Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » links created with EWL is not appearing in diagram
links created with EWL is not appearing in diagram [message #638136] Wed, 10 November 2010 01:51 Go to next message
Abhijit Gurav is currently offline Abhijit Gurav
Messages: 25
Registered: November 2010
Junior Member
Hi,

I created normal GMF project with some nodes and connecting link.
But now I want to insert nodes and connect them through wizard (EWL).
I have created .ewl file in which I have written code for the same i.e. creating new node and connect it with existing node through link.
e.g.

say in diagram i have like node A connecting to node B with link

A -----> B

I clicked on link and through wizards i entered new node C in between A and B. which will looks as follows,


A----->C------>B

Nodes are coming properly but connecting links are not coming on diagram, although its showing in node C and B as inputLink in property view.

But when I refreshed manually (F5), links appears ( I don't want user should do this.) . But they are not remain as it is. i.e When I closed diagram and opened it again they are gone. Sad

Anybody having any idea about the same. Please do reply.

NOTE : all the above stuff I am doing inside a compartment. (is that making mess. I don't know )

Regards,
-AG

[Updated on: Wed, 10 November 2010 01:56]

Report message to a moderator

Re: links created with EWL is not appearing in diagram [message #638170 is a reply to message #638136] Wed, 10 November 2010 04:53 Go to previous messageGo to next message
Louis Rose is currently offline Louis Rose
Messages: 439
Registered: July 2009
Location: York, United Kingdom
Senior Member
Hi AG,

I've seen this issue before, but haven't quite figured out the root cause. A workaround is to force GMF to refresh the contents of the compartment.

Assuming a simple Statemachine metamodel, the following operation should suffice. (The states reference is the compartment).

operation forceRefresh() {
	var s : new State;
	Statemachine.all.first.states.add(s);
	delete s;
}


Then add a call to the operation at the end of the do part of the EWL wizard:

do {
	// The rest of the do block...

	forceRefresh();
}


Hope this helps.

Cheers,
Louis.
Re: links created with EWL is not appearing in diagram [message #638255 is a reply to message #638136] Wed, 10 November 2010 08:10 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi,

I've had a chat about this with Louis offline and he said he has a
workaround for this so I guess he'll get back to you on this shortly.

Cheers,
Dimitris

On 10/11/2010 06:51, abhijit.gurav@atosorigin.com wrote:
> Hi,
>
> I created normal GMF project with some nodes and connecting link.
> But now I want to insert nodes and connect them through wizard (EWL). I
> have created .ewl file in which I have written code for the same i.e.
> creating new node and connect it with existing node through link.
> e.g.
>
> say in diagram i have like node A connecting to node B with link L1
> L1
> A -----> B
>
> I clicked on L1 and through wizards i entered new node C in between A
> and B. which will split the link in two as follows,
>
> L1 L2
> A----->C------>B
>
> Nodes are coming properly but connecting links are not coming on
> diagram, although its showing in node C and B as inputLink in property
> view.
>
> But when I refreshed manually (F5), links appears ( I don't want user
> should do this.) . But they are not remain as it is. i.e When I closed
> diagram and opened it again they are gone. :(
> Anybody having any idea about the same. Please do reply.
>
> Regards,
> -AG
Re: links created with EWL is not appearing in diagram [message #639595 is a reply to message #638255] Wed, 17 November 2010 01:15 Go to previous message
Abhijit Gurav is currently offline Abhijit Gurav
Messages: 25
Registered: November 2010
Junior Member
Hi Louis and Dimitris,

Thanks for reply, I will definitely try your approach. But meanwhile I succeed to refresh the edtior diagram by using adator notification which also solved my issue.

Once again Thanks for help.


Regards,
-AG
Previous Topic:HutnGenerationException in property of an element
Next Topic:[EWL] Customizing Wizard menu name and position in context menu
Goto Forum:
  


Current Time: Wed Aug 20 06:50:25 EDT 2014

Powered by FUDForum. Page generated in 0.04703 seconds