Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ public void afterSave(XtextEditor xtextEditor) {
}
}

@Override
public void afterRevert(XtextEditor xtextEditor) {
for (IXtextEditorCallback xtextEditorCallback : editorCallbacks) {
try {
xtextEditorCallback.afterRevert(xtextEditor);
} catch (Exception e) {
handle(e);
}
}
}

@Override
public void beforeDispose(XtextEditor xtextEditor) {
for (IXtextEditorCallback xtextEditorCallback : editorCallbacks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public interface IXtextEditorCallback {
*/
void afterSave(XtextEditor editor);

default void afterRevert(XtextEditor editor) {
afterSave(editor);
}

void beforeDispose(XtextEditor editor);

boolean onValidateEditorInputState(XtextEditor editor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ protected void run() throws Exception {
@Override
public void doRevertToSaved() {
super.doRevertToSaved();
callback.afterSave(this);
callback.afterRevert(this);
}

/**
Expand Down
Loading