use of org.gradle.internal.logging.events.ProgressStartEvent in project gradle by gradle.
the class BuildStatusRenderer method onOutput.
@Override
public void onOutput(OutputEvent event) {
if (event instanceof ProgressStartEvent) {
ProgressStartEvent startEvent = (ProgressStartEvent) event;
// if it has no parent ID, assign this operation as the root operation
if (startEvent.getParentId() == null && BUILD_PROGRESS_CATEGORY.equals(startEvent.getCategory())) {
rootOperationId = startEvent.getOperationId();
buildStarted(startEvent);
}
} else if (event instanceof ProgressCompleteEvent) {
ProgressCompleteEvent completeEvent = (ProgressCompleteEvent) event;
if (completeEvent.getOperationId().equals(rootOperationId)) {
rootOperationId = null;
buildFinished(completeEvent);
}
} else if (event instanceof ProgressEvent) {
ProgressEvent progressEvent = (ProgressEvent) event;
if (progressEvent.getOperationId().equals(rootOperationId)) {
buildProgressed(progressEvent);
}
}
}
use of org.gradle.internal.logging.events.ProgressStartEvent in project gradle by gradle.
the class WorkInProgressRenderer method onOutput.
@Override
public void onOutput(OutputEvent event) {
if (event instanceof ProgressStartEvent) {
progressArea.setVisible(true);
ProgressStartEvent startEvent = (ProgressStartEvent) event;
ProgressOperation op = operations.start(startEvent.getShortDescription(), startEvent.getStatus(), startEvent.getCategory(), startEvent.getOperationId(), startEvent.getParentId());
attach(op);
} else if (event instanceof ProgressCompleteEvent) {
ProgressCompleteEvent completeEvent = (ProgressCompleteEvent) event;
detach(operations.complete(completeEvent.getOperationId()));
} else if (event instanceof ProgressEvent) {
ProgressEvent progressEvent = (ProgressEvent) event;
operations.progress(progressEvent.getStatus(), progressEvent.getOperationId());
} else if (event instanceof EndOutputEvent) {
progressArea.setVisible(false);
}
listener.onOutput(event);
}
use of org.gradle.internal.logging.events.ProgressStartEvent in project gradle by gradle.
the class ProgressStartEventSerializer method read.
@Override
public ProgressStartEvent read(Decoder decoder) throws Exception {
OperationIdentifier id = new OperationIdentifier(decoder.readSmallLong());
OperationIdentifier parentId = decoder.readBoolean() ? new OperationIdentifier(decoder.readSmallLong()) : null;
long timestamp = decoder.readLong();
String category = decoder.readString();
String description = decoder.readString();
String shortDescription = decoder.readNullableString();
String loggingHeader = decoder.readNullableString();
String status = decoder.readString();
return new ProgressStartEvent(id, parentId, timestamp, category, description, shortDescription, loggingHeader, status);
}
Aggregations