Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Remove popup info or disable action on popupMenu extension point
Remove popup info or disable action on popupMenu extension point [message #494154] Thu, 29 October 2009 12:12
El_justiciero  is currently offline El_justiciero Friend
Messages: 13
Registered: July 2009
Junior Member
Hello,

We are developing a plug-in extension for eclipse, It is a popupMenu.
This menu has some actions, that we want to do is disable it depending on one variable.

Actually the way that we are using to disable it is changing the setEnable to false:

public void selectionChanged(IAction action, ISelection selection) {
action.setEnabled(false);
this.mySelection = selection;

}

The first time that we run the plug-in, the letters of the label assigned to the previous action are normal like an enable action, but when we press over it appear one popup with the next info: "The chosen operation is not enable"

After it popup, the letters change to disable (gray color) and we can't press over it. That we can to do is to disable the action at the first time.

How can I do to disable the action before to press over it, or how can I delete the popup info?

Our object contribution look like this:

<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="true"
id="xx.contribution1"
objectClass="org.eclipse.core.resources.IProject">
<filter
name="projectNature"
value="xx.Nature">
</filter>
<menu
id="xx.menu1"
label="xx"
path="additions">
<separator
name="group2">
</separator>
</menu>
<action
class="xx.Action"
enablesFor="1"
id="xx.Action"
abel=" xx "
menubarPath="xx.menu1/group2">
</action>

</objectContribution>
</extension>

Thank you in advance.

[Updated on: Thu, 29 October 2009 12:14]

Report message to a moderator

Previous Topic:Font update
Next Topic:Multiple IResourceChangeEvents sent on refresh
Goto Forum:
  


Current Time: Tue Mar 09 08:43:38 GMT 2021

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

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

Back to the top