public interface IWorkbench
Modifier and Type | Method and Description |
---|---|
void |
addWorkbenchListener(IWorkbenchListener listener)
Adds the given workbench listener to the workbench.
|
void |
closeAllEditors(boolean force)
Closes all open editors.
|
void |
closeAllEditors(IAbstractFile file,
boolean force)
Closes all editors that have opened the given abstract file.
|
void |
closeAllViews(boolean force)
Closes all open views except of the workspace view.
|
void |
closeEditor(IEditor editor,
boolean force)
Closes the editor.
|
void |
closeView(IView view,
boolean force)
Closes the view.
|
void |
closeWindow(IChildWindow window,
boolean force)
Closes the window.
|
IEditor[] |
findEditors(IAbstractFile file)
Returns an array of all editors that have currently opened the given
abstract file.
|
IEditor |
findLockingEditor(IAbstractFile file)
Returns the editor that has currently locked the file or null if the file
isn't locked.
|
IAbstractFolderProvider |
getAbstractFolderProvider() |
IActionHandler |
getActionHandler() |
String[] |
getCommandLineOptions() |
IContextMenuManager |
getContextMenuManager() |
IWorkspace |
getCurrentWorkspace()
Returns the currently opened workspace in the vip tool
|
IEditorManager |
getEditorManager() |
IFileInterpreterManager |
getFileInterpreterManager()
Returns the file interpreter manager that manages all file interpreters
and their providers.
|
IJobScheduler |
getJobScheduler() |
ILogger |
getLogger()
Returns the logger for the viptool.
|
JFrame |
getMainFrame()
Returns a reference to the main frame window.
|
IMenuBarManager |
getMenuBarManager() |
IEditor[] |
getOpenEditors()
Returns an array of all opened editors.
|
IView[] |
getOpenViews()
Returns an array of all opened views.
|
String |
getPropertyPath() |
IResourceLoader |
getResourceLoader() |
IAbstractFile |
getSelectedFile()
Returns the current selected file.
|
IAbstractFolder |
getSelectedFolder()
Returns the parent folder of the current selected object in the project
tree.
|
IProject |
getSelectedProject()
Returns the project of the current selected object in the project tree.
|
IToolBarManager |
getToolBarManager() |
void |
openEditor(IEditor editor)
Opens the given editor.
|
void |
openFile(IAbstractFile file)
Opens the given file using the default file interpreter and the default
editor for displaying.
|
void |
openFile(IAbstractFile file,
IFileInterpreterProvider fileInterpreterProvider)
Opens the given file using the file interpreter that is managed by the
given file interpreter provider.
|
void |
openFile(IAbstractFile file,
IFileInterpreterProvider fileInterpreterProvider,
IEditorProvider editorProvider)
Opens the given file using the file interpreter managed by the given file
interpreter provider.
|
void |
openFile(IFileInterpreter fileInterpreter)
Opens the file that is managed by the given file interpreter using the
default editor for this interpreter.
|
void |
openView(IView view)
Opens the given view.
|
void |
removeWorkbenchListener(IWorkbenchListener listener)
Removes the given workbench listener from the workbench.
|
void |
selectFile(IAbstractFile file)
Select the given file.
|
void |
selectWindow(IChildWindow window)
selects the given window
|
void |
setCurrentWorkspace(IWorkspace workspace)
Sets the current workspace.
|
void |
showDialog(IStandardDialogListener listener,
String title,
String mainDescription,
JComponent content,
Image image,
int buttons,
int defaultButton) |
void |
showExceptionInDialog(VipToolException exception)
Shows the given exception in a standard dialog to informt the user about
the error.
|
void |
showExceptionInDialog(VipToolRuntimeException exception)
Shows the given exception in a standard dialog to informt the user about
the error.
|
void |
startWizard(IWizard wizard) |
boolean |
windowIsSelected(IChildWindow window)
checks weather the given window is selected
|
IAbstractFolderProvider getAbstractFolderProvider()
void showDialog(IStandardDialogListener listener, String title, String mainDescription, JComponent content, Image image, int buttons, int defaultButton)
JFrame getMainFrame()
void selectWindow(IChildWindow window)
window
- the child window that is to be selectedboolean windowIsSelected(IChildWindow window)
window
- the child window that is to be checkedvoid showExceptionInDialog(VipToolException exception)
exception
- the exception, that should be shown in the dialog.void showExceptionInDialog(VipToolRuntimeException exception)
exception
- the exception, that should be shown in the dialog.void closeWindow(IChildWindow window, boolean force)
window
- the window to closeforce
- if this parameter is true the window will be closed even if
the view return false to a call to canClosevoid setCurrentWorkspace(IWorkspace workspace)
workspace
- the workspace to open and to loadIWorkspace getCurrentWorkspace()
IProject getSelectedProject()
IAbstractFolder getSelectedFolder()
IAbstractFile getSelectedFile()
void selectFile(IAbstractFile file)
file
- the file to selectvoid openView(IView view)
view
- the view that should be openedvoid closeView(IView view, boolean force)
view
- the view to closeforce
- if this parameter is true the view will be closed even if the
view return false to a call to canClosevoid closeAllViews(boolean force)
force
- if this parameter is true the views will be closed even if the
views return false to a call to canCloseIView[] getOpenViews()
void openEditor(IEditor editor)
editor
- the editor that should be openedIEditor[] findEditors(IAbstractFile file)
file
- the editors of this file will be returnedIEditor findLockingEditor(IAbstractFile file)
file
- the locking editor of this file will be returnedvoid closeEditor(IEditor editor, boolean force)
editor
- the editor to closeforce
- if this parameter is true the editor will be closed even if
the editor return false to a call to canClosevoid closeAllEditors(boolean force)
force
- if this parameter is true the editors will be closed even if
the editors return false to a call to canClosevoid closeAllEditors(IAbstractFile file, boolean force)
file
- the editors of this file will be closedforce
- if this parameter is true the editors will be closed even if
the editors return false to a call to canClose.IEditor[] getOpenEditors()
void openFile(IAbstractFile file) throws CannotOpenFileException
file
- the file that should be openedEditorException
- - if the file cannot be openedCannotOpenFileException
void openFile(IFileInterpreter fileInterpreter) throws CannotOpenFileException
fileInterpreter
- the file interpreter whose file shpuld be openedCannotOpenFileException
- - if the file cannot be openedvoid openFile(IAbstractFile file, IFileInterpreterProvider fileInterpreterProvider) throws CannotOpenFileException
file
- the file that should be openedfileInterpreterProvider
- the file interpreter provider managing the file interpreter
that should be used to interprete the fileCannotOpenFileException
- - if the file could not be opened, e.g. because the file
interpreter provider does not accept the filevoid openFile(IAbstractFile file, IFileInterpreterProvider fileInterpreterProvider, IEditorProvider editorProvider) throws CannotOpenFileException
file
- the file to openfileInterpreterProvider
- the file interpreter provider managing the file interpreter
that should be used to interprete the fileeditorProvider
- the editor provider that manages the editor that should be
used for displaying the given fileCannotOpenFileException
- if the file could not be opened, e.g. because the editor
interpreter provider does not accept the given file
interpreter providervoid addWorkbenchListener(IWorkbenchListener listener)
listener
- the workbench listener that should be addedvoid removeWorkbenchListener(IWorkbenchListener listener)
listener
- the listener that should be removed from the workbenchIFileInterpreterManager getFileInterpreterManager()
ILogger getLogger()
IMenuBarManager getMenuBarManager()
IToolBarManager getToolBarManager()
IContextMenuManager getContextMenuManager()
IActionHandler getActionHandler()
IEditorManager getEditorManager()
IJobScheduler getJobScheduler()
void startWizard(IWizard wizard)
IResourceLoader getResourceLoader()
String getPropertyPath()
String[] getCommandLineOptions()