Java Code Examples for javax.tools.Diagnostic#NOPOS

The following examples show how to use javax.tools.Diagnostic#NOPOS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MethodArgumentsScanner.java    From netbeans with Apache License 2.0 6 votes vote down vote up
private final MethodArgument[] composeArguments(List<? extends Tree> args, List<? extends Tree> argTypes) {
    int n = args.size();
    MethodArgument[] arguments = new MethodArgument[n];
    for (int i = 0; i < n; i++) {
        Tree var = args.get(i);
        long startOffset = positions.getStartPosition(tree, var);
        long endOffset = positions.getEndPosition(tree, var);
        if (startOffset == Diagnostic.NOPOS || endOffset == Diagnostic.NOPOS) {
            return new MethodArgument[] {};
        }
        arguments[i] = new MethodArgument(var.toString(),
                                          (argTypes.size() > i) ? argTypes.get(i).toString() : "",
                                          positionDelegate.createPosition(
                                            (int) startOffset,
                                            (int) lineMap.getLineNumber(startOffset),
                                            (int) lineMap.getColumnNumber(startOffset)),
                                          positionDelegate.createPosition(
                                            (int) endOffset,
                                            (int) lineMap.getLineNumber(endOffset),
                                            (int) lineMap.getColumnNumber(endOffset)));
    }
    return arguments;
}
 
Example 2
Source File: Util.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String code, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public String getCode() {
            return code;
        }
        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }
        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }
        public Kind getKind() {
            return kind;
        }
        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }
        public String getMessage(Locale locale) {
            if (code.length() == 0)
                return (String) args[0];
            return getText(code, args); // FIXME locale
        }
        public long getPosition() {
            return Diagnostic.NOPOS;
        }
        public JavaFileObject getSource() {
            return null;
        }
        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }
    };
}
 
Example 3
Source File: MethodArgumentsScanner.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public MethodArgument[] visitMethod(MethodTree node, Object p) {
    long startMethod = positions.getStartPosition(tree, node);
    long endMethod = positions.getEndPosition(tree, node);
    if (methodInvocation || startMethod == Diagnostic.NOPOS || endMethod == Diagnostic.NOPOS ||
                            !(offset >= lineMap.getLineNumber(startMethod) &&
                             (offset <= lineMap.getLineNumber(endMethod)))) {
        return super.visitMethod(node, p);
    }
    List<? extends VariableTree> args = node.getParameters();
    List<? extends TypeParameterTree> argTypes = node.getTypeParameters();
    int n = args.size();
    arguments = new MethodArgument[n];
    for (int i = 0; i < n; i++) {
        VariableTree var = args.get(i);
        long startOffset = positions.getStartPosition(tree, var);
        long endOffset = positions.getEndPosition(tree, var);
        if (startOffset == Diagnostic.NOPOS || endOffset == Diagnostic.NOPOS) {
            return new MethodArgument[] {};
        }
        arguments[i] = new MethodArgument(var.getName().toString(),
                                          var.getType().toString(),
                                          positionDelegate.createPosition(
                                            (int) startOffset,
                                            (int) lineMap.getLineNumber(startOffset),
                                            (int) lineMap.getColumnNumber(startOffset)),
                                          positionDelegate.createPosition(
                                            (int) endOffset,
                                            (int) lineMap.getLineNumber(endOffset),
                                            (int) lineMap.getColumnNumber(endOffset)));
    }
    return arguments;
    //return composeArguments(args, argTypes);
}
 
Example 4
Source File: Util.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String code, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public String getCode() {
            return code;
        }
        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }
        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }
        public Kind getKind() {
            return kind;
        }
        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }
        public String getMessage(Locale locale) {
            if (code.length() == 0)
                return (String) args[0];
            return getText(code, args); // FIXME locale
        }
        public long getPosition() {
            return Diagnostic.NOPOS;
        }
        public JavaFileObject getSource() {
            return null;
        }
        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }
    };
}
 
Example 5
Source File: T6458823.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    if (compiler == null) {
        throw new RuntimeException("can't get javax.tools.JavaCompiler!");
    }
    DiagnosticCollector<JavaFileObject> diagColl =
        new DiagnosticCollector<JavaFileObject>();
    StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null);
    List<String> options = new ArrayList<String>();
    options.add("-processor");
    options.add("MyProcessor");
    options.add("-proc:only");
    List<File> files = new ArrayList<File>();
    files.add(new File(T6458823.class.getResource("TestClass.java").toURI()));
    final CompilationTask task = compiler.getTask(null, fm, diagColl,
        options, null, fm.getJavaFileObjectsFromFiles(files));
    task.call();
    int diagCount = 0;
    for (Diagnostic<? extends JavaFileObject> diag : diagColl.getDiagnostics()) {
        if (diag.getKind() != Diagnostic.Kind.WARNING) {
            throw new AssertionError("Only warnings expected");
        }
        System.out.println(diag);
        if (diag.getPosition() == Diagnostic.NOPOS) {
            throw new AssertionError("No position info in message");
        }
        if (diag.getSource() == null) {
            throw new AssertionError("No source info in message");
        }
        diagCount++;
    }
    if (diagCount != 2) {
        throw new AssertionError("unexpected number of warnings: " +
            diagCount + ", expected: 2");
    }
}
 
