Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318424 - Cross reference to enums or data types should be flagged as invalid
Summary: Cross reference to enums or data types should be flagged as invalid
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: SR1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-30 04:31 EDT by Lothar Wendehals CLA
Modified: 2017-09-19 15:50 EDT (History)
3 users (show)

See Also:
sebastian.zarnekow: helios+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lothar Wendehals CLA 2010-06-30 04:31:56 EDT
Build Identifier: 20100617-1415

Enum and data type rules can be used in cross references. This shouldn't be allowed in the Xtext editor. A validation rule for this scenario is needed.

Reproducible: Always
Comment 1 Moritz Eysholdt CLA 2010-06-30 04:37:13 EDT
What's wrong about data type rules in cross references?


FQN: ID ('.' ID)*?

Class: 'class' name=ID ('extends' extends=[Class|FQN])?


I agree that enum rules don't make sense since scoping in general is based on string.
Comment 2 Jan Koehnlein CLA 2010-06-30 04:44:11 EDT
The problem is the type, not the lexical representation of the crosslink

Foo: 
   bar=[Bar];

Bar (returns ecore::EString):
   ID ('.' ID);
Comment 3 Sebastian Zarnekow CLA 2010-07-30 12:45:41 EDT
We should validate that cross references point to EClasses. ContentAssist should filter other EClassifiers as well. Mybe it's sufficient to reduce the scope for type refs in cross references but this will provide no meaningful error message.
Comment 4 Sebastian Zarnekow CLA 2010-08-01 08:04:39 EDT
Fixed in HEAD.
Comment 5 Karsten Thoms CLA 2017-09-19 15:50:41 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.