Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » GetRemove function
GetRemove function [message #1063854] Fri, 14 June 2013 13:58 Go to next message
abdallah Q is currently offline abdallah QFriend
Messages: 14
Registered: May 2013
Junior Member
Hi all,

I'm new to Graphiti and am trying to disable the delete and the remove features for specific element type.

i tried alot to find any way to know what is the type of the deleted element using the IDeleteContext but couldnt find any thing. is there any way to do it?

thank you
Re: GetRemove function [message #1064081 is a reply to message #1063854] Mon, 17 June 2013 14:01 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1640
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Abdallah,

in your features or your feature provider you have methods
getBusinessObjectForPictogramElement that would return the domain object the
diagram element represents. It is the domain object you linked to the shape
when you cretaed it, e.g. in your add feature.

That should enable you to identify which shape you are working on. Depending
on that you might either disable delete (canDelete method in the delete
feature) the delete for specific elements or you may completely hide it
(return null in getDeleteFeature in the feature provider or false on
isAvailable in the delete feature).

Michael
Re: GetRemove function [message #1064206 is a reply to message #1064081] Tue, 18 June 2013 09:03 Go to previous message
abdallah Q is currently offline abdallah QFriend
Messages: 14
Registered: May 2013
Junior Member
Michael,

thank you again for your help , now its working very well

Abdallah
Previous Topic:Insert image as shape
Next Topic:DiagramEditor and Compatibility wtth Eclipse 4.2.x
Goto Forum:
  


Current Time: Sat Dec 20 06:35:02 GMT 2014

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

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