Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to Add a menu items to the popup menu of Sirius Table representation
How to Add a menu items to the popup menu of Sirius Table representation [message #1795632] Wed, 26 September 2018 09:40 Go to next message
Divya Patel is currently offline Divya PatelFriend
Messages: 7
Registered: July 2018
Junior Member
I want to add menu items in the popup/Context menu of Sirius Table representation/view.
How to add such menus and actions in the table view?
I have tried using the plugin but still, it is not working. I am not sure about objectClass.

<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="true"
id="com.eclipse.example.objectContribution1"
objectClass="org.eclipse.ui.IEditorActionDelegate">
<menu
id="com.eclipse.example.menu1"
label="Add Element"
path="additions">
<separator
name="group1">
</separator>
</menu>
<action
class="com.eclipse.example.ShowAddElementMenuAction"
enablesFor="1"
id="com.eclipse.example.action1"
label="Add Element"
menubarPath="com.avin.SwcEditorComponent.design.menu1/group1">
</action>
</objectContribution>
</extension>


And I have tried using org.eclipse.ui.menus extension also.

<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.sirius.table.ui.EditorID.tableContext#PopupMenu?after=additions">
<command
commandId="com.eclipse.example.sampleCommand"
label="Add Element"
style="push">
<visibleWhen
checkEnabled="false">
<with
variable="activeWorkbenchWindow.activePerspective">
<equals
value="com.eclipse.example.ShowAddElementMenuAction">
</equals>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension>




Re: How to Add a menu items to the popup menu of Sirius Table representation [message #1795650 is a reply to message #1795632] Wed, 26 September 2018 12:03 Go to previous messageGo to next message
Jessy Mallet is currently offline Jessy MalletFriend
Messages: 10
Registered: July 2018
Junior Member
Hi Divya,

As explained on the post https://www.eclipse.org/forums/index.php/m/1722496/?srch=menu+table#msg_1722496, you can not create popup menu by using the Viewpoint Specification Model.
You have to use the Eclipse way to create popup menus. For org.eclipse.ui.menus extension point, you should use popup:org.eclipse.sirius.table.ui.EditionTableEditorID?after=additions as location URI.

Regards,
Re: How to Add a menu items to the popup menu of Sirius Table representation [message #1795652 is a reply to message #1795632] Wed, 26 September 2018 12:10 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi Divya,

As explained on the post https://www.eclipse.org/forums/index.php/m/1722496/?srch=menu+table#msg_1722496, you can not create popup menu by using the Viewpoint Specification Model.
You have to use the Eclipse way to create popup menus. For org.eclipse.ui.menus extension point, you should use popup:org.eclipse.sirius.table.ui.EditionTableEditorID?after=additions as location URI.

Regards,


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Impact of removing Style Customization Layer
Next Topic:[ANN] Sirius 6.0.2 (with an important bugfix under Windows)
Goto Forum:
  


Current Time: Sat Apr 20 04:07:24 GMT 2024

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

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

Back to the top