|
|
|
|
Uses of Interface org.eclipse.jdt.core.ICompilationUnit
Methods in
org.eclipse.jdt.core that return
ICompilationUnit
|
ICompilationUnit
|
IClassFile.
becomeWorkingCopy
(
IProblemRequestor problemRequestor,
WorkingCopyOwner owner,
IProgressMonitor monitor)
Deprecated. Use
ITypeRoot.getWorkingCopy(WorkingCopyOwner, IProgressMonitor) instead.
Note that if this deprecated method is used, problems will be reported to the given problem requestor
as well as the problem requestor returned by the working copy owner (if not null).
|
ICompilationUnit
|
IPackageFragment.
createCompilationUnit
(
String name,
String contents,
boolean force,
IProgressMonitor monitor)
Creates and returns a compilation unit in this package fragment
with the specified name and contents. |
static
ICompilationUnit
|
JavaCore.
createCompilationUnitFrom
(
IFile file)
Creates and returns a compilation unit element for
the given source file (i.e. a file with one of the
Java-like extensions ). |
ICompilationUnit
|
ICompilationUnit.
findWorkingCopy
(
WorkingCopyOwner owner)
Finds the working copy for this compilation unit, given a
WorkingCopyOwner . |
ICompilationUnit
|
IMember.
getCompilationUnit
()
Returns the compilation unit in which this member is declared, or null
if this member is not declared in a compilation unit (for example, a binary type). |
ICompilationUnit
|
IPackageFragment.
getCompilationUnit
(
String name)
Returns the compilation unit with the specified name
in this package (for example, "Object.java" ). |
ICompilationUnit[]
|
IPackageFragment.
getCompilationUnits
()
Returns all of the compilation units in this package fragment. |
ICompilationUnit[]
|
IPackageFragment.
getCompilationUnits
(
WorkingCopyOwner owner)
Returns all of the compilation units in this package fragment that are
in working copy mode and that have the given owner. |
ICompilationUnit
|
ICompilationUnit.
getPrimary
()
Returns the primary compilation unit (whose owner is the primary owner)
this working copy was created from, or this compilation unit if this a primary
compilation unit. |
static
ICompilationUnit[]
|
JavaCore.
getWorkingCopies
(
WorkingCopyOwner owner)
Returns the working copies that have the given owner. |
ICompilationUnit
|
ICompilationUnit.
getWorkingCopy
(
IProgressMonitor monitor)
Returns a new working copy of this compilation unit if it is a primary compilation unit,
or this compilation unit if it is already a non-primary working copy. |
ICompilationUnit
|
ICompilationUnit.
getWorkingCopy
(
WorkingCopyOwner owner,
IProblemRequestor problemRequestor,
IProgressMonitor monitor)
Deprecated. Use
ITypeRoot.getWorkingCopy(WorkingCopyOwner, IProgressMonitor) instead.
Note that if this deprecated method is used, problems will be reported on the passed problem requester
as well as on the problem requestor returned by the working copy owner (if not null).
|
ICompilationUnit
|
ITypeRoot.
getWorkingCopy
(
WorkingCopyOwner owner,
IProgressMonitor monitor)
Returns a shared working copy on this compilation unit or class file using the given working copy owner to create
the buffer. |
ICompilationUnit
|
WorkingCopyOwner.
newWorkingCopy
(
String name,
IClasspathEntry[] classpath,
IProblemRequestor problemRequestor,
IProgressMonitor monitor)
Deprecated. Use
WorkingCopyOwner.newWorkingCopy(String, IClasspathEntry[], IProgressMonitor) instead.
Note that if this deprecated method is used, problems may be reported twice
if the given requestor is not the same as the current working copy owner one.
|
ICompilationUnit
|
WorkingCopyOwner.
newWorkingCopy
(
String name,
IClasspathEntry[] classpath,
IProgressMonitor monitor)
Returns a new working copy with the given name using this working copy owner to
create its buffer. |
Methods in
org.eclipse.jdt.core with parameters of type
ICompilationUnit
|
void
|
CorrectionEngine.
computeCorrections
(
IMarker marker,
ICompilationUnit targetUnit,
int positionOffset,
ICorrectionRequestor requestor)
Performs code correction for the given marker,
reporting results to the given correction requestor. |
void
|
CorrectionEngine.
computeCorrections
(
IProblem problem,
ICompilationUnit targetUnit,
ICorrectionRequestor requestor)
Performs code correction for the given IProblem,
reporting results to the given correction requestor. |
IBuffer
|
WorkingCopyOwner.
createBuffer
(
ICompilationUnit workingCopy)
Creates a buffer for the given working copy. |
IProblemRequestor
|
WorkingCopyOwner.
getProblemRequestor
(
ICompilationUnit workingCopy)
Returns the problem requestor used by a working copy of this working copy owner. |
ITypeHierarchy
|
IType.
newSupertypeHierarchy
(
ICompilationUnit[] workingCopies,
IProgressMonitor monitor)
Creates and returns a type hierarchy for this type containing
this type and all of its supertypes, considering types in the given
working copies. |
ITypeHierarchy
|
IType.
newTypeHierarchy
(
ICompilationUnit[] workingCopies,
IProgressMonitor monitor)
Creates and returns a type hierarchy for this type containing
this type, all of its supertypes, and all its subtypes in the workspace,
considering types in the given working copies. |
Methods in
org.eclipse.jdt.core.util with parameters of type
ICompilationUnit
|
static void
|
CompilationUnitSorter.
sort
(
ICompilationUnit compilationUnit,
int[] positions,
Comparator comparator,
int options,
IProgressMonitor monitor)
Deprecated. Clients should port their code to use the new JLS3 AST API and call
CompilationUnitSorter.sort(AST.JLS3, compilationUnit, positions, comparator, options, monitor)
instead of using this method.
|
static void
|
CompilationUnitSorter.
sort
(int level,
ICompilationUnit compilationUnit,
int[] positions,
Comparator comparator,
int options,
IProgressMonitor monitor)
Reorders the declarations in the given compilation unit according to
the specified AST level. |
Methods in
org.eclipse.jdt.ui with parameters of type
ICompilationUnit
|
static
ImportRewrite
|
CodeStyleConfiguration.
createImportRewrite
(
ICompilationUnit cu,
boolean restoreExistingImports)
Returns a
ImportRewrite using
ImportRewrite.create(ICompilationUnit, boolean) and
configures the rewriter with the settings as specified in the JDT UI preferences. |
static
String
|
CodeGeneration.
getCompilationUnitContent
(
ICompilationUnit cu,
String typeComment,
String typeContent,
String lineDelimiter)
Returns the content for a new compilation unit using the 'new Java file' code template. |
static
String
|
CodeGeneration.
getCompilationUnitContent
(
ICompilationUnit cu,
String fileComment,
String typeComment,
String typeContent,
String lineDelimiter)
Returns the content for a new compilation unit using the 'new Java file' code template. |
static void
|
JavaElementLabels.
getCompilationUnitLabel
(
ICompilationUnit cu,
long flags,
StringBuffer buf)
Appends the label for a compilation unit to a
StringBuffer
. |
static void
|
JavaElementLabels.
getCompilationUnitLabel
(
ICompilationUnit cu,
long flags,
StyledString result)
Appends the label for a compilation unit to a
StyledString . |
static
String
|
CodeGeneration.
getFieldComment
(
ICompilationUnit cu,
String typeName,
String fieldName,
String lineDelimiter)
Returns the content for a new field comment using the 'field comment' code template. |
static
String
|
CodeGeneration.
getFileComment
(
ICompilationUnit cu,
String lineDelimiter)
Returns the content for a new file comment using the 'file comment' code template. |
static
String
|
CodeGeneration.
getGetterComment
(
ICompilationUnit cu,
String declaringTypeName,
String methodName,
String fieldName,
String fieldType,
String bareFieldName,
String lineDelimiter)
Returns the comment for a getter method using the getter comment template. |
static
String
|
CodeGeneration.
getGetterMethodBodyContent
(
ICompilationUnit cu,
String declaringTypeName,
String methodName,
String fieldName,
String lineDelimiter)
Returns the content of body for a getter method using the getter method body template. |
static
String
|
CodeGeneration.
getMethodBodyContent
(
ICompilationUnit cu,
String declaringTypeName,
String methodName,
boolean isConstructor,
String bodyStatement,
String lineDelimiter)
Returns the content of the body for a method or constructor using the method body templates. |
static
String
|
CodeGeneration.
getMethodComment
(
ICompilationUnit cu,
String declaringTypeName,
MethodDeclaration decl,
boolean isDeprecated,
String overriddenMethodName,
String overriddenMethodDeclaringTypeName,
String[] overriddenMethodParameterTypeNames,
String lineDelimiter)
Returns the comment for a method or constructor using the comment code templates (constructor / method / overriding method). |
static
String
|
CodeGeneration.
getMethodComment
(
ICompilationUnit cu,
String declaringTypeName,
MethodDeclaration decl,
IMethodBinding overridden,
String lineDelimiter)
Returns the comment for a method or constructor using the comment code templates (constructor / method / overriding method). |
static
String
|
CodeGeneration.
getMethodComment
(
ICompilationUnit cu,
String declaringTypeName,
String methodName,
String[] paramNames,
String[] excTypeSig,
String retTypeSig,
IMethod overridden,
String lineDelimiter)
Returns the comment for a method or constructor using the comment code templates (constructor / method / overriding method). |
static
String
|
CodeGeneration.
getMethodComment
(
ICompilationUnit cu,
String declaringTypeName,
String methodName,
String[] paramNames,
String[] excTypeSig,
String retTypeSig,
String[] typeParameterNames,
IMethod overridden,
String lineDelimiter)
Returns the comment for a method or constructor using the comment code templates (constructor / method / overriding method). |
static
String
|
CodeGeneration.
getSetterComment
(
ICompilationUnit cu,
String declaringTypeName,
String methodName,
String fieldName,
String fieldType,
String paramName,
String bareFieldName,
String lineDelimiter)
Returns the comment for a setter method using the setter method body template. |
static
String
|
CodeGeneration.
getSetterMethodBodyContent
(
ICompilationUnit cu,
String declaringTypeName,
String methodName,
String fieldName,
String paramName,
String lineDelimiter)
Returns the content of body for a setter method using the setter method body template. |
static
String
|
CodeGeneration.
getTypeBody
(
String typeKind,
ICompilationUnit cu,
String typeName,
String lineDelim)
Returns the content of a new new type body using the 'type body' code templates. |
static
String
|
CodeGeneration.
getTypeComment
(
ICompilationUnit cu,
String typeQualifiedName,
String lineDelimiter)
Returns the content for a new type comment using the 'type comment' code template. |
static
String
|
CodeGeneration.
getTypeComment
(
ICompilationUnit cu,
String typeQualifiedName,
String[] typeParameterNames,
String lineDelimiter)
Returns the content for a new type comment using the 'type comment' code template. |
void
|
IWorkingCopyManagerExtension.
setWorkingCopy
(
IEditorInput input,
ICompilationUnit workingCopy)
Sets the given working copy for the given editor input. |
Methods in
org.eclipse.jdt.ui.wizards with parameters of type
ICompilationUnit
|
protected
String
|
NewTypeWizardPage.
constructCUContent
(
ICompilationUnit cu,
String typeContent,
String lineDelimiter)
Uses the New Java file template from the code template page to generate a
compilation unit with the given type content. |
protected
String
|
NewTypeWizardPage.
getFileComment
(
ICompilationUnit parentCU)
Deprecated. Instead of file templates, the new type code template
specifies the stub for a compilation unit.
|
protected
String
|
NewTypeWizardPage.
getFileComment
(
ICompilationUnit parentCU,
String lineDelimiter)
Hook method that gets called from createType to retrieve
a file comment. |
protected
String
|
NewTypeWizardPage.
getTemplate
(
String name,
ICompilationUnit parentCU)
Deprecated. Use getTemplate(String,ICompilationUnit,int)
|
protected
String
|
NewTypeWizardPage.
getTemplate
(
String name,
ICompilationUnit parentCU,
int pos)
Returns the string resulting from evaluation the given template in
the context of the given compilation unit. |
protected
String
|
NewTypeWizardPage.
getTypeComment
(
ICompilationUnit parentCU)
Deprecated. Use getTypeComment(ICompilationUnit, String)
|
protected
String
|
NewTypeWizardPage.
getTypeComment
(
ICompilationUnit parentCU,
String lineDelimiter)
Hook method that gets called from createType to retrieve
a type comment. |
Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.
|
|
|