Eclipse Help System in RAP Basics? [message #118704] |
Mon, 19 January 2009 08:40  |
Eclipse User |
|
|
|
Hello,
I am new on Eclipse RCP / RAP and the toppic Eclispe Help System.
To learn how Eclipse Help System works I used the following website:
http://www.eclipse.org/articles/article.php?file=Article-Add ingHelpToRCP/index.html
I also was able to add the Help System into an already existing RCP
application, so I think I understood the basics of the Help System.
Next issue is to implement Eclipse Help System into an already existing
RAP application.
I have an already configured and running simple RAP application, where I
wanted to add the normal "Help Contents" menu.
- I added the help Menu in my extensions.
- The I added the org.eclipse.help.ui and org.eclipse.help.apperver to my
plugindependencies and my run configuration.
- After that I wanted to register my Help menu in the source code (class
ApplicationActionBarAdvisor method "makeActions" just as follows:
...
IWorkbenchAction helpContent = ActionFactory.HELP_CONTENTS.create(window);
register(helpContent);
...
The problem:
I get a compile error, becaus ActionFactory.HELP_CONTENTS cannot be
resolved.
So I checked the plugin.xml file.
Finally I found out, that the compile error disappears, when I use the
org.eclipse.help.ui bundle at first position in the Dependencies (and
wondered that I was not able to import org.eclipse.ui.workbench, which
should contain the class ActionFactory.).
So I started my application. When I wanted to request my application I get
an error which has nothing to do with the help system at all:
-----------------------------
Exception in thread "Thread-9" java.lang.ClassCastException:
one.of.my.bundles.Perspective
at
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(PerspectiveDescriptor.java:171)
at
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:696)
at
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:258)
at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:146)
at
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1537)
at org.eclipse.ui.internal.WorkbenchPage.init(WorkbenchPage.jav a:2318)
at org.eclipse.ui.internal.WorkbenchPage.<init>(WorkbenchPage.java:552)
at
org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(Workben chWindow.java:732)
at
org.eclipse.ui.internal.Workbench$20.runWithException(Workbe nch.java:1023)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3659)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3296)
at
org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:797)
at
org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:1342)
at
org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.j ava:152)
at
org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchroniz er.java:118)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4097)
at
org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThreading.java:94)
at org.eclipse.ui.internal.Workbench.init(Workbench.java:1337)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2319)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at one.of.my.bundles.Application.createUI(Application.java:43)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:228)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:116)
at java.lang.Thread.run(Thread.java:595)
-----------------------------
My questions:
- Does anyone know what this exception means?
- Why is the order of the bundles in the Dependencies important? I
presumed that linear class paths are past with the equinox framework?
- Are there any restrictions for Eclipse Help Systems in RAP ontext? I
read in this group, that context sensitive help and search is not
supported. Is this right? If yes, is there any alternative?
Thank you,
Bastian
|
|
|
Re: Eclipse Help System in RAP Basics? [message #118743 is a reply to message #118704] |
Mon, 19 January 2009 10:39   |
Eclipse User |
|
|
|
Bastian,
context sensitive help is not yet supported in RAP. What works is
running RAP with the Eclipse help web-app and showing help content
provided there.
Search this newsgroup for "help" to find more information. This
posting also contains a working example:
http://dev.eclipse.org/newslists/news.eclipse.technology.rap /msg04903.html
HTH
Rüdiger
Bastian wrote:
> Hello,
> I am new on Eclipse RCP / RAP and the toppic Eclispe Help System.
>
> To learn how Eclipse Help System works I used the following website:
> http://www.eclipse.org/articles/article.php?file=Article-Add ingHelpToRCP/index.html
>
>
> I also was able to add the Help System into an already existing RCP
> application, so I think I understood the basics of the Help System.
>
> Next issue is to implement Eclipse Help System into an already existing
> RAP application.
> I have an already configured and running simple RAP application, where I
> wanted to add the normal "Help Contents" menu.
>
> - I added the help Menu in my extensions.
> - The I added the org.eclipse.help.ui and org.eclipse.help.apperver to
> my plugindependencies and my run configuration.
> - After that I wanted to register my Help menu in the source code (class
> ApplicationActionBarAdvisor method "makeActions" just as follows:
> ...
> IWorkbenchAction helpContent = ActionFactory.HELP_CONTENTS.create(window);
> register(helpContent);
> ...
>
> The problem:
> I get a compile error, becaus ActionFactory.HELP_CONTENTS cannot be
> resolved. So I checked the plugin.xml file.
> Finally I found out, that the compile error disappears, when I use the
> org.eclipse.help.ui bundle at first position in the Dependencies (and
> wondered that I was not able to import org.eclipse.ui.workbench, which
> should contain the class ActionFactory.).
> So I started my application. When I wanted to request my application I
> get an error which has nothing to do with the help system at all:
>
> -----------------------------
> Exception in thread "Thread-9" java.lang.ClassCastException:
> one.of.my.bundles.Perspective
> at
> org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(PerspectiveDescriptor.java:171)
>
> at
> org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:696)
>
> at
> org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:258)
>
> at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:146)
> at
> org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1537)
>
> at org.eclipse.ui.internal.WorkbenchPage.init(WorkbenchPage.jav a:2318)
> at org.eclipse.ui.internal.WorkbenchPage.<init>(WorkbenchPage.java:552)
> at
> org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(Workben chWindow.java:732)
>
> at
> org.eclipse.ui.internal.Workbench$20.runWithException(Workbe nch.java:1023)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
>
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3659)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3296)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:797)
>
> at
> org.eclipse.ui.internal.Workbench$25.runWithException(Workbe nch.java:1342)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
>
> at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.j ava:152)
> at
> org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchroniz er.java:118)
> at org.eclipse.swt.widgets.Display.syncExec(Display.java:4097)
> at
> org.eclipse.ui.internal.StartupThreading.runWithoutException s(StartupThreading.java:94)
>
> at org.eclipse.ui.internal.Workbench.init(Workbench.java:1337)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2319)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at one.of.my.bundles.Application.createUI(Application.java:43)
> at
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
>
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:228)
>
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:116)
>
> at java.lang.Thread.run(Thread.java:595)
> -----------------------------
>
> My questions:
> - Does anyone know what this exception means?
> - Why is the order of the bundles in the Dependencies important? I
> presumed that linear class paths are past with the equinox framework?
> - Are there any restrictions for Eclipse Help Systems in RAP ontext? I
> read in this group, that context sensitive help and search is not
> supported. Is this right? If yes, is there any alternative?
>
> Thank you,
> Bastian
>
|
|
|
|
Re: Eclipse Help System in RAP Basics? [message #119081 is a reply to message #119029] |
Thu, 22 January 2009 03:19  |
Eclipse User |
|
|
|
Finally it worked just the way, which is described in my last posting.
My conclution is that help in RAP has to be done this "workaround" way,
and that the help system, known from RCP can not be used for both - RAP
and RCP.
|
|
|
Powered by
FUDForum. Page generated in 0.03570 seconds