Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » File location for cheat sheet(Minimal plug-in cheet sheet file can't be found)
File location for cheat sheet [message #1791187] Mon, 25 June 2018 16:13 Go to next message
Jim Dawson is currently offline Jim DawsonFriend
Messages: 2
Registered: June 2018
Junior Member
I have successfully created a very minimal (view) plug-in and a cheat sheet. The cheat sheet shows up in the Help menu but I get the following error:
Cheat sheet content file 'How-to-simple-plugin.xml' not found.

This is the relevant snippet that I have in the plugin.xml file.
<cheatsheet
            category="com.example.helloworld.category1098123443"
            composite="false"
            contentFile="How-to-simple-plugin.xml"
            id="com.example.helloworld.cheatsheet1631512715"
            name="How to create a simple plugin">
         <description>
            How to do the stuff for stuff1
         </description>
      </cheatsheet>


Originally, the path (contentFile) was $nl$/How-to-simple-plugin.xml

I have tried several different paths and I have tried saving
the file 'How-to-simple-plugin.xml' in the 'plugins' folder (same folder as eclipse.exe) .

The cheat sheet works fine when I select the bullet for 'Select a cheat sheet from a file:' and browse for it.

Thanks.
Re: File location for cheat sheet [message #1791216 is a reply to message #1791187] Tue, 26 June 2018 06:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29456
Registered: July 2009
Senior Member
You could have a look at how this one for EMF is structured:

https://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/doc/org.eclipse.emf.cheatsheets

The *.xml should definitely be in your bundle itself. So perhaps your problem is as simple as failing to specify the file in your bin.includes in the build.properties:

https://git.eclipse.org/c/emf/org.eclipse.emf.git/tree/doc/org.eclipse.emf.cheatsheets/build.properties

Are you testing in a launched self-hosted runtime instance, or are you testing something you've exported/built? If the latter, make sure that the *.xml is properly in the jar that you deploy.
Re: File location for cheat sheet [message #1791231 is a reply to message #1791216] Tue, 26 June 2018 11:21 Go to previous messageGo to next message
Jim Dawson is currently offline Jim DawsonFriend
Messages: 2
Registered: June 2018
Junior Member
Hey, thanks.

I am especially new to the Eclipse foundation and java.

I thought jar files only contained compiled java code.

In Eclipse, I opened the build.properties file with the Build Properties Editor, selected the build tab and placed a checkmark in appropriate checkbox and voila, it works!

[Updated on: Tue, 26 June 2018 11:56]

Report message to a moderator

Re: File location for cheat sheet [message #1791232 is a reply to message #1791231] Tue, 26 June 2018 12:42 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29456
Registered: July 2009
Senior Member
Certainly jars for bundles/plugins typically contain quite a bit more, e.g., the plugin.xml. Also, in general with Java, it's often the case that one puts *.properties files in the package folder and then it ends up in the jar (because all files in a source folder are copied to the bin folder) so that the Java class can load it as a resource relative to its own class' location at runtime. For Eclipse plugins it's very important to consider which things will actually be needed at runtime and hence should end up in the jar. Definitely any resource referenced in the plugin.xml should be in the bin.includes of the build.properties.

I'm glad this fixed your problem. :-)
Previous Topic:Post Approval Wait Time
Next Topic:errors code while running java on windows after installed
Goto Forum:
  


Current Time: Fri Jul 20 08:26:17 GMT 2018

Powered by FUDForum. Page generated in 0.03136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top