Home » Modeling » Epsilon » EWL wizard
|
Re: EWL wizard [message #589917 is a reply to message #589884] |
Wed, 09 June 2010 19:46 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Endre,
Interesting question, thanks. I've never seen this done before.
I've tried to create a minimal example just now, but it seems to work for me. I did have to ensure that any model elements created in the wizard are contained under the top level element (annotated with @gmf.diagram).
I used the following metamodel:
@namespace(uri="flowchart", prefix="flowchart")
package flowchart;
@gmf.diagram(foo="bar")
class Flowchart {
val Node[*] nodes;
val Transition[*] transitions;
}
@gmf.node(label="name", label.icon="false")
abstract class Node {
attr String name;
ref Transition[*]#source outgoing;
ref Transition[*]#target incoming;
}
@gmf.link(label="name", source="source", target="target", target.decoration="arrow")
class Transition {
attr String name;
ref Node#outgoing source;
ref Node#incoming target;
}
class Subflow extends Flowchart, Node{
}
@gmf.node(figure=
" org.eclipse.epsilon.eugenia.examples.flowchart.diagram.figur es.SquareFigure ")
class Action extends Node {
}
@gmf.node(figure=
" org.eclipse.epsilon.eugenia.examples.flowchart.diagram.figur es.DiamondFigure ")
class Decision extends Node {
}
And the following wizard file:
wizard IntroduceAction {
guard : self.isKindOf(Transition)
title : 'Introduce an action'
do {
var action = new Action;
var transition = new Transition;
transition.source = action;
transition.target = self.target;
self.target = action;
Flowchart.all.first.nodes.add(action);
Flowchart.all.first.transitions.add(transition);
}
}
The last two lines add the newly created action and transition to the top level Flowchart. Without these two lines, the elements didn't appear on the diagram.
Does this help at all? If not, would you send me a minimal example of your metamodel and wizard, and I'll investigate further. My email address is louis AT cs DOT york DOT ac DOT uk
Cheers,
Louis.
|
|
|
Re: EWL wizard [message #589924 is a reply to message #589917] |
Wed, 09 June 2010 22:28 |
Endre Balogh Messages: 38 Registered: May 2010 |
Member |
|
|
Hi Louis,
Upon trying to recreate the error for you, I stumbled upon the following:
When creating links in the base object (Flowchart, for you model), all links appear as they should be, both link references and link classes.
When creating links inside another container (like a package class or other container), no links appear (neither references nor classes).
When creating links that cross a container boundary (such as the above mentioned package), link references appear immediately, while link classes do not.
Add a container class to your model to reproduce the error; if you don't succeed, I'll send you my own model to work with.
Cheers,
Endre
|
|
| |
Re: EWL wizard [message #589948 is a reply to message #589924] |
Thu, 10 June 2010 12:24 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Endre
Endre Balogh wrote on Wed, 09 June 2010 18:28
> Upon trying to recreate the error for you, I stumbled upon the following:
>
> When creating links in the base object (Flowchart, for you model), all links appear as they should be, both link references and link classes.
> When creating links inside another container (like a package class or other container), no links appear (neither references nor classes).
Yes, I've been able to recreate this behaviour. The second point seems like a bug to me. Would you open a bug report here:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT& component=Epsilon
[quote title=Endre Balogh wrote on Wed, 09 June 2010 18:28When creating links that cross a container boundary (such as the above mentioned package), link references appear immediately, while link classes do not.[/quote]
I couldn't recreate this, but I had some problems with my GMF editor after recreating the first faulty behaviour, above.
Thanks for reporting this Endre, and I'm sorry that you've ran into a problem. I'll involve Dimitris in finding a resolution, as he's more familiar with the EWL / GMF code than I am.
Cheers,
Louis.
|
|
| |
Goto Forum:
Current Time: Thu Apr 25 11:00:42 GMT 2024
Powered by FUDForum. Page generated in 0.02990 seconds
|