|
Re: Customizing the Sirius tab bar for 3.x [message #1773037 is a reply to message #1772989] |
Wed, 20 September 2017 14:45   |
Eclipse User |
|
|
|
Hi,
Regarding the tabbar, you have no way to customizing it in 3.x. There is no alternative.
Regarding right click menu modification, there is no Sirius documentation.
This kind of modification is done with the GMF extension point org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders so you have access to this extension point documentation.
You can see some example in Sirius and GMF in org.eclipse.sirius.diagram.ui and in GMF in org.eclipse.gmf.runtime.diagram.ui.providers plugin.xml file.
Check GMF documentation for eventual additional information about it.
Regards,
Pierre
|
|
|
Re: Customizing the Sirius tab bar for 3.x [message #1773045 is a reply to message #1773037] |
Wed, 20 September 2017 18:33   |
Eclipse User |
|
|
|
Pierre,
Thanks for that input. Re: the right click menu, can we remove existing contribution items (e.g. items provided by the internal Sirius framework) using the GMF extension point? Our customer does not want some of the items to be available.
-Chris
|
|
|
|
|
Re: Customizing the Sirius tab bar for 3.x [message #1773386 is a reply to message #1773361] |
Wed, 27 September 2017 08:01   |
Eclipse User |
|
|
|
Hi Chris,
I checked in the plugin.xml of plugin org.eclipse.sirius.diagram.ui for org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders in Sirius 3.1.9 and the contributions are available.
What exact version do you have?
Regards,
Pierre
|
|
|
Re: Customizing the Sirius tab bar for 3.x [message #1773416 is a reply to message #1773386] |
Wed, 27 September 2017 16:15   |
Eclipse User |
|
|
|
Pierre,
Your follow-up helped me to make a correction to the extension point and I was able to remove some items via your example. While several popup actions are predefined in this manner, some (e.g. show/hide label) are wired through command ids and property testers. Not sure if there's any way to remove those from the menu.
Also, in addition to "popupContribution", I noticed there was a "partContribution" which provided access to a predefined toolbar item (e.g. 'makeSameSizeBothAction'), but I didn't see any others that were accessible in this format.
-Chris
|
|
|
|
Re: Customizing the Sirius tab bar for 3.x [message #1773590 is a reply to message #1773475] |
Fri, 29 September 2017 18:16   |
Eclipse User |
|
|
|
Interesting. I saw "selectHiddenElementsAction" defined in the org.eclipse.sirius.diagram.ui > plugin.xml but I'm not sure how you were able to infer the complete id path? I can't use Plugin Spy on our product because the build does not include the source files. The spy only works on the IDE.
|
|
|
Re: Customizing the Sirius tab bar for 3.x [message #1773643 is a reply to message #1773590] |
Mon, 02 October 2017 08:11   |
Eclipse User |
|
|
|
To be able to use Spy you can just download an ObeoDesigner Community package just to identify actions with an ecore Sirius diagram. Most of the actions if not all should have not change across versions.
To get the path I used spy but you can just read the plugin xml and try it with activities. At first it did not work with selectHiddenElementsAction so I tried prefixed by the plugin name and it worked. Whether you have the isEqualityPattern to true or false also change the way you must specify the pattern.
The general rules are unclear to me for the moment.
|
|
|
Re: Customizing the Sirius tab bar for 3.x [message #1773672 is a reply to message #1773643] |
Mon, 02 October 2017 16:34   |
Eclipse User |
|
|
|
Setting isEqualityPattern to false seems to be the way to go unless we know the exact path. Unfortunately, that pattern had no effect on removing the Show/Hide menu option in my case. As stated earlier "selectHiddenElementsAction" is clearly defined in the org.eclipse.sirius.diagram.ui dependency.
|
|
|
Re: Customizing the Sirius tab bar for 3.x [message #1773717 is a reply to message #1773672] |
Tue, 03 October 2017 13:16  |
Eclipse User |
|
|
|
Hi,
To hide the menu you just have to hide all its action.
By using spy like I describe above I ended with these extension:
<extension
point="org.eclipse.ui.activities">
<activity
id="myActivity"
name="%activityName">
</activity>
<activityPatternBinding
activityId="myActivity"
isEqualityPattern="true"
pattern="org.eclipse.sirius.diagram.ui/org.eclipse.sirius.diagram.ui.command.hideElement">
</activityPatternBinding>
<activityPatternBinding
activityId="myActivity"
isEqualityPattern="true"
pattern="org.eclipse.sirius.diagram.ui/org.eclipse.sirius.diagram.ui.command.hideLabel">
</activityPatternBinding>
</extension>
and the same thing with equalitypattern to false:
<extension
point="org.eclipse.ui.activities">
<activity
id="myActivity"
name="%activityName">
</activity>
<activityPatternBinding
activityId="myActivity"
isEqualityPattern="false"
pattern="org.eclipse.sirius.diagram.ui.org.eclipse.sirius.diagram.ui.command.hideElement">
</activityPatternBinding>
<activityPatternBinding
activityId="myActivity"
isEqualityPattern="false"
pattern="org.eclipse.sirius.diagram.ui.org.eclipse.sirius.diagram.ui.command.hideLabel">
</activityPatternBinding>
</extension>
Regards,
|
|
|
Powered by
FUDForum. Page generated in 0.26667 seconds