Skip to main content



      Home
Home » Modeling » Graphiti » GetRemove function
GetRemove function [message #1063854] Fri, 14 June 2013 09:58 Go to next message
Eclipse UserFriend
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 10:01 Go to previous messageGo to next message
Eclipse UserFriend
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 05:03 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 19:21:45 EDT 2025

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

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

Back to the top