Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EWL wizard(classes annotated with '@gmf.link' appear only after reopening diagram)
EWL wizard [message #539121] Wed, 09 June 2010 17:09 Go to next message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
Hi,

I created EWL wizards for transforming one metaclass into another and also for factoring out a new object using some attributes of an existing object (then adding a reference to the factored out object).
I also update correctly the 'link' class (annotated with @gmf.link(label="name,multiplicity" etc), but it does not appear right away in the diagram. For it to appear, the diagram needs to be closed and opened again.

Do these links need to be added explicitly to the diagram?

Cheers,
Endre

P.s. References annotated with @gmf.link do appear immediately, as opposed to classes.
Re: EWL wizard [message #539164 is a reply to message #539121] Wed, 09 June 2010 19:46 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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.figures.SquareFigure")
class Action extends Node {
   
}

@gmf.node(figure=
	"org.eclipse.epsilon.eugenia.examples.flowchart.diagram.figures.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 #539197 is a reply to message #539164] Wed, 09 June 2010 22:28 Go to previous messageGo to next message
Endre Balogh is currently offline Endre BaloghFriend
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 #539266 is a reply to message #539197] Thu, 10 June 2010 08:41 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi Endre,

Thanks for investigating further. I'll try to re-create the problem you describe later today.

More soon...

Cheers,
Louis.
Re: EWL wizard [message #539320 is a reply to message #539197] Thu, 10 June 2010 12:24 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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.
Re: EWL wizard [message #539468 is a reply to message #539320] Thu, 10 June 2010 20:50 Go to previous message
Endre Balogh is currently offline Endre BaloghFriend
Messages: 38
Registered: May 2010
Member
Hi Louis,

Bug report filed.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=316537
I also attached my complete model and wizards to reproduce all the behavior I described. (For the third point, use the 'create repository' wizard, creating the new object both inside the same container and outside (in the root container).
Sorry for the clutter, the projects also use some custom figures and so on, but you've got everything you need there, and you are basically only interested in the .emf and the .ewl file, for the sake of this bug. Smile

Thanks for looking into this!
Cheers,
Endre
Previous Topic:Disappearing Elements
Next Topic:EWL wizard
Goto Forum:
  


Current Time: Thu May 24 18:02:23 GMT 2018

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

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

Back to the top