protected void editData() { final IStructuredSelection selection = (IStructuredSelection) dataTableViewer.getSelection(); if (onlyOneElementSelected(selection)) { final Data selectedData = (Data) selection.getFirstElement(); if (selectedData.eContainer() == null) { final AbstractProcess parentProcess = ModelHelper.getParentProcess(eObject); BonitaStudioLog.error( "Investigation trace for issue BS-11552:\n" + "The context was not initialized.\n " + "Please report the issue with details and attached impacted process.\n" + "data: " + (selectedData != null ? selectedData.getName() : "null data") + "\n" + "From diagram:" + (parentProcess != null ? parentProcess.getName() : "No process found."), DataPlugin.PLUGIN_ID); } final DataWizard wizard = new DataWizard( getEditingDomain(), selectedData, getDataFeature(), getDataFeatureToCheckUniqueID(), getShowAutoGenerateForm()); wizard.setIsPageFlowContext(isPageFlowContext()); wizard.setIsOverviewContext(isOverViewContext()); new CustomWizardDialog( Display.getDefault().getActiveShell(), wizard, IDialogConstants.OK_LABEL) .open(); dataTableViewer.refresh(); } }
@Override public void addData() { final DataWizard wizard = new DataWizard( getEditingDomain(), getEObject(), getDataFeature(), getDataFeatureToCheckUniqueID(), getShowAutoGenerateForm()); wizard.setIsPageFlowContext(isPageFlowContext()); wizard.setIsOverviewContext(isOverViewContext()); if (new DataWizardDialog(Display.getCurrent().getActiveShell(), wizard, this).open() == Dialog.OK) { dataTableViewer.refresh(); } }