Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to write a DSL which is able to add "things" to a cross reference?
How to write a DSL which is able to add "things" to a cross reference? [message #892900] Sun, 01 July 2012 16:01
Hannes Müller is currently offline Hannes MüllerFriend
Messages: 24
Registered: June 2012
Junior Member
Hi everyone,

I want to write a DSL which is able to add features to an existing model element(cross reference).

An Examble: I defined a parameter in my DSL with some calculation formula (could be anything else ...). Now I would like to extend the known parameters with new calculation formula on another place of the DSL. If the known parameter already has two calculation formula as entry in a list of features than I want to be able to add a third and a forth one to the list.

My actually aproach looks like this: you can define just a new one or have a reference to a parameter with known calculations and the additional caclulations would be in an extra list:

ParameterWithRecalculate:
(parameter = Parameter 'state depending recalculates {' (recalculates += Recalculate)+ '}') |
paramWithRecal = [ParameterWithRecalculate] 'state depending recalculates {' (recalculates += Recalculate)+ '}'

Is their a better solution? I would prefer a solution where you could just add other caclulate formulas to the list "recalculates" and not have multible lists (some for known formulas and others for newly added formulas).

If anyone could inspire me I would be very happy. Thx in advance
Hannes
;

[Updated on: Mon, 02 July 2012 08:46]

Report message to a moderator

Previous Topic:extraneous input '}' expecting EOF
Next Topic:Do I have to "reinvent" things like interfaces with methods and impl classes?
Goto Forum:
  


Current Time: Tue Sep 24 01:45:46 GMT 2024

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

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

Back to the top