org.gradle.tooling.ProgressListener Java Examples

The following examples show how to use org.gradle.tooling.ProgressListener. 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: GradleProjectCache.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static BuildActionExecuter<NbProjectInfo> createInfoAction(ProjectConnection pconn, GradleCommandLine cmd, CancellationToken token, ProgressListener pl) {
    BuildActionExecuter<NbProjectInfo> ret = pconn.action(new NbProjectInfoAction());
    cmd.configure(ret);

    if (token != null) {
        ret.withCancellationToken(token);
    }

    if (pl != null) {
        ret.addProgressListener(pl);
    }
    return ret;
}
 
Example #3
Source File: ConsumerOperationParameters.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void addProgressListener(ProgressListener listener) {
    progressListener.add(listener);
}
 
Example #4
Source File: ProgressListenerAdapter.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void add(ProgressListener listener) {
    listeners.add(listener);
}
 
Example #5
Source File: AbstractLongRunningOperation.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public T addProgressListener(ProgressListener listener) {
    operationParamsBuilder.addProgressListener(listener);
    return getThis();
}
 
Example #6
Source File: ConsumerOperationParameters.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void addProgressListener(ProgressListener listener) {
    progressListener.add(listener);
}
 
Example #7
Source File: ProgressListenerAdapter.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void add(ProgressListener listener) {
    listeners.add(listener);
}
 
Example #8
Source File: AbstractLongRunningOperation.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public T addProgressListener(ProgressListener listener) {
    operationParamsBuilder.addProgressListener(listener);
    return getThis();
}
 
Example #9
Source File: ConsumerOperationParameters.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void addProgressListener(ProgressListener listener) {
    progressListener.add(listener);
}
 
Example #10
Source File: ProgressListenerAdapter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void add(ProgressListener listener) {
    listeners.add(listener);
}
 
Example #11
Source File: AbstractLongRunningOperation.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public T addProgressListener(ProgressListener listener) {
    operationParamsBuilder.addProgressListener(listener);
    return getThis();
}
 
Example #12
Source File: ConsumerOperationParameters.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void addProgressListener(ProgressListener listener) {
    progressListener.add(listener);
}
 
Example #13
Source File: ProgressListenerAdapter.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void add(ProgressListener listener) {
    listeners.add(listener);
}
 
Example #14
Source File: AbstractLongRunningOperation.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public T addProgressListener(ProgressListener listener) {
    operationParamsBuilder.addProgressListener(listener);
    return getThis();
}