maven-client-plugin, GraalVM and class initialization - gluon

I am trying to generate a native image of a JavaFX+FXML application using the GluonHQ client-maven-plugin. Creating the native image works fine, but when trying to execute it, it seems my configuration was wrong.
FXML
<?import java.lang.*?>
<?import org.prelle.javafx.NavigationView?>
<?import org.prelle.javafx.NavigationItem?>
<?import org.prelle.javafx.NavigationItemHeader?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.control.SeparatorMenuItem?>
<?import javafx.scene.layout.FlowPane?>
<NavigationView xmlns:fx="http://javafx.com/fxml"
stylesheets="#styles.css"
displayMode="AUTO">
</NavigationView>
The execution fails with
org.apache.logging.log4j.message.ParameterizedMessageFactory
ClassNotFoundException: org.prelle.javafx.NavigationView
Now I tried to add my reflectionconfig.json
[
{
"name" : "org.prelle.javafx.NavigationView",
"allDeclaredConstructors" : true,
"allPublicConstructors" : true
}
]
The problem now is that it doesn't compile annymore. Instead I get 3 errors for classses that have been unintentionally initialized at build time - e.g. javafx.scene.control.SkinBase or the skin for my class org.prelle.javafx.skin.NavigationViewSkin
My NavigationView constructor explicitly sets the skin to NavigationViewSkin, so calling the empty constructor will call the skins constructor as well.
What did I do wrong? How can I avoid those errors?
Edit: I failed to notice that I copied an older error message (from having problems with Log4J2). Changed it.

Related

How to edit vsixmanifest using groovy without loosing content?

My question may sound stupid but I am struggling to achieve my result. I would like to edit and save version tage of vsixmanifest file without loosing any content. This article almost solved my purpose but it removes some of the tags.
<?xml version="1.0" encoding="utf-8"?>
<Vsix xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
<Identifier Id="Visual Test">
<Name>Visual Gallery Test</Name>
<Author>Visual Studio Demo</Author>
<Version>XXXXX</Version>
<Description xml:space="preserve">Visual Studio Gallery Demo</Description>
<Locale>1033</Locale>
<AllUsers>true</AllUsers>
<InstalledByMsi>false</InstalledByMsi>
<Icon>Resources/Icon.png</Icon>
<PreviewImage>Resources/Preview.png</PreviewImage>
<SupportedProducts>
<IsolatedShell Version="7.0">Visual Studio</IsolatedShell>
</SupportedProducts>
<SupportedFrameworkRuntimeEdition MinVersion="4.6" MaxVersion="4.9" />
</Identifier>
<Content>
<VsPackage>XX.pkgdef</VsPackage>
</Content>
</Vsix>
Here is my gradle script
task updateExtensionManifest{
def vsixmanifestFile = "build/source.extension.vsixmanifest"
def vsixmanifest = new XmlParser().parse(vsixmanifestFile)
vsixmanifest.Identifier[0].Version[0].value="YYYYY"
def nodePrinter = new XmlNodePrinter(new PrintWriter(new FileWriter(vsixmanifestFile)))
nodePrinter.preserveWhitespace = true
nodePrinter.expandEmptyElements = true
nodePrinter.print(vsixmanifest)
}
When I execute the script it removes some of the tags defines manifest file, this is how it looks after task is getting executed:
<Vsix xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010" Version="1.0.0">
<Identifier Id="Visual Test">
<Name>Visual Gallery Test</Name>
<Author>Visual Studio Demo</Author>
<Version>YYYYY</Version>
<Description xml:space="preserve" xmlns:xml="http://www.w3.org/XML/1998/namespace">Visual Studio Gallery Demo</Description>
<Locale>1033</Locale>
<AllUsers>true</AllUsers>
<InstalledByMsi>false</InstalledByMsi>
<Icon>Resources/Icon.png</Icon>
<PreviewImage>Resources/Preview.png</PreviewImage>
<SupportedProducts>
<IsolatedShell Version="7.0">Visual Studio</IsolatedShell>
</SupportedProducts>
<SupportedFrameworkRuntimeEdition MinVersion="4.6" MaxVersion="4.9"></SupportedFrameworkRuntimeEdition>
</Identifier>
<Content>
<VsPackage>XX.pkgdef</VsPackage>
</Content>
</Vsix>
Some unwanted edits:
Line1 removed: <?xml version="1.0" encoding="utf-8"?>
Line2 modified to <Vsix xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010" Version="1.0.0">
Tag "Description" got edited too..
How could I avoid this edits? I just expected the version to get modified from XXXXX to YYYYY without changing any other content through my gradle build script.
That is because XmlNodePrinter.
If xml markup declaration is needed, use XmlUtil.serialize().
def vsixmanifest = new XmlSlurper().parse(vsixmanifestFile)
vsixmanifest.Identifier[0].Version.replaceBody ( "YYYYY" )
println groovy.xml.XmlUtil.serialize(vsixmanifest)
You can quickly try the demo

What's wrong with my code snippet?

I have a code snippet that's giving me some slightly annoying problems. Here's the snippet:
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Set With Notify</Title>
<Description>Code snippet for common model setters</Description>
<Shortcut>notify_member</Shortcut>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>The type of both members</ToolTip>
</Literal>
<Literal>
<ID>member</ID>
<ToolTip>The member symbol</ToolTip>
</Literal>
</Declarations>
<Code Language="CSharp">
<![CDATA[
private $type$ _$member$;
public $type$ $member$
{
get
{
return _$member$;
}
set
{
if (value != this._$member$)
{
this._$member$ = value;
this.OnPropertyChanged();
}
}
}
]]>
</Code>
</Snippet>
</CodeSnippet>
So, first issue I've already worked around but it made my snippet slightly more difficult to use: When using only 2 Declarations/Replacements the snippet would just get pasted into the editor without an opportunity to specify type, or member.
Currently, whenever I use this snippet, the two braces following my set function are not properly indented. The final brace is in the right spot and all other code is indented correctly.
So, what am I missing or doing improperly to cause this formatting issue?

