public interface IWorkspace extends IFileSpecificationGetter
This interface extends IFileSpecificationGetter
so that compilation
units that do not wish to virtualize access to the file system can just use a
workspace as their IFileSpecificationGetter
.
Modifier and Type | Field and Description |
---|---|
static Map<ICompilerProject,Set<ICompilationUnit>> |
NIL_COMPILATIONUNITS_TO_UPDATE
Empty map that can be passed to
endIdleState(Map) by callers who do not have
a map containing ICompilationUnit s whose updates to project
symbol tables have been deferred. |
Modifier and Type | Method and Description |
---|---|
void |
addInvalidationListener(IInvalidationListener invalidationListner)
Adds a
IInvalidationListener on the workspace. |
void |
doneBuilding()
Allows the workspace to enter the idle state once all pending operations
are completed.
|
void |
endIdleState(Map<ICompilerProject,Set<ICompilationUnit>> cusToUpdate)
Updates symbol table entries for all the
ICompilationUnit s in the
specified map and unlocks the lock acquired by calling
startIdleState() . |
void |
fileAdded(IFileSpecification addedFile)
Called by clients of the driver object model when a file add has been
detected.
|
void |
fileChanged(IFileSpecification changedFile)
Called by clients of the driver object model when a file change has been
detected.
|
void |
fileRemoved(IFileSpecification removedFile)
Called by clients of the driver object model when a file remove has been
detected.
|
IASDocDelegate |
getASDocDelegate()
Gets the
IASDocDelegate that instances of
ASParser will use to record information about ASDoc comments. |
Collection<ICompilationUnit> |
getCompilationUnits(String path,
ICompilerProject project)
Get all compilation units in the specified project related to the
specified file name.
|
Iterable<ICompilationUnit> |
getInvisibleAndVisibleCompilationUnits(String path,
ICompilerProject project)
Gets an iterator that iterates first over all invisible
ICompilationUnit 's for the specified file path in the specified
ICompilerProject and then over all visible
ICompilationUnit 's for the specified file path in the specified
ICompilerProject . |
IMXMLDataManager |
getMXMLDataManager()
Gets the singleton that manages DOM-like
MXMLData objects for
MXML files in the workspace. |
IWorkspaceProfilingDelegate |
getProfilingDelegate()
Gets the
IWorkspaceProfilingDelegate from the workspace. |
ISWCManager |
getSWCManager()
Get the SWC manager.
|
void |
removeInvalidationListener(IInvalidationListener invalidationListner)
Removes a
IInvalidationListener on the workspace. |
void |
setASDocDelegate(IASDocDelegate asDocDelegate)
Sets the
IASDocDelegate that instances of
ASParser will use to record information about ASDoc comments. |
void |
setProfilingDelegate(IWorkspaceProfilingDelegate profilingDelegate)
Sets the
IWorkspaceProfilingDelegate on the workspace. |
void |
startBuilding()
Waits for the workspace to leave the idle state and prevents all threads
from putting the workspace into the idle state.
|
void |
startIdleState()
Waits for all pending operation on all
ICompilationUnit 's in all
ICompilerProject s in this IWorkspace to complete. |
getFileSpecification, getWorkspace
static final Map<ICompilerProject,Set<ICompilationUnit>> NIL_COMPILATIONUNITS_TO_UPDATE
endIdleState(Map)
by callers who do not have
a map containing ICompilationUnit
s whose updates to project
symbol tables have been deferred.void startIdleState()
ICompilationUnit
's in all
ICompilerProject
s in this IWorkspace
to complete. The
activity lock will also be acquired in this call, so once this method has
been called, no new work can be submitted until after the lock has been
released by calling endIdleState(Map)
.
This method must never be called from an ICompilationUnit
operation
as that would result in dead lock.
void endIdleState(Map<ICompilerProject,Set<ICompilationUnit>> cusToUpdate)
ICompilationUnit
s in the
specified map and unlocks the lock acquired by calling
startIdleState()
.cusToUpdate
- Map
from ICompilerProject
to
Set
of ICompilationUnit
s in the project whose externally
visible symbols need to be re-registered with the symbol table of the
containing ICompilerProject
.void startBuilding()
doneBuilding()
.void doneBuilding()
startBuilding()
.void setProfilingDelegate(IWorkspaceProfilingDelegate profilingDelegate)
IWorkspaceProfilingDelegate
on the workspace.profilingDelegate
- IWorkspaceProfilingDelegate
that will receive
profiling information. Can be null, in which case no profiling
information is collected.IWorkspaceProfilingDelegate getProfilingDelegate()
IWorkspaceProfilingDelegate
from the workspace.IWorkspaceProfilingDelegate
for this IWorkspace. Can be null.void addInvalidationListener(IInvalidationListener invalidationListner)
IInvalidationListener
on the workspace.invalidationListner
- IInvalidationListener
that will receive
invalidation notifications.void removeInvalidationListener(IInvalidationListener invalidationListner)
IInvalidationListener
on the workspace.invalidationListner
- IInvalidationListener
that will be removed.ISWCManager getSWCManager()
ISWCManager
objectIMXMLDataManager getMXMLDataManager()
MXMLData
objects for
MXML files in the workspace.IMXMLDataManager
objectvoid fileRemoved(IFileSpecification removedFile)
removedFile
- An IFileSpecification
that can be used to get
the new contents of the removed file.void fileChanged(IFileSpecification changedFile)
changedFile
- An IFileSpecification
that can be used to get
the change filename.void fileAdded(IFileSpecification addedFile)
addedFile
- An IFileSpecification
that can be used to get the
name and contents of the added file.Collection<ICompilationUnit> getCompilationUnits(String path, ICompilerProject project)
path
- String to source filenameproject
- containing projectIterable<ICompilationUnit> getInvisibleAndVisibleCompilationUnits(String path, ICompilerProject project)
ICompilationUnit
's for the specified file path in the specified
ICompilerProject
and then over all visible
ICompilationUnit
's for the specified file path in the specified
ICompilerProject
.path
- Normalized absolute file name.project
- ICompilerProject
that will contains all the
ICompilationUnit
in the returned Iterable
.ICompilationUnit
's for the specified file path in the specified
ICompilerProject
and then over all visible
ICompilationUnit
's for the specified file path in the specified
ICompilerProject
IASDocDelegate getASDocDelegate()
IASDocDelegate
that instances of
ASParser
will use to record information about ASDoc comments.IASDocDelegate
that instances of
ASParser
will use to record information about ASDoc comments.void setASDocDelegate(IASDocDelegate asDocDelegate)
IASDocDelegate
that instances of
ASParser
will use to record information about ASDoc comments.asDocDelegate
- IASDocDelegate
that instances of
ASParser
will use to record information about ASDoc comments.Copyright © 2016 The Apache Software Foundation. All rights reserved.