User Tools

Site Tools


java:infocenter

InfoCenter -- Four and final attempt

Eventually I've found the steps for getting the eclipse infocenter as an standalone application.

Step 1: download the file of this guy

This guy:

http://www.ipov.net/apps/blog/2011/01/eclipse-infocenter-help-as-web-app/

have done all the staff of isolating the infocenter as an standalone application for us. So the only thing we have to do is download the jar file who has provided and install it in a tomcat directory.

Then we have to start tomcat and point our browser to http://localhost:8080/infocenter/index.jsp: in my case I've installed the contents of the war file in the directory infocenter.

Step 2: Adding your onw data to the existing data

The help documentation is stored with the plugin information, under WEB-INF/plugins. The infocenter software scans all the plugins for a file called plugin.xml and use the information stored in it to display one of the contents.

Adding our own content is easy:

3.1 Move to the plugins directory (in my case TOMCAT_HOME/webapps/infocenter/WEB-INF/plugins) and create a directory for your contents:

$ mkdir com.supermanhamuerto.doc-1.0.0

I've called this directory upon this website, but you can pick up whatever name you want.

3.2 Create a plugin.xml file with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<plugin 
   name="La tortilla de patatas, ese desconocido" 
   id="com.supermanhamuerto.doc"
   version="1.0.0" 
   provider-name="Superman Ha Muerto" >
   <extension point="org.eclipse.help.toc">
      <toc file="toc.xml" type="toc" primary="true" />
   </extension>
</plugin>

Of course, the values “name”, “id”, “version”, etc. can be configured with your own values.

3.3 create this toc.xml file referred in the previous section. I've put the following content:

<?xml version="1.0" encoding="UTF-8"?>
<toc label="La tortilla de patatas" href='toplevel.html'>
  <topic label="Section 1" href="section1.html"/>
</toc>

Obviously, it can be more complex: http://www.gulfsoft.com/blog_new/index.php?name=News&file=article&sid=429

3.4 And finally provide this toplevel.html and section1.html elements. They are usual html pages.

My directory has the following files:

~/tmp/eclipse-juno/plugins/com.supermanhamuerto.doc_1.0.0$ ls
plugin.xml  section1.html  toc.xml  toplevel.html

After this, just wait until tomcat rescans the application or simply restart tomcat again: when it's done, the infocenter will index the new content and it will appear again.

You should see your new content by refreshing the browser:

~~DISQUS~~

java/infocenter.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1