public class ContainerGenerator extends Object
This class may be instantiated; it is not intended to be subclassed.
Example usage:
ContainerGenerator gen = new ContainerGenerator(new Path("/A/B"));
IContainer res = null;
try {
res = gen.getContainer(monitor); // creates project A and folder B if required
} catch (CoreException e) {
// handle failure
} catch (OperationCanceledException e) {
// handle cancelation
}
| Constructor and Description |
|---|
ContainerGenerator(IPath containerPath)
Creates a generator for the container resource (folder or project) at the
given workspace path.
|
| Modifier and Type | Method and Description |
|---|---|
IContainer |
generateContainer(IProgressMonitor monitor)
Ensures that this generator's container resource exists.
|
public ContainerGenerator(IPath containerPath)
Call getContainer to create any missing resources along the
path.
containerPath - the workspace path of the containerpublic IContainer generateContainer(IProgressMonitor monitor) throws CoreException
Note: This method should be called within a workspace modify operation since it may create resources.
monitor - a progress monitorCoreException - if the operation failsOperationCanceledException - if the operation is canceledGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.