Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » ComponentEditPolicy
ComponentEditPolicy [message #160695] Thu, 15 November 2007 14:44 Go to next message
Eclipse UserFriend
Originally posted by: sd10046.lanet.lv

ComponentEditPolicy -> createDeleteSemanticCommand has

....
Command semanticCmd = getHost().getCommand(editCommandRequest);
if (semanticCmd != null && semanticCmd.canExecute()) {
CompoundCommand cc = new CompoundCommand();
cc.add(semanticCmd);
return cc;
}
return createDeleteViewCommand(deleteRequest);


Am I right that even if command can't be executed, view will be deleted
anyway?
Is it correct behaviour?

--
Ty
Re: ComponentEditPolicy [message #160933 is a reply to message #160695] Fri, 16 November 2007 13:41 Go to previous message
Cherie Revells is currently offline Cherie RevellsFriend
Messages: 299
Registered: July 2009
Senior Member
Ty,

Yes, your conclusion seems correct. If the logic in
shouldDeleteSemantic() is correct, then I would think that if you can't
delete the semantic element that the view should not be deleted.
However, a client may be depending on this behavior as it is now. Is it
causing you a problem?

Regards,
Cherie

Ty Phoon wrote:
> ComponentEditPolicy -> createDeleteSemanticCommand has
>
> ...
> Command semanticCmd = getHost().getCommand(editCommandRequest);
> if (semanticCmd != null && semanticCmd.canExecute()) {
> CompoundCommand cc = new CompoundCommand();
> cc.add(semanticCmd);
> return cc;
> }
> return createDeleteViewCommand(deleteRequest);
>
>
> Am I right that even if command can't be executed, view will be deleted
> anyway?
> Is it correct behaviour?
>
Previous Topic:Canvas/DiagramEditor class generation question
Next Topic:Setting of Edge bendpoints does not reflect visually
Goto Forum:
  


Current Time: Thu Apr 25 07:30:30 GMT 2024

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

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

Back to the top