Class EditingInExcelManager
java.lang.Object
com.amalgamasimulation.desktop.ui.internal.PartialLoadAndSaveManager
com.amalgamasimulation.desktop.ui.views.EditingInExcelManager
public class EditingInExcelManager
extends com.amalgamasimulation.desktop.ui.internal.PartialLoadAndSaveManager
A container for data required to edit a part of the scenario using Excel.
How to use:
- Get an instance of the EditingInExcelManager class from a
TableView. - Set up the instance via its
setDataForEditing(EClass, Supplier, EMFExcelTransform, Supplier)method.
- Author:
- Ionov Ivan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidopenDialog(org.eclipse.swt.widgets.Shell shell) Shows a dialog that enables data export or upload.voidsetAdditionalActionBeforeRemove(Function<List<org.eclipse.emf.ecore.EObject>, List<org.eclipse.emf.common.command.Command>> additionalActionBeforeRemove) voidsetDataForEditing(org.eclipse.emf.ecore.EClass editingEClass, Supplier<org.eclipse.emf.ecore.EObject> rootObject, com.amalgamasimulation.emf.excel.EMFExcelTransform<? extends org.eclipse.emf.ecore.EObject> emfExcelTransform, Supplier<org.eclipse.emf.ecore.util.ECrossReferenceAdapter> crossReferenceAdapter) Set up the editing data.Methods inherited from class com.amalgamasimulation.desktop.ui.internal.PartialLoadAndSaveManager
checkAvailableEditing, getActionAfterCommand, getActionBeforeCommand, getCrossReferenceAdapter, getEditingEClass, getEmfExcelTransform, getRootObject, setActionAfterCommand, setActionBeforeCommand, setData
-
Constructor Details
-
EditingInExcelManager
public EditingInExcelManager()
-
-
Method Details
-
setDataForEditing
public void setDataForEditing(org.eclipse.emf.ecore.EClass editingEClass, Supplier<org.eclipse.emf.ecore.EObject> rootObject, com.amalgamasimulation.emf.excel.EMFExcelTransform<? extends org.eclipse.emf.ecore.EObject> emfExcelTransform, Supplier<org.eclipse.emf.ecore.util.ECrossReferenceAdapter> crossReferenceAdapter) Set up the editing data. After calling this method, a new menu item 'Edit in Excel' should appear in the TableView that holds this EditingInExcelManager instance.- Parameters:
editingEClass- The EClass of the data that will be edited. Note that objects of 'editingEClass' must be immediately contained within the root scenario object ('rootObject'), i.e., the 'rootObject' must have a 0..* reference to the objects of the 'editingEClass'.rootObject- Supplier of the scenario root objectemfExcelTransform- The EMFExcelTransform object set up to work with scenario objectscrossReferenceAdapter- ECrossReferenceAdapter supplier
-
openDialog
public void openDialog(org.eclipse.swt.widgets.Shell shell) Description copied from class:com.amalgamasimulation.desktop.ui.internal.PartialLoadAndSaveManagerShows a dialog that enables data export or upload.- Specified by:
openDialogin classcom.amalgamasimulation.desktop.ui.internal.PartialLoadAndSaveManager- Parameters:
shell- parent Shell object for the dialog
-
getAdditionalActionBeforeRemove
-
setAdditionalActionBeforeRemove
-