Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 64.01% (20482/31999)
* Branch Coverage: 54.22% (8240/15196)
* Lines of Code: 31999
* Cyclomatic Complexity: 13164
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 715
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
29 lines
1.1 KiB
Java
29 lines
1.1 KiB
Java
package p.studio.app;
|
|
|
|
import p.packer.events.PackerEvent;
|
|
import p.packer.events.PackerEventSink;
|
|
import p.studio.ui.javafx.events.StudioEventBus;
|
|
import p.studio.ui.javafx.events.StudioPackerOperationEvent;
|
|
import p.studio.ui.javafx.events.StudioPackerOperationKind;
|
|
|
|
import java.util.Objects;
|
|
|
|
final class StudioPackerEventAdapter implements PackerEventSink {
|
|
private final StudioEventBus eventBus;
|
|
|
|
StudioPackerEventAdapter(StudioEventBus eventBus) {
|
|
this.eventBus = Objects.requireNonNull(eventBus, "eventBus");
|
|
}
|
|
|
|
@Override
|
|
public void publish(PackerEvent event) {
|
|
final PackerEvent packerEvent = Objects.requireNonNull(event, "event");
|
|
eventBus.publish(new StudioPackerOperationEvent(
|
|
packerEvent.operationId(),
|
|
StudioPackerOperationKind.valueOf(packerEvent.kind().name()),
|
|
packerEvent.summary(),
|
|
packerEvent.progress() == null ? null : packerEvent.progress().value(),
|
|
packerEvent.progress() == null || packerEvent.progress().indeterminate()));
|
|
}
|
|
}
|