Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » LaunchShortcut Extension(hasNature does not work)
LaunchShortcut Extension [message #492176] Mon, 19 October 2009 10:35
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
I added a ProjectNature to my plugin project to identify projects as "MyProjects".
Adding the NATURE_ID still works fine, I can see the ID in the .project file created by Eclipse.

Now I want to launch those Files, so I added the launchShortcuts extension point to the plugin.
It should be possible to launch by clicking on either a file or a project.
If the project is an instance of "MyProject" I wanted to check via the NATURE_ID.
Now here is the extension point

<extension point="org.eclipse.debug.ui.launchShortcuts">
label="A4L Application"
modes="run, debug">
description="Runs an A4L-Application"
description="Debugs an A4L-Application"
<with variable="selection">
<count value="1"/>
<instanceof value="org.eclipse.core.resources.IFile"/>
<test property="org.eclipse.debug.ui.matchesPattern" value="*.a4l"/>
<instanceof value="org.eclipse.core.resources.IProject"/>

The problem is that <test property="org.eclipse.jdt.launching.hasProjectNature" args="eu.emundo.a4l.wizard.A4LProjectNature"/> seems to be ignored. No LaunchShortcut is available if I click on a project with the defined nature although the NATURE_ID is still in the .project file.

If delete the hasNature test the LaunchShortcut is available because I select an instance of IProject.

Does anybody know why the hasNature test doesn't work?

I would appreciate any help...

Best regards
Previous Topic:Error while switching the workspace
Next Topic:IProject instanceof MyProject
Goto Forum:

Current Time: Thu Feb 25 17:17:57 GMT 2021

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

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

Back to the top