|
|
Re: bidirectional Cross-Document Reference [message #1067346 is a reply to message #1067343] |
Mon, 08 July 2013 11:31 |
serhat gezgin Messages: 243 Registered: January 2013 Location: Izmir |
Senior Member |
|
|
But i have a.ecore on project A and
b.ecore on project B so if i done cross Document Referance java projects give me a error like ;
"A cycle was detected in the built path......" reference plug-in error.
So i cant use each metamodels Model codes. How can i solve this (i make dsl for each ecore files. so project must be seperate (XTEXT))
Regards
[Updated on: Mon, 08 July 2013 11:32] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: bidirectional Cross-Document Reference [message #1078611 is a reply to message #1078567] |
Sat, 03 August 2013 08:34 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Arshad,
Comments below.
On 03/08/2013 9:04 AM, Arshad Adavani wrote:
> Hi,
> I am using .xcore file as meta model for my grammar, which looks
> something like this,
>
> class Sample{
> Integer bit
> ...
> ....
> ...
> }
>
> And my grammar:
> Sample:
> 'Sample'....
> ...
>
> ('BIT' | 'BYTE') bit=INT
> This "bit=INT" I am referring from my xcore model.
> MY PROBLEM IS THAT I WANT TO EITHER TYPE "BIT AND THEN BIT VALUE" OR
> "BYTE AND THEN BYTE VALUE" IN MY LANGUAGE.
> BUT WHEN I WRITE "BYTE AND BYTE VALUE" , I AM CONVERTING BITS INTO
> BYTES AND THEN STORING IT IN SAME METAMODEL FIELD "bit".
> SO LATER WHEN I READ THE "RESOURCE" I WILL GET THE BIT VALUE BUT I AM
> UNAWARE WHETHER IT IS "BIT OR BYTE"...
> "I DON'T WANT TO STORE ONE MORE VARIABLE FOR BYTE IN XCORE".
> CAN ANYONE HELP ME OUT WITH THIS PROBLEM ? OR ANY BETTER SUGGESTIONS
> FOR THIS ??
If I understand correctly, your model has no way to record or to know
whether you've represented the value in the grammar as bit or byte. So,
given just an instance of a Sample with a field of type Integer (why not
use int?) you'd have no way to know how that should be serialized
according to your grammar as either a BIT or a BYTE. You need something
else in your model to record such information, e.g., a boolean field or
an enum field for recording the BIT verses BYTE keyword.
> Thanks in advance ! :)
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04746 seconds