| Summary: | ClassCastException using ContentAssistant | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Hendrik Renken <funsheep> | ||||||||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||
| Severity: | major | ||||||||||||
| Priority: | P3 | CC: | clay, sebastian.zarnekow | ||||||||||
| Version: | unspecified | Flags: | sebastian.zarnekow:
juno+
|
||||||||||
| Target Milestone: | M6 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
Created attachment 210322 [details]
Klass.xtext grammar description.
Created attachment 210323 [details]
json grammar description.
Created attachment 210324 [details]
The stacktrace of the classcastexception
Created attachment 210335 [details]
proposed patch pls review
JsonValue: valueobject=JsonObject | value=STRING | valuearray=JsonArray | value=BOOLEAN | value='null' | value=JsonNumber; JsonValue has 4 assignments for the feature 'value' 3 RuleCalls and 1 Keyword which causes the CCE in the generated ContentAssist class. Another option to the provided patch would be to add warning/errors validation for such rules. Patch looks good besides the indentation in the xpand template.
Could you add a test case in org.eclipse.xtext.ui.tests.editor.contentassist.ContentAssistCustomizingTest
e.g. with
Type:
(name=FQN|name='FQN') ('extends' superType=TypeRef)? ';'
;
psuhed to master Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
Build Identifier: Version: 3.7.1 Build id: M20110909-1335 I created two grammars: "json" and "klass". klass is based on json. When i now fire up the ContentAssistant to get a suggestion in the .klass file for a jsonvalue, i get the following ClassCastException. I've added the two grammars and the classcastexception as files. Reproducible in the following situation: abstract klass Test { properties { JSON_PROPERTY extends java.util.Set : { "Test : X } } } At the location of X fire up the content assistant. Reproducible: Always Steps to Reproduce: 1. Create two xtext-projects for the two grammars 2. Compile them and start a new eclipse 3. Add a new file containing the above code 4. Fire up the content assistant where the X is located