Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » visibleWhen : test the stereotype of the selected element
visibleWhen : test the stereotype of the selected element [message #1777126] Fri, 24 November 2017 18:27 Go to next message
Jules Franc is currently offline Jules FrancFriend
Messages: 5
Registered: May 2016
Junior Member

I just started to learn how to develop an Eclipse plugin.
I would like to use it in Papyrus (the UML/SysML modeler).

I would like to add an element in the right click menu if the selected element is a block (a block is a SysML stereotype) with a custom profile (called "myStereotype").

My XML now looks like that :

						<with variable="activeMenuSelection">
							<iterate ifEmpty="false">

How to check if the selected element has the profile "myStereotype" ?

I found "instanceof" on Eclipse' website:

Is it the right thing to use ?

Thank you very much!
Re: visibleWhen : test the stereotype of the selected element [message #1780572 is a reply to message #1777126] Wed, 24 January 2018 00:20 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 466
Registered: July 2009
Senior Member

Hi Jules,

We don't know papyrus. Maybe you should ask in that forum. If you want to test on a tree item element, it might be possible to use the plugin spy ALT+SHIFT+F1 to get the class. You can use the class of the selected object in the core expression.

Another idea is to inspect the menu entries of the papyrus plugins. If you can find one of their menu options maybe you can mimic it.

Best regards,

Previous Topic:Show Splash screen on double clicking System tray icon
Next Topic:P2 site
Goto Forum:

Current Time: Wed Oct 20 17:51:39 GMT 2021

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

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

Back to the top