Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [TCS] custom separators in KM3.tcs
[TCS] custom separators in KM3.tcs [message #12281] Thu, 17 April 2008 14:39 Go to next message
T Kruse is currently offline T KruseFriend
Messages: 73
Registered: July 2009
Member
Hi,

I noticed in KM3.tcs, there are custom separators declared in template
Package and Context:
"before_block_bracket" and "after_supertypes_coma"

however, in class org.eclipse.gmt.tcs.extractor.prettyPrinter in
serializeSeqElem(Object, Object), it seems these custom separators are
never considered. Are they obsolete?
Re: [TCS] custom separators in KM3.tcs [message #12292 is a reply to message #12281] Thu, 17 April 2008 15:41 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi,

> I noticed in KM3.tcs, there are custom separators declared in template
> Package and Context:
> "before_block_bracket" and "after_supertypes_coma"
>
> however, in class org.eclipse.gmt.tcs.extractor.prettyPrinter in
> serializeSeqElem(Object, Object), it seems these custom separators are
> never considered. Are they obsolete?

By definition, they are custom. So, you can define your own.

However, they need to be mapped to an implementation. For instance, you
can have a refining transformation that would transform
<before_block_bracket> into <space>. In this way, you separate the
presentation from the contents.

Note that we never actually experimented with this, but such a
transformation could be written quite quickly.


Regards,

Frédéric Jouault
Re: [TCS] custom separators in KM3.tcs [message #12343 is a reply to message #12292] Mon, 21 April 2008 10:03 Go to previous messageGo to next message
T Kruse is currently offline T KruseFriend
Messages: 73
Registered: July 2009
Member
Hi,


>> I noticed in KM3.tcs, there are custom separators declared in template
>> Package and Context:
>> "before_block_bracket" and "after_supertypes_coma"
>
> By definition, they are custom. So, you can define your own.

Okay, but where are these defined? I mean, how does the extractor know
what to do with "after_supertypes_coma", if this is not specified in the
TCS, where else?
Re: [TCS] custom separators in KM3.tcs [message #12352 is a reply to message #12343] Mon, 21 April 2008 12:40 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi,

>>> I noticed in KM3.tcs, there are custom separators declared in
>>> template Package and Context:
>>> "before_block_bracket" and "after_supertypes_coma"
>>
>> By definition, they are custom. So, you can define your own.
>
> Okay, but where are these defined? I mean, how does the extractor know
> what to do with "after_supertypes_coma", if this is not specified in the
> TCS, where else?

The extractor ignores custom separators it does not know. So,
"after_supertypes_coma" actually means "nothing" if you do not transform
it to a supported separator.

If you want to give a different meaning than "nothing" to a custom
separator, you can for instance do this in an ATL transformation.

If you do not feel that separating the definition of a custom separator
from its actual implementation is necessary for a specific TCS model,
then you may directly use the predefined custom separator.

At the current time, "after_supertypes_coma" is defined as being
"nothing", which is the default, and does not require any additional
specification.


Regards,

Frédéric Jouault
Previous Topic:Re: Xtext (4.3 beta) for EMF resources
Next Topic:[TCS] TCSRuntime doitForContext ambiguity
Goto Forum:
  


Current Time: Sat Dec 21 14:53:19 GMT 2024

Powered by FUDForum. Page generated in 0.03825 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top