Community
Participate
Working Groups
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 : nothing is displayed If we write, as prefix, the metamodel name followed by ::, the metamodel elements are displayed * call the completion after "<metamodel name>::" =>issue2 : once the user has selected something the result is that "<metamodel name>::" is displayed twice in the expression field
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