Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » how to disable "Delete form model" function for special Element
how to disable "Delete form model" function for special Element [message #8064] Sun, 06 August 2006 23:07 Go to next message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

I create a process diagrm such as process.process_diagram in my picture,
when I doulbe click on the element 'a', it will programmatically open a
subdiagram called a.diagrm.process_diagram with an element called 'data'.

Now, I want to disable the "delete from model" function for the element
'data' I created in subdiagram, what do I need to do ?

Thanks,
dzh



Re: how to disable "Delete form model" function for special Element [message #9986 is a reply to message #8064] Tue, 08 August 2006 12:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi dzh,

You could return an unexecutable command from your
xxxSemanticEditPolicy#getDestroyElementCommand, or from your
xxxEditHelper#getDestroyElementCommand, to disable the "Delete from
Model" menu item for that kind of element.

Regards,
Linda
Re: how to disable "Delete form model" function for special Element [message #18166 is a reply to message #8064] Mon, 14 August 2006 14:46 Go to previous messageGo to next message
Eclipse UserFriend
Hello dzh,

You can take a look on plugin.xml generated for Ecore diagram editor - it
removes "deleteFromDiagramAction" for some elements. I think you can remove
"deleteFromModelAction" in a same way.

<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="org.eclipse.gmf.ecore.edit.parts.EAttributeEditPart "/>
<popupPredefinedItem id="deleteFromDiagramAction" remove="true"/>
</popupContribution>
.......

-----------------
Alex Shatalin
Re: how to disable "Delete form model" function for special Element [message #18232 is a reply to message #18166] Tue, 15 August 2006 01:59 Go to previous message
Eclipse UserFriend
Originally posted by: dzhpingbo.sohu.com

"Alex Shatalin" <vano@borland.com> д
Previous Topic:List of items based on internal list?
Next Topic:Image as background
Goto Forum:
  


Current Time: Wed Apr 16 10:26:48 EDT 2025

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

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

Back to the top