Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Pop up menus Java UI Plugin Development(Pop up menus Java UI Plugin Development issues)
Pop up menus Java UI Plugin Development [message #902691] Sun, 19 August 2012 16:36 Go to next message
shalini Pachineela is currently offline shalini PachineelaFriend
Messages: 2
Registered: August 2012
Junior Member
Hi,

I am working on Java UI Plug in development for Lotus notes. I want to add context menus based on the type of document that I have selected. Typically, different menus should be visible based on appointment, mail or contact document that I right click on.

I followed the Java UI exerciser and I noticed that an instance of "com.ibm.notes.java.ui.documents.NotesUIDocument" can find what document I currently am in. I followed the java UI exerciser project and it din't work for me. The menu always appears greyed out. And also, all the pop up menus added in the exerciser having an instance of com.ibm.notes.java.ui.documents.NotesUIDocument" is greyed out.

I attached a part of my plugin.xml related to this problem for your reference too.


<menuContribution
locationURI="popup:org.eclipse.ui.popup.any?after=additions"> <command
commandId="com.sap.sod.ln.shelf.addon.testmenu"
style="push">
<visibleWhen>
<count
value="1">
</count>
<iterate>
<instanceof
value="com.ibm.notes.java.ui.documents.NotesUIDocument">
</instanceof>
</iterate>
</visibleWhen>
</command>
</menuContribution>


<command
id="com.sap.sod.ln.shelf.addon.testmenu"
name="test menu">
</command>

<handler
class="com.sap.sod.ln.shelf.addon.contextmenu.TestClass"
commandId="com.sap.sod.ln.shelf.addon.testmenu">
<enabledWhen>
<iterate>
<instanceof
value="com.ibm.notes.java.ui.documents.NotesUIDocument">
</instanceof>
</iterate>
</enabledWhen>
<activeWhen>
<count
value="1">
</count>
</activeWhen>
</handler>
<handler
class="com.sap.sod.ln.shelf.addon.contextmenu.TestClass"
commandId="com.sap.sod.ln.shelf.addon.tool.tools">
</handler>
Re: Pop up menus Java UI Plugin Development [message #902855 is a reply to message #902691] Mon, 20 August 2012 18:19 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

What if you insert a with element into your core expressions:

<visibleWhen>
<with variable="activeMenuSelection">
<count
value="1">
</count>
<iterate>
<instanceof
value="com.ibm.notes.java.ui.documents.NotesUIDocument">
</instanceof>
</iterate>
</with>
</visibleWhen>

Apply the same logic to your handler activeWhen (leave out the enabledWhen for now).

PW


Previous Topic:PullDown item in tool bar with dynamic options
Next Topic:Which bmp represents the icon associated with the rcp executable in a .product file.
Goto Forum:
  


Current Time: Wed Apr 24 19:05:25 GMT 2024

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

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

Back to the top