Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Save Action Error
Save Action Error [message #1060615] Mon, 27 May 2013 06:35
junior developer is currently offline junior developer
Messages: 159
Registered: January 2013
Senior Member
Hi all ,

I wrote code in the NatureAddingEditorCallback class.I override afterSave(XtextEditor editor) method but When I save the editor,open one dialog window .I upload screenshot.I do not this dialog window.How can I remove it?

public class EditorCallback extends NatureAddingEditorCallback {
	public class EditorCallback extends NatureAddingEditorCallback {
	@Override
	public void afterSave(XtextEditor editor) {
		System.out.println("here we go");
		editor.getDocument().modify(new IUnitOfWork<Void, XtextResource>() {
          
			@Override
			public java.lang.Void exec(XtextResource state) throws Exception {
				ContentModel mymodel = ((ContentModel) state.getContents().get(0));
				System.out.println(mymodel);
				mymodel.setName(mymodel.getDisplayName().toString());
				
				return null;
				
			}
			
		});
		if (isDirty()) {
			editor.doSave(new NullProgressMonitor());
		}
		super.afterSave(editor);
		
	}


best regards.
Previous Topic:Using a File located in workspace during Validation process
Next Topic:Create Automatically Field in Xtext Editor
Goto Forum:
  


Current Time: Tue May 28 17:06:28 EDT 2013

Powered by FUDForum. Page generated in 0.01768 seconds