use of org.kie.workbench.common.screens.datamodeller.client.DataModelerErrorCallback in project kie-wb-common by kiegroup.
the class DataObjectBrowser method openDataObject.
private void openDataObject(final DataObject dataObject) {
final Path objectPath = getContext().getDataObjectPath(dataObject.getClassName());
if (objectPath != null) {
view.showBusyIndicator(org.kie.workbench.common.widgets.client.resources.i18n.CommonConstants.INSTANCE.Loading());
modelerService.call(new RemoteCallback<Boolean>() {
@Override
public void callback(Boolean exists) {
view.hideBusyIndicator();
if (Boolean.TRUE.equals(exists)) {
placeManager.goTo(new PathPlaceRequest(objectPath));
} else {
view.showYesNoCancelPopup(CommonConstants.INSTANCE.Warning(), Constants.INSTANCE.objectBrowser_message_file_not_exists_or_renamed(objectPath.toURI()), new Command() {
@Override
public void execute() {
// do nothing.
}
}, CommonConstants.INSTANCE.Close(), ButtonType.WARNING, null, null, null, null, null, null);
}
}
}, new DataModelerErrorCallback(CommonConstants.INSTANCE.ExceptionNoSuchFile0(objectPath.toURI()))).exists(objectPath);
}
}
Aggregations