Search in sources :

Example 1 with CheckCanceled

use of org.eclipse.n4js.jsdoc2spec.CheckCanceled in project n4js by eclipse.

the class TaskGenerateAdoc method performTasks.

private void performTasks(IProgressMonitor monitor) throws IOException, InterruptedException {
    jsDoc2SpecProcessor.resetIssues();
    File rootDir = configAdoc.getDocRootDir();
    FileSystem.ensureFileStructure(rootDir);
    int workload = 0;
    if (specInfos.isEmpty())
        workload += 2;
    if (specChangeSet == null)
        workload += 2;
    SubMonitor completeProgress = SubMonitor.convert(monitor, workload);
    SubMonitorMsg cmplProgAcceptor = new SubMonitorMsg(completeProgress, processAdocPage::displayMessage, processAdocPage::displayMessageRed, CheckCanceled::checkUserCanceled);
    if (specInfos.isEmpty()) {
        SubMonitorMsg subMonitor = cmplProgAcceptor.newChild(2);
        computeTypes(subMonitor);
        subMonitor.done();
    }
    if (specChangeSet == null) {
        SubMonitorMsg subMonitor = cmplProgAcceptor.newChild(2);
        computeChangeSet(subMonitor);
        subMonitor.done();
    }
    cmplProgAcceptor.subTask("Finished.");
    if (specChangeSet.isEmpty())
        processAdocPage.displayMessage("No Changes found.");
    completeProgress.done();
}
Also used : CheckCanceled(org.eclipse.n4js.jsdoc2spec.CheckCanceled) SubMonitor(org.eclipse.core.runtime.SubMonitor) SubMonitorMsg(org.eclipse.n4js.jsdoc2spec.SubMonitorMsg) SpecModuleFile(org.eclipse.n4js.jsdoc2spec.adoc.SpecModuleFile) SpecFile(org.eclipse.n4js.jsdoc2spec.SpecFile) File(java.io.File) SpecIndexFile(org.eclipse.n4js.jsdoc2spec.adoc.SpecIndexFile)

Aggregations

File (java.io.File)1 SubMonitor (org.eclipse.core.runtime.SubMonitor)1 CheckCanceled (org.eclipse.n4js.jsdoc2spec.CheckCanceled)1 SpecFile (org.eclipse.n4js.jsdoc2spec.SpecFile)1 SubMonitorMsg (org.eclipse.n4js.jsdoc2spec.SubMonitorMsg)1 SpecIndexFile (org.eclipse.n4js.jsdoc2spec.adoc.SpecIndexFile)1 SpecModuleFile (org.eclipse.n4js.jsdoc2spec.adoc.SpecModuleFile)1