Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359367 - [XbaseWithAnnotations] Missing PrefixMatcher exchange for ProposalProvider
Summary: [XbaseWithAnnotations] Missing PrefixMatcher exchange for ProposalProvider
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 359377
  Show dependency tree
 
Reported: 2011-09-29 04:54 EDT by Holger Schill CLA
Modified: 2017-09-19 17:39 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: indigo+


Attachments
Patch (3.97 KB, patch)
2011-09-29 05:45 EDT, Holger Schill CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Schill CLA 2011-09-29 04:54:04 EDT
If a language extends XbaseWithAnnotations and the ProposalProvider extends XbaseWithAnnotationsProposalprovider there is a need to exchange the original PrefixMatcher for the method XbaseWithAnnotationsProposalprovider.completeXAnnotationValueFielReference_declaringType in the same way it is done in XbaseProposalProvider.completeXFeatureCall_DeclaringType. Otherwise there are no proposals for fqn-named DeclaredTypes because the delimiter in the DataTypeRule StaticQualifier is '::' and not '.' as in QualifiedName.

A problem is that some of the methods called in completeXFeatureCall_DeclaringType are protected. So there is no access from XbaseWithAnnotationsProposalprovider. Delegating to completeXFeatureCall_DeclaringType from completeXAnnotationValueFielReference_declaringType is a solution but feels like a hack.

Any thoughts?
Comment 1 Sebastian Zarnekow CLA 2011-09-29 04:56:51 EDT
The protected methods should be public.

However, it is more important to change completeXFeatureCall_DeclaringType. It should delegate completely to a method with a better name (e.g. proposeDeclaringTypeForStaticInvocation) and completeXAnnotationValueFielReference_declaringType should delegate to that method, too. Holger, could you take care of this one?
Comment 2 Holger Schill CLA 2011-09-29 05:26:37 EDT
Yes.
Comment 3 Holger Schill CLA 2011-09-29 05:45:18 EDT
Created attachment 204278 [details]
Patch

I don not know if we can change the visibility of the mentioned methods. Therefor I attach a patch to discuss this.
Comment 4 Sebastian Zarnekow CLA 2011-09-29 06:18:25 EDT
Looks good to me at a first glance. Do you get any warnings from the API tooling?
Comment 5 Holger Schill CLA 2011-09-29 06:34:28 EDT
No. No warnings.
Comment 6 Holger Schill CLA 2011-09-29 06:37:08 EDT
pushed to master.
Comment 7 Karsten Thoms CLA 2017-09-19 17:28:28 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 8 Karsten Thoms CLA 2017-09-19 17:39:36 EDT
Closing all bugs that were set to RESOLVED before Neon.0