Klasse EvaluationContext

java.lang.Object
org.aspectj.org.eclipse.jdt.internal.eval.EvaluationContext
Alle implementierten Schnittstellen:
SuffixConstants, EvaluationConstants

public class EvaluationContext extends Object implements EvaluationConstants, SuffixConstants
Siehe auch:
  • Ungültige Referenz
    org.eclipse.jdt.core.eval.IEvaluationContext
  • Konstruktordetails

    • EvaluationContext

      public EvaluationContext()
      Creates a new evaluation context.
  • Methodendetails

    • allVariables

      public GlobalVariable[] allVariables()
      Returns the global variables of this evaluation context in the order they were created in.
    • complete

      public void complete(char[] codeSnippet, int completionPosition, SearchableEnvironment environment, CompletionRequestor requestor, Map<String,String> options, IJavaProject project, WorkingCopyOwner owner, org.eclipse.core.runtime.IProgressMonitor monitor)
      Computes a completion at the specified position of the given code snippet. (Note that this evaluation context's VM doesn't need to be running.)
      Parameter:
      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 units
      monitor - the progress monitor used to report progress
    • deleteVariable

      public void deleteVariable(GlobalVariable variable)
      Deletes the given variable from this evaluation context. This will take effect in the target VM only the next time global variables are installed.
    • evaluate

      public void evaluate(char[] codeSnippet, char[][] contextLocalVariableTypeNames, char[][] contextLocalVariableNames, int[] contextLocalVariableModifiers, char[] contextDeclaringTypeName, boolean contextIsStatic, boolean contextIsConstructorCall, INameEnvironment environment, Map<String,String> options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.core.eval.IEvaluationContext
    • evaluate

      public void evaluate(char[] codeSnippet, INameEnvironment environment, Map<String,String> options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.core.eval.IEvaluationContext
    • evaluateImports

      public void evaluateImports(INameEnvironment environment, IRequestor requestor, IProblemFactory problemFactory)
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.core.eval.IEvaluationContext
    • evaluateVariable

      public void evaluateVariable(GlobalVariable variable, INameEnvironment environment, Map<String,String> options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.core.eval.IEvaluationContext
    • evaluateVariables

      public void evaluateVariables(INameEnvironment environment, Map<String,String> options, IRequestor requestor, IProblemFactory problemFactory) throws InstallException
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.core.eval.IEvaluationContext
    • getCodeSnippetSource

      public static String getCodeSnippetSource()
      Returns the source of the CodeSnippet class. This is used to generate the binary of the CodeSnippetClass
    • getImports

      public char[][] getImports()
      Returns the imports of this evaluation context. An import is the name of a package or the fully qualified name of a type as defined in the import statement of a compilation unit.
    • getPackageName

      public char[] getPackageName()
      Returns the dot-separated name of the package code snippets are run into. Returns an empty array for the default package. This is the default if the package name has never been set.
    • getVarClassName

      public char[] getVarClassName()
    • newVariable

      public GlobalVariable newVariable(char[] typeName, char[] name, char[] initializer)
      Creates a new global variable with the given name, type and initializer. If the variable is not initialized, the initializer can be null. Note that this doesn't install it to this evaluation context's VM.
      Siehe auch:
    • select

      public void select(char[] codeSnippet, int selectionSourceStart, int selectionSourceEnd, SearchableEnvironment environment, ISelectionRequestor requestor, Map<String,String> options, WorkingCopyOwner owner)
      Computes the selection at the specified positions of the given code snippet. (Note that this evaluation context's VM doesn't need to be running.)
      Parameter:
      codeSnippet - char[] The code snipper source
      selectionSourceStart - int
      selectionSourceEnd - int
      environment - 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.
    • setImports

      public void setImports(char[][] imports)
      Sets the imports of this evaluation context. An import is the name of a package or the fully qualified name of a type as defined in the import statement of a compilation unit (see the Java Language Specifications for more details).
    • setLineSeparator

      public void setLineSeparator(String lineSeparator)
      Sets the line separator used by this evaluation context.
    • setPackageName

      public void setPackageName(char[] packageName)
      Sets the dot-separated name of the package code snippets are ran into. The default package name is an empty array.