Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » check before modify(Check for lock before modifying diagram)
check before modify [message #650954] Thu, 27 January 2011 09:59 Go to next message
Avijit Kumar Singh is currently offline Avijit Kumar SinghFriend
Messages: 3
Registered: January 2011
Junior Member
My use case is that in the graphiti diagram before modifying the diagram for the first time i need to check if the underlying resource(remote resource) is already locked. The examples in graphiti work with local resources and probably it is taken care by the EMF. In my case the resource is a remote one and so i need an place where i can check the state of the remote resource and then decide whether to modify or to cancel the command.
Re: check before modify [message #651157 is a reply to message #650954] Fri, 28 January 2011 03:59 Go to previous messageGo to next message
Panneer Selvam is currently offline Panneer SelvamFriend
Messages: 8
Registered: May 2010
Junior Member
you may have to check in canExecute() method in the feature class, return false if the lock cannot be acquired.

Is there another way?

Regards,
Panneer
Re: check before modify [message #651173 is a reply to message #651157] Fri, 28 January 2011 07:51 Go to previous messageGo to next message
Avijit Kumar Singh is currently offline Avijit Kumar SinghFriend
Messages: 3
Registered: January 2011
Junior Member
I am doing that already but i feel that is not the optimal solution as then we have to check for the lock separately in all the different features . It would be better in my opinion to have a central place where the canExecute() of the command can be checked. Is there any such place?
Re: check before modify [message #651174 is a reply to message #651173] Fri, 28 January 2011 07:54 Go to previous messageGo to next message
Avijit Kumar Singh is currently offline Avijit Kumar SinghFriend
Messages: 3
Registered: January 2011
Junior Member
I found a solution but i do not know if this is completely correct. In the preExecute() method in the tool behaviour provider we can do some things.
Re: check before modify [message #651198 is a reply to message #651174] Fri, 28 January 2011 10:14 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1635
Registered: July 2009
Location: Walldorf, Germany
Senior Member
This is a good central place to do such checks.

Michael


"Avijit Kumar Singh" wrote in message news:ihtsct$r5q$1@news.eclipse.org...

I found a solution but i do not know if this is completely correct. In the
preExecute() method in the tool behaviour provider we can do some things.
Previous Topic:de-select a shape on double click
Next Topic:[ANN] Migration field report @ Eclipse Demo Camp Berlin
Goto Forum:
  


Current Time: Sun Nov 23 02:19:22 GMT 2014

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

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