Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368280 - Diagnosing ambiguous references
Summary: Diagnosing ambiguous references
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.2.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 12:28 EST by Ed Willink CLA
Modified: 2015-07-31 09:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2012-01-10 12:28:15 EST
The invocation of getLinkingService().getLinkedObjects within LazyLinkingResource.getEObject() does not appear to support ambiguities completely.

getEObject() may return a list of ambiguous alternatives but the subsequent testing then throws an untidy IllegalStateException, when it would be much more user friendly to return some form of "Ambiguous reference" diagnostic.

Is there a way to workaround this limitation other than my current approach just returns an empty list and so reports an "Unresolved ..." whenever the true problem is "Multiply resolved ...."
Comment 1 Ed Willink CLA 2012-06-18 16:56:03 EDT
Workaround:

Attach the multiple ambiguities as an adapter on the context object.
Return an empty list from getLinkedObjects.
Detect the adapter in an UnresolvedProxyMessageProvider.