|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jdt.internal.eval.EvaluationContext
public class EvaluationContext
IEvaluationContext
Field Summary |
---|
Fields inherited from interface org.eclipse.jdt.internal.eval.EvaluationConstants |
---|
CODE_SNIPPET_CLASS_NAME_PREFIX, CODE_SNIPPET_NAME, DELEGATE_THIS, GLOBAL_VARS_CLASS_NAME_PREFIX, LOCAL_VAR_PREFIX, PACKAGE_NAME, RESULT_TYPE_FIELD, RESULT_VALUE_FIELD, ROOT_CLASS_NAME, ROOT_COMPOUND_NAME, ROOT_FULL_CLASS_NAME, RUN_METHOD, SETRESULT_ARGUMENTS, SETRESULT_SELECTOR |
Fields inherited from interface org.eclipse.jdt.internal.compiler.util.SuffixConstants |
---|
EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA |
Constructor Summary | |
---|---|
EvaluationContext()
Creates a new evaluation context. |
Method Summary | |
---|---|
GlobalVariable[] |
allVariables()
Returns the global variables of this evaluation context in the order they were created in. |
void |
complete(char[] codeSnippet,
int completionPosition,
SearchableEnvironment environment,
CompletionRequestor requestor,
java.util.Map options,
IJavaProject project,
WorkingCopyOwner owner)
Computes a completion at the specified position of the given code snippet. |
void |
deleteVariable(GlobalVariable variable)
Deletes the given variable from this evaluation context. |
void |
evaluate(char[] codeSnippet,
char[][] contextLocalVariableTypeNames,
char[][] contextLocalVariableNames,
int[] contextLocalVariableModifiers,
char[] contextDeclaringTypeName,
boolean contextIsStatic,
boolean contextIsConstructorCall,
INameEnvironment environment,
java.util.Map options,
IRequestor requestor,
IProblemFactory problemFactory)
|
void |
evaluate(char[] codeSnippet,
INameEnvironment environment,
java.util.Map options,
IRequestor requestor,
IProblemFactory problemFactory)
|
void |
evaluateImports(INameEnvironment environment,
IRequestor requestor,
IProblemFactory problemFactory)
|
void |
evaluateVariable(GlobalVariable variable,
INameEnvironment environment,
java.util.Map options,
IRequestor requestor,
IProblemFactory problemFactory)
|
void |
evaluateVariables(INameEnvironment environment,
java.util.Map options,
IRequestor requestor,
IProblemFactory problemFactory)
|
static java.lang.String |
getCodeSnippetSource()
Returns the source of the CodeSnippet class. |
char[][] |
getImports()
Returns the imports of this evaluation context. |
char[] |
getPackageName()
Returns the dot-separated name of the package code snippets are run into. |
char[] |
getVarClassName()
|
GlobalVariable |
newVariable(char[] typeName,
char[] name,
char[] initializer)
Creates a new global variable with the given name, type and initializer. |
void |
select(char[] codeSnippet,
int selectionSourceStart,
int selectionSourceEnd,
SearchableEnvironment environment,
ISelectionRequestor requestor,
java.util.Map options)
Computes the selection at the specified positions of the given code snippet. |
void |
setImports(char[][] imports)
Sets the imports of this evaluation context. |
void |
setLineSeparator(java.lang.String lineSeparator)
Sets the line separator used by this evaluation context. |
void |
setPackageName(char[] packageName)
Sets the dot-separated name of the package code snippets are ran into. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EvaluationContext()
Method Detail |
---|
public GlobalVariable[] allVariables()
public void complete(char[] codeSnippet, int completionPosition, SearchableEnvironment environment, CompletionRequestor requestor, java.util.Map options, IJavaProject project, WorkingCopyOwner owner)
environment
- used to resolve type/package references and search for types/packages
based on partial names.requestor
- since the engine might produce answers of various forms, the engine
is associated with a requestor able to accept all possible completions.options
- set of options used to configure the code assist engine.owner
- the owner of working copies that take precedence over their original compilation unitspublic void deleteVariable(GlobalVariable variable)
public void evaluate(char[] codeSnippet, char[][] contextLocalVariableTypeNames, char[][] contextLocalVariableNames, int[] contextLocalVariableModifiers, char[] contextDeclaringTypeName, boolean contextIsStatic, boolean contextIsConstructorCall, INameEnvironment environment, java.util.Map options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
InstallException
- if the code snippet class files could not be deployed.IEvaluationContext
public void evaluate(char[] codeSnippet, INameEnvironment environment, java.util.Map options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
InstallException
- if the code snippet class files could not be deployed.IEvaluationContext
public void evaluateImports(INameEnvironment environment, IRequestor requestor, IProblemFactory problemFactory)
IEvaluationContext
public void evaluateVariable(GlobalVariable variable, INameEnvironment environment, java.util.Map options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
InstallException
- if the code snippet class files could not be deployed.
java.lang.IllegalArgumentException
- if the global has not been installed yet.IEvaluationContext
public void evaluateVariables(INameEnvironment environment, java.util.Map options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
InstallException
- if the code snippet class files could not be deployed.IEvaluationContext
public static java.lang.String getCodeSnippetSource()
public char[][] getImports()
public char[] getPackageName()
public char[] getVarClassName()
public GlobalVariable newVariable(char[] typeName, char[] name, char[] initializer)
GlobalVariable
public void select(char[] codeSnippet, int selectionSourceStart, int selectionSourceEnd, SearchableEnvironment environment, ISelectionRequestor requestor, java.util.Map options)
codeSnippet
- char[]
The code snipper sourceselectionSourceStart
- intselectionSourceEnd
- intenvironment
- org.eclipse.jdt.internal.core.SearchableEnvironment
used to resolve type/package references and search for types/packages
based on partial names.requestor
- org.eclipse.jdt.internal.codeassist.ISelectionRequestor
since the engine might produce answers of various forms, the engine
is associated with a requestor able to accept all possible selections.options
- java.util.Map
set of options used to configure the code assist engine.public void setImports(char[][] imports)
public void setLineSeparator(java.lang.String lineSeparator)
public void setPackageName(char[] packageName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |