Modifier and Type | Field and Description |
---|---|
protected IJavaScriptUnit |
CorrectionEngine.compilationUnit
This field is not intended to be used by client.
|
Modifier and Type | Method and Description |
---|---|
IJavaScriptUnit |
IPackageFragment.createCompilationUnit(java.lang.String name,
java.lang.String contents,
boolean force,
IProgressMonitor monitor)
Creates and returns a javaScript unit in this package fragment
with the specified name and contents.
|
static IJavaScriptUnit |
JavaScriptCore.createCompilationUnitFrom(IFile file)
Creates and returns a javaScript unit element for
the given source file (i.e. a file with one of the
JavaScript-like extensions ). |
IJavaScriptUnit |
IJavaScriptUnit.findWorkingCopy(WorkingCopyOwner owner)
Finds the working copy for this javaScript file, given a
WorkingCopyOwner . |
IJavaScriptUnit |
IMember.getJavaScriptUnit()
Returns the javaScript unit in which this member is declared, or
null
if this member is not declared in a javaScript unit. |
IJavaScriptUnit |
IPackageFragment.getJavaScriptUnit(java.lang.String name)
Returns the javaScript unit with the specified name
in this package (for example,
"Object.js" ). |
IJavaScriptUnit[] |
IPackageFragment.getJavaScriptUnits()
Returns all of the javaScript units in this source folder.
|
IJavaScriptUnit[] |
IPackageFragment.getJavaScriptUnits(WorkingCopyOwner owner)
Returns all of the javaScript units in this source folder that are
in working copy mode and that have the given owner.
|
IJavaScriptUnit |
IJavaScriptUnit.getPrimary()
Returns the primary javaScript file (whose owner is the primary owner)
this working copy was created from, or this javaScript file if this a primary
javaScript file.
|
static IJavaScriptUnit[] |
JavaScriptCore.getWorkingCopies(WorkingCopyOwner owner)
Returns the working copies that have the given owner.
|
IJavaScriptUnit |
IJavaScriptUnit.getWorkingCopy(IProgressMonitor monitor)
Returns a new working copy of this javaScript file if it is a primary javaScript file,
or this javaScript file if it is already a non-primary working copy.
|
IJavaScriptUnit |
IJavaScriptUnit.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). |
IJavaScriptUnit |
ITypeRoot.getWorkingCopy(WorkingCopyOwner owner,
IProgressMonitor monitor)
Returns a shared working copy on this javaScirpt file using the given working copy owner to create
the buffer.
|
IJavaScriptUnit |
WorkingCopyOwner.newWorkingCopy(java.lang.String name,
IIncludePathEntry[] classpath,
IProgressMonitor monitor)
Returns a new working copy with the given name using this working copy owner to
create its buffer.
|
Modifier and Type | Method and Description |
---|---|
void |
CorrectionEngine.computeCorrections(IMarker marker,
IJavaScriptUnit targetUnit,
int positionOffset,
ICorrectionRequestor requestor)
Performs code correction for the given marker,
reporting results to the given correction requestor.
|
void |
CorrectionEngine.computeCorrections(IProblem problem,
IJavaScriptUnit targetUnit,
ICorrectionRequestor requestor)
Performs code correction for the given IProblem,
reporting results to the given correction requestor.
|
IBuffer |
WorkingCopyOwner.createBuffer(IJavaScriptUnit workingCopy)
Creates a buffer for the given working copy.
|
IProblemRequestor |
WorkingCopyOwner.getProblemRequestor(IJavaScriptUnit workingCopy)
Returns the problem requestor used by a working copy of this working copy owner.
|
org.eclipse.wst.jsdt.internal.core.NameLookup |
ILookupScope.newNameLookup(IJavaScriptUnit[] workingCopies) |
org.eclipse.wst.jsdt.internal.core.SearchableEnvironment |
ILookupScope.newSearchableNameEnvironment(IJavaScriptUnit[] workingCopies) |
ITypeHierarchy |
IType.newSupertypeHierarchy(IJavaScriptUnit[] 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(IJavaScriptUnit[] 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.
|
Modifier and Type | Method and Description |
---|---|
IJavaScriptUnit |
ReconcileContext.getWorkingCopy()
Returns the working copy this context refers to.
|
Modifier and Type | Method and Description |
---|---|
void |
ASTRequestor.acceptAST(IJavaScriptUnit source,
JavaScriptUnit ast)
Accepts an AST corresponding to the javaScript unit.
|
void |
ASTParser.createASTs(IJavaScriptUnit[] compilationUnits,
java.lang.String[] bindingKeys,
ASTRequestor requestor,
IProgressMonitor monitor)
Creates ASTs for a batch of javaScript units.
|
void |
ASTParser.setSource(IJavaScriptUnit source)
Sets the source code to be parsed.
|
Modifier and Type | Method and Description |
---|---|
IJavaScriptUnit |
ImportRewrite.getCompilationUnit()
The javaScript unit for which this import rewrite was created for.
|
Modifier and Type | Method and Description |
---|---|
static ImportRewrite |
ImportRewrite.create(IJavaScriptUnit cu,
boolean restoreExistingImports)
Creates a
ImportRewrite from a IJavaScriptUnit . |
Modifier and Type | Method and Description |
---|---|
void |
RenameLocalVariableDescriptor.setCompilationUnit(IJavaScriptUnit unit)
Sets the compilation unit which contains the local variable.
|
void |
MoveDescriptor.setMoveResources(IFile[] files,
IFolder[] folders,
IJavaScriptUnit[] units)
Sets the resources and compilation units to move.
|
Constructor and Description |
---|
SearchEngine(IJavaScriptUnit[] workingCopies)
Creates a new search engine with a list of working copies that will take precedence over
their original javascript unit s in the subsequent search operations.
|
Modifier and Type | Method and Description |
---|---|
static void |
JavaScriptUnitSorter.sort(int level,
IJavaScriptUnit compilationUnit,
int[] positions,
java.util.Comparator comparator,
int options,
IProgressMonitor monitor)
Reorders the declarations in the given javascript unit according to
the specified AST level.
|
Modifier and Type | Method and Description |
---|---|
IJavaScriptUnit |
IWorkingCopyManager.getWorkingCopy(IEditorInput input)
Returns the working copy remembered for the compilation unit encoded in the
given editor input.
|
Modifier and Type | Method and Description |
---|---|
static ImportRewrite |
CodeStyleConfiguration.createImportRewrite(IJavaScriptUnit cu,
boolean restoreExistingImports)
Returns a
ImportRewrite using ImportRewrite.create(IJavaScriptUnit, boolean) and
configures the rewriter with the settings as specified in the JDT UI preferences. |
static java.lang.String |
CodeGeneration.getCompilationUnitContent(IJavaScriptUnit cu,
java.lang.String typeComment,
java.lang.String typeContent,
java.lang.String lineDelimiter)
Returns the content for a new compilation unit using the 'new JavaScript file' code template.
|
static java.lang.String |
CodeGeneration.getCompilationUnitContent(IJavaScriptUnit cu,
java.lang.String fileComment,
java.lang.String typeComment,
java.lang.String typeContent,
java.lang.String lineDelimiter)
Returns the content for a new compilation unit using the 'new JavaScript file' code template.
|
static void |
JavaScriptElementLabels.getCompilationUnitLabel(IJavaScriptUnit cu,
long flags,
java.lang.StringBuffer buf)
Appends the label for a compilation unit to a
StringBuffer . |
static java.lang.String |
CodeGeneration.getFieldComment(IJavaScriptUnit cu,
java.lang.String typeName,
java.lang.String fieldName,
java.lang.String lineDelimiter)
Returns the content for a new field comment using the 'field comment' code template.
|
static java.lang.String |
CodeGeneration.getFileComment(IJavaScriptUnit cu,
java.lang.String lineDelimiter)
Returns the content for a new file comment using the 'file comment' code template.
|
static java.lang.String |
CodeGeneration.getGetterComment(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
java.lang.String methodName,
java.lang.String fieldName,
java.lang.String fieldType,
java.lang.String bareFieldName,
java.lang.String lineDelimiter)
Returns the comment for a getter method using the getter comment template.
|
static java.lang.String |
CodeGeneration.getGetterMethodBodyContent(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
java.lang.String methodName,
java.lang.String fieldName,
java.lang.String lineDelimiter)
Returns the content of body for a getter method using the getter method body template.
|
static java.lang.String |
CodeGeneration.getMethodBodyContent(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
java.lang.String methodName,
boolean isConstructor,
java.lang.String bodyStatement,
java.lang.String lineDelimiter)
Returns the content of the body for a method or constructor using the method body templates.
|
static java.lang.String |
CodeGeneration.getMethodComment(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
FunctionDeclaration decl,
boolean isDeprecated,
java.lang.String overriddenMethodName,
java.lang.String overriddenMethodDeclaringTypeName,
java.lang.String[] overriddenMethodParameterTypeNames,
java.lang.String lineDelimiter)
Returns the comment for a method or constructor using the comment code templates (constructor / method / overriding method).
|
static java.lang.String |
CodeGeneration.getMethodComment(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
FunctionDeclaration decl,
IFunctionBinding overridden,
java.lang.String lineDelimiter)
Returns the comment for a method or constructor using the comment code templates (constructor / method / overriding method).
|
static java.lang.String |
CodeGeneration.getMethodComment(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
java.lang.String methodName,
java.lang.String[] paramNames,
java.lang.String[] excTypeSig,
java.lang.String retTypeSig,
IFunction overridden,
java.lang.String lineDelimiter)
Returns the comment for a method or constructor using the comment code templates (constructor / method / overriding method).
|
static java.lang.String |
CodeGeneration.getSetterComment(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
java.lang.String methodName,
java.lang.String fieldName,
java.lang.String fieldType,
java.lang.String paramName,
java.lang.String bareFieldName,
java.lang.String lineDelimiter)
Returns the comment for a setter method using the setter method body template.
|
static java.lang.String |
CodeGeneration.getSetterMethodBodyContent(IJavaScriptUnit cu,
java.lang.String declaringTypeName,
java.lang.String methodName,
java.lang.String fieldName,
java.lang.String paramName,
java.lang.String lineDelimiter)
Returns the content of body for a setter method using the setter method body template.
|
static java.lang.String |
CodeGeneration.getTypeBody(java.lang.String typeKind,
IJavaScriptUnit cu,
java.lang.String typeName,
java.lang.String lineDelim)
Returns the content of a new new type body using the 'type body' code templates.
|
static java.lang.String |
CodeGeneration.getTypeComment(IJavaScriptUnit cu,
java.lang.String typeQualifiedName,
java.lang.String lineDelimiter)
Returns the content for a new type comment using the 'type comment' code template.
|
void |
IWorkingCopyManagerExtension.setWorkingCopy(IEditorInput input,
IJavaScriptUnit workingCopy)
Sets the given working copy for the given editor input.
|
Modifier and Type | Method and Description |
---|---|
void |
AddJavaDocStubAction.run(IJavaScriptUnit cu,
IMember[] members)
Note this method is for internal use only.
|
void |
FormatAllAction.runOnMultiple(IJavaScriptUnit[] cus)
Perform format all on the given compilation units.
|
void |
OrganizeImportsAction.runOnMultiple(IJavaScriptUnit[] cus)
Perform organize import on multiple compilation units.
|
Modifier and Type | Method and Description |
---|---|
static RenameSupport |
RenameSupport.create(IJavaScriptUnit unit,
java.lang.String newName,
int flags)
Creates a new rename support for the given
IJavaScriptUnit . |
Modifier and Type | Method and Description |
---|---|
IJavaScriptUnit |
JavaContentAssistInvocationContext.getCompilationUnit()
Returns the compilation unit that content assist is invoked in,
null if there
is none. |
IJavaScriptUnit |
IInvocationContext.getCompilationUnit() |
protected IJavaScriptUnit |
CompletionProposalCollector.getCompilationUnit()
Returns the compilation unit that the receiver operates on, or
null if the IJavaScriptProject constructor was
used to create the receiver. |
Modifier and Type | Method and Description |
---|---|
IJavaCompletionProposal[] |
IJavadocCompletionProcessor.computeCompletionProposals(IJavaScriptUnit cu,
int offset,
int length,
int flags)
Returns the completion proposals based on the specified location
within the compilation unit.
|
IContextInformation[] |
IJavadocCompletionProcessor.computeContextInformation(IJavaScriptUnit cu,
int offset)
Returns information about possible contexts based on the
specified location within the compilation unit.
|
boolean |
IQuickFixProcessor.hasCorrections(IJavaScriptUnit unit,
int problemId)
Returns
true if the processor has proposals for the given problem. |
Constructor and Description |
---|
CompletionProposalCollector(IJavaScriptUnit cu)
Creates a new instance ready to collect proposals.
|
JavaContentAssistInvocationContext(IJavaScriptUnit unit)
Creates a new context.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
NewTypeWizardPage.constructCUContent(IJavaScriptUnit cu,
java.lang.String typeContent,
java.lang.String lineDelimiter)
Uses the New JavaScript file template from the code template page to generate a
compilation unit with the given type content.
|
protected java.lang.String |
NewTypeWizardPage.getFileComment(IJavaScriptUnit parentCU)
Deprecated.
Instead of file templates, the new type code template
specifies the stub for a compilation unit.
|
protected java.lang.String |
NewTypeWizardPage.getFileComment(IJavaScriptUnit parentCU,
java.lang.String lineDelimiter)
Hook method that gets called from
createType to retrieve
a file comment. |
protected java.lang.String |
NewTypeWizardPage.getTemplate(java.lang.String name,
IJavaScriptUnit parentCU,
int pos)
Returns the string resulting from evaluation the given template in
the context of the given compilation unit.
|
protected java.lang.String |
NewTypeWizardPage.getTypeComment(IJavaScriptUnit parentCU,
java.lang.String lineDelimiter)
Hook method that gets called from
createType to retrieve
a type comment. |
Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.