Example 6
Source File: JavahTask.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(final String key, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public Kind getKind() {
            return Diagnostic.Kind.ERROR;
        }

        public JavaFileObject getSource() {
            return null;
        }

        public long getPosition() {
            return Diagnostic.NOPOS;
        }

        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }

        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }

        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }

        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }

        public String getCode() {
            return key;
        }

        public String getMessage(Locale locale) {
            return JavahTask.this.getMessage(locale, key, args);
        }

    };
}
 
Example 7
Source File: ExpressionScanner.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private boolean isCurrentTree(Tree aTree) {
    int startLine = (int) lineMap.getLineNumber(positions.getStartPosition(tree, aTree));
    if (startLine == Diagnostic.NOPOS) {
        return false;
    }
    int endLine = (int) lineMap.getLineNumber(positions.getEndPosition(tree, aTree));
    if (endLine == Diagnostic.NOPOS) {
        return false;
    }
    return startLine <= lineNumber && lineNumber <= endLine;
}
 
Example 8
Source File: JavahTask.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(final String key, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public Kind getKind() {
            return Diagnostic.Kind.ERROR;
        }

        public JavaFileObject getSource() {
            return null;
        }

        public long getPosition() {
            return Diagnostic.NOPOS;
        }

        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }

        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }

        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }

        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }

        public String getCode() {
            return key;
        }

        public String getMessage(Locale locale) {
            return JavahTask.this.getMessage(locale, key, args);
        }

    };
}
 
Example 9
Source File: T6458823.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    if (compiler == null) {
        throw new RuntimeException("can't get javax.tools.JavaCompiler!");
    }
    DiagnosticCollector<JavaFileObject> diagColl =
        new DiagnosticCollector<JavaFileObject>();
    StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null);
    List<String> options = new ArrayList<String>();
    options.add("-processor");
    options.add("MyProcessor");
    options.add("-proc:only");
    List<File> files = new ArrayList<File>();
    files.add(new File(T6458823.class.getResource("TestClass.java").toURI()));
    final CompilationTask task = compiler.getTask(null, fm, diagColl,
        options, null, fm.getJavaFileObjectsFromFiles(files));
    task.call();
    int diagCount = 0;
    for (Diagnostic<? extends JavaFileObject> diag : diagColl.getDiagnostics()) {
        if (diag.getKind() != Diagnostic.Kind.WARNING) {
            throw new AssertionError("Only warnings expected");
        }
        System.out.println(diag);
        if (diag.getPosition() == Diagnostic.NOPOS) {
            throw new AssertionError("No position info in message");
        }
        if (diag.getSource() == null) {
            throw new AssertionError("No source info in message");
        }
        diagCount++;
    }
    if (diagCount != 2) {
        throw new AssertionError("unexpected number of warnings: " +
            diagCount + ", expected: 2");
    }
}
 
Example 10
Source File: Util.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String code, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public String getCode() {
            return code;
        }
        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }
        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }
        public Kind getKind() {
            return kind;
        }
        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }
        public String getMessage(Locale locale) {
            if (code.length() == 0)
                return (String) args[0];
            return getText(code, args); // FIXME locale
        }
        public long getPosition() {
            return Diagnostic.NOPOS;
        }
        public JavaFileObject getSource() {
            return null;
        }
        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }
    };
}
 
Example 11
Source File: Util.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String code, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public String getCode() {
            return code;
        }
        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }
        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }
        public Kind getKind() {
            return kind;
        }
        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }
        public String getMessage(Locale locale) {
            if (code.length() == 0)
                return (String) args[0];
            return getText(code, args); // FIXME locale
        }
        public long getPosition() {
            return Diagnostic.NOPOS;
        }
        public JavaFileObject getSource() {
            return null;
        }
        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }
    };
}
 
Example 12
Source File: Util.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String code, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public String getCode() {
            return code;
        }
        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }
        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }
        public Kind getKind() {
            return kind;
        }
        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }
        public String getMessage(Locale locale) {
            if (code.length() == 0)
                return (String) args[0];
            return getText(code, args); // FIXME locale
        }
        public long getPosition() {
            return Diagnostic.NOPOS;
        }
        public JavaFileObject getSource() {
            return null;
        }
        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }
    };
}
 
