protected void hideLoadingViews() { getView().hideBusyIndicator(); }
protected void showSavingViews() { getView().showSaving(); }
/** * Builds a menu item with a clear icon and executes the given callback. * Added alert message - the operation cannot be reverted. * See <a>org.kie.workbench.common.stunner.core.client.session.command.impl.ClearSessionCommand</a> */ public MenuItem newClearItem(final Command command) { return buildItem(buildClearItem(command)); }
@SuppressWarnings("unchecked") public void open(final ProjectDiagram diagram) { editorProxy = makeStunnerEditorProxy(); showLoadingViews(); //Open applicable SessionPresenter if (!isReadOnly()) { openSession(diagram); } else { openReadOnlySession(diagram); } }
protected void doClose() { menuItems.clear(); menuSessionItems.destroy(); destroySession(); }
@Override protected Supplier<ProjectDiagramResource> getContentSupplier() { return () -> getEditorProxy().getContentSupplier().get(); }
protected void showLoadingViews() { getView().showLoading(); }
protected void doStartUp(final ObservablePath path, final PlaceRequest place) { init(path, place, resourceType); }
@Override public void destroy() { super.destroy(); onMigrate = null; formsItem = null; migrateMenuItem = null; }
void superDoStartUp(final ObservablePath path, final PlaceRequest place) { super.doStartUp(path, place); } }
@Override public void onSuccess(final ProjectDiagram item) { open(item); }
@Override protected void onSaveError(ClientRuntimeError error) { isMigrating = false; super.onSaveError(error); }
protected Menus getMenus() { if (menus == null) { makeMenuBar(); } return menus; }
void saveAndMigrate() { isMigrating = true; super.save(); }
@Override protected Integer getCurrentContentHash() { return getCurrentDiagramHash(); }
public MenuItem newCutItem(final Command command) { return buildItem(buildCutItem(command)); }
@Override public void onError(final ClientRuntimeError error) { onLoadError(error); } });
@SuppressWarnings("unchecked") protected int getCurrentDiagramHash() { return editorProxy.getEditorHashCode(); }
private void onValidationSuccess() { log(Level.INFO, "Validation SUCCESS."); }
public ClientTranslationService getTranslationService() { return itemsBuilder.getTranslationService(); }