@OnStartup public void onStartup(final ObservablePath path, final PlaceRequest place) { init(path, place, resourceType, true, false, SAVE, COPY, RENAME, DELETE); // This is only used to define the "name" used by @WorkbenchPartTitle which is called by // Uberfire after @OnStartup // but before the async call in "loadContent()" has returned. When the *real* plugin is loaded // this is overwritten final String name = place.getParameter("name", ""); plugin = new Plugin(name, PluginType.PERSPECTIVE_LAYOUT, path); this.layoutEditorPlugin.init(name, lookupPerspectiveDragComponents()); this.perspectiveEditorView.setupLayoutEditor(layoutEditorPlugin.asWidget()); }
@Override protected void loadContent() { baseView.hideBusyIndicator(); layoutEditorPlugin.load( PluginType.PERSPECTIVE_LAYOUT, versionRecordManager.getCurrentPath(), new ParameterizedCommand<LayoutEditorModel>() { @Override public void execute(LayoutEditorModel layoutEditorModel) { setOriginalHash(getCurrentModelHash()); plugin = layoutEditorModel; } }); }
public String getLayoutProperty(String key) { return layoutEditorPlugin.getLayoutProperty(key); }
public void saveProperty(String key, String value) { layoutEditorPlugin.addLayoutProperty(key, value); }
public int getCurrentModelHash() { return layoutEditorPlugin.getLayout().hashCode(); }
protected void save() { layoutEditorPlugin.save( versionRecordManager.getCurrentPath(), getSaveSuccessCallback(getCurrentModelHash())); concurrentUpdateSessionInfo = null; }