private void openDataObject(final DataObject dataObject) {
   final Path objectPath = getContext().getDataObjectPath(dataObject.getClassName());
   if (objectPath != null) {
     BusyPopup.showMessage(
         org.kie.workbench.common.widgets.client.resources.i18n.CommonConstants.INSTANCE
             .Loading());
     modelerService
         .call(
             new RemoteCallback<Boolean>() {
               @Override
               public void callback(Boolean exists) {
                 BusyPopup.close();
                 if (Boolean.TRUE.equals(exists)) {
                   placeManager.goTo(new PathPlaceRequest(objectPath));
                 } else {
                   YesNoCancelPopup yesNoCancelPopup =
                       YesNoCancelPopup.newYesNoCancelPopup(
                           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);
                   yesNoCancelPopup.setClosable(false);
                   yesNoCancelPopup.show();
                 }
               }
             },
             new DataModelerErrorCallback(
                 CommonConstants.INSTANCE.ExceptionNoSuchFile0(objectPath.toURI())))
         .exists(objectPath);
   }
 }
Esempio n. 2
0
 @Override
 public void close() {
   BusyPopup.close();
 }
Esempio n. 3
0
 @Override
 public void show(final String message) {
   BusyPopup.showMessage(message);
 }
 @Override
 public void hideBusyIndicator() {
   BusyPopup.close();
 }
 @Override
 public void showBusyIndicator(String message) {
   BusyPopup.showMessage(message);
 }
 @Override
 public void showBusyPopupMessage() {
   BusyPopup.showMessage(CoreConstants.INSTANCE.Cloning());
 }