How to add cq:listener to a component

I am trying to add cq:listener https://docs.adobe.com/docs/en/cq/5-5/developing/components/edit_config.html#cq:listeners to my component so that after selecting an asset and clicking "ok", the page refreshes.
This is how the component looks on the screen where I select an asset and click ok.
In my code, the dialog.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Dialog"
xtype="dialog">
<items
jcr:primaryType="cq:Widget"
xtype="tabpanel">
<items jcr:primaryType="cq:WidgetCollection">
<tab1
jcr:primaryType="cq:Panel"
title="Tab">
<items
jcr:primaryType="cq:WidgetCollection">
<asset-reference
jcr:primaryType="cq:Widget"
fieldLabel="Foo Bar:"
fieldDescription="Select the asset under /content/dam/foo-sync"
name="./fileReference"
xtype="pathfield"
rootPath="/content/dam/evernote-sync"/>
</items>
</tab1>
</items>
</items>
</jcr:root>
_cq_editConfig.xml looks like this
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:EditConfig">
<cq:dropTargets jcr:primaryType="nt:unstructured">
<fileReference
jcr:primaryType="cq:DropTargetConfig"
accept="[text/.*]"
groups="[media]"
propertyName="./fileReference"/>
</cq:dropTargets>
</jcr:root>
Create a node with name cq:listeners and type as cq:EditListenersConfig as a child of the cq:EditConfig node. Add the property afteredit to the newly created node with value REFRESH_PAGE, to refresh the page once the component is edited. By default this value is REFRESH_SELF, hence only the component is refreshed after edit and not the entire page.
The _cq_editConfig.xml would look something like this.
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:EditConfig">
<cq:listeners jcr:primaryType="cq:EditListenersConfig"
afteredit="REFRESH_PAGE"/>
<cq:dropTargets jcr:primaryType="nt:unstructured">
<fileReference
jcr:primaryType="cq:DropTargetConfig"
accept="[text/.*]"
groups="[media]"
propertyName="./fileReference"/>
</cq:dropTargets>
</jcr:root>
More details can be found in the link mentioned in the question itself.
You might try the following in your _cq_editConfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="cq:EditConfig">
<cq:listeners
jcr:primaryType="cq:EditListenersConfig"
afterdelete="REFRESH_PAGE"
afteredit="REFRESH_PAGE"
afterinsert="REFRESH_PAGE"
afterMove="REFRESH_PAGE"/>
</jcr:root>

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+AAAACXZwQWcAAAAYAAAAGAB4TKWmAAAI1UlEQVRYw61YS4gc VRf+7r1Vt+pWdfdMd0/P9PTMOCGJBpNI4gPiRrPQnSKIigQEN4LgQoTgwpU7QYOggop7UVA3 ESMEDKiJmIlEhUwS85pM5tGP6Wemn/V2cVJ2xxjCr//d3K66davOd873nXNus+jGwH8cjuM4 jgN0Op1OpwOEYRiGIcAY54wBQgihaUAqlUwmkwDnnEcRwBhjmvbvv8v+VwCO43muC1y6dOHC 0hJQKhWL5TIghKYJARQK09PpNDA1lc9nMoBlWVYyCdRqtdrmJrC+vr5eqQAAYwAwOzs3VygA 09NTU1NTBIhW/k8AoigMgwBYWbl2rVgEfvnl998XF4F6vVq9dg2YmUkmGQNyOSn7fYBzxlx3 uF8IIYQANE3XlaI7ySRQrfq+YQBra9Vqrwdks7nczAzw6KOPPPLww0AymUwmEncGdFsAnud5 vg9cvbq8fPUq0GiUSpUK0GqVSouLgBC9XqkEWBbn3S6g62HougDnUaTrIx9gjHE+vA4C8r3r apquA5ubvp9IAL0eY9kskMnMzc3PA/feu3v3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DDiRPHjwOLi+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 = "iVBORw0KGgoAAAANSUhEUgAAADIAAAAdCAYAAADoxT9SAAAACXBIWXMAAAsYAAALGAGJqbUQAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4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1dnY2RSKRm1VVDbrdbkpLS0mn0xiGUaiCc7kcyWQSRVFwuVwFQKPgFUXBNE1kWS6wey7YcySArutoLhc9wE6wW+C1QVgP/POLuFjVAysjkchtNy5Z0nDd4sXuSCRCSSCA7DiYeTCjJc1ocJIkFYKXZRlFUcY8jwIdLfVTqRQdnZ38at269CddXW+nYTOw60rdEF9eJUk/9NfWojU0MHPBAmbX1VE1fTo+nw+Xy1WQn+M4E4CNgnAch2w2Szwep6enh48++shsb2/f393d/RfgT3l358rd2efBlpegzgaOAgeAFrf7pF5Zua+6qmpmKBQqr6io0MvKyhS/34/H40FRFGzbLtxPTp06Zff39yd7e3ujvb29B2Ox2F7gQ2BfPjldORflKrh5Fdz0GGiVQDy/yf4M/AieMUdclKnAVee4KMVAUT6DOvlD+QwwCAzkXZQk/2M7r6+lQIUONVOhugZqZkPoenBfD1SOm+B1YA109H/JvtYYp3EmiCYQm0F8COIzELlxTmMCxGEQr4JohKzvK+Q0TvB+AxAphppiKC+CYm2kqCSb934H4PjAiOf7lfF+/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/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAs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Qn+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