WorkspaceSvc.I Interface

com.bea.ide.workspace
WorkspaceSvc.I Interface

public static interface WorkspaceSvc.I
Enclosing class

WorkspaceSvc

Method Summary

public boolean
buildProject(URI uriWorkspace, String sProjectName, WorkspaceSvc.ProjectBuildOptions options)
Builds a project loaded from a .work file using the given options.
public boolean
buildProject(IProject project, boolean bAsync)
Builds a project.
public boolean
buildProject(IProject project, WorkspaceSvc.ProjectBuildOptions options, boolean bAsync)
Builds a project using the given options.
public boolean
buildWorkspace(URI uriWorkspace, WorkspaceSvc.WorkspaceBuildOptions options)
Builds a workspace loaded from a .work file using the given options.
public boolean
buildWorkspace(IWorkspace ws, boolean bAsync)
Builds a workspace.
public boolean
buildWorkspace(IWorkspace ws, WorkspaceSvc.WorkspaceBuildOptions options, boolean bAsync)
Performs a build of the workspace with the given options.
public boolean
checkProject(IProject proj, Collection uris, boolean fileCheck)
Checks a set of files in a given project for errors and outputs any diagnostics to the output window.
public boolean
cleanProject(IProject proj, boolean bAsync)
Cleans a project.
public boolean
cleanWorkspace(IWorkspace ws, boolean bAsync)
Cleans a workspace.
public IProjectInfo
getProjectInfo(String sTypeId)
Gets the IProjectInfo for the given project type.
public IURISelectionContext
getSelectedInTree()
Gets the set of selected URIs in the application tree.
public IWorkspace
load(String sWorkspacePath)
Creates and loads an IWorkspace using a path to a Workshop .work file.
public void
selectInTree(URI uriFile, boolean focus)
Select the given URI in the application tree.
public void
selectInTree(URI uriFile)
public boolean
visibleTreeName(String sName, boolean isDirectory)
Indicates whether the given name will be visible in the workspace tree.

Method Detail

buildProject(URI, String, WorkspaceSvc.ProjectBuildOptions) Method

public boolean buildProject(URI uriWorkspace, 
                            String sProjectName, 
                            WorkspaceSvc.ProjectBuildOptions options)
Builds a project loaded from a .work file using the given options. Will not return until the operation completes.

Parameters

uriWorkspace
URI of a Workshop .work file.
sProjectName
Name of a project in the workspace.
options
Option settings for performing the build.

Returns

true if the operation completed without error; otherwise false.

buildProject(IProject, boolean) Method

public boolean buildProject(IProject project, 
                            boolean bAsync)
Builds a project. If bAsync is set to true, work will be done in a background thread.

Parameters

project
IProject to build.
bAsync
true to perform the operation on a background thread.

Returns

true if the operation completed without error, or was scheduled for execution successfully; otherwise false.

buildProject(IProject, WorkspaceSvc.ProjectBuildOptions, boolean) Method

public boolean buildProject(IProject project, 
                            WorkspaceSvc.ProjectBuildOptions options, 
                            boolean bAsync)
Builds a project using the given options. If bAsync is set to true, work will be done in a background thread.

Parameters

project
IProject to build.
options
Option settings for performing the build.
bAsync
true to perform the operation on a background thread.

Returns

true if the operation completed without error, or was scheduled for execution successfully; otherwise false.

buildWorkspace(URI, WorkspaceSvc.WorkspaceBuildOptions) Method

public boolean buildWorkspace(URI uriWorkspace, 
                              WorkspaceSvc.WorkspaceBuildOptions options)
Builds a workspace loaded from a .work file using the given options. Build will be invoked on all currently enabled projects in the workspace. Will not return until the operation completes.

Parameters

uriWorkspace
URI of a Workshop .work file.
options
Option settings for performing the build.

Returns

true if the operation completed without error; otherwise false.

buildWorkspace(IWorkspace, boolean) Method

public boolean buildWorkspace(IWorkspace ws, 
                              boolean bAsync)
