| Summary: | aql: completion don't find the metamodel elements | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Laurent Fasani <laurent.fasani> |
| Component: | Core | Assignee: | Laurent Fasani <laurent.fasani> |
| Status: | CLOSED FIXED | QA Contact: | Florian Barbin <florian.barbin> |
| Severity: | normal | ||
| Priority: | P3 | CC: | florian.barbin, laurent.fasani, laurent.goubet, laurent.redor, maxime.porhel, pierre-charles.david |
| Version: | 3.0.0 | Keywords: | triaged |
| Target Milestone: | 6.0.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| See Also: |
https://git.eclipse.org/r/59353 https://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=cb06c757822c5f49035d9476b59d509efbc8aa86 https://git.eclipse.org/r/115005 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=70dab79adbd89cf39bcd12286a7e4e5b466dd3c1 |
||
| Whiteboard: | |||
| Bug Depends on: | 529808 | ||
| Bug Blocks: | 470460 | ||
|
Description
Laurent Fasani
New Gerrit change created: https://git.eclipse.org/r/59353 The first part of this bug (completion within self.eAllContents()) is a duplicate of bug 465037. The second part (completion not replacing the existing "ecore::" when accepting a proposal) is due to AQL not sending accurate replacement info back to the proposal users. Gerrit https://git.eclipse.org/r/59353 introduces APIs to feed back said info. Sirius will need to exploit it. Only two lines need to be changed, in org.eclipse.sirius.common.acceleo.aql.ide.proposal.AQLProposalProvider.getProposals(ExpressionTrimmer, int, IQueryEnvironment, Map<String, Set<IType>>) Replace int offset = position - completionResult.getPrefix().length(); int length = completionResult.getPrefix().length() + completionResult.getRemaining().length(); with int offset = trimmer.getPositionInExpression(completionResult.getReplacementOffset()); int length = completionResult.getReplacementLength(); once our patch is pushed on master Gerrit change https://git.eclipse.org/r/59353 was merged to [master]. Commit: http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=cb06c757822c5f49035d9476b59d509efbc8aa86 the first issue described in #comment1 is handled by bug 484858 This ticket will handle the second issue. Scenario: * In a odesign, create a diagram and a node mapping * In an expression, type "aql:self.eAllContents(ecore::)" * call the completion after "ecore::" =>issue2 : once the user has selected something the result is that "ecore::" is displayed twice in the expression field New Gerrit change created: https://git.eclipse.org/r/115005 ERRATUM: the #comment4 is wrong the second issue described in #comment1 is handled by bug 484858 This ticket will handle the first issue but with a slightly different scenario. Scenario: * In a odesign, create a diagram and a node mapping * In an expression, type "aql:self.eAllContents()" * Put the cursor between parenthesis and call completion =>issue1 : all types of all meta-model found (sirius and domain meta-models registered as representationDescription metamodels) are listed. The result is huge and not pertinent * Type "aql:self.eAllContents(eco)", position cursor after eco and call the completion =>issue3 : nothing is displayed as proposals. All ecore::xxtypes should be proposed. Gerrit change https://git.eclipse.org/r/115005 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=70dab79adbd89cf39bcd12286a7e4e5b466dd3c1 Steps to validate: * Create a VSP * In the odesign, create a diagramDescription and a node mapping * In an expression, type "aql:self.eAllContents(eco)", position cursor after eco and call the completion =>All ecore::xxtypes should be proposed. Available in Sirius 6.0.0, see https://wiki.eclipse.org/Sirius/6.0.0 for details |