Package org.aspectj.org.eclipse.jdt.internal.compiler.impl

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions


    }
  }

  public void reset(SourceTypeBinding typeBinding) {
    // the code stream is reinitialized for each method
    final CompilerOptions options = typeBinding.scope.compilerOptions();
    this.referenceBinding = typeBinding;
    this.targetJDK = options.targetJDK;
    this.produceAttributes = options.produceDebugAttributes;
    if (this.targetJDK >= ClassFileConstants.JDK1_6) {
      this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
View Full Code Here


  // and not from Object or implicit static field access. 
  if (fieldBinding.declaringClass != lastReceiverType
      && !lastReceiverType.isArrayType()
      && fieldBinding.declaringClass != null // array.length
      && fieldBinding.constant() == Constant.NotAConstant) {
    CompilerOptions options = currentScope.compilerOptions();
    if ((options.targetJDK >= ClassFileConstants.JDK1_2
        && (options.complianceLevel >= ClassFileConstants.JDK1_4 || !(index <= 1 &&  this.indexOfFirstFieldBinding == 1 && fieldBinding.isStatic()))
        && fieldBinding.declaringClass.id != TypeIds.T_JavaLangObject) // no change for Object fields
        || !fieldBinding.declaringClass.canBeSeenBy(currentScope)) {
 
View Full Code Here

  private int typeIndex;
  private IGenericType[] typeModels;
 
public HierarchyResolver(INameEnvironment nameEnvironment, Map settings, HierarchyBuilder builder, IProblemFactory problemFactory) {
  // create a problem handler with the 'exit after all problems' handling policy
  this.options = new CompilerOptions(settings);
  IErrorHandlingPolicy policy = DefaultErrorHandlingPolicies.exitAfterAllProblems();
  ProblemReporter problemReporter = new ProblemReporter(policy, this.options, problemFactory);

  this.setEnvironment(
    new LookupEnvironment(this, this.options, problemReporter, nameEnvironment),
View Full Code Here

  if (!DEVELOPMENT_MODE) {
    // If we are not developping the code snippet support classes,
    // use a regular compiler and feed its lookup environment with
    // the code snippet support classes

    CompilerOptions compilerOptions = new CompilerOptions(this.options);
    compilerOptions.performMethodsFullRecovery = true;
    compilerOptions.performStatementsRecovery = true;
    compiler =
      new CodeSnippetCompiler(
        this.environment,
        DefaultErrorHandlingPolicies.exitAfterAllProblems(),
        compilerOptions,
        compilerRequestor,
        this.problemFactory,
        this.context,
        getMapper().startPosOffset,
        getMapper().startPosOffset + this.codeSnippet.length - 1);
    ((CodeSnippetParser) compiler.parser).lineSeparatorLength = this.context.lineSeparator.length();
    // Initialize the compiler's lookup environment with the already compiled super classes
    IBinaryType binary = this.context.getRootCodeSnippetBinary();
    if (binary != null) {
      compiler.lookupEnvironment.cacheBinaryType(binary, null /*no access restriction*/);
    }
    VariablesInfo installedVars = this.context.installedVars;
    if (installedVars != null) {
      ClassFile[] globalClassFiles = installedVars.classFiles;
      for (int i = 0; i < globalClassFiles.length; i++) {
        ClassFileReader binaryType = null;
        try {
          binaryType = new ClassFileReader(globalClassFiles[i].getBytes(), null);
        } catch (ClassFormatException e) {
          e.printStackTrace(); // Should never happen since we compiled this type
        }
        compiler.lookupEnvironment.cacheBinaryType(binaryType, null /*no access restriction*/);
      }
    }
  } else {
    // If we are developping the code snippet support classes,
    // use a wrapped environment so that if the code snippet classes are not found
    // then a default implementation is provided.

    CompilerOptions compilerOptions = new CompilerOptions(this.options);
    compilerOptions.performMethodsFullRecovery = true;
    compilerOptions.performStatementsRecovery = true;
    compiler = new Compiler(
      getWrapperEnvironment(),
      DefaultErrorHandlingPolicies.exitAfterAllProblems(),
View Full Code Here

  // for runtime compatibility on 1.2 VMs : change the declaring class of the binding
  // NOTE: from target 1.2 on, method's declaring class is touched if any different from receiver type
  // and not from Object or implicit static method call. 
  if (this.binding.declaringClass != this.actualReceiverType
      && !this.actualReceiverType.isArrayType()) {
    CompilerOptions options = currentScope.compilerOptions();
    if ((options.targetJDK >= ClassFileConstants.JDK1_2
        && (options.complianceLevel >= ClassFileConstants.JDK1_4 || !receiver.isImplicitThis() || !this.codegenBinding.isStatic())
        && this.binding.declaringClass.id != T_JavaLangObject) // no change for Object methods
      || !this.binding.declaringClass.canBeSeenBy(currentScope)) {
View Full Code Here

    // NOTE: from target 1.2 on, field's declaring class is touched if any different from receiver type
    // and not from Object or implicit static field access. 
    if (fieldBinding.declaringClass != this.delegateThis.type
        && fieldBinding.declaringClass != null // array.length
        && fieldBinding.constant() == Constant.NotAConstant) {
      CompilerOptions options = currentScope.compilerOptions();
      if ((options.targetJDK >= ClassFileConstants.JDK1_2
          && (options.complianceLevel >= ClassFileConstants.JDK1_4 || !fieldBinding.isStatic())
          && fieldBinding.declaringClass.id != T_JavaLangObject) // no change for Object fields
        || !fieldBinding.declaringClass.canBeSeenBy(currentScope)) {
 
View Full Code Here

    : (INameEnvironment) new JavaSearchNameEnvironment(project, this.workingCopies);

  // create lookup environment
  Map map = project.getOptions(true);
  map.put(CompilerOptions.OPTION_TaskTags, ""); //$NON-NLS-1$
  this.options = new CompilerOptions(map);
  ProblemReporter problemReporter =
    new ProblemReporter(
      DefaultErrorHandlingPolicies.proceedWithAllProblems(),
      this.options,
      new DefaultProblemFactory());
View Full Code Here

      }
    }
  }
 
  // called once when the builder is initialized... can override if needed
  CompilerOptions compilerOptions = new CompilerOptions(projectOptions);
  compilerOptions.performMethodsFullRecovery = true;
  compilerOptions.performStatementsRecovery = true;
  Compiler newCompiler = new Compiler(
    nameEnvironment,
    DefaultErrorHandlingPolicies.proceedWithAllProblems(),
    compilerOptions,
    this,
    ProblemFactory.getProblemFactory(Locale.getDefault()));
  CompilerOptions options = newCompiler.options;
 
  // enable the compiler reference info support
  options.produceReferenceInfo = true;

  if (options.complianceLevel >= ClassFileConstants.JDK1_6
View Full Code Here

        null/*taskPriorities*/,
        true/*taskCaseSensitive*/);
  }
  public static void suggestArgumentNames(IJavaProject javaProject, char[] packageName, char[] qualifiedTypeName, int dim, char[] internalPrefix, char[][] excludedNames, INamingRequestor requestor) {
    Map options = javaProject.getOptions(true);
    CompilerOptions compilerOptions = new CompilerOptions(options);
    AssistOptions assistOptions = new AssistOptions(options);

    suggestNames(
      packageName,
      qualifiedTypeName,
View Full Code Here

  }
  public static void suggestFieldNames(IJavaProject javaProject, char[] packageName, char[] qualifiedTypeName, int dim, int modifiers, char[] internalPrefix, char[][] excludedNames, INamingRequestor requestor) {
    boolean isStatic = Flags.isStatic(modifiers);
   
    Map options = javaProject.getOptions(true);
    CompilerOptions compilerOptions = new CompilerOptions(options);
    AssistOptions assistOptions = new AssistOptions(options);

    suggestNames(
      packageName,
      qualifiedTypeName,
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions

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.