Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » launchshortcut enablement specification
launchshortcut enablement specification [message #264725] Fri, 30 July 2004 15:10 Go to next message
Gernot Belger is currently offline Gernot BelgerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi all,

does anyone know if there is a good description of the <enablement>
element of the org.eclipse.debug.ui.launchShortcuts extension point??
I already searched a lot the web an this archive but there seems nothin
special around...

Background:
Want i want to do is this:
I want to add a new LaunchShortcut to the 'run' context menu, but it
should only be enabled (e.g. visible) if the selected element in the
resource navigator is a folder containing a certain file.

I succeeded in the firt part (that is, my shortcut is only visible when i
select a folder), the plugin.xml snippet is:

<extension
point="org.eclipse.debug.ui.launchShortcuts">
<shortcut
label="Modellrechnung"
class="org.kalypso.ui.launcher.CalcCaseLaunchShortcut"
modes="run"
id="org.kalypso.ui.launch.CalcCaseLaunchShortcut">
<perspective id="org.eclipse.ui.resourcePerspective"/>
<contextualLaunch>
<contextLabel
label="Modellrechnung"
mode="run"/>
<enablement>
<with variable="selection">
<count value="1"/>
<iterate >
<instanceof
value="org.eclipse.core.resources.IFolder"/>
</iterate>
</with>
</enablement>
</contextualLaunch>
</shortcut>
</extension>

But now how can i test, if my folder contains a certain file?
I already had a look at the existing plugin.xml, which use a subelement
<test>.
Unfortunately there is no description how to use/define own test-elements.

Does anybody know how to use these <test> elements or define own
test-classed?

Thanx
Gernot
Re: launchshortcut enablement specification [message #265377 is a reply to message #264725] Wed, 04 August 2004 13:54 Go to previous message
Darin Wright is currently offline Darin WrightFriend
Messages: 454
Registered: July 2009
Senior Member
The <test> attribute allows you to define your own property tester for the
selected elements. The <test> attribute is associated with an extension of
kind "org.eclipse.core.expressions.propertyTesters". The doc for this
extension point can be found in the on-line help (Platform Plug-in
Developers Guide > Reference > Extension Points > Reference).

Darin

"Gernot" <gernot.belger@gmx.de> wrote in message
news:cedod0$fau$1@eclipse.org...
> Hi all,
>
> does anyone know if there is a good description of the <enablement>
> element of the org.eclipse.debug.ui.launchShortcuts extension point??
> I already searched a lot the web an this archive but there seems nothin
> special around...
>
> Background:
> Want i want to do is this:
> I want to add a new LaunchShortcut to the 'run' context menu, but it
> should only be enabled (e.g. visible) if the selected element in the
> resource navigator is a folder containing a certain file.
>
> I succeeded in the firt part (that is, my shortcut is only visible when i
> select a folder), the plugin.xml snippet is:
>
> <extension
> point="org.eclipse.debug.ui.launchShortcuts">
> <shortcut
> label="Modellrechnung"
> class="org.kalypso.ui.launcher.CalcCaseLaunchShortcut"
> modes="run"
> id="org.kalypso.ui.launch.CalcCaseLaunchShortcut">
> <perspective id="org.eclipse.ui.resourcePerspective"/>
> <contextualLaunch>
> <contextLabel
> label="Modellrechnung"
> mode="run"/>
> <enablement>
> <with variable="selection">
> <count value="1"/>
> <iterate >
> <instanceof
> value="org.eclipse.core.resources.IFolder"/>
> </iterate>
> </with>
> </enablement>
> </contextualLaunch>
> </shortcut>
> </extension>
>
> But now how can i test, if my folder contains a certain file?
> I already had a look at the existing plugin.xml, which use a subelement
> <test>.
> Unfortunately there is no description how to use/define own test-elements.
>
> Does anybody know how to use these <test> elements or define own
> test-classed?
>
> Thanx
> Gernot
>
>
Previous Topic:Java Remote Debugging - no breakpoints at startup
Next Topic:Updating the help search index
Goto Forum:
  


Current Time: Fri Apr 26 07:37:54 GMT 2024

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

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

Back to the top