Java Code Examples for com.sun.source.util.TaskEvent.Kind#PARSE

The following examples show how to use com.sun.source.util.TaskEvent.Kind#PARSE . 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: DeptectivePlugin.java    From deptective with Apache License 2.0 6 votes vote down vote up
private TaskEventKind getTaskEventKind(TaskEvent.Kind kind, int totalSourceFiles, int analyzedSourceFiles) {
    if (kind == Kind.PARSE) {
        return TaskEventKind.PARSE;
    }
    else if (kind == Kind.ANALYZE) {
        if (!HAS_KIND_COMPILATION && analyzedSourceFiles >= totalSourceFiles - 1) {
            return TaskEventKind.LAST_ANALYZE;
        }
        else {
            return TaskEventKind.ANALYZE;
        }

    }
    else if (kind.name().equals("COMPILATION")) {
        return TaskEventKind.COMPILATION;
    }
    else {
        return TaskEventKind.OTHER;
    }
}
 
Example 2
Source File: DeptectivePlugin.java    From deptective with Apache License 2.0 6 votes vote down vote up
private TaskEventKind getTaskEventKind(TaskEvent.Kind kind, int totalSourceFiles, int analyzedSourceFiles) {
    if (kind == Kind.PARSE) {
        return TaskEventKind.PARSE;
    }
    else if (kind == Kind.ANALYZE) {
        if (!HAS_KIND_COMPILATION && analyzedSourceFiles >= totalSourceFiles - 1) {
            return TaskEventKind.LAST_ANALYZE;
        }
        else {
            return TaskEventKind.ANALYZE;
        }

    }
    else if (kind.name().equals("COMPILATION")) {
        return TaskEventKind.COMPILATION;
    }
    else {
        return TaskEventKind.OTHER;
    }
}
 
Example 3
Source File: JavacTaskPool.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override @DefinedBy(Api.COMPILER_TREE)
public void finished(TaskEvent e) {
    if (e.getKind() == Kind.PARSE) {
        roots.add(e.getCompilationUnit());
    }
}
 
Example 4
Source File: ReusableContext.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void finished(TaskEvent e) {
    if (e.getKind() == Kind.PARSE) {
        roots.add(e.getCompilationUnit());
    }
}