public void onRename() {
    RenamePopup popup =
        new RenamePopup(
            new RenameCommand() {
              @Override
              public void execute(final String newName, final String comment) {
                enumService
                    .call(
                        new RemoteCallback<Path>() {
                          @Override
                          public void callback(Path response) {
                            view.setNotDirty();
                            metadataWidget.resetDirty();
                            notification.fire(
                                new NotificationEvent(
                                    CommonConstants.INSTANCE.ItemRenamedSuccessfully()));
                            resourceRenamedEvent.fire(new ResourceRenamedEvent(path, response));
                          }
                        })
                    .rename(path, newName, comment);
              }
            });

    popup.show();
  }
  public void onRename() {
    RenamePopup popup =
        new RenamePopup(
            new RenameCommand() {
              @Override
              public void execute(final String newName, final String comment) {
                factModelService
                    .call(
                        new RemoteCallback<Path>() {
                          @Override
                          public void callback(Path response) {
                            view.setNotDirty();
                            metadataWidget.resetDirty();
                            notification.fire(
                                new NotificationEvent(
                                    CommonConstants.INSTANCE.ItemRenamedSuccessfully(),
                                    NotificationEvent.NotificationType.DEFAULT,
                                    NotificationEvent.RefreshType.REFRESH));
                          }
                        })
                    .rename(path, newName, comment);
              }
            });

    popup.show();
  }