From 71f262f006238eb133e11e56590142d299e2f24d Mon Sep 17 00:00:00 2001 From: cbrun Date: Tue, 16 May 2017 17:15:31 +0200 Subject: [510126] Use PropertiesExpressionQueryProvider for Dialogs & Wizards The previous enablement condition was only looking at the ancestors hierarchy but now it is possible to have Dialog or Wizard descriptions directly as part of a Diagram tool for instance. This commit check the originating EPackage to cover those cases. Bug: 510126 Change-Id: I0df567f27b228bff71aff87ea4bd10931863bd2c Signed-off-by: Cedric Brun --- .../core/internal/expressions/PropertiesExpressionQueryProvider.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/expressions/PropertiesExpressionQueryProvider.java b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/expressions/PropertiesExpressionQueryProvider.java index 0216016943..c0c7f39613 100644 --- a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/expressions/PropertiesExpressionQueryProvider.java +++ b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/internal/expressions/PropertiesExpressionQueryProvider.java @@ -16,6 +16,7 @@ import org.eclipse.sirius.business.api.dialect.description.IInterpretedExpressio import org.eclipse.sirius.business.api.dialect.description.IInterpretedExpressionQueryProvider; import org.eclipse.sirius.ext.base.Option; import org.eclipse.sirius.ext.base.Options; +import org.eclipse.sirius.properties.PropertiesPackage; /** * An {@link IInterpretedExpressionQueryProvider} for properties view @@ -26,7 +27,7 @@ import org.eclipse.sirius.ext.base.Options; public class PropertiesExpressionQueryProvider implements IInterpretedExpressionQueryProvider { @Override public Option getExpressionQueryFor(EObject context, EStructuralFeature expressionAttribute) { - if (VSMNavigation.isInsideViewExtensionDescription(context)) { + if (VSMNavigation.isInsideViewExtensionDescription(context) || context.eClass().getEPackage() == PropertiesPackage.eINSTANCE) { IInterpretedExpressionQuery value = new PropertiesInterpretedExpressionQuery(context, expressionAttribute); return Options.newSome(value); } else { -- cgit v1.2.3