Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316863 - Xtend editor shows an error, but running the transformation works fine
Summary: Xtend editor shows an error, but running the transformation works fine
Status: CLOSED WORKSFORME
Alias: None
Product: M2T
Classification: Modeling
Component: Xpand (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-15 04:46 EDT by Matthieu Wipliez CLA
Modified: 2010-06-15 09:05 EDT (History)
1 user (show)

See Also:


Attachments
Simple test case (134 bytes, text/plain)
2010-06-15 04:47 EDT, Matthieu Wipliez CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.