Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Help system in pure e4 application
Help system in pure e4 application [message #1699736] Fri, 26 June 2015 09:43 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
The eclipse help system is still bound to the old workbench and cannot be used in a pure e4 application. For the purpose of an rcp app we just needed a way to display the help application in a separate browser. This is easy to accomplish in a pure e4 app. Here is how:

I startet with a pure e4 rcp app based on the features org.eclipse.e4.rcp, o.e.emf.common and o.e.emf.ecore.

In order to use the help app I had to add the following bundles:

         org.eclipse.help
         org.eclipse.help.webapp
         org.eclipse.help.base
         org.apache.lucene.analysis
         org.apache.lucene.core
         org.eclipse.core.net
         org.eclipse.equinox.security
         org.eclipse.equinox.security.macosx (for macosx only)
         javax.servlet
         javax.servlet.jsp
         javax.el
         org.eclipse.equinox.http.registry
         org.eclipse.equinox.jsp.jasper.registry
         org.eclipse.equinox.jsp.jasper
         org.apache.jasper.glassfish
         org.eclipse.equinox.http.jetty
         org.eclipse.equinox.http.servlet
         org.eclipse.jetty.continuation
         org.eclipse.jetty.http
         org.eclipse.jetty.io
         org.eclipse.jetty.security
         org.eclipse.jetty.server
         org.eclipse.jetty.servlet
         org.eclipse.jetty.util


None of these have dependencies to org.eclipse.ui or any other 3.x stuff.

The Help Contents menu item is handled by the following:


package ch.arenae.anm.handler;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.server.WebappManager;

public class HelpContentsHandler {
    @Execute
    public void execute() throws Exception {
        BaseHelpSystem.ensureWebappRunning();
        String helpURL = "http://" //$NON-NLS-1$
                + WebappManager.getHost() + ":" //$NON-NLS-1$
                + WebappManager.getPort() + "/help/index.jsp"; //$NON-NLS-1$
        BaseHelpSystem.getHelpBrowser(true).displayURL(helpURL);
    }

}


For us, this is enough. But I think it could be easily enhanced to open a specific topic.

HTH
Peter
Re: Help system in pure e4 application [message #1700113 is a reply to message #1699736] Tue, 30 June 2015 08:39 Go to previous messageGo to next message
Michel Simeon is currently offline Michel SimeonFriend
Messages: 128
Registered: December 2009
Senior Member
Thank you for this very interesting post. Could you go one step further and clarify the nature of your so-called help system. In Eclipse 3 I have an help system made of xml and html files, whereas your example refers to 'index.jsp'.

Thanks for your help
MS
Re: Help system in pure e4 application [message #1700128 is a reply to message #1700113] Tue, 30 June 2015 10:37 Go to previous messageGo to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
It's the same system as in eclipse 3.x. It serves the help content contributed through the extension points org.eclipse.help.toc and org.eclipse.help.contexts. The help system is a web application with index.jsp as an entry point (this is unchanged from eclipse 3.x).
Re: Help system in pure e4 application [message #1700299 is a reply to message #1700128] Wed, 01 July 2015 14:37 Go to previous messageGo to next message
Michel Simeon is currently offline Michel SimeonFriend
Messages: 128
Registered: December 2009
Senior Member
Thank for the quick feed-back. I'll try it out !!!

MS
Re: Help system in pure e4 application [message #1700477 is a reply to message #1700299] Thu, 02 July 2015 19:29 Go to previous messageGo to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 184
Registered: July 2009
Senior Member
Am 01.07.2015 um 16:37 schrieb Michel Simeon:
> Thank for the quick feed-back. I'll try it out !!!
>
> MS

Hi all,
just for completeness: There are some bug reports regarding the new
EHelpService:

- https://bugs.eclipse.org/bugs/show_bug.cgi?id=458829
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=457391
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=445600

The bugs are closed, but I think these are only some workarounds.
Personally I prefer also a "plain" E4 solution. But this could be a very
time consuming process since you have to re-implement the whole help
system. IIRC there was a proposal for this which stated the use of
docbook as source for the help files (but I can't find it anywhere).
As I also need a clean solution for this problem I could imagine to take
part on the discussion for it.

Greets,
Ralf.
Re: Help system in pure e4 application [message #1748349 is a reply to message #1700477] Tue, 22 November 2016 11:55 Go to previous messageGo to next message
Joe Fernandez is currently offline Joe FernandezFriend
Messages: 27
Registered: November 2014
Junior Member
Peter

Your solution works for me and is very useful.

How did you find out the details? And is there a way to do Welcome/Intro?

Thank you.
Re: Help system in pure e4 application [message #1748397 is a reply to message #1748349] Tue, 22 November 2016 17:56 Go to previous message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
Sorry, I don't know about welcome or intro. I got this solution by looking at the source of the working e3 implementation, I think.
Previous Topic:Multi-Lined TrimBar
Next Topic:Part not displayed on exported product
Goto Forum:
  


Current Time: Sat Nov 25 00:26:25 GMT 2017

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

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