Builds a workspace. Build will be invoked on all currently enabled projects in the workspace. If bAsync is set to true, work will be done in a background thread.

Parameters

ws
IWorkpace to build.
bAsync
true to perform the operation on a background thread.

Returns

true if the operation completed without error, or was scheduled for execution successfully; otherwise false.

buildWorkspace(IWorkspace, WorkspaceSvc.WorkspaceBuildOptions, boolean) Method

public boolean buildWorkspace(IWorkspace ws, 
                              WorkspaceSvc.WorkspaceBuildOptions options, 
                              boolean bAsync)
Performs a build of the workspace with the given options. Build will be invoked on all currently enabled projects in the workspace. If bAsync is set to true, work will be done in a background thread.

Parameters

ws
IWorkpace to build.
options
Option settings for performing the build.
bAsync
true to perform the operation on a background thread.

Returns

true if the operation completed without error, or was scheduled for execution successfully; otherwise false.

checkProject(IProject, Collection, boolean) Method

public boolean checkProject(IProject proj, 
                            Collection uris, 
                            boolean fileCheck)
Checks a set of files in a given project for errors and outputs any diagnostics to the output window.

Parameters

proj
The IDE project to which the files belong.
uris
A collection of URIs to check.
fileCheck
true if this represents a check of a single file and its dependencies.

Returns

true if no diagnostics were reported to the user, false if the files had error diagnostics.

cleanProject(IProject, boolean) Method

public boolean cleanProject(IProject proj, 
                            boolean bAsync)
Cleans a project. If bAsync is set to true, work will be done in a background thread.

Parameters

proj
IProject to clean.
bAsync
true to perform the operation on a background thread.

Returns

true if the operation completed without error, or was scheduled for execution successfully; otherwise false.

cleanWorkspace(IWorkspace, boolean) Method

public boolean cleanWorkspace(IWorkspace ws, 
                              boolean bAsync)
Cleans a workspace. Clean will be invoked on all currently enabled projects in the workspace. If bAsync is set to true, work will be done in a background thread.

Parameters

ws
IWorkpace to clean.
bAsync
true to perform the operation on a background thread.

Returns

true if the operation completed without error, or was scheduled for execution successfully; otherwise false.

getProjectInfo(String) Method

public IProjectInfo getProjectInfo(String sTypeId)
Gets the IProjectInfo for the given project type.

Parameters

sTypeId
The string project type identifier.

Returns

An IProjectInfo interface for the specified project type.

getSelectedInTree() Method

public IURISelectionContext getSelectedInTree()
Gets the set of selected URIs in the application tree. Note that these URIs may or may not currently have focus in the IDE. Use Application.PROP_FocusedURIs to get an IURISectionContext for the set of focused URIs.

Returns

IURISelectionContext

load(String) Method

public IWorkspace load(String sWorkspacePath)
throws FileNotFoundException, IOException, Exception
Creates and loads an IWorkspace using a path to a Workshop .work file. IWorkspace.close() closes the currently open workspace.

Parameters

sWorkspacePath
String path to a .work file

Returns

IWorkspace open in the IDE.

Exceptions

FileNotFoundException
IOException
Exception

selectInTree(URI, boolean) Method

public void selectInTree(URI uriFile, 
                         boolean focus)
Select the given URI in the application tree. Optionally set the IDE's focus to the newly selected URI in the application tree.

Parameters

uriFile
URI to select
focus
true to request focus to the URI in the tree, false to select but not request focus.

selectInTree(URI) Method

DEPRECATED use selectInTree(uriFile, focus)

public void selectInTree(URI uriFile)

visibleTreeName(String, boolean) Method

public boolean visibleTreeName(String sName, 
                               boolean isDirectory)
Indicates whether the given name will be visible in the workspace tree. The workspace allows filtering of the visible directories and files in the workspace tree. This method may be used to determine if a file or directory of the given name will appear in the workspace tree.

Parameters

sName
Name of file or directory
isDirectory
Whether the name indicates a file or a directory

Returns

true if the named directory or file will be visible in the workspace tree, false if it will be hidden from the user