Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2013-07-31 12:48:02 +0000
committerVincent Lorenzo2013-07-31 12:48:02 +0000
commit70bef2084e73c6385e6e92da5a7feefeeda473c2 (patch)
treeea2107210e7e9baf8c41e7d93d48b96e09ea33bf /extraplugins
parentaef4bbc863e82de5563f9e993925cefaeee70e5e (diff)
downloadorg.eclipse.papyrus-70bef2084e73c6385e6e92da5a7feefeeda473c2.tar.gz
org.eclipse.papyrus-70bef2084e73c6385e6e92da5a7feefeeda473c2.tar.xz
org.eclipse.papyrus-70bef2084e73c6385e6e92da5a7feefeeda473c2.zip
411115: [Table 2] The tabular editor must provide a command to save and
reuse the current axis providers https://bugs.eclipse.org/bugs/show_bug.cgi?id=411115
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadColumnAxisProvidersHandler.java13
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadRowAxisProvidersHandler.java15
2 files changed, 23 insertions, 5 deletions
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadColumnAxisProvidersHandler.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadColumnAxisProvidersHandler.java
index 0e3f5ce353d..5b628e75ea5 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadColumnAxisProvidersHandler.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadColumnAxisProvidersHandler.java
@@ -44,7 +44,12 @@ public class LoadColumnAxisProvidersHandler extends AbstractLoadAxisProvidersHan
*/
@Override
public AbstractAxisProvider getCurrentAxisProvider() {
- return this.getCurrentNattableModelManager().getTable().getCurrentColumnAxisProvider();
+ if(!this.getCurrentNattableModelManager().getTable().isInvertAxis()){
+ return this.getCurrentNattableModelManager().getTable().getCurrentColumnAxisProvider();
+ }else{
+ return this.getCurrentNattableModelManager().getTable().getCurrentRowAxisProvider();
+
+ }
}
/**
@@ -56,7 +61,11 @@ public class LoadColumnAxisProvidersHandler extends AbstractLoadAxisProvidersHan
*/
@Override
public EList<AbstractAxisProvider> getAxisProvidersHistory() {
- return this.getCurrentNattableModelManager().getTable().getColumnAxisProvidersHistory();
+ if(!this.getCurrentNattableModelManager().getTable().isInvertAxis()){
+ return this.getCurrentNattableModelManager().getTable().getColumnAxisProvidersHistory();
+ }else{
+ return this.getCurrentNattableModelManager().getTable().getRowAxisProvidersHistory();
+ }
}
/**
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadRowAxisProvidersHandler.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadRowAxisProvidersHandler.java
index 245c79660a7..8e25d4cfdbf 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadRowAxisProvidersHandler.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/handler/LoadRowAxisProvidersHandler.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
/**
@@ -44,7 +45,11 @@ public class LoadRowAxisProvidersHandler extends AbstractLoadAxisProvidersHandle
* @return
*/
public EList<AbstractAxisProvider> getAxisProvidersHistory() {
- return this.getCurrentNattableModelManager().getTable().getRowAxisProvidersHistory();
+ if(!this.getCurrentNattableModelManager().getTable().isInvertAxis()){
+ return this.getCurrentNattableModelManager().getTable().getRowAxisProvidersHistory();
+ }else{
+ return this.getCurrentNattableModelManager().getTable().getColumnAxisProvidersHistory();
+ }
}
/**
@@ -55,7 +60,11 @@ public class LoadRowAxisProvidersHandler extends AbstractLoadAxisProvidersHandle
* @return
*/
public AbstractAxisProvider getCurrentAxisProvider() {
- return this.getCurrentNattableModelManager().getTable().getCurrentRowAxisProvider();
+ if(!this.getCurrentNattableModelManager().getTable().isInvertAxis()){
+ return this.getCurrentNattableModelManager().getTable().getCurrentRowAxisProvider();
+ }else{
+ return this.getCurrentNattableModelManager().getTable().getCurrentColumnAxisProvider();
+ }
}
/**
@@ -69,4 +78,4 @@ public class LoadRowAxisProvidersHandler extends AbstractLoadAxisProvidersHandle
return NattablePackage.eINSTANCE.getTable_CurrentRowAxisProvider();
}
-}
+} \ No newline at end of file

Back to the top