Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 316863

Summary: Xtend editor shows an error, but running the transformation works fine
Product: [Modeling] M2T Reporter: Matthieu Wipliez <matthieu.wipliez>
Component: XpandAssignee: Project Inbox <m2t.xpand-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Simple test case none

Description Matthieu Wipliez CLA 2010-06-15 04:46:50 EDT
Build Identifier: 20100610-0636

The following code:

import ecore;

EDataType getEcoreDataType(String name) :
    org::eclipse::emf::ecore::EcorePackage::eINSTANCE.getEClassifier(name)
;

is erroneous according to Xtend editor because:

Unknown variable, type or enumeration literal 'org::eclipse::emf::ecore::EcorePackage::eINSTANCE'

even though the code appears to be valid (the transformation runs fine).

Reproducible: Always

Steps to Reproduce:
1. open the attachment in Eclipse 3.6 RC4
Comment 1 Matthieu Wipliez CLA 2010-06-15 04:47:29 EDT
Created attachment 171898 [details]
Simple test case
Comment 2 Sebastian Zarnekow CLA 2010-06-15 04:49:27 EDT
Which metamodel-constributors did you configure in your IDE? (Project properties -> Xpand)?
Comment 3 Matthieu Wipliez CLA 2010-06-15 04:58:28 EDT
(In reply to comment #2)
> Which metamodel-constributors did you configure in your IDE? (Project
> properties -> Xpand)?

None, I did not even know that this existed :-)
By default only EMF Metamodels are activated, and the problem disappears if I also enable JavaBeans Metamodel.
I did took the code from the Xtext FAQ though, so it might be worth mentioning this there.
Comment 4 Sebastian Zarnekow CLA 2010-06-15 09:05:29 EDT
Updated the FAQ.