Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How is saving working in GMF?
How is saving working in GMF? [message #1128330] Mon, 07 October 2013 11:26 Go to next message
Phil H is currently offline Phil H
Messages: 267
Registered: November 2012
Senior Member
Hi,

I'm wondering how the save mechanism is working im GMF. DiagramDocumentEditor has the method isdirty(), which determine if save should be enabled or not I reckon, but how and where is this method called before?

public boolean isDirty() {
	IDocumentProvider p= getDocumentProvider();
	return p == null ? false : p.canSaveDocument(getEditorInput());
}
Re: How is saving working in GMF? [message #1137288 is a reply to message #1128330] Mon, 14 October 2013 07:40 Go to previous message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi,

the method which does the saving is located in the generated code. The generated xxxDiagramEditor has two methods public void doSaveAs() and protected void performSaveAs(IProgressMonitor progressMonitor) which are responsible for saving. This is a good place to do model Validation.

Ralph
Previous Topic:GMF customization with EEF
Next Topic:Iterator id
Goto Forum:
  


Current Time: Wed Aug 20 12:42:44 EDT 2014

Powered by FUDForum. Page generated in 0.01509 seconds