Page 1 of 1

How to display a help page inside a plugin?

Posted: Tue 4. Aug 2015, 21:03
by fausto
Hi folks

How can one implement functionality to display a custom help page when the '?' icon in the header plugin is clicked?

In the developer's tutorial the section"Adding a help page ("http://www3.math.tu-berlin.de/jreality/ ... &redlink=1) is not available.

Also, I saw that the demo app "Schatz Cube" (http://page.math.tu-berlin.de/~gunn/web ... zCube.jnlp) can display a help page when clicking in the '?' icon in the plugin header. It would be great if I could read the source code to learn how this is done, but it is not available. If anyone has it could you please share it?

Thanks a lot!

Re: How to display a help page inside a plugin?

Posted: Wed 9. Mar 2016, 20:12
by MarcelP
For example in the ContentAppearance plugin you can find this:

@Override
public PluginInfo getPluginInfo() {
PluginInfo info = new PluginInfo();
info.name = "Content Appearance";
info.vendorName = "Ulrich Pinkall";
info.icon = ImageHook.getIcon("lupeblau.png");
return info;
}

@Override
public String getHelpDocument() {
return "ContentAppearance.html"; // this is the help page written in html.
}

@Override
public String getHelpPath() {
return "/de/jreality/plugin/help/"; // This is the location of the ContentAppearance.html folder
}

@Override
public Class<?> getHelpHandle() {
return getClass();
}