deleteFromModelAction remove="true" in my plugin.xml doesn't work, rest ok [message #232133] |
Wed, 03 June 2009 10:31 |
Eclipse User |
|
|
|
Originally posted by: ralph.schreder.gmx.de
I have seen another demand for the same theme (deleteFromModelAction
remove="true" Not working [Please Help]).
I have the same problem and I found no solution.
My code in my plugin.xml shows like that:
<extension
point=" org.eclipse.gmf.runtime.common.ui.services.action.contributi onItemProviders ">
<contributionItemProvider
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContribu tionItemProvider "
checkPluginLoaded="false">
<Priority name="Low"/>
<popupContribution
class=" org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextM enuProvider ">
<popupStructuredContributionCriteria
objectClass="xxx.gmf.diagram.edit.parts.MyNodeEditPart">
</popupStructuredContributionCriteria>
<popupPredefinedItem id="deleteFromDiagramAction"
remove="true"></popupPredefinedItem>
<popupPredefinedItem id="deleteFromModelAction"
remove="true"></popupPredefinedItem>
<popupPredefinedItem
id="showPropertiesViewAction"
remove="true">
</popupPredefinedItem>
<popupPredefinedItem
id="properties"
remove="true">
</popupPredefinedItem>
</popupContribution>
</contributionItemProvider>
</extension>
Has anybody a solution?
Thanks a lot,
Ralph
|
|
|
|
|
Re: deleteFromModelAction remove="true" in my plugin.xml doesn't work, rest ok [message #485218 is a reply to message #232172] |
Thu, 10 September 2009 19:47 |
No real name Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Ralph schrieb:
> govind schrieb:
>> Hi Ralph
>>
>> Use <popupPredefinedItem id="editGroup" remove="true"/>
>>
>> It should work..
>>
>>
>> Regards
>> Govind R
> Hi Govind,
> thanks four your answer, but now I miss the edit menu (cut...). It works
> really, but I need the edit submenu.
>
> Regards,
> Ralph
I have the same problem - I want to remove the deleteFromModelAction but
not the edit menu (cut, copy, paste, undo, redo).
Does anyone have a solution ?
Peter
|
|
|
Re: deleteFromModelAction remove="true" in my plugin.xml doesn't work, rest ok [message #485318 is a reply to message #485218] |
Fri, 11 September 2009 11:16 |
Peter Lang Messages: 153 Registered: July 2009 |
Senior Member |
|
|
I don't have a general solution, but you might be interested in what I found out:
Most of the other menu items are added by GEF, but this item is removed by generated GMF-source afterwards and re-added (after popupContributions apply):
part/DiagramEditorContextMenuProvider.buildContextMenu
I guess this is, because GEF does not provide it for connections or something like that.
So if you just comment out the following lines there, then you can control it via plugin.xml:
menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
menu.appendToGroup("editGroup", deleteAction);
This should be sufficient if you want to remove it for all editParts, but if you would like to remove it for some special EditParts, it may leave you with connections not having this menu.
Hope that helps,
Peter
|
|
|
Powered by
FUDForum. Page generated in 0.03549 seconds