Composite Refactoring
v1.0

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;.


Fields inherited from class org.eclipse.jdt.internal.core.CreatePackageDeclarationOperation
fName
 
Fields inherited from class org.eclipse.jdt.internal.core.CreateElementInCUOperation
fAnchorElement, fCreatedElement, fCreationOccurred, fCUDOM, fInsertionPolicy, fInsertionPosition, fReplacementLength, INSERT_AFTER, INSERT_BEFORE, INSERT_LAST
 
Fields inherited from class org.eclipse.jdt.internal.core.JavaModelOperation
fDeltas, fElementsToProcess, fForce, fgEmptyResult, fMonitor, fNested, fParentElements, fResultElements, hasModifiedResource
 
Fields inherited from interface org.eclipse.core.runtime.IProgressMonitor
UNKNOWN
 
Constructor Summary
CreatePackageDeclaration(String name, ICompilationUnit cu)
          creates an object of CreatePackageDeclaration
 
Method Summary
 void executeOperation()
          creates the compilation unit.
 
Methods inherited from class org.eclipse.jdt.internal.core.CreatePackageDeclarationOperation
generateElementDOM, generateResultHandle, getMainTaskName, initializeDefaultPosition, verify
 
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
 

Constructor Detail

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.
Method Detail

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

Composite Refactoring
v1.0