Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » deleteFromModelAction remove="true" in my plugin.xml doesn't work, rest ok
deleteFromModelAction remove="true" in my plugin.xml doesn't work, rest ok [message #232133] Wed, 03 June 2009 10:31 Go to next message
Eclipse UserFriend
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 #232148 is a reply to message #232133] Wed, 03 June 2009 11:03 Go to previous messageGo to next message
govind Ra is currently offline govind RaFriend
Messages: 95
Registered: July 2009
Member
Hi Ralph

Use <popupPredefinedItem id="editGroup" remove="true"/>

It should work..


Regards
Govind R
Re: deleteFromModelAction remove="true" in my plugin.xml doesn't work, rest ok [message #232172 is a reply to message #232148] Wed, 03 June 2009 11:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ralph.schreder.gmx.de

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
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 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
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 Go to previous message
Peter Lang is currently offline Peter LangFriend
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
Previous Topic:Get IProject of active DiagramEditor
Next Topic:Palette hide
Goto Forum:
  


Current Time: Fri Apr 26 05:08:42 GMT 2024

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

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

Back to the top