NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
carmen_maven
Joined: 22 Dec 2011 Posts: 13
|
Posted: Mon Apr 09, 2012 7:02 pm Post subject: JavaHelp: how to set ide.welcome in a mavenized netbeans application |
|
|
Hello:
I'm building a netbeans application platform with maven and I'm trying to configure the JavaHelp.
I'm using NetBeans 7.0.1, and nbm-maven-plugin 3.6
I created the helpset with the wizard of JavaHelp Help Set that NetBeans provides. NetBeans generated a set of files in src/main/resources folder of my project.
In the layer.xml file I configure this:
| Code: | <folder name="Services">
<folder name="JavaHelp">
<file name="manager-hs.xml" url="manager/docs/manager-hs.xml">
<attr name="position" intvalue="100"/>
</file>
<file name="org-netbeans-modules-db-docs.xml_hidden"/>
<file name="org-netbeans-modules-dbschema-docs.xml_hidden"/>
<file name="org-netbeans-modules-maven-docs.xml_hidden"/>
<file name="org-netbeans-modules-usersguide-helpset.xml_hidden"/>
</folder>
</folder> |
I need only to configure my helpset, so I disable the others helpsets, then when I run the application I got this:
WARNING [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID "ide.welcome" was not found. So according to http://wiki.netbeans.org/DevFaqIdeWelcome I set ide.welcome in manager-map.xml, like this:
In the file manager-hs.xml:
| Code: | <maps>
<homeID>ide.welcome</homeID>
<mapref location="manager-map.xml"/>...
</maps> |
In the file manager-map.xml:
| Code: | <map version="2.0">
<mapID target="ide.welcome" url="welcome.htm"/>
</map> |
But I got the Help window with empty contents and this warning:
INFO [org.netbeans.ui.metrics.javahelp]: Showing help ID: org.openide.util.HelpCtx.DEFAULT_HELP
WARNING [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID org.openide.util.HelpCtx.DEFAULT_HELP was not found.
Is there any configuration that I'm missing? Why isn't NetBeans seeing my helpset?
thanks in advanced,
Carmen
|
|
| Back to top |
|
 |
carmen_maven
Joined: 22 Dec 2011 Posts: 13
|
Posted: Wed Apr 11, 2012 1:01 pm Post subject: |
|
|
Hi again:
Just to point out another test, when I tried to access Help through a TopComponent of my aplication (F1) I got the context help null..that means that the helpset I configured is not registered correctly, right? Please, if someone could tell me what is the correct way of register JavaHelp in a maven NB Application project (NetBeans 7.0.1) ?
| Code: | @Override
public HelpCtx getHelpCtx() {
HelpCtx ctx = new HelpCtx("ide.welcome");
System.out.println(ctx.getHelp());
return ctx;
} |
Note: Something curious is when I add JavaHelp in a simple NB Application project without maven, it works perfectly, seems the configuration problem is with the nbm-maven-plugin, but I can't find it.
Regards,
Carmen
|
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Thu Apr 12, 2012 6:24 am Post subject: [platform-dev] Re: JavaHelp: how to set ide.welcome in a mavenized netbeans application |
|
|
can you zip up a sample project and create an issue for it?
Thanks
Milos
On Wed, Apr 11, 2012 at 3:02 PM, carmen_maven <address-removed> wrote:
| Quote: | Hi again:
Just to point out another test, when I tried to access Help through a TopComponent of my aplication (F1) I got the context help null..that means that the helpset I configured is not registered correctly, right? Please, if someone could tell me what is the correct way of register JavaHelp in a maven NB Application project (NetBeans 7.0.1) ?
Code:
@Override
public HelpCtx getHelpCtx() {
HelpCtx ctx = new HelpCtx("ide.welcome");
System.out.println(ctx.getHelp());
return ctx;
}
Note: Something curious is when I add JavaHelp in a simple NB Application project without maven, it works perfectly, seems the configuration problem is with the nbm-maven-plugin, but I can't find it.
Regards,
Carmen
|
|
|
| Back to top |
|
 |
carmen_maven
Joined: 22 Dec 2011 Posts: 13
|
Posted: Thu Apr 12, 2012 7:25 pm Post subject: |
|
|
Hi:
I've made a sample NB platform application, (I added the netbeans projectui module because I need that function for my project, I also used other netbeans modules, but I don't considered necessary for this sample)
In this case the project has not other module that provides a java helpset, so I created one and in the layer.xml file I declare it as a service in the JavaHelp folder.
I also create a TopComponent named Editor see Window/Editor, and when I press F1 I got the Help window with empty contents and this lines in netbeans output:
INFO [org.netbeans.ui.metrics.javahelp]: Showing help ID: org.openide.util.HelpCtx.DEFAULT_HELP
WARNING [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID org.openide.util.HelpCtx.DEFAULT_HELP was not found.
WARNING [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID org.openide.util.HelpCtx.DEFAULT_HELP was not found.
It seems it did not enter to getHelpCtx() method of the topcomponent neither.
Please if you have a clue what configuration I'm missing I'll appreciate you could tell me..
I found these tutorial: http://netbeans.dzone.com/nb-how-create-javahelp-mavenized
but as it is for an older NetBeans version I'm not quite sure it will work ok for 7.0.1 version..
About nbm-maven-plugin: I also read about nbmJavahelpSource in
http://mojo.codehaus.org/nbm-maven-plugin/apidocs/org/codehaus/mojo/nbm/NetbeansManifestUpdateMojo.html
but it seems it is not used anymore, because it says "Obsolete as of NetBeans 7.0 with @HelpSetRegistration."
thanks in advanced
Carmen
| Description: |
|
 Download |
| Filename: |
JavaHelpApp.rar |
| Filesize: |
148.52 KB |
| Downloaded: |
32 Time(s) |
|
|
| Back to top |
|
 |
Milos Kleint Posted via mailing list.
|
Posted: Fri Apr 13, 2012 6:11 am Post subject: [platform-dev] Re: JavaHelp: how to set ide.welcome in a mavenized netbeans application |
|
|
for some reason I cannot access the attachment.. my browser tells me
the url doesn't exist..
could you create an issue for it at
http://netbeans.org/bugzilla/enter_bug.cgi?product=projects&component=Maven
Thanks
Milos
On Thu, Apr 12, 2012 at 9:26 PM, carmen_maven <address-removed> wrote:
| Quote: | Hi:
I've made a sample NB platform application, (I added the netbeans projectui module because I need that function for my project, I also used other netbeans modules, but I don't considered necessary for this sample)
In this case the project has not other module that provides a java helpset, so I created one and in the layer.xml file I declare it as a service in the JavaHelp folder.
I also create a TopComponent named Editor see Window/Editor, and when I press F1 I got the Help window with empty contents and this lines in netbeans output:
INFO [org.netbeans.ui.metrics.javahelp]: Showing help ID: org.openide.util.HelpCtx.DEFAULT_HELP
WARNING [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID org.openide.util.HelpCtx.DEFAULT_HELP was not found.
WARNING [org.netbeans.modules.javahelp]: Warning: the JavaHelp topic ID org.openide.util.HelpCtx.DEFAULT_HELP was not found.
It seems it did not enter to getHelpCtx() method of the topcomponent neither.
Please if you have a clue what configuration I'm missing I'll appreciate you could tell me..
I found these tutorial: http://netbeans.dzone.com/nb-how-create-javahelp-mavenized
but as it is for an older NetBeans version I'm not quite sure it will work ok for 7.0.1 version..
About nbm-maven-plugin: I also read about nbmJavahelpSource in
http://mojo.codehaus.org/nbm-maven-plugin/apidocs/org/codehaus/mojo/nbm/NetbeansManifestUpdateMojo.html
but it seems it is not used anymore, because it says "Obsolete as of NetBeans 7.0 with @HelpSetRegistration."
thanks in advanced
Carmen
Attachments:
http://forums.netbeans.org//files/javahelpapp_205.rar
|
|
|
| Back to top |
|
 |
carmen_maven
Joined: 22 Dec 2011 Posts: 13
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|