Community
Participate
Working Groups
steps to reproduce: - with basicfamily, on Man, write "aql:self.oclAsType(basicfamily::)" - select basicfamily::Man - the completion creates "aql:self.oclAsType(basicfamily::basicfamily::Man)" which is invalidated It should not re-add the MM prefix.
I confirm the bug, I have had the same through https://bugs.eclipse.org/bugs/show_bug.cgi?id=484217#c4
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=479826#c2
At a first sight, the fix seems trivial. Just provide a proposal that complete what the user has already written: String proposal = propFromAQL.getProposal().substring(completionResult.getReplacementLength()); For example aql:self.eAllContents(basicfamily::P+CTRL+SPACE -> proposal=erson But, why have not we got the issue for method completion? aql:self.eAllC+CTRL+SPACE Because, there is a post processing in TextContentProposalProvider.getProposals(String, int) to convert sirius proposal into Jface. The process is not specific to a particular interpreter. It cuts the proposal according to what users has already written (String proposalStart = new ContentContextHelper(contents, position, prefix).getProposalStart()). proposal1: * update TextContentProposalProvider.getProposalStart()to better understand how to cut the proposal. proposal2: * update AQLProposalProvider.getProposals(ExpressionTrimmer, int, IQueryEnvironment, Map<String, Set<IType>>) to let the specific interpreter cut the proposal himself.
New Gerrit change created: https://git.eclipse.org/r/115004
Gerrit change https://git.eclipse.org/r/115004 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=a3393ba4f56b52a4dc6b16f4119b1d84b96ba80c
Steps to validate: * Create a VSP * In the odesign, create a diagramDescription and a node mapping * In an expression, type "aql:self.eAllContents(ecore::EAtt)", position cursor after EAtt and call the completion then select ecore::EAttribute =>The resulting expression shoulb be "aql:self.eAllContents(ecore::EAttribute)".
Available in Sirius 6.0.0, see https://wiki.eclipse.org/Sirius/6.0.0 for details