| getWorkspace | Get the workspace root. |
|---|---|
| getProject | Get a project instance. |
| createProject | Create a new workspace project. Will create a new project if it now already exists. If creation fails, null is returned. |
| showFileSelectionDialog | Opens a file dialog. Depending on the rootFolder a workspace dialog or a file system dialog will be used. If the folder cannot be located, the workspace root folder is used by default. When type is set to WRITE or APPEND a save dialog will be shown instead of the default open dialog. |
| showFolderSelectionDialog | /** Opens a dialog box which allows the user to select a container (project or folder) in the workspace. |
| getFile | Retrieve a file from the workspace or the file system. |
| openFile | |
| readFile | |
| readLine | |
| writeFile | |
| existsFile | |
| createFile | Create a file from a given file handle. |
| createFolder | Create a folder into the workbench |
| closeFile | |
| findFiles | Return all the file of a workspace matching a pattern |
org.eclipse.core.resources.IWorkspaceRoot getWorkspace()
Get the workspace root.
org.eclipse.core.resources.IWorkspaceRoot ...
org.eclipse.core.resources.IProject getProject(java.lang.String name)
Get a project instance.
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String | project name |
org.eclipse.core.resources.IProject ...
org.eclipse.core.resources.IProject createProject(java.lang.String name)
Create a new workspace project. Will create a new project if it now already exists. If creation fails, null is returned.
| Parameter | Type | Description |
|---|---|---|
| name | java.lang.String | name or project to create |
org.eclipse.core.resources.IProject ...
java.lang.String showFileSelectionDialog(java.lang.Object rootFolder, int type)
Opens a file dialog. Depending on the rootFolder a workspace dialog or a file system dialog will be used. If the folder cannot be located, the workspace root folder is used by default. When type is set to WRITE or APPEND a save dialog will be shown instead of the default open dialog.
| Parameter | Type | Description |
|---|---|---|
| rootFolder | java.lang.Object | root folder path to use |
| type | int | dialog type to use (WRITE|APPEND for save dialog, other for open dialog) |
java.lang.String ...
java.lang.String showFolderSelectionDialog(java.lang.Object rootFolder)
/** Opens a dialog box which allows the user to select a container (project or folder) in the workspace.
| Parameter | Type | Description |
|---|---|---|
| rootFolder | java.lang.Object |
java.lang.String ...
java.lang.Object getFile(java.lang.String location)
Retrieve a file from the workspace or the file system.
| Parameter | Type | Description |
|---|---|---|
| location | java.lang.String | file location to open from |
java.lang.Object ...
org.eclipse.ease.module.platform.IFileHandle openFile(java.lang.Object location, int mode)
| Parameter | Type | Description |
|---|---|---|
| location | java.lang.Object | |
| mode | int |
org.eclipse.ease.module.platform.IFileHandle ...
java.lang.String readFile(org.eclipse.ease.module.platform.IFileHandle handle, int characters)
| Parameter | Type | Description |
|---|---|---|
| handle | org.eclipse.ease.module.platform.IFileHandle | |
| characters | int |
java.lang.String ...
java.lang.String readLine(org.eclipse.ease.module.platform.IFileHandle handle)
| Parameter | Type | Description |
|---|---|---|
| handle | org.eclipse.ease.module.platform.IFileHandle |
java.lang.String ...
boolean writeFile(org.eclipse.ease.module.platform.IFileHandle handle, java.lang.String data, int offset)
| Parameter | Type | Description |
|---|---|---|
| handle | org.eclipse.ease.module.platform.IFileHandle | |
| data | java.lang.String | |
| offset | int |
boolean ...
boolean existsFile(org.eclipse.ease.module.platform.IFileHandle handle)
| Parameter | Type | Description |
|---|---|---|
| handle | org.eclipse.ease.module.platform.IFileHandle |
boolean ...
boolean createFile(org.eclipse.ease.module.platform.IFileHandle handle, boolean createHierarchy)
Create a file from a given file handle.
| Parameter | Type | Description |
|---|---|---|
| handle | org.eclipse.ease.module.platform.IFileHandle | handle to the file to be created |
| createHierarchy | boolean | create non existing folders in fiel hierarchy |
boolean ...
org.eclipse.core.resources.IFolder createFolder(java.lang.String path)
Create a folder into the workbench
| Parameter | Type | Description |
|---|---|---|
| path | java.lang.String | Path of the new folder |
org.eclipse.core.resources.IFolder ...
void closeFile(org.eclipse.ease.module.platform.IFileHandle handle)
| Parameter | Type | Description |
|---|---|---|
| handle | org.eclipse.ease.module.platform.IFileHandle |
org.eclipse.core.resources.IFile findFiles(java.lang.String pattern, java.lang.Object rootFolder, boolean recursive)
Return all the file of a workspace matching a pattern
| Parameter | Type | Description |
|---|---|---|
| pattern | java.lang.String | |
| rootFolder | java.lang.Object | |
| recursive | boolean |
org.eclipse.core.resources.IFile ...