compositeRefactoring.codemanipulation
Class CreatePackageDeclaration
java.lang.Object
|
+--org.eclipse.jdt.internal.core.JavaModelOperation
|
+--org.eclipse.jdt.internal.core.CreateElementInCUOperation
|
+--org.eclipse.jdt.internal.core.CreatePackageDeclarationOperation
|
+--compositeRefactoring.codemanipulation.CreatePackageDeclaration
- All Implemented Interfaces:
- IProgressMonitor, IWorkspaceRunnable
- public class CreatePackageDeclaration
- extends CreatePackageDeclarationOperation
This is a convenience class to make the CreatePackageDeclarationOperation public.
The class creates a package declaration (like package java.lang.util;
.
Methods inherited from class org.eclipse.jdt.internal.core.CreateElementInCUOperation |
checkCanceled, createAfter, createBefore, generateNewCompilationUnitDOM, generateResultHandles, getCompilationUnit, getMainAmountOfWork, getResultElements, insertDOMNode, setAlteredName, setRelativePosition |
Methods inherited from class org.eclipse.jdt.internal.core.JavaModelOperation |
addDelta, beginTask, commonVerify, copyResources, createFile, createFolder, deleteEmptyPackageFragment, deleteResource, deleteResources, done, execute, executeNestedOperation, getCompilationUnitFor, getElementsToProcess, getElementToProcess, getJavaModel, getParentElement, getParentElements, getSubProgressMonitor, getWorkspace, hasModifiedResource, internalWorked, isCanceled, isReadOnly, makeWorkingCopiesConsistent, moveResources, newJavaElementDelta, registerDeltas, run, setCanceled, setNested, setTaskName, subTask, walkDeltaMakingWorkingCopiesConsistent, worked |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreatePackageDeclaration
public CreatePackageDeclaration(String name,
ICompilationUnit cu)
- creates an object of CreatePackageDeclaration
- Parameters:
name
- the name of the declaration (like java.lang.util
)cu
- the compilation unit in which the declaration is to be created.
executeOperation
public void executeOperation()
- creates the compilation unit.
- Overrides:
executeOperation
in class CreateElementInCUOperation
- Following copied from class:
org.eclipse.jdt.internal.core.CreateElementInCUOperation
- Throws:
JavaModelException
- if the operation is unable to complete