use of com.microsoft.azure.toolkit.lib.common.entity.IAzureBaseResource in project azure-tools-for-java by Microsoft.
the class AzureResourceLabelView method onEvent.
public void onEvent(AzureEvent<Object> event) {
final String type = event.getType();
final Object source = event.getSource();
if (source instanceof IAzureBaseResource && ((IAzureBaseResource<?, ?>) source).id().equals(this.resource.id())) {
final AzureTaskManager tm = AzureTaskManager.getInstance();
if ("common|resource.refresh".equals(type)) {
if (((AzureOperationEvent) event).getStage() == AzureOperationEvent.Stage.AFTER) {
tm.runLater(this::refreshChildren);
}
} else if ("common|resource.status_changed".equals(type)) {
tm.runLater(this::refreshView);
}
}
}
Aggregations