use of org.eclipse.che.ide.api.parts.EditorPartStack in project che by eclipse.
the class EditorMultiPartStackPresenter method split.
@Override
public EditorPartStack split(EditorPartStack relativePartStack, Constraints constraints, double size) {
EditorPartStack editorPartStack = addEditorPartStack(null, relativePartStack, constraints, size);
activeEditorPartStack = editorPartStack;
return editorPartStack;
}
use of org.eclipse.che.ide.api.parts.EditorPartStack in project che by eclipse.
the class EditorMultiPartStackPresenter method createRootPartStack.
@Override
public EditorPartStack createRootPartStack() {
EditorPartStack editorPartStack = addEditorPartStack(null, null, null, -1);
activeEditorPartStack = editorPartStack;
return editorPartStack;
}
use of org.eclipse.che.ide.api.parts.EditorPartStack in project che by eclipse.
the class CloseOtherAction method actionPerformed.
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent event) {
EditorPartStack currentPartStack = getEditorPane(event);
EditorPartPresenter currentEditor = getEditorTab(event).getRelativeEditorPart();
for (EditorPartPresenter editorPart : editorAgent.getOpenedEditorsFor(currentPartStack)) {
if (currentEditor != editorPart) {
editorAgent.closeEditor(editorPart);
}
}
}
use of org.eclipse.che.ide.api.parts.EditorPartStack in project che by eclipse.
the class CloseOtherAction method isFilesToCloseExist.
private boolean isFilesToCloseExist(ActionEvent event) {
EditorPartStack currentPartStack = getEditorPane(event);
EditorPartPresenter currentEditor = getEditorTab(event).getRelativeEditorPart();
for (EditorPartPresenter openedEditor : editorAgent.getOpenedEditorsFor(currentPartStack)) {
if (currentEditor != openedEditor) {
return true;
}
}
return false;
}
use of org.eclipse.che.ide.api.parts.EditorPartStack in project che by eclipse.
the class ReopenClosedFileAction method actionPerformed.
/** {@inheritDoc} */
@Override
public void actionPerformed(ActionEvent event) {
EditorPartStack currentPartStack = getEditorPane(event);
EditorPartPresenter lastClosed = currentPartStack.getLastClosed();
VirtualFile file = lastClosed.getEditorInput().getFile();
eventBus.fireEvent(FileEvent.createOpenFileEvent(file));
}
Aggregations