[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.ua] Re: Questions about standalone context help

Hi all:

The original thread quoted didn't show up in my post, the link is:

http://www.eclipse.org/newsportal/article.php?id=158&group=eclipse.platform.ua

To be sure that the "nothing happens when Help.displayContext()" was not a problem with my help plugin I tried it with a help plunin from Eclipse.

1. I borrowed the plug-in library.doc from http://www.eclipse.org/articles/article.php?file=Article-DynamicCSH/index.html

2. I unzipped eclipse-platform-3.4.2-win32.zip into C:\x937standalone. That resulted into C:\x937standalone\eclipse etc.

3. I copied library.doc plug-in into C:\x937standalone\eclipse\plugins

4. This is a test program:

package tests;

import org.eclipse.help.standalone.Help;

public class Test2 {


static public void main( String[] args ) {

/*
* Create an array of String objects containing options that you want to * pass to help system support. Typically, the eclipsehome option is needed. */
String[] options = new String[] { "-eclipsehome", "c:\\" + System.getProperty("eclipsehome") +"\\eclipse" };
/*
* In your application, create an instance of the Help class by passing in * the options. This object should be held onto until the end of your * application. */
Help helpSystem = new Help(options);
try {
helpSystem.start();
helpSystem.displayHelp(); Thread.sleep(20000);
System.out.println("Context defaultLibraryId");
helpSystem.displayContext("library.doc.defaultLibraryId", 100, 100); Thread.sleep(10000);
System.out.println("Context libraryBookId");
helpSystem.displayContext("library.doc.libraryBookId", 100, 100); Thread.sleep(10000);
helpSystem.shutdown();
} catch (Exception e) {
e.printStackTrace();
try {
helpSystem.shutdown();
} catch (Exception e1) {
System.out.println("Cant shutdown Help");
e1.printStackTrace();
}
}


	}
}

The class was copied into C:\x937standalone\tests

5.  The cmd to test the program is:

@java -cp ;c:/x937standalone/eclipse/plugins/org.eclipse.help.base_3.3.103.v20090128_34x.jar -Declipsehome=x937standalone tests.Test2

current directory is C:\x937standalone


The result is:
- standalone help is shown for 20 seconds. The TOC contains the user documentatoin from eclipse and the library documentation from library.doc. It works as expect.
- after 20 seconds the console shows Context defaultLibraryId and there is no change in the Help GUI.
- after 10 seconds the console shows Context libraryBookId and there is no change in the Help GUI.
- after 10 seconds the GUI closes.


No exceptions reach up to the main() method. There are no log files in configuration or .metadata.

This is the same result as I get using my help plugin.

What am I missing in my test program?

What should happen when displayContext() is called?

Thank you for reading, I hope you can help.

Bill Blalock