Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » modify model with command befor delete edge
modify model with command befor delete edge [message #630390] Fri, 01 October 2010 19:46
AlexejS Mising name is currently offline AlexejS Mising nameFriend
Messages: 25
Registered: May 2010
Junior Member
Hello Community,

in my GMF editor I want to modify my model with a undoable command after I delete an Element in my editor.

So should I delete an edge for exmaple, I want to change node properties befor.


So I have to modify EdgeItemSemanticEditPolicy,

	protected Command getDestroyElementCommand(DestroyElementRequest req) {
		View view = (View) getHost().getModel();
		CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(
				getEditingDomain(), null);
		
		cmd.setTransactionNestingEnabled(false);
		cmd.add(new BeforeEdgeDeleteCommand(view));
		//cmd.add(new DestroyElementCommand(req));
		return getGEFWrapper(cmd);
	}




so i added a Command - but that doesn't really work.

What to do?

A hint is enough.
Previous Topic:gmf examples no longer on the cvs repository
Next Topic:add a new function in my menubar
Goto Forum:
  


Current Time: Fri Apr 26 22:22:36 GMT 2024

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

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

Back to the top