Example usage for org.eclipse.jdt.internal.compiler.impl CompilerOptions NonExternalizedString

List of usage examples for org.eclipse.jdt.internal.compiler.impl CompilerOptions NonExternalizedString

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.impl CompilerOptions NonExternalizedString.

Prototype

int NonExternalizedString

To view the source code for org.eclipse.jdt.internal.compiler.impl CompilerOptions NonExternalizedString.

Click Source Link

Usage

From source file:ch.uzh.ifi.seal.changedistiller.ast.java.CommentRecorderParser.java

License:Open Source License

@Override
public void initializeScanner() {
    scanner = new Scanner(false /*comment*/, false /*whitespace*/,
            options.getSeverity(CompilerOptions.NonExternalizedString) != ProblemSeverities.Ignore /*nls*/,
            options.sourceLevel /*sourceLevel*/, options.taskTags/*taskTags*/,
            options.taskPriorities/*taskPriorities*/, options.isTaskCaseSensitive/*taskCaseSensitive*/);
}

From source file:org.eclipse.jdt.internal.compiler.parser.Parser.java

License:Open Source License

public void initialize(boolean initializeNLS) {
    //positionning the parser for a new compilation unit
    //avoiding stack reallocation and all that....
    this.astPtr = -1;
    this.astLengthPtr = -1;
    this.expressionPtr = -1;
    this.expressionLengthPtr = -1;
    this.identifierPtr = -1;
    this.identifierLengthPtr = -1;
    this.intPtr = -1;
    this.nestedMethod[this.nestedType = 0] = 0; // need to reset for further reuse
    this.variablesCounter[this.nestedType] = 0;
    this.dimensions = 0;
    this.realBlockPtr = -1;
    this.compilationUnit = null;
    this.referenceContext = null;
    this.endStatementPosition = 0;

    //remove objects from stack too, while the same parser/compiler couple is
    //re-used between two compilations ....

    int astLength = this.astStack.length;
    if (this.noAstNodes.length < astLength) {
        this.noAstNodes = new ASTNode[astLength];
        //System.out.println("Resized AST stacks : "+ astLength);

    }//from www  . j a v a 2  s  .c  om
    System.arraycopy(this.noAstNodes, 0, this.astStack, 0, astLength);

    int expressionLength = this.expressionStack.length;
    if (this.noExpressions.length < expressionLength) {
        this.noExpressions = new Expression[expressionLength];
        //System.out.println("Resized EXPR stacks : "+ expressionLength);
    }
    System.arraycopy(this.noExpressions, 0, this.expressionStack, 0, expressionLength);

    // reset this.scanner state
    this.scanner.commentPtr = -1;
    this.scanner.foundTaskCount = 0;
    this.scanner.eofPosition = Integer.MAX_VALUE;
    this.recordStringLiterals = true;
    final boolean checkNLS = this.options
            .getSeverity(CompilerOptions.NonExternalizedString) != ProblemSeverities.Ignore;
    this.checkExternalizeStrings = checkNLS;
    this.scanner.checkNonExternalizedStringLiterals = initializeNLS && checkNLS;
    this.scanner.lastPosition = -1;

    resetModifiers();

    // recovery
    this.lastCheckPoint = -1;
    this.currentElement = null;
    this.restartRecovery = false;
    this.hasReportedError = false;
    this.recoveredStaticInitializerStart = 0;
    this.lastIgnoredToken = -1;
    this.lastErrorEndPosition = -1;
    this.lastErrorEndPositionBeforeRecovery = -1;
    this.lastJavadocEnd = -1;
    this.listLength = 0;
    this.listTypeParameterLength = 0;
    this.lastPosistion = -1;

    this.rBraceStart = 0;
    this.rBraceEnd = 0;
    this.rBraceSuccessorStart = 0;

    this.genericsIdentifiersLengthPtr = -1;
    this.genericsLengthPtr = -1;
    this.genericsPtr = -1;
}