org.eclipse.jdt.internal.core
Class CreatePackageFragmentOperation

java.lang.Object
  extended by org.eclipse.jdt.internal.core.JavaModelOperation
      extended by org.eclipse.jdt.internal.core.CreatePackageFragmentOperation
All Implemented Interfaces:
IWorkspaceRunnable, org.eclipse.core.runtime.IProgressMonitor

public class CreatePackageFragmentOperation
extends JavaModelOperation

This operation creates a new package fragment under a given package fragment root. The following must be specified:

Any needed folders/package fragments are created. If the package fragment already exists, this operation has no effect. The result elements include the IPackageFragment created and any side effect package fragments that were created.

NOTE: A default package fragment exists by default for a given root.

Possible exception conditions:


Field Summary
 
Fields inherited from class org.eclipse.jdt.internal.core.JavaModelOperation
HAS_MODIFIED_RESOURCE_ATTR, progressMonitor, TRUE
 
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
 
Constructor Summary
CreatePackageFragmentOperation(IPackageFragmentRoot parentElement, java.lang.String packageName, boolean force)
          When executed, this operation will create a package fragment with the given name under the given package fragment root.
 
Method Summary
 IJavaModelStatus verify()
          Possible failures: NO_ELEMENTS_TO_PROCESS - the root supplied to the operation is null.
 
Methods inherited from class org.eclipse.jdt.internal.core.JavaModelOperation
beginTask, done, executeNestedOperation, getJavaModel, getResultElements, hasModifiedResource, internalWorked, isCanceled, isReadOnly, newJavaElementDelta, run, runOperation, setCanceled, setTaskName, subTask, worked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreatePackageFragmentOperation

public CreatePackageFragmentOperation(IPackageFragmentRoot parentElement,
                                      java.lang.String packageName,
                                      boolean force)
When executed, this operation will create a package fragment with the given name under the given package fragment root. The dot-separated name is broken into segments. Intermediate folders are created as required for each segment. If the folders already exist, this operation has no effect.

Method Detail

verify

public IJavaModelStatus verify()
Possible failures:

See Also:
IJavaModelStatus, JavaConventions