Search in sources :

Example 6 with EditorPartStack

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;
}
Also used : EditorPartStack(org.eclipse.che.ide.api.parts.EditorPartStack)

Example 7 with 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;
}
Also used : EditorPartStack(org.eclipse.che.ide.api.parts.EditorPartStack)

Example 8 with 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);
        }
    }
}
Also used : EditorPartPresenter(org.eclipse.che.ide.api.editor.EditorPartPresenter) EditorPartStack(org.eclipse.che.ide.api.parts.EditorPartStack)

Example 9 with EditorPartStack

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;
}
Also used : EditorPartPresenter(org.eclipse.che.ide.api.editor.EditorPartPresenter) EditorPartStack(org.eclipse.che.ide.api.parts.EditorPartStack)

Example 10 with EditorPartStack

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));
}
Also used : VirtualFile(org.eclipse.che.ide.api.resources.VirtualFile) EditorPartPresenter(org.eclipse.che.ide.api.editor.EditorPartPresenter) EditorPartStack(org.eclipse.che.ide.api.parts.EditorPartStack)

Aggregations

EditorPartStack (org.eclipse.che.ide.api.parts.EditorPartStack)16 EditorPartPresenter (org.eclipse.che.ide.api.editor.EditorPartPresenter)7 JsonObject (elemental.json.JsonObject)3 PartPresenter (org.eclipse.che.ide.api.parts.PartPresenter)3 OperationException (org.eclipse.che.api.promises.client.OperationException)2 Promise (org.eclipse.che.api.promises.client.Promise)2 HasDataObject (org.eclipse.che.ide.api.data.HasDataObject)2 EditorTab (org.eclipse.che.ide.api.parts.EditorTab)2 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)1 ArrayOf (elemental.util.ArrayOf)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Operation (org.eclipse.che.api.promises.client.Operation)1 Constraints (org.eclipse.che.ide.api.constraints.Constraints)1 AsyncEditorProvider (org.eclipse.che.ide.api.editor.AsyncEditorProvider)1 EditorProvider (org.eclipse.che.ide.api.editor.EditorProvider)1 FileType (org.eclipse.che.ide.api.filetypes.FileType)1 Resource (org.eclipse.che.ide.api.resources.Resource)1 VirtualFile (org.eclipse.che.ide.api.resources.VirtualFile)1 ProjectExplorerPresenter (org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter)1