Community
Participate
Working Groups
For example, on ecore Metamodel. In an odesign file, enter "[eco/]" and launch auto-completion. The completion suggests "eContainer()". Validate this choice, then you should see "[ecoeContainer()/]" Doing the same thing with "[eCo/]" works as expected : as soon as the characters case is respected the completion works, otherwise the completion appends to the existing characters.
Reproduced with Sirius M5
fix submitted on gerrit https://git.eclipse.org/r/#/c/37099/ AND https://git.eclipse.org/r/#/c/37102/
code generation template : https://gerrit.obeo.fr:8443/941
update of fix with API modification https://git.eclipse.org/r/37344
regression detected on class domain completion do not close this bug
Commits reverted until the regression is fixed: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=81354c1fb1c2b87f82bee77363698baf7532304f http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7de9b7a04bc8f335bb4c769d7f2c7d7901fdb1c4 http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2c90adb386cdaf81633989ff94a3d964ab83d36b
Moving to 3.0.0, but this is not a priority given the cost and impact of a correct solution which would avoid the regressions we saw witht the first attempt.
Moving to 4.0: not critical enough compared to the cost and risks of regressions.
The new ContentProposalWithReplacement introduced by https://git.eclipse.org/r/#/c/54689/ for bug #475176 may provide what was needed to finish this.
Moving out of the 4.0 scope for now, along with all the other issues which were there "by default". This does not mean some of these will not be re-integrated at some point, but for now these issues are not part of the roadmap for 4.0. If you feel strongly about this removal from 4.0 and/or are ready to sponsor the corresponding work, feel free to comment.
In order to get proprer information form AQL you can have a look at: CompletionTest.assertCompletion() completionResult.getReplacementOffset() completionResult.getReplacementLength()
The issue comes from the fact that the Properties view of the odesign file are using an old API for the text widget and its content assist: org.eclipse.jface.fieldassist.IContentProposal This API does NOT support the replacement of a part of the existing text contrary to more modern APIs. The Sirius/AQL bridge is computing CORRECTLY how to replace the text in: org.eclipse.sirius.common.acceleo.aql.ide.proposal.AQLProposalProvider.getProposals(ExpressionTrimmer, int, IQueryEnvironment, Map<String, Set<IType>>) Even better, now AQL is providing this information directly in the completion result. None of that matter because as long as the Properties view of the odesign use this old text widget IT CANNOT WORK, EVER :) Sirius would need to use a SourceViewer backed by a StyledText which can accept an org.eclipse.jface.text.contentassist.IContentAssistant working with an org.eclipse.jface.text.contentassist.IContentAssistProcessor to provide instances of org.eclipse.jface.text.contentassist.ICompletionProposal which can replace the existing content. tldr: JFace Text ICompletionProposal > JFace FieldAssist IContentProposal
(In reply to Stephane Begaudeau from comment #12) > The issue comes from the fact that the Properties view of the odesign file > are using an old API for the text widget and its content assist: > org.eclipse.jface.fieldassist.IContentProposal > > This API does NOT support the replacement of a part of the existing text > contrary to more modern APIs. Stéphane, I seem to remember that you proposed patches to improve this at some point. IIRC we could not accept them at the time because they would have made us depend in EMF 2.10+, while at the time we still needed to be compatible with earlier versions. This wouldn't be an issue anymore now, but I can't find the patches in question. Do you remember about that?
(In reply to Pierre-Charles David from comment #13) > (In reply to Stephane Begaudeau from comment #12) > > The issue comes from the fact that the Properties view of the odesign file > > are using an old API for the text widget and its content assist: > > org.eclipse.jface.fieldassist.IContentProposal > > > > This API does NOT support the replacement of a part of the existing text > > contrary to more modern APIs. > > Stéphane, I seem to remember that you proposed patches to improve this at > some point. IIRC we could not accept them at the time because they would > have made us depend in EMF 2.10+, while at the time we still needed to be > compatible with earlier versions. This wouldn't be an issue anymore now, but > I can't find the patches in question. Do you remember about that? You are talking about this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=477963 My patch would improve the feature provided by AQL and the AQL bridge with styled text, better documentation etc. Those features, once integrated in the Sirius AQL Bridge would provide better content assist but only in the Interpreter View because in the text field of the Properties view for the odesign editor this old text API is used. My changes would not work here too for the exact same reasons. For example, in the Properties view of the odesign editor, you can't even have the documentation of the content proposal like in the next screenshot while this feature has been working for months in the Interpreter view. https://bugs.eclipse.org/bugs/attachment.cgi?id=256717 This is the reason why all my issues for the improvements of the AQL support in Sirius have only be documented with screenshots from the Interpreter view.
This bug generate also a problem with domain class completion: completion on the parameter of oclIsTypeOf() search only in EClass name, not in prefix. example : "basicfamily::P" -> completion -> "basicfamily::Pbasicfamily::Person" As the best practices is now to use prefix, it is a bigger problem than previous versions of Sirius.