org.gradle.tooling.ProgressEvent Java Examples

The following examples show how to use org.gradle.tooling.ProgressEvent. 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: GradleProjectCache.java    From netbeans with Apache License 2.0 6 votes vote down vote up
@Messages({
    "# {0} - The project name",
    "LBL_Loading=Loading {0}"
})
@Override
public GradleProject call() throws Exception {
    tokenSource = GradleConnector.newCancellationTokenSource();
    final ProgressHandle handle = ProgressHandle.createHandle(Bundle.LBL_Loading(ctx.previous.getBaseProject().getName()), this);
    ProgressListener pl = (ProgressEvent pe) -> {
        handle.progress(pe.getDescription());
    };
    handle.start();
    try {
        return loadGradleProject(ctx, tokenSource.token(), pl);
    } catch (Throwable ex) {
        LOG.log(WARNING, ex.getMessage(), ex);
        throw ex;
    } finally {
        handle.finish();
    }
}
 
Example #2
Source File: ProgressListenerAdapter.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void fireChangeEvent() {
    final String description = stack.isEmpty() ? "" : stack.getFirst();
    listeners.getSource().statusChanged(new ProgressEvent() {
        public String getDescription() {
            return description;
        }
    });
}
 
Example #3
Source File: ProgressListenerAdapter.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void fireChangeEvent() {
    final String description = stack.isEmpty() ? "" : stack.getFirst();
    listeners.getSource().statusChanged(new ProgressEvent() {
        public String getDescription() {
            return description;
        }
    });
}
 
Example #4
Source File: ProgressListenerAdapter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void fireChangeEvent() {
    final String description = stack.isEmpty() ? "" : stack.getFirst();
    listeners.getSource().statusChanged(new ProgressEvent() {
        public String getDescription() {
            return description;
        }
    });
}
 
Example #5
Source File: ProgressListenerAdapter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void fireChangeEvent() {
    final String description = stack.isEmpty() ? "" : stack.getFirst();
    listeners.getSource().statusChanged(new ProgressEvent() {
        public String getDescription() {
            return description;
        }
    });
}