Example 13
Source File: Util.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String code, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        @DefinedBy(Api.COMPILER)
        public String getCode() {
            return code;
        }
        @DefinedBy(Api.COMPILER)
        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }
        @DefinedBy(Api.COMPILER)
        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }
        @DefinedBy(Api.COMPILER)
        public Kind getKind() {
            return kind;
        }
        @DefinedBy(Api.COMPILER)
        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }
        @DefinedBy(Api.COMPILER)
        public String getMessage(Locale locale) {
            if (code.length() == 0)
                return (String) args[0];
            return getText(code, args); // FIXME locale
        }
        @DefinedBy(Api.COMPILER)
        public long getPosition() {
            return Diagnostic.NOPOS;
        }
        @DefinedBy(Api.COMPILER)
        public JavaFileObject getSource() {
            return null;
        }
        @DefinedBy(Api.COMPILER)
        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }
    };
}
 
Example 14
Source File: JavapTask.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String key, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public Kind getKind() {
            return kind;
        }

        public JavaFileObject getSource() {
            return null;
        }

        public long getPosition() {
            return Diagnostic.NOPOS;
        }

        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }

        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }

        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }

        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }

        public String getCode() {
            return key;
        }

        public String getMessage(Locale locale) {
            return JavapTask.this.getMessage(locale, key, args);
        }

        @Override
        public String toString() {
            return getClass().getName() + "[key=" + key + ",args=" + Arrays.asList(args) + "]";
        }

    };

}
 
Example 15
Source File: JavapTask.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String key, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public Kind getKind() {
            return kind;
        }

        public JavaFileObject getSource() {
            return null;
        }

        public long getPosition() {
            return Diagnostic.NOPOS;
        }

        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }

        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }

        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }

        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }

        public String getCode() {
            return key;
        }

        public String getMessage(Locale locale) {
            return JavapTask.this.getMessage(locale, key, args);
        }

        @Override
        public String toString() {
            return getClass().getName() + "[key=" + key + ",args=" + Arrays.asList(args) + "]";
        }

    };

}
 
Example 16
Source File: Utilities.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private static Token<JavaTokenId> createHighlightImpl(CompilationInfo info, Document doc, TreePath tree) {
    Tree leaf = tree.getLeaf();
    SourcePositions positions = info.getTrees().getSourcePositions();
    CompilationUnitTree cu = info.getCompilationUnit();
    
    //XXX: do not use instanceof:
    if (leaf instanceof MethodTree || leaf instanceof VariableTree || leaf instanceof ClassTree
            || leaf instanceof MemberSelectTree || leaf instanceof AnnotatedTypeTree || leaf instanceof MemberReferenceTree
            || "BINDING_PATTERN".equals(leaf.getKind().name())) {
        return findIdentifierSpan(info, doc, tree);
    }
    
    int start = (int) positions.getStartPosition(cu, leaf);
    int end = (int) positions.getEndPosition(cu, leaf);
    
    if (start == Diagnostic.NOPOS || end == Diagnostic.NOPOS) {
        return null;
    }
    
    TokenHierarchy<?> th = info.getTokenHierarchy();
    TokenSequence<JavaTokenId> ts = th.tokenSequence(JavaTokenId.language());
    
    if (ts.move(start) == Integer.MAX_VALUE) {
        return null;
    }
    
    if (ts.moveNext()) {
        Token<JavaTokenId> token = ts.token();
        if (ts.offset() == start && token != null) {
            final JavaTokenId id = token.id();
            if (id == JavaTokenId.IDENTIFIER) {
                return token;
            }
            if (id == JavaTokenId.THIS || id == JavaTokenId.SUPER) {
                return ts.offsetToken();
            }
        }
    }
    
    return null;
}
 
Example 17
Source File: JavahTask.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(final String key, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        @DefinedBy(Api.COMPILER)
        public Kind getKind() {
            return Diagnostic.Kind.ERROR;
        }

        @DefinedBy(Api.COMPILER)
        public JavaFileObject getSource() {
            return null;
        }

        @DefinedBy(Api.COMPILER)
        public long getPosition() {
            return Diagnostic.NOPOS;
        }

        @DefinedBy(Api.COMPILER)
        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }

        @DefinedBy(Api.COMPILER)
        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }

        @DefinedBy(Api.COMPILER)
        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }

        @DefinedBy(Api.COMPILER)
        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }

        @DefinedBy(Api.COMPILER)
        public String getCode() {
            return key;
        }

        @DefinedBy(Api.COMPILER)
        public String getMessage(Locale locale) {
            return JavahTask.this.getMessage(locale, key, args);
        }

    };
}
 
Example 18
Source File: JavapTask.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String key, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public Kind getKind() {
            return kind;
        }

        public JavaFileObject getSource() {
            return null;
        }

        public long getPosition() {
            return Diagnostic.NOPOS;
        }

        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }

        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }

        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }

        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }

        public String getCode() {
            return key;
        }

        public String getMessage(Locale locale) {
            return JavapTask.this.getMessage(locale, key, args);
        }

        @Override
        public String toString() {
            return getClass().getName() + "[key=" + key + ",args=" + Arrays.asList(args) + "]";
        }

    };

}
 
Example 19
Source File: JavapTask.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private Diagnostic<JavaFileObject> createDiagnostic(
        final Diagnostic.Kind kind, final String key, final Object... args) {
    return new Diagnostic<JavaFileObject>() {
        public Kind getKind() {
            return kind;
        }

        public JavaFileObject getSource() {
            return null;
        }

        public long getPosition() {
            return Diagnostic.NOPOS;
        }

        public long getStartPosition() {
            return Diagnostic.NOPOS;
        }

        public long getEndPosition() {
            return Diagnostic.NOPOS;
        }

        public long getLineNumber() {
            return Diagnostic.NOPOS;
        }

        public long getColumnNumber() {
            return Diagnostic.NOPOS;
        }

        public String getCode() {
            return key;
        }

        public String getMessage(Locale locale) {
            return JavapTask.this.getMessage(locale, key, args);
        }

        @Override
        public String toString() {
            return getClass().getName() + "[key=" + key + ",args=" + Arrays.asList(args) + "]";
        }

    };

}
 
Example 20
Source File: EditorContextSupport.java    From netbeans with Apache License 2.0 4 votes vote down vote up
private static void assignNextOperations(Tree methodTree,
                                         CompilationUnitTree cu,
                                         CompilationController ci,
                                         EditorContext.BytecodeProvider bytecodeProvider,
                                         ASTOperationCreationDelegate opCreationDelegate,
                                         List<Tree> treeNodes,
                                         ExpressionScanner.ExpressionsInfo info,
                                         Map<Tree, EditorContext.Operation> nodeOperations) {
    int length = treeNodes.size();
    for (int treeIndex = 0; treeIndex < length; treeIndex++) {
        Tree node = treeNodes.get(treeIndex);
        Set<Tree> nextNodes = info.getNextExpressions(node);
        if (nextNodes != null) {
            EditorContext.Operation op = nodeOperations.get(node);
            if (op == null) {
                for (int backIndex = treeIndex - 1; backIndex >= 0; backIndex--) {
                    node = treeNodes.get(backIndex);
                    op = nodeOperations.get(node);
                    if (op != null) {
                        break;
                    }
                }
            }
            if (op != null) {
                for (Tree t : nextNodes) {
                    EditorContext.Operation nextOp = nodeOperations.get(t);
                    if (nextOp == null) {
                        SourcePositions sp = ci.getTrees().getSourcePositions();
                        int treeStartLine =
                                (int) cu.getLineMap().getLineNumber(
                                    sp.getStartPosition(cu, t));
                        if (treeStartLine == Diagnostic.NOPOS) {
                            continue;
                        }
                        int treeEndLine =
                                (int) cu.getLineMap().getLineNumber(
                                    sp.getEndPosition(cu, t));
                        if (treeEndLine == Diagnostic.NOPOS) {
                            continue;
                        }
                        ExpressionScanner scanner = new ExpressionScanner(treeStartLine, treeStartLine, treeEndLine,
                                                                          cu, ci.getTrees().getSourcePositions());
                        ExpressionScanner.ExpressionsInfo newInfo = new ExpressionScanner.ExpressionsInfo();
                        List<Tree> newExpTrees = methodTree.accept(scanner, newInfo);
                        if (newExpTrees == null) {
                            continue;
                        }
                        treeStartLine =
                                (int) cu.getLineMap().getLineNumber(
                                    sp.getStartPosition(cu, newExpTrees.get(0)));
                        treeEndLine =
                                (int) cu.getLineMap().getLineNumber(
                                    sp.getEndPosition(cu, newExpTrees.get(newExpTrees.size() - 1)));

                        if (treeStartLine == Diagnostic.NOPOS || treeEndLine == Diagnostic.NOPOS) {
                            continue;
                        }
                        int[] indexes = bytecodeProvider.indexAtLines(treeStartLine, treeEndLine);
                        Map<Tree, EditorContext.Operation> newNodeOperations = new HashMap<Tree, EditorContext.Operation>();
                        /*Operation[] newOps = */AST2Bytecode.matchSourceTree2Bytecode(
                                cu,
                                ci,
                                newExpTrees, newInfo, bytecodeProvider.byteCodes(),
                                indexes,
                                bytecodeProvider.constantPool(),
                                opCreationDelegate,
                                newNodeOperations);
                        nextOp = newNodeOperations.get(t);
                        if (nextOp == null) {
                            // Next operation not found
                            System.err.println("Next operation not found!");
                            continue;
                        }
                    }
                    opCreationDelegate.addNextOperationTo(op, nextOp);
                }
            }
        }
    }

}