Package org.eclipse.jdt.internal.compiler.env

Examples of org.eclipse.jdt.internal.compiler.env.INameEnvironment


            public boolean ignoreOptionalProblems() {
                return false;
            }
        }

        final INameEnvironment env = new INameEnvironment() {

                @Override
                public NameEnvironmentAnswer
                    findType(char[][] compoundTypeName) {
                    String result = "";
View Full Code Here


      boolean doGenerateBytes) {
    this.compilationState = compilationState;
    this.doGenerateBytes = doGenerateBytes;
    rememberPackage("");

    INameEnvironment env = new INameEnvironmentImpl();
    IErrorHandlingPolicy pol = DefaultErrorHandlingPolicies.proceedWithAllProblems();
    IProblemFactory probFact = new DefaultProblemFactory(Locale.getDefault());
    ICompilerRequestor req = new ICompilerRequestorImpl();
    CompilerOptions options = JdtCompiler.getCompilerOptions(true);
View Full Code Here

    Sandbox(AbstractCompiler outer, boolean doGenerateBytes) {
      this.outer = outer;
      this.doGenerateBytes = doGenerateBytes;
      rememberPackage("");

      INameEnvironment env = new INameEnvironmentImpl();
      IErrorHandlingPolicy pol = DefaultErrorHandlingPolicies.proceedWithAllProblems();
      IProblemFactory probFact = new DefaultProblemFactory(Locale.getDefault());
      ICompilerRequestor req = new ICompilerRequestorImpl();
      CompilerOptions options = getCompilerOptions();
View Full Code Here

                return result;
            }
        }


        final INameEnvironment env = new INameEnvironment() {

                public NameEnvironmentAnswer
                    findType(char[][] compoundTypeName) {
                    String result = "";
                    String sep = "";
View Full Code Here

            return new org.drools.commons.jci.compilers.CompilationResult( result );
        }

        final IErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.proceedWithAllProblems();
        final IProblemFactory problemFactory = new DefaultProblemFactory( Locale.getDefault() );
        final INameEnvironment nameEnvironment = new INameEnvironment() {

            public NameEnvironmentAnswer findType(final char[][] pCompoundTypeName) {
                final StringBuffer result = new StringBuffer();
                for ( int i = 0; i < pCompoundTypeName.length; i++ ) {
                    if ( i != 0 ) {
View Full Code Here

                }
                return result;
            }
        }

        final INameEnvironment env = new INameEnvironment() {

                public NameEnvironmentAnswer
                    findType(char[][] compoundTypeName) {
                    String result = "";
                    String sep = "";
View Full Code Here

        IProblemFactory problemFactory = new DefaultProblemFactory(Locale.ENGLISH);

        /**
         * To find types ...
         */
        INameEnvironment nameEnvironment = new INameEnvironment() {

            public NameEnvironmentAnswer findType(final char[][] compoundTypeName) {
                final StringBuffer result = new StringBuffer();
                for (int i = 0; i < compoundTypeName.length; i++) {
                    if (i != 0) {
View Full Code Here

          options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.IGNORE);
        }
      }
    }
  }
  INameEnvironment environment = null;
  try {
    this.context.evaluate(
      codeSnippet.toCharArray(),
      varTypeNames,
      varNames,
      localVariableModifiers,
      declaringType == null? null : declaringType.getFullyQualifiedName().toCharArray(),
      isStatic,
      isConstructorCall,
      environment = getBuildNameEnvironment(),
      options,
      getInfrastructureEvaluationRequestor(requestor),
      getProblemFactory());
  } catch (InstallException e) {
    handleInstallException(e);
  } finally {
    if (environment != null) environment.cleanup();
  }
}
View Full Code Here

* @see IEvaluationContext#evaluateCodeSnippet(String, ICodeSnippetRequestor, IProgressMonitor)
*/
public void evaluateCodeSnippet(String codeSnippet, ICodeSnippetRequestor requestor, IProgressMonitor progressMonitor) throws JavaModelException {

  checkBuilderState();
  INameEnvironment environment = null;
  try {
    this.context.evaluate(
      codeSnippet.toCharArray(),
      environment = getBuildNameEnvironment(),
      this.project.getOptions(true),
      getInfrastructureEvaluationRequestor(requestor),
      getProblemFactory());
  } catch (InstallException e) {
    handleInstallException(e);
  } finally {
    if (environment != null) environment.cleanup();
  }
}
View Full Code Here

* @see IEvaluationContext#evaluateVariable(IGlobalVariable, ICodeSnippetRequestor, IProgressMonitor)
*/
public void evaluateVariable(IGlobalVariable variable, ICodeSnippetRequestor requestor, IProgressMonitor progressMonitor) throws JavaModelException {

  checkBuilderState();
  INameEnvironment environment = null;
  try {
    this.context.evaluateVariable(
      ((GlobalVariableWrapper)variable).variable,
      environment = getBuildNameEnvironment(),
      this.project.getOptions(true),
      getInfrastructureEvaluationRequestor(requestor),
      getProblemFactory());
  } catch (InstallException e) {
    handleInstallException(e);
  } finally {
    if (environment != null) environment.cleanup();
  }
}
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.env.INameEnvironment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.