com.intellij.testFramework
Class TestEditorManagerImpl

java.lang.Object
  extended by FileEditorManagerEx
      extended by com.intellij.testFramework.TestEditorManagerImpl
All Implemented Interfaces:
ApplicationComponent, BaseComponent, ProjectComponent

public class TestEditorManagerImpl
extends FileEditorManagerEx
implements ApplicationComponent, ProjectComponent


Constructor Summary
TestEditorManagerImpl(Project project)
           
 
Method Summary
 void addFileEditorManagerListener(FileEditorManagerListener listener)
           
 void changeSplitterOrientation()
           
 void closeAllFiles()
           
 void closeFile(VirtualFile file)
           
 void createSplitter(int orientation)
           
 void disposeComponent()
          Component should dispose system resources or perform another cleanup in this method.
 void flipTabs()
           
 FileEditor[] getAllEditors()
           
 javax.swing.JComponent getComponent()
           
 java.lang.String getComponentName()
          Unique name of this component.
 VirtualFile getCurrentFile()
           
 EditorWindow getCurrentWindow()
           
 Editor getEditor(VirtualFile file)
           
 FileEditor[] getEditors(VirtualFile file)
           
 Pair<FileEditor[],FileEditorProvider[]> getEditorsWithProviders(VirtualFile file)
           
 VirtualFile getFile(FileEditor editor)
           
 EditorWindow getNextWindow(EditorWindow window)
           
 VirtualFile[] getOpenFiles()
           
 javax.swing.JComponent getPreferredFocusedComponent()
           
 EditorWindow getPrevWindow(EditorWindow window)
           
 Project getProject()
           
 FileEditorProvider getProvider(FileEditor editor)
           
 FileEditor getSelectedEditor(VirtualFile file)
           
 FileEditor[] getSelectedEditors()
           
 Pair<FileEditor,FileEditorProvider> getSelectedEditorWithProvider(VirtualFile file)
           
 VirtualFile[] getSelectedFiles()
           
 Editor getSelectedTextEditor()
           
 VirtualFile[] getSiblings(VirtualFile file)
           
 int getTabGroupsOrientation()
           
 EditorWindow[] getWindows()
           
 boolean hasOpenedFile()
           
 boolean hasSplitters()
           
 boolean hasTabGroups()
           
 void initComponent()
          Component should do initialization and communication with another components in this method.
 boolean isChanged(EditorComposite editor)
           
 boolean isFileOpen(VirtualFile file)
           
 boolean isFilePinned(VirtualFile file)
           
 boolean isInSplitter()
           
 void moveFocusToNextEditor()
           
 void moveToOppositeTabGroup(VirtualFile file)
           
 java.util.List<FileEditor> openEditor(OpenFileDescriptor descriptor, boolean focusEditor)
           
 Pair<FileEditor[],FileEditorProvider[]> openFileWithProviders(VirtualFile file, boolean focusEditor)
           
 Editor openTextEditor(OpenFileDescriptor descriptor, boolean focusEditor)
           
 Editor openTextEditorEnsureNoFocus(OpenFileDescriptor descriptor)
           
 void projectClosed()
          Invoked when the project corresponding to this component instance is closed.
 void projectOpened()
          Invoked when the project corresponding to this component instance is opened.
 void registerFileAsOpened(VirtualFile file, Editor editor)
           
 void removeFileEditorManagerListener(FileEditorManagerListener listener)
           
 void setCurrentWindow(EditorWindow window)
           
 void setFilePinned(VirtualFile file, boolean pinned)
           
 void setTabGroupsOrientation(int orientation)
           
 boolean tabsMode()
           
 void unsplitAllWindow()
           
 void unsplitWindow()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestEditorManagerImpl

public TestEditorManagerImpl(Project project)
Method Detail

openFileWithProviders

public Pair<FileEditor[],FileEditorProvider[]> openFileWithProviders(VirtualFile file,
                                                                     boolean focusEditor)

moveFocusToNextEditor

public void moveFocusToNextEditor()

createSplitter

public void createSplitter(int orientation)

changeSplitterOrientation

public void changeSplitterOrientation()

flipTabs

public void flipTabs()

tabsMode

public boolean tabsMode()

isInSplitter

public boolean isInSplitter()

hasOpenedFile

public boolean hasOpenedFile()

getCurrentFile

public VirtualFile getCurrentFile()

getSelectedEditorWithProvider

public Pair<FileEditor,FileEditorProvider> getSelectedEditorWithProvider(VirtualFile file)

isChanged

public boolean isChanged(EditorComposite editor)

getNextWindow

public EditorWindow getNextWindow(EditorWindow window)

getPrevWindow

public EditorWindow getPrevWindow(EditorWindow window)

closeAllFiles

public void closeAllFiles()

openTextEditorEnsureNoFocus

public Editor openTextEditorEnsureNoFocus(OpenFileDescriptor descriptor)

getProvider

public FileEditorProvider getProvider(FileEditor editor)

getCurrentWindow

public EditorWindow getCurrentWindow()

setCurrentWindow

public void setCurrentWindow(EditorWindow window)

getFile

public VirtualFile getFile(FileEditor editor)

hasSplitters

public boolean hasSplitters()

hasTabGroups

public boolean hasTabGroups()

isFilePinned

public boolean isFilePinned(VirtualFile file)

setFilePinned

public void setFilePinned(VirtualFile file,
                          boolean pinned)

unsplitWindow

public void unsplitWindow()

unsplitAllWindow

public void unsplitAllWindow()

getWindows

public EditorWindow[] getWindows()

getTabGroupsOrientation

public int getTabGroupsOrientation()

setTabGroupsOrientation

public void setTabGroupsOrientation(int orientation)

moveToOppositeTabGroup

public void moveToOppositeTabGroup(VirtualFile file)

getSelectedEditor

public FileEditor getSelectedEditor(VirtualFile file)

isFileOpen

public boolean isFileOpen(VirtualFile file)

getEditors

public FileEditor[] getEditors(VirtualFile file)

getSiblings

public VirtualFile[] getSiblings(VirtualFile file)

disposeComponent

public void disposeComponent()
Description copied from interface: BaseComponent
Component should dispose system resources or perform another cleanup in this method.

Specified by:
disposeComponent in interface BaseComponent

initComponent

public void initComponent()
Description copied from interface: BaseComponent
Component should do initialization and communication with another components in this method.

Specified by:
initComponent in interface BaseComponent

projectClosed

public void projectClosed()
Description copied from interface: ProjectComponent
Invoked when the project corresponding to this component instance is closed.

Note that components may be created for even unopened projects and this method can be never invoked for a particular component instance (for example for default project).

Specified by:
projectClosed in interface ProjectComponent

projectOpened

public void projectOpened()
Description copied from interface: ProjectComponent
Invoked when the project corresponding to this component instance is opened.

Note that components may be created for even unopened projects and this method can be never invoked for a particular component instance (for example for default project).

Specified by:
projectOpened in interface ProjectComponent

closeFile

public void closeFile(VirtualFile file)

getSelectedFiles

public VirtualFile[] getSelectedFiles()

getSelectedEditors

public FileEditor[] getSelectedEditors()

getSelectedTextEditor

public Editor getSelectedTextEditor()

getComponent

public javax.swing.JComponent getComponent()

getOpenFiles

public VirtualFile[] getOpenFiles()

getEditor

public Editor getEditor(VirtualFile file)

getAllEditors

public FileEditor[] getAllEditors()

registerFileAsOpened

public void registerFileAsOpened(VirtualFile file,
                                 Editor editor)

openTextEditor

public Editor openTextEditor(OpenFileDescriptor descriptor,
                             boolean focusEditor)

addFileEditorManagerListener

public void addFileEditorManagerListener(FileEditorManagerListener listener)

removeFileEditorManagerListener

public void removeFileEditorManagerListener(FileEditorManagerListener listener)

openEditor

@NotNull
public java.util.List<FileEditor> openEditor(OpenFileDescriptor descriptor,
                                                     boolean focusEditor)

getProject

@NotNull
public Project getProject()

getPreferredFocusedComponent

public javax.swing.JComponent getPreferredFocusedComponent()

getEditorsWithProviders

public Pair<FileEditor[],FileEditorProvider[]> getEditorsWithProviders(VirtualFile file)

getComponentName

public java.lang.String getComponentName()
Description copied from interface: BaseComponent
Unique name of this component. If there is another component with the same name or name is null internal assertion will occur.

Specified by:
getComponentName in interface BaseComponent
Returns:
the name of this component