Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Issue with Extension point for action (Extension point for action )
Issue with Extension point for action [message #1060706] Tue, 28 May 2013 07:01
Yossi Balan is currently offline Yossi BalanFriend
Messages: 10
Registered: May 2013
Junior Member
Hi

I created an editor and I added the functionality of folding.
I added a menu of folding with sub menu : enable,expend, collapse.
I want that the value of enable we come from the preference value of enable folding.
The problem that the logic of the enable folding is working only when I press on the second time on the mouse.
This is the extension point
<extension point="org.eclipse.ui.popupMenus">
<viewerContribution
id="Plugin.ui.RulerPopupActions"
targetID="#EditorContext">
<menu
label="Label1"
path="additions"
id="Plugin.Ruler.EditorMenu">
<separator
name="group">
</separator>
</menu>
<action
id="Action1"
label="EnableFolding"
class="classl"
menubarPath="Plugin.Ruler.EditorMenu/group">
</action>
<
</viewerContribution>
</extension>


The framework call to this action
protected final void rulerContextMenuAboutToShow(final IMenuManager menu) {
super.rulerContextMenuAboutToShow(menu);
MenuItem[] menus = ((MenuManager) menu).getMenu().getItems();
}

in the first time the menus are = [] and in the second time I got values
Do you have any idea why it is not working ?

Previous Topic:Reflective Access to @NonNull
Next Topic:JDT Classpath setup and ServiceLoader
Goto Forum:
  


Current Time: Thu Mar 28 20:04:02 GMT 2024

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

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

Back to the top