From 2fb1c6e4b7ad8af2202a31a66850c7c7c2e1cf5c Mon Sep 17 00:00:00 2001 From: Pierre-Charles David Date: Tue, 4 Jul 2023 10:55:48 +0200 Subject: [PATCH] Switch to AQL 8.0.x Change-Id: I9c6ce4e1202bdeff65d159dd13c60f921294caaf Signed-off-by: Pierre-Charles David --- .../META-INF/MANIFEST.MF | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../aql/business/internal/AQLSiriusInterpreter.java | 11 ++++++----- .../sirius/common/interpreter/aql/AQLInterpreter.java | 2 +- .../internal/preprocessor/AQLInterpreter.java | 2 +- .../org.eclipse.sirius.targets/sirius_canary.target | 7 +++++-- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF index 3173ef0a0d..ec69e6cdcb 100644 --- a/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.sirius.common.acceleo.aql.ide/META-INF/MANIFEST.MF @@ -6,7 +6,7 @@ Bundle-Version: 7.2.0.qualifier Require-Bundle: org.eclipse.sirius.common;bundle-version="2.0.0", org.eclipse.sirius.common.acceleo.aql;bundle-version="2.0.0", org.eclipse.emf.ecore;bundle-version="2.8.0", - org.eclipse.acceleo.query;bundle-version="[5.0.0,8.0.0)" + org.eclipse.acceleo.query;bundle-version="8.0.2" Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Vendor: %providerName Export-Package: org.eclipse.sirius.common.acceleo.aql.ide;version="3.1.0", diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.common.acceleo.aql/META-INF/MANIFEST.MF index a9fcaf8d29..0fd214350a 100644 --- a/plugins/org.eclipse.sirius.common.acceleo.aql/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/META-INF/MANIFEST.MF @@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.sirius.common;bundle-version="2.0.0", org.eclipse.sirius.ecore.extender;bundle-version="2.0.0", org.eclipse.emf.ecore;bundle-version="2.8.0", org.eclipse.sirius.ext.base;bundle-version="3.1.0", - org.eclipse.acceleo.query;bundle-version="[5.0.0,8.0.0)" + org.eclipse.acceleo.query;bundle-version="8.0.2" Bundle-RequiredExecutionEnvironment: JavaSE-17 Bundle-Vendor: %providerName Export-Package: org.eclipse.sirius.common.acceleo.aql.business;version="3.0.0", diff --git a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AQLSiriusInterpreter.java b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AQLSiriusInterpreter.java index 8877ff4351..1c5bf8a980 100644 --- a/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AQLSiriusInterpreter.java +++ b/plugins/org.eclipse.sirius.common.acceleo.aql/src/org/eclipse/sirius/common/acceleo/aql/business/internal/AQLSiriusInterpreter.java @@ -25,15 +25,16 @@ import java.util.Set; import java.util.concurrent.ExecutionException; +import org.eclipse.acceleo.query.parser.AstResult; import org.eclipse.acceleo.query.runtime.AcceleoQueryEvaluationException; import org.eclipse.acceleo.query.runtime.AcceleoQueryValidationException; import org.eclipse.acceleo.query.runtime.CrossReferenceProvider; import org.eclipse.acceleo.query.runtime.EvaluationResult; import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine; -import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine.AstResult; import org.eclipse.acceleo.query.runtime.IQueryEnvironment; import org.eclipse.acceleo.query.runtime.IQueryEvaluationEngine; import org.eclipse.acceleo.query.runtime.IQueryValidationEngine; +import org.eclipse.acceleo.query.runtime.IService; import org.eclipse.acceleo.query.runtime.IValidationMessage; import org.eclipse.acceleo.query.runtime.IValidationResult; import org.eclipse.acceleo.query.runtime.Query; @@ -144,7 +145,7 @@ public void loaded(String nsURI, EPackage pak) { @Override public void unloaded(String nsURI, EPackage pak) { - queryEnvironment.removeEPackage(pak.getName()); + queryEnvironment.removeEPackage(pak); } }; this.javaExtensions.addClassLoadingCallBack(callback); @@ -215,7 +216,7 @@ public IEvaluationResult evaluateExpression(final EObject target, final String f try { AstResult build = parsedExpressions.get(expression); IQueryEvaluationEngine evaluationEngine = QueryEvaluation.newEngine(queryEnvironment); - final EvaluationResult evalResult = evaluationEngine.eval(build, variables); + EvaluationResult evalResult = evaluationEngine.eval(build, variables); final BasicDiagnostic diagnostic = new BasicDiagnostic(); if (Diagnostic.OK != build.getDiagnostic().getSeverity()) { @@ -359,11 +360,11 @@ public Map getInferredVariableTypes(Boolean value) { @Override public Collection getImplementation(String serviceCall) { javaExtensions.reloadIfNeeded(); - Set registeredServices = queryEnvironment.getLookupEngine().getRegisteredServices(); + Set> registeredServices = queryEnvironment.getLookupEngine().getRegisteredServices(); List results = new ArrayList(); registeredServices.iterator().forEachRemaining(s -> { if (s instanceof JavaMethodService) { - results.add(((JavaMethodService) s).getMethod()); + results.add(((JavaMethodService) s).getOrigin()); } }); diff --git a/plugins/org.eclipse.sirius.common.interpreter.aql/src/org/eclipse/sirius/common/interpreter/aql/AQLInterpreter.java b/plugins/org.eclipse.sirius.common.interpreter.aql/src/org/eclipse/sirius/common/interpreter/aql/AQLInterpreter.java index 36186d6722..cc8f7381f4 100644 --- a/plugins/org.eclipse.sirius.common.interpreter.aql/src/org/eclipse/sirius/common/interpreter/aql/AQLInterpreter.java +++ b/plugins/org.eclipse.sirius.common.interpreter.aql/src/org/eclipse/sirius/common/interpreter/aql/AQLInterpreter.java @@ -15,9 +15,9 @@ import java.util.Map; import java.util.concurrent.ExecutionException; +import org.eclipse.acceleo.query.parser.AstResult; import org.eclipse.acceleo.query.runtime.EvaluationResult; import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine; -import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine.AstResult; import org.eclipse.acceleo.query.runtime.IQueryEnvironment; import org.eclipse.acceleo.query.runtime.IQueryEvaluationEngine; import org.eclipse.acceleo.query.runtime.Query; diff --git a/plugins/org.eclipse.sirius.tests.ui.properties/src/org/eclipse/sirius/tests/ui/properties/internal/preprocessor/AQLInterpreter.java b/plugins/org.eclipse.sirius.tests.ui.properties/src/org/eclipse/sirius/tests/ui/properties/internal/preprocessor/AQLInterpreter.java index 7542118e7b..ecab73cbb0 100644 --- a/plugins/org.eclipse.sirius.tests.ui.properties/src/org/eclipse/sirius/tests/ui/properties/internal/preprocessor/AQLInterpreter.java +++ b/plugins/org.eclipse.sirius.tests.ui.properties/src/org/eclipse/sirius/tests/ui/properties/internal/preprocessor/AQLInterpreter.java @@ -15,9 +15,9 @@ import java.util.Map; import java.util.concurrent.ExecutionException; +import org.eclipse.acceleo.query.parser.AstResult; import org.eclipse.acceleo.query.runtime.EvaluationResult; import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine; -import org.eclipse.acceleo.query.runtime.IQueryBuilderEngine.AstResult; import org.eclipse.acceleo.query.runtime.IQueryEnvironment; import org.eclipse.acceleo.query.runtime.IQueryEvaluationEngine; import org.eclipse.acceleo.query.runtime.Query; diff --git a/releng/org.eclipse.sirius.targets/sirius_canary.target b/releng/org.eclipse.sirius.targets/sirius_canary.target index 5ce9b3b882..72c5e51e93 100644 --- a/releng/org.eclipse.sirius.targets/sirius_canary.target +++ b/releng/org.eclipse.sirius.targets/sirius_canary.target @@ -15,7 +15,7 @@ - + @@ -114,10 +114,13 @@ + + + - +