Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableWidgetPropertyTester.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableWidgetPropertyTester.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableWidgetPropertyTester.java
index 37aab8b9ff1..f86fb0c6139 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableWidgetPropertyTester.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/utils/NattableWidgetPropertyTester.java
@@ -14,6 +14,7 @@
package org.eclipse.papyrus.infra.nattable.utils;
import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.nebula.widgets.nattable.NatTable;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.ISlaveAxisProvider;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.DisplayStyle;
@@ -44,7 +45,7 @@ public class NattableWidgetPropertyTester extends PropertyTester {
public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) {
final INattableModelManager manager = getNattableModelManager();
if (IS_NATTABLE_WIDGET.equals(property) && expectedValue instanceof Boolean) {
- return expectedValue.equals(manager != null);
+ return expectedValue.equals(null != manager) && ((!(Boolean)expectedValue) || manager.getAdapter(NatTable.class).isFocusControl());
}
if (manager != null && expectedValue instanceof Boolean) {
if (HAS_FEATURE_ROW_HEADER_CONFIGURATION.equals(property)) {
@@ -77,7 +78,7 @@ public class NattableWidgetPropertyTester extends PropertyTester {
/**
*
* @return
- * the current nattable model manager or <code>null</code> if not found
+ * the current nattable model manager or <code>null</code> if not found
*/
protected INattableModelManager getNattableModelManager() {
final IWorkbench workbench = PlatformUI.getWorkbench();

Back to the top