Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-debug-dev] jdt launch shortcuts on non java files


Hi Ryan,

The adapt entry is used to check if the item you have right clicked on (the current context) can be adapted to an IJavaElement.

As for the shortcuts, you can try adding an enablement test for your menu shortcut to make it (not) show up in the RunAs menu.
Enablement tests are added to your menu shortcuts to determine when they should be present or not (in the context of the RunAs menu any way).
There are a few 'standard' tests provided for other plugin developers to use for their menu shortcuts.

Try looking at org.eclipse.jdt.internal.debug.core.JavaLaunchableTester for a description of the tests and also look at the org.eclipse.debug.ui.launchShortcuts extension in the plugin.xml file for org.eclipse.jdt.debug.ui for an example of how to use them.

Hope this helps.

Michael Rennie
Eclipse Platform Commiter,
Rational Team,
IBM Canada



Ryan Boder <boder@xxxxxxxxxxxxxxxx>
Sent by: jdt-debug-dev-bounces@xxxxxxxxxxx

01/12/2005 10:59 AM

Please respond to
"Eclipse JDT Debug developers list."

To
jdt-debug-dev@xxxxxxxxxxx
cc
Subject
[jdt-debug-dev] jdt launch shortcuts on non java files





Hi,

I made a new launch shortcut for files of with a .nws extension. My
launch shortcut works but all the jdt shortcuts also appear in the Run
As menu for these files even though they are not java files.

Through trial and error I figured out that if I remove this line

<adapt type="org.eclipse.jdt.core.IJavaElement"/>

from the contextualLaunch section of the jdt launch shortcuts they go
away like I want them to. I don't understand what that adapt tag is
doing.

Of course when I actually release this plugin I can't mess with the jdt
launch shortcuts. How can I make my .nws files fail the tests for the
jdt launch shortcuts so they won't appear in the Run As menu?


Thanks,
--
Ryan Boder
http://bitwiserlabs.com

_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-debug-dev


Back to the top