IllegalArgumentException when using FXML - tornadofx

I've been following along the TornadoFX guide for using FXML (https://github.com/edvin/tornadofx/wiki/FXML), but am getting a error:
java.lang.IllegalArgumentException: FXML not found for class ui.view.BoardView
Here's my BoardView.kt view:
class BoardView : View() {
override val root: BorderPane by fxml()
val hello: Label by fxid()
init {
hello.text = "Hello World"
}
}
And here's the FXML file (in the same package, ui.view)
*
<BorderPane xmlns="http://javafx.com/javafx/null" xmlns:fx="http://javafx.com/fxml/1">
<padding>
<Insets top="20" right="20" bottom="20" left="20" />
</padding>
<center>
<HBox alignment="CENTER" spacing="10">
<Label fx:id="hello">
<font>
<Font size="20"/>
</font>
</Label>
</HBox>
</center>
</BorderPane>
Here's the full stack trace if it helps:
java.lang.IllegalArgumentException: FXML not found for class ui.view.BoardView
at tornadofx.UIComponent$fxml$1.<init>(Component.kt:360)
at tornadofx.UIComponent.fxml(Component.kt:353)
at tornadofx.UIComponent.fxml$default(Component.kt:353)
at ui.view.BoardView.<init>(BoardView.kt:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at java.lang.Class.newInstance(Class.java:442)
at tornadofx.FXKt.find(FX.kt:238)
at tornadofx.App.start(App.kt:29)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$163(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$149(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
I've tried giving arguments to fxml(), from "BoardView" to "BoardView.fxml" to moving the fxml file into src/main/resources. I couldn't see anything obvious looking at the Component.kt source file.
Thanks for any help you can give me.

Short answer first: Put the file in src/main/resources/ui/view/BoardView.fxml and don't supply a path parameter to the fxml() call.
If you are using Maven, it will not copy fxml files in src/main/java to the target directory by default, so even if you have the fxml file in the same package it will not be available unless you instruct Maven to copy resources with .fxml extension.
I recommend that you put it in src/main/resources instead, but remember that it also has to be in the same package there, so the correct path would be src/main/resources/ui/view/BoardView.fxml.
Alternatively, if you put it directly in src/main/resources you must add this path parameter to the fxml delegate:
override val root : BorderPane by fxml("/BoardView.fxml")
Note the / prefix to make it look in the root of the classpath.
A good tip would be to compile the project and look in the output folder (target by default for Maven projects) and check that the fxml file is in the location you expect.

Related

How to create Orbeon custom control XBL with predefined visibility, control name, default value?

I have created a custom control (hidden text box with some predefined value), where I want to set visibility=false(), controlName="Mycustom", default value="This is my custom control" in XBL file. So that whenever we use that custom control from Orbeon Form Builder, it will come with all default values with no need to set anything.
XBL:
<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl">
<metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
<display-name lang="en">Epson Custom Controls</display-name>
</metadata>
<xbl:binding id="fr-custom" element="fr|custom" >
<metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
<display-name lang="en">My Custom Control</display-name>
<icon lang="en">
<small-icon>/forms/orbeon/builder/images/input.png</small-icon>
<large-icon>/forms/orbeon/builder/images/input.png</large-icon>
</icon>
<templates>
<bind xxf:whitespace="trim"/>
<view>
<xf:input id="myCustom" ref="" xmlns="">
<xf:label>My Custom lable</xf:label>
<xf:hint ref=""/>
<xf:help ref=""/>
<xf:alert ref=""/>
</xf:input>
</view>
</templates>
</metadata>
</xbl:binding>
</xbl:xbl>
Using above control I want hidden text box with value='This is my custom control' and its control name should be Mycustom.
Update
I have tried with below changes, but it is not working
<templates>
<bind xxf:whitespace="trim" relevant="false()" xxf:default="'This is my custom control'"/>
<view>
<xf:input id="myCustom" ref="" xmlns="">
<xf:label>Success Message</xf:label>
<xf:hint ref=""/>
<xf:help ref=""/>
<xf:alert ref=""/>
</xf:input>
</view>
</templates>
With above changes now its working (control is hidden with some default value).
Can you please let me know how to put if condition
properties-local.xml:
<property as="xs:string" name="oxf.fr.detail.process.save-final-custom.*.*">
require-uploads
then validate-all
then save
if({xxf:instance('fr-form-instance')//customMessage} != null)
{
then success-message(message = "{xxf:instance('fr-form-instance')//customMessage}")
}
recover error-message("database-error")
</property>
Here I want to override this success-message if it properly configured from backed. If it's value is null then want to show OOTB message(don't override).
Update2
Integrated changes in Hybris. below are the changes I have made in Hybris
Create XBL > orbeon > custom > custom.xbl
<bind xxf:whitespace="trim" relevant="false()" xxf:default="'This is my custom control'"/>
Issue :- When we select custom control, it will bind without any lable/message/visibility etc. But if I refresh left control panel then label start appearing on the form. but still default message is not set.
Let's take the items you mentioned one by one:
visibility="false()" – I imagine you're referring to the relevant attribute in XForms, instead of the visibility attribute. (Form Builder calls this "visibility", because this is what it is, but in XForms, the attribute is relevant.) This can be done by having inside the <templates> a <bind relevant="false()"/>.
controlName="Mycustom" – You can't set the id of the control in XBL. (BTW, when using Form Builder, the XForms id is inferred from the control name defined by the form author in Form Builder.) The id is set by whoever uses the control, not whoever defines it, otherwise, for one, this would prevent you from having multiple instances of that control in the form.
default value="This is my custom control" – As in #1 above, you can do this with <bind xxf:default="'This is my custom control'">. Note the added single quotes, as the value of xxf:default is an XPath expression.

Getting Menu Inheritance to Work in a Multi-Module Maven Site

I have a question about constructing a Maven site with a parent POM file and sub-modules. I am having trouble getting relative links in inherited module sites to work when the menu is inherited from a parent POM.
I have a project structure as follows:
modules/pom.xml
parent/
module1/
module2/
etc.
So with this configuration I end up with a site that looks like:
base-site/
module1/
module2/
The reactor build from modules/pom.xml generates the top-level website, and each of the modules also has a site generated.
Each of the modules inherits this site.xml file from the parent (for example):
<project>
<body>
<menu name="Module" inherit="top">
<item name="Summary" href="./project-summary.html"/>
</menu>
<menu name="Module" ref="reports" inherit="bottom" />
</body>
</project>
The menu referencing the standard Maven generated "reports" works fine.
But the href to project-summary.html ends up pointing back at the top site and not the child.
I have seen some similar issues on Stackoverflow having to do with constructing an inherited menu, but I did not find exact information on how to get these links to point to content in the child site and not the parent. It may be possible that I am misunderstanding what the menu inheritance is supposed to accomplish here.
Basically, I want the menu links to generated content in the child sites to look like:
<item name="Summary" href="./module1/project-summary.html"/>
Okay, so I thought, let me try to use filtering to accomplish this like from my parent POM using something like:
<item name="Summary" href="./${project.artifactId}/project-summary.html"/>
But that does not work because the parent POM's name gets substituted here instead of the child project's name.
In this case, perhaps I need site a custom site.xml for each module, but I would like to avoid this as there are something like 15 of them, and they will mostly be identical in terms of sharing about 8 or 9 different (relative) menu links. Most projects would not need their own site.xml file. So ideally I'd like the parent to define all the defaults with the child POMs adding a few additional menus.
In order to do this, am I stuck with using the "reports" ref and its default layout? Or can I list these explicitly as menu items in the parent's site.xml file and get those references to work somehow?
I hope that's clear. Thanks.
I've the same need as you.
I'll use the gmaven-plugin with a script (during the generate resource phase) that iterates in parent and copy src/site/site.xml in the current project if any.
Here's my script (Here's I'm just copying a parent site.xml file if a 'readme.md' file is present on the module):
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>execute</goal>
</goals>
<phase>pre-site</phase>
</execution>
</executions>
<configuration>
<scripts>
<script> <![CDATA[
import java.io.BufferedWriter
import java.io.File
import java.nio.charset.Charset
import java.nio.file.StandardCopyOption
import java.nio.file.Files
import java.nio.file.StandardOpenOption
String siteXmlPath = "src/site/site.xml"
String readme_file = "readme.md"
String currentPath = "${project.basedir}"
if (new File(currentPath + "/" + readme_file).exists() && !(new File(currentPath + "/" + siteXmlPath).exists())) {
while (!(new File(currentPath + "/" + siteXmlPath).exists())) {
currentPath = currentPath + "/.."
if (new File(currentPath + "/" + siteXmlPath).exists()) {
Files.copy(new File(currentPath + "/" + siteXmlPath).toPath(), new File("${project.basedir}/" + siteXmlPath).toPath(), StandardCopyOption.REPLACE_EXISTING)
File newlyCreatedFile = new File("${project.basedir}/" + siteXmlPath)
BufferedWriter newFileWriter = Files.newBufferedWriter(newlyCreatedFile.toPath(), Charset.defaultCharset(), StandardOpenOption.APPEND)
newFileWriter.append("<!-- #generated -->")
newFileWriter.close()
} else if (!(new File(currentPath + "/pom.xml").exists())) { break; }
}
} ]]>
</script>
</scripts>
</configuration>
</plugin>
Regards

Module not working in joomla 3.0

problem is self made module not working- I make my self made module in Joomla 3.0. I made a mod_products folder here we created a file called mod_products.php.
mod_products.php - code
defined('_JEXEC') or die;
require_once __DIR__ . '/helper.php';
$value = modProductsHelper::getproducts( $params );
require JModuleHelper::getLayoutPath('mod_products', $params->get('layout', 'default'));
and after it I made second file helper.php code -
class modProductsHelper{
public static function getProducts( $params ){
return 'Products';
}
}
and third one is default.php
<?php
defined('_JEXEC') or die;
if($value!='') { ?>
<ul style="margin-left: 0px;" class="clients-list slides-list slide-wrapper">
<li class="slide">
<div class="product-image"><img src="images/product3.png" width="181" height="177"></div>
</li>
</ul>
<?php } ?>
Then we install through administrator panel and gave a position to the mod_products module and display in index.php file like so:
<div class="grid_12 product_home">
<jdoc:include type="modules" name="position-3" />
</div>
But it's not being displayed on the site. Does anyone have any idea why?
Edit:mod_products.xml
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.0" client="site" method="upgrade">
<name>mod_products</name>
<author>Joomla! Project</author>
<creationDate>July 2004</creationDate>
<copyright>Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin#joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>MOD_PRODUCTS_XML_DESCRIPTION</description>
<files>
<filename module="mod_products">mod_products.php</filename>
<folder>tmpl</folder>
<filename>helper.php</filename>
<filename>mod_products.xml</filename>
</files>
<config>
</config>
</extension>
Right, I've created a small example for you. I think it might have been due to you calling the wrong module layout, not entirely sure.
Here is a link to download the module. Uninstall the current module you're using via the Joomla backend and install this:
http://www.mediafire.com/download/ucp3prv219430zl/mod_products.zip
Also, don't forget to assign the module to a menu item. That might have been the problem before
Enjoy
For me it seems your problem is module name.In some places you have used mod_product and in other places mod_products Please make sure you use only one.I will suggest you to change
require JModuleHelper::getLayoutPath('mod_products', $params->get('layout', 'default'));
to
require JModuleHelper::getLayoutPath('mod_product', $params->get('layout', 'default'));
Also check that you have published the module and also test it for all pages.

JavaFX: Embedding encoded image in .FXML file

I would like to embed an encoded image into an FXML (i need this in that I'm coding a converter between svg and fxml).
I tried with this:
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" layoutX="153.0" layoutY="94.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYEAYAAACw5+G7AAAABmJLR0T///////8JWPfcAAAA CXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAYAAAAGAB4TKWmAAAI1UlEQVRYw61YS4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ezQ8JjTUlJ+FsIwTBMQQkoSHYk5zh6apmlKAbpO67HhsWFC0LVtp1L5PNDr9XrtNqCUZY2N Af1+rXb5MsC5UrZN30kkgOnpfH5ycoRy8Y/ZWeo9XJdzpYBCYdeu/fupDihFBpD4yJNxtogB MsZYbGicRWiWcnRfvC5lJjMzAwBKSQkopZRhAI6zuVkqAcXi0tL588D8/D337N0L+D4lkGw2 k6HO4G8Ahk0SNWUTE3fdtXs3oFQ2Oz8PBEEUUV4misSejimkaYYRAzUMQEqaY0/HAHSdOC8E JY8goN5L0+hEd+3amTM//wyY5sTE3XcD/b7nCUEHpOnpW7vRW5qAQoFORrVao9HpANnsli17 9wKDAR1EHIfOCYah61T6yTAhYmDDCBClqNfRNF3XdaKUUiRC6oWo8p87d/LksWNAq9XvRxHg OIZBVKFWw7ZtezRb3hZAfIKani4U8nng+vUgME3A88bHd+wAVlZ6PaWAy5fL5XYbcJzBgAoW Y2FInyONxE0aaccwbDuVogIURcDS0rlzv/0G/PDDiRPHjwOLi+Wy4wCDgaZNTgJjY4mEZQHZ bDabTuO247bH6RjI9u1bt87PEzWkBNbWqOlbXS2VlpeBzc0w9DxgYqLbbTYByzLNdhswDCnj dCsl4PvVar0OuK7nUb0ZDACgWh0MDIN6r/l5YM+ehx568MEhgDuNf32ov3jx0qWrV4FisVQa bSFmZ6em0mlgbq5QKBTI84kEUC4Xi6USsLFRrzebQ63Nzs7MFApAPj85mc1SZb7T2eI/Afj7 iHf7vu8HAdDtUr/vODeaLY1zzgHTVMo0qXeiyFCd+K9/q/wJwRXXOxs1rPEAAAAASUVORK5C YII= " preserveRatio="false" smooth="false" />
</image>
</ImageView>
</children>
</AnchorPane>
As you can see I used the standard way I would do with HTML or CSS, passing a data url with the Base64 encoding of the image.
In this case it does not return any error, but the image is not displayed (passing a url to the same image as a file works, but this is not what I want).
Can somebody help me?
Thank you very much!
I was able to do this but not in FXML
String rocketImgStr = "iVBORw0KGgoAAAANSUhEUgAAADIAAAAdCAYAAADox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Ym2kqCSb934H4PjAiOf7lfF+/zMAVaPsnAfVjSoAAAAASUVORK5CYII=";
BASE64Decoder base64Decoder = new BASE64Decoder();
ByteArrayInputStream rocketInputStream = new ByteArrayInputStream(base64Decoder.decodeBuffer(rocketImgStr));
Image rocketImg = new Image(rocketInputStream);
Hope that helps.
If you look at the String for the url attribute of the Image in the question, you can see that it has spaces in it, so it is not well-formed.
However, in another provided answer, there is an Image URL string encoding that has no spaces in it and is well formed.
If the corrupted Image URL string from the question is replaced with the correctly encoded value, then the image will be displayed (otherwise the image display will silently fail).
This is quite an old question (ten years), so it is possible that originally this feature was not supported and the image URL decoding support was added to JavaFX in a relatively recent release. For instance, support for data URL encoding of CSS stylesheets was only added in the JavaFX 17 release. And earlier Image javadoc than JavaFX 17 does not mention the feature.
From the Image javadoc:
The RFC 2397 "data" scheme for URLs is supported in addition to the
protocol handlers that are registered for the application. If a URL
uses the "data" scheme, the data must be base64-encoded and the MIME
type must either be empty or a subtype of the image type.
Example App
ImageScene.fxml
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.image.Image?>
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" layoutX="153.0" layoutY="94.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAdCAYAAADoxT9SAAAACXBIWXMAAAsYAAALGAGJqbUQAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAiz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X4TiQSxWIzBwUFM05ywGWVZpqSkBF3XJwRjmiZz587l/vvvZyAWI5tJM1UBI5XCMAzWrl1LdXX1BDbGS8vKBxrOs3IPDLwEd4+CmMyBqKqqOuagGl9P6bpOUVFRAdT41TVNk/nz5xOJROjp6WF4eJiysjJmzZqFoihkL5JqRZ6JkjwTbwKPw+4+WAN0Xc7Jfqq9vd0uLi5WSktLUVUVVVULwUqSRDqd5sSJE3g8HrxeL5qm4XK5CswJITBNE6/XS0NDA7IsY9s2pmletPYSeQnVAfuBJyC5DZ5npA9fbony+z179vR1dnY2RSKRm1VVDbrdbkpLS0mn0xiGUaiCc7kcyWQSRVFwuVwFQKPgFUXBNE1kWS6wey7YcySArutoLhc9wE6wW+C1QVgP/POLuFjVAysjkchtNy5Z0nDd4sXuSCRCSSCA7DiYeTCjJc1ocJIkFYKXZRlFUcY8jwIdLfVTqRQdnZ38at269CddXW+nYTOw60rdEF9eJUk/9NfWojU0MHPBAmbX1VE1fTo+nw+Xy1WQn+M4E4CNgnAch2w2Szwep6enh48++shsb2/f393d/RfgT3l358rd2efBlpegzgaOAgeAFrf7pF5Zua+6qmpmKBQqr6io0MvKyhS/34/H40FRFGzbLtxPTp06Zff39yd7e3ujvb29B2Ox2F7gQ2BfPjldORflKrh5Fdz0GGiVQDy/yf4M/AieMUdclKnAVee4KMVAUT6DOvlD+QwwCAzkXZQk/2M7r6+lQIUONVOhugZqZkPoenBfD1SOm+B1YA109H/JvtYYp3EmiCYQm0F8COIzELlxTmMCxGEQr4JohKzvK+Q0TvB+AxAphppiKC+CYm2kqCSb934H4PjAiOf7lfF+/zMAVaPsnAfVjSoAAAAASUVORK5CYII=" preserveRatio="false" smooth="false" />
</image>
</ImageView>
</children>
</AnchorPane>
ImageDataApp.java
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class ImageDataApp extends Application {
#Override
public void start(Stage stage) throws Exception {
FXMLLoader loader = new FXMLLoader(
ImageDataApp.class.getResource(
"ImageScene.fxml"
)
);
stage.setScene(
new Scene(
loader.load()
)
);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Side note for IntelliJ users
My IDE (Idea 2022.1.2), in the editor, highlights the URL image string in red and indicates that it is a malformed file path, but that is misleading and a shortcoming of the IDE. The IDE does not understand the correctly encoded image data URLs in FXML. The program will execute fine despite the IDE highlighting error.

Eclipse Contextual Help

Now can I register contextual help in an Eclipse WizardDialog/Editor.
1) I created a help_contexts.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.contexts"?>
<contexts>
<context id="my.plugin.help.general" >
<description>test</description>
<topic label="test" href="http://domain.com/help.html"/>
</context>
</contexts>
2) I referenced this file in my plugin.xml
<extension
point="org.eclipse.help.contexts">
<contexts file="help_contexts.xml" plugin="my.plugin.MainEditor">
</contexts>
</extension>
3) I added a line in my build.properties to include this file in the bin directory (bin.includes = help_contexts.xml, ... )
4) When running my GEF-based plugin, I see "No match found for "my.plugin.MainEditor"" under dynamic help.
I know I need to create something like this somewhere, but I don't know where to set this up for my WizardDialog or at least for my whole editor:
public void createPartControl(Composite parent) {
...
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent,
"my.plugin.help.general");
}
Note: This question originally contained two questions. I have removed the first (unanswered part) to be posted elsewhere.
Here is how you do it:
1) I created a help_contexts.xml file. Don't have periods in the context id. Don't include your plugin name in there.
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.contexts"?>
<contexts>
<context id="help_general" >
<description>test</description>
<topic label="test" href="http://domain.com/help.html"/>
</context>
</contexts>
2) I referenced this file in my plugin.xml Don't include the plugin-id if you are referencing your own plugin.
<extension
point="org.eclipse.help.contexts">
<contexts file="help_contexts.xml">
</contexts>
</extension>
3) I added a line in my build.properties to include this file in the bin directory (bin.includes = help_contexts.xml, ... ). Note your Bundle-SymbolicName in your Manifest.MF (also visible in your plugin.xml editor). Example: my.plugin
4) Set the context id in the WizardPage (credit goes to #VonC)
public class MyWizardPage extends WizardPage
public void createControl(Composite parent) {
PlatformUI.getWorkbench.getHelpSystem.setHelp(parent, "my.plugin.help_general");
}
}
For the main question, I am not sure about your setHelp second parameter. See this thread:
In the method call
PlatformUI.getWorkbench().getHelpSystem().setHelp()
second parameter is the contextID.
It should be prefixed with the pluginID like : "pluginID.contextID".
Now I was not sure where to find the plug-in ID for my plug-in.
So I used the value of this property : Bundle-Name Bundle-Symbolic-Name from MANIFEST.MF as the plug-in ID.
Now it works.
For the sidenote (help for WizardDialog), this thread might help (from David Kyle
and his blog "Eclipse RCP"):
We set the context id in our wizard page.
public class MyWizardPage extends WizardPage
public void createControl(Composite parent) {
PlatformUI.getWorkbench.getHelpSystem.setHelp(parent,
MyPluginActivator.ID + ".mycontexthelpid");
}
}
and we set help for the wizard dialog.
WizardDialog dialog = new WizardDialog(.....);
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
"mycontexthelp.id");
We don't override performHelp().
As for the help context id. Define a context xml file in your plugin.
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.contexts"?>
<contexts>
<context id="mycontexthelpid" >
<description>My wizard help.</description>
<topic label="Wizard help" href="reference/wizard/help.xhtml"/>
</context>
</contexts>
in your plugin
<plugin>
<extension point="org.eclipse.help.contexts">
<contexts file="mywizard.xml" plugin="com.mypluginid"/>
</extension>
</plugin>
A common problem is messing up the plugin and context help ids. You can set
a couple of break points to see which context id is being requested.

Resources