Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2013-07-17 04:56:38 -0400
committerVincent Lorenzo2013-07-17 05:03:28 -0400
commit93cf4406b7d8ddf02b3840526ddf72f613bed8fa (patch)
tree8ad8a4264d4aed8d4423ad912721b08558117fc3 /sandbox
parent87c57c60c3d17a57b9dc659bf795dab24edd0177 (diff)
downloadorg.eclipse.papyrus-93cf4406b7d8ddf02b3840526ddf72f613bed8fa.tar.gz
org.eclipse.papyrus-93cf4406b7d8ddf02b3840526ddf72f613bed8fa.tar.xz
org.eclipse.papyrus-93cf4406b7d8ddf02b3840526ddf72f613bed8fa.zip
401764: [Table 2] The classes managing the table model and Nattable must
be refactored https://bugs.eclipse.org/bugs/show_bug.cgi?id=401764 Replace all usages of EditingDomain by TransactionalEditingDomain (to clear the API) + organize import
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFileAxisManager.java19
-rw-r--r--sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFilePropertyAxisManager.java25
-rw-r--r--sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/DerivedUMLPropertiesAxisManager.java4
-rw-r--r--sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/SynchronizedFeatureValueAxisManager.java3
-rw-r--r--sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java4
5 files changed, 20 insertions, 35 deletions
diff --git a/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFileAxisManager.java b/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFileAxisManager.java
index 48a852e4e98..ba02dd97372 100644
--- a/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFileAxisManager.java
+++ b/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFileAxisManager.java
@@ -26,7 +26,7 @@ import java.util.Properties;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
-import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
import org.eclipse.papyrus.infra.nattable.manager.axis.AbstractSynchronizedOnFeatureAxisManager;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
@@ -106,7 +106,7 @@ public class PropertyFileAxisManager extends AbstractSynchronizedOnFeatureAxisMa
}
@Override
- public Command getAddAxisCommand(EditingDomain domain, Collection<Object> objectToAdd) {
+ public Command getAddAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToAdd) {
return super.getAddAxisCommand(domain, objectToAdd);
}
@@ -116,7 +116,7 @@ public class PropertyFileAxisManager extends AbstractSynchronizedOnFeatureAxisMa
}
@Override
- public Command getComplementaryAddAxisCommand(EditingDomain domain, Collection<Object> objectToAdd) {
+ public Command getComplementaryAddAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToAdd) {
return super.getComplementaryAddAxisCommand(domain, objectToAdd);
}
@@ -146,7 +146,7 @@ public class PropertyFileAxisManager extends AbstractSynchronizedOnFeatureAxisMa
}
@Override
- public Command getDestroyAxisCommand(EditingDomain domain, Collection<Object> objectToDestroy) {
+ public Command getDestroyAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToDestroy) {
return super.getDestroyAxisCommand(domain, objectToDestroy);
}
@@ -211,15 +211,6 @@ public class PropertyFileAxisManager extends AbstractSynchronizedOnFeatureAxisMa
return prop;
}
- @Override
- protected EditingDomain getTableEditingDomain() {
- return super.getTableEditingDomain();
- }
-
- @Override
- protected EditingDomain getContextEditingDomain() {
- return super.getContextEditingDomain();
- }
@Override
public void moveAxis(Object elementToMove, int newIndex) {
@@ -297,7 +288,7 @@ public class PropertyFileAxisManager extends AbstractSynchronizedOnFeatureAxisMa
}
@Override
- public Command getDestroyAxisElementCommand(EditingDomain domain, Integer axisPosition) {
+ public Command getDestroyAxisElementCommand(TransactionalEditingDomain domain, Integer axisPosition) {
return null;
}
diff --git a/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFilePropertyAxisManager.java b/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFilePropertyAxisManager.java
index 1658fad64ed..2afb7ae9574 100644
--- a/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFilePropertyAxisManager.java
+++ b/sandbox/org.eclipse.papyrus.uml.nattable.ws.preferences/src/org/eclipse/papyrus/uml/nattable/ws/preferences/manager/axis/PropertyFilePropertyAxisManager.java
@@ -24,7 +24,7 @@ import java.util.Properties;
import java.util.Set;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.nebula.widgets.nattable.ui.NatEventData;
import org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
@@ -79,7 +79,7 @@ public class PropertyFilePropertyAxisManager extends AbstractAxisManager {
}
@Override
- public Command getAddAxisCommand(EditingDomain domain, Collection<Object> objectToAdd) {
+ public Command getAddAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToAdd) {
return super.getAddAxisCommand(domain, objectToAdd);
}
@@ -89,7 +89,7 @@ public class PropertyFilePropertyAxisManager extends AbstractAxisManager {
}
@Override
- public Command getComplementaryAddAxisCommand(EditingDomain domain, Collection<Object> objectToAdd) {
+ public Command getComplementaryAddAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToAdd) {
return super.getComplementaryAddAxisCommand(domain, objectToAdd);
}
@@ -119,7 +119,7 @@ public class PropertyFilePropertyAxisManager extends AbstractAxisManager {
}
@Override
- public Command getDestroyAxisCommand(EditingDomain domain, Collection<Object> objectToDestroy) {
+ public Command getDestroyAxisCommand(TransactionalEditingDomain domain, Collection<Object> objectToDestroy) {
return super.getDestroyAxisCommand(domain, objectToDestroy);
}
@@ -170,16 +170,6 @@ public class PropertyFilePropertyAxisManager extends AbstractAxisManager {
}
@Override
- protected EditingDomain getTableEditingDomain() {
- return super.getTableEditingDomain();
- }
-
- @Override
- protected EditingDomain getContextEditingDomain() {
- return super.getContextEditingDomain();
- }
-
- @Override
public void moveAxis(Object elementToMove, int newIndex) {
super.moveAxis(elementToMove, newIndex);
}
@@ -255,7 +245,7 @@ public class PropertyFilePropertyAxisManager extends AbstractAxisManager {
}
@Override
- public Command getDestroyAxisElementCommand(EditingDomain domain, Integer axisPosition) {
+ public Command getDestroyAxisElementCommand(TransactionalEditingDomain domain, Integer axisPosition) {
return null;
}
@@ -264,4 +254,9 @@ public class PropertyFilePropertyAxisManager extends AbstractAxisManager {
return true;
}
+ @Override
+ public boolean canBeSavedAsConfig() {
+ return false;
+ }
+
}
diff --git a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/DerivedUMLPropertiesAxisManager.java b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/DerivedUMLPropertiesAxisManager.java
index 7c696ca2701..2a8e1f0354f 100644
--- a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/DerivedUMLPropertiesAxisManager.java
+++ b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/DerivedUMLPropertiesAxisManager.java
@@ -14,7 +14,7 @@
package org.eclipse.papyrus.views.properties.table.axis;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.infra.nattable.manager.axis.AbstractAxisManager;
/**
@@ -47,7 +47,7 @@ public class DerivedUMLPropertiesAxisManager extends AbstractAxisManager {
return false;
}
- public Command getDestroyAxisElementCommand(EditingDomain domain, Integer axisPosition) {
+ public Command getDestroyAxisElementCommand(TransactionalEditingDomain domain, Integer axisPosition) {
return null;
}
diff --git a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/SynchronizedFeatureValueAxisManager.java b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/SynchronizedFeatureValueAxisManager.java
index 5279d4a8e7c..0d6fab4fb35 100644
--- a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/SynchronizedFeatureValueAxisManager.java
+++ b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/axis/SynchronizedFeatureValueAxisManager.java
@@ -20,7 +20,6 @@ import java.util.List;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
@@ -63,7 +62,7 @@ public class SynchronizedFeatureValueAxisManager extends AbstractSynchronizedOnF
return true;
}
- public Command getDestroyAxisElementCommand(EditingDomain domain, Integer axisPosition) {
+ public Command getDestroyAxisElementCommand(TransactionalEditingDomain domain, Integer axisPosition) {
final Object current = getElements().get(axisPosition);
EObject elementToDestroy = null;
if(current instanceof EObjectAxis) {
diff --git a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java
index 5e6639ff674..0542d21c911 100644
--- a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java
+++ b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java
@@ -14,7 +14,7 @@
package org.eclipse.papyrus.views.properties.table.cell;
import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager;
import org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
@@ -71,7 +71,7 @@ public class DerivedUMLPropertiesCellManager extends AbstractCellManager impleme
/**
* {@inheritDoc}
*/
- public Command getSetValueCommand(EditingDomain domain, Object columnElement, Object rowElemenet, Object newValue) {
+ public Command getSetValueCommand(TransactionalEditingDomain domain, Object columnElement, Object rowElemenet, Object newValue) {
MultiplicityElement element = getMultiplicityElement(columnElement, rowElemenet);

Back to the top