Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Eclipse Help System in RAP Basics?
Eclipse Help System in RAP Basics? [message #118704] Mon, 19 January 2009 13:40 Go to next message
Bastian is currently offline BastianFriend
Messages: 7
Registered: July 2009
Junior Member
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 15:39 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
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 #119029 is a reply to message #118743] Wed, 21 January 2009 16:17 Go to previous messageGo to next message
Bastian is currently offline BastianFriend
Messages: 7
Registered: July 2009
Junior Member
Hello,
I knew this tutorial, thanks. Finally I made it run (after I had a messed
up target platform several times).

Is this the only way to implement help, via actions?
At the moment I try to realize it as a command, for coding convention
reasons.

So it seems to me that there is no official way to add the help
functionality via command, like
<command commandId="org.eclipse.ui.help.helpSearch"
style="push"></command>

As far as I understood this i got to register the help command in the
ApplicationActionBarAdvisor and define it with the
ActionFactory.HELP_CONTENTS.create(window) action.

To get it right: I got to register an action similar to the action which
was defined in the example instead of the basic
"org.eclipse.ui.help.helpSearch". Is this correct?

Thanks a lot, Bastian
Re: Eclipse Help System in RAP Basics? [message #119081 is a reply to message #119029] Thu, 22 January 2009 08:19 Go to previous message
Bastian is currently offline BastianFriend
Messages: 7
Registered: July 2009
Junior Member
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.
Previous Topic:Workbench won't open with current CVS HEAD (19.01.2009 14:29 gmt+1)
Next Topic:Defining an extension point in a RAP app and using it
Goto Forum:
  


Current Time: Fri Nov 08 23:36:30 GMT 2024

Powered by FUDForum. Page generated in 0.02728 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top