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.