|
Re: how to use types defined in other Ecore files in my DSL [message #997674 is a reply to message #997592] |
Tue, 08 January 2013 09:30  |
Eclipse User |
|
|
|
Does your external types have an identifier feature called 'name' - this
is required for references to work out of the box.
- henrik
On 2013-08-01 15:04, Barbara Xiong wrote:
> Hi,
>
> I want to use data types defined in a Ecore named ModelTypes in my DSL.
> And I suppose it is the same theory as using Java types in one's own
> DSL. So I follow the steps in the document of Xtext about how to use
> Java type
> here is my DSL:
>
> import "platform:/resource/ModelTypes.ecore" as ModelTypes
>
> Program:
> 'var' modeltype=MTypes ;
>
> Mtypes:
> a=[ModelTypes::TypeA]|b=[ModelTypes::TypeB]
> ;
>
>
> then I add the referencedGenModels and TypesGeneratorFragment in the
> workflow
>
> However, in the editor, when i write:
> var TypeA
>
> there exists an error, which suggested that Couldn't resolve reference
> to ModelTypes 'TypeA'
>
> What can i do to use data types defined in a Ecore in my DSL?
> TIA!
|
|
|
Powered by
FUDForum. Page generated in 0.07251 seconds