|
Re: Specific cross-reference [message #1385873 is a reply to message #1385871] |
Wed, 11 June 2014 20:32 |
|
Hi,
i dont know what this question is about? do you have problems to write a grammar for that?
the only thing you need to know is:
xxx=[YYY] is short for xxx=[YYY|ID] which means "parse an ID to refer to a YYY
=> you would have to change that to xxx=[YYY|INT] + maybe change the IQualifiedNameProvider as well since the default one will pick only string attributes named name
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
Re: Specific cross-reference [message #1386023 is a reply to message #1385889] |
Fri, 13 June 2014 04:00 |
Félix SILINOU KAMDEM Messages: 96 Registered: April 2013 |
Member |
|
|
Thank you very much for your advise.
I will need your help for something else. Actually, I don't know how to start.
I have create this grammar:
/*** Alternatives ****/
Alternative 1:
for {e1, e2, e3} select :
R1 or R2 or R3;
Alternative 2:
for {e6, e7, e8} select :
R6 or R7 or R8;
/*** Decision appears when the user make a choice from [b][i]alternative i[/i][/b], [b][i]alternative i[/i][/b] will be automatically delete from the file ****/
Decision 1 select R7 for {e6, e7, e8} :
consequences : decision 1.0 select R2 for {e1, e2, e3} and exclude R7 for {e6,e7,e8}
/*** Tell if the rule has to be excluded or Apply when the decision is validate. Automatically, Decision will be delete from the file ****/
Exclude rule R10 for {e9};
Apply rule R12 for {e10,e11};
What I want to do is this :
1 - I have a file which contains only some Alternatives.
2 - An user has a possibility to make a choise from an Alternative
3 - Decision appears when the user make a choice from Alternative i, Alternative i will be automatically delete from the file
4 - Tell if the rule has to be exclude or Apply when the Decision is validate. Automatically, the Decision will be delete from the file
The problem is that, I don't know howI can do that.
Thank you in advance for your help.
[Updated on: Fri, 13 June 2014 10:42] Report message to a moderator
|
|
|
|
|
Re: Specific cross-reference [message #1386075 is a reply to message #1386073] |
Fri, 13 June 2014 10:52 |
|
dont use xtext for that. is not made for such a
automatically delete stuff when user uses it somewhere else (that is how i understand your problem)
but maybe i got your problem wrong. maybe you could post several sample models and what shall happen when a user does what action
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Re: Specific cross-reference [message #1386081 is a reply to message #1386077] |
Fri, 13 June 2014 11:21 |
|
Hi,
1 - autoimport is of course possible. it can be done with xbase based languages. you can do something similar (you have todo it yourself)
2 - it is possible, the point is what triggers the auto edit - you want todo this by typing right? - since xtext recreates the ast all the time, since during typing the model may be broken and not parsed at all
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04359 seconds