use of org.eclipse.che.ide.api.parts.EditorPartStack in project che by eclipse.
the class EditorAgentImpl method closeEditor.
@Override
public void closeEditor(EditorPartPresenter editor) {
if (editor == null) {
return;
}
EditorPartStack editorPartStack = editorMultiPartStack.getPartStackByPart(editor);
if (editorPartStack == null) {
return;
}
EditorTab editorTab = editorPartStack.getTabByPart(editor);
//we have the handlers for the closing file event in different places of the project
//so we need to notify them about it (we can't just pass doClose() method)
eventBus.fireEvent(FileEvent.createCloseFileEvent(editorTab));
}
Aggregations