Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java')
-rw-r--r--sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
index 3e2b0c84eec..5eb416412f6 100644
--- a/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
+++ b/sandbox/TableV3/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/table/NattableModelManager.java
@@ -396,6 +396,9 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
}
}
+ //we update the state for the invert axis command
+ command = commandService.getCommand(CommandIds.COMMAND_INVERT_AXIS);
+ updateToggleCommandState(command, getTable().isInvertAxis());
} else {
throw new RuntimeException(String.format("The Eclipse service {0} has not been found", ICommandService.class)); //$NON-NLS-1$
@@ -403,6 +406,22 @@ public class NattableModelManager extends AbstractNattableWidgetManager implemen
}
+ /**
+ *
+ * @param command
+ * an eclipse command
+ * @param newValue
+ * the new boolean value to set to the state of this command
+ */
+ private void updateToggleCommandState(final org.eclipse.core.commands.Command command, final boolean newValue) {//FIXME : refactore the code to always use this method
+ if(command != null) {
+ final State state = command.getState(CommandIds.TOGGLE_STATE);
+ if(state != null) {
+ state.setValue(newValue);
+ }
+ }
+ }
+
public void invertJavaObject() {
AbstractAxisProvider newColumProvider = this.rowProvider;
AbstractAxisProvider newRowProvider = this.columnProvider;

Back to the top