Opens this project. No action is taken if the project is already open.
Opening a project constructs an in-memory representation of its resources from information stored on disk.
The BACKGROUND_REFRESH
update flag controls how this method behaves when a project is opened for the first time on a location that has existing resources on disk. If this flag is specified, resources on disk will be added to the project in the background after this method returns. Child resources of the project may not be available until this background refresh completes. If this flag is not specified, resources on disk are added to the project in the foreground before this method returns.
This method changes resources; these changes will be reported in a subsequent resource change event that includes an indication that the project has been opened and its resources have been added to the tree. If the
BACKGROUND_REFRESH
update flag is specified, multiple resource change events may occur as resources on disk are discovered and added to the tree.
This method is long-running; progress and cancellation are provided by the given progress monitor.
@param monitor a progress monitor, or
null
if progressreporting is not desired
@exception CoreException if this method fails. Reasons include:
- Resource changes are disallowed during certain types of resource change event notification. See
IResourceChangeEvent
for more details.
@exception OperationCanceledException if the operation is canceled. Cancelation can occur even if no progress monitor is provided.
@see #close(IProgressMonitor)
@see IResource#BACKGROUND_REFRESH
@see IResourceRuleFactory#modifyRule(IResource)
@since 3.1