sebb 2003/10/07 18:04:00
Modified: src/core/org/apache/jmeter/gui/action Help.java
Log:
Export HELP_PAGE for use by FunctionHelper; try to fix up so that HTML works after
using setText(). More todo...
Revision Changes Path
1.16 +11 -4 jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Help.java
Index: Help.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/gui/action/Help.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Help.java 6 Oct 2003 13:59:41 -0000 1.15
+++ Help.java 8 Oct 2003 01:04:00 -0000 1.16
@@ -23,7 +23,7 @@
public final static String HELP = "help";
private static Set commands = new HashSet();
- private static String helpPage =
+ public static final String HELP_PAGE =
"file:///"
+ JMeterUtils.getJMeterHome()
+ "/printable_docs/usermanual/component_reference.html";
@@ -41,8 +41,8 @@
helpDoc.setEditable(false);
try
{
- helpDoc.setPage(helpPage);
- currentPage = helpPage;
+ helpDoc.setPage(HELP_PAGE);
+ currentPage = HELP_PAGE;
}
catch (IOException err)
{
@@ -79,7 +79,7 @@
}
else
{
- resetPage(helpPage);
+ resetPage(HELP_PAGE);
helpDoc.scrollToReference(
GuiPackage
.getInstance()
@@ -94,6 +94,13 @@
{
if (!currentPage.equals(source))
{
+ if (currentPage.length()==0){
+ helpDoc = new HtmlPane();// setText seems to mangle the old one
+ scroller.setViewportView(helpDoc);
+ helpDoc.setEditable(false);
+ //TODO: still does not recover completely, but is
usable
+ // and unlikely to be needed now that HELP_PAGE is
shared string
+ }
try
{
helpDoc.setPage(source);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]