Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Displaying Connections(...make them visible)
Displaying Connections [message #1002768] Sat, 19 January 2013 11:01 Go to next message
Tim E. is currently offline Tim E.Friend
Messages: 56
Registered: November 2012

I've got a problem with connections.

You should know:
-- I'm currently using GEF just as a visualization tool, for visualizing a model
-- the editing capabilities of GEF will be used later in the project
-- I've have to work with a model I'm not allowed to change
-- the model has no update/notification mechanism
-- no editing capabilities are required at the moment, except of moving the elements
of the diagram (if you like to call this editing)
-- no view information (positions, width, height, ...) is stored in the model, at all

At the moment I'm trying to add connections to my visualization.
Therefo some of the EditParts implement NodeEditPart and thus provide all information
for the connections. As far as I can see, the connections (its editparts) are created correctly.

Unfortunately, the connections are not shown in the editor.

I've read a lot about it and figured out that I have to call refreshSourceConnections(), and refreshTargetConnections().

But all the solutions I've found depend either on the notification of the view by the model, which I don't have.
Or depend on a creation command for connections, that I also don't have.

So is there a way to make my connection visible?

I'd appreciate your help.

Thanks in advance,

[Updated on: Sat, 19 January 2013 11:22]

Report message to a moderator

Re: Displaying Connections [message #1003156 is a reply to message #1002768] Sun, 20 January 2013 12:13 Go to previous messageGo to next message
Arieh Bibliowicz is currently offline Arieh BibliowiczFriend
Messages: 18
Registered: June 2011
Junior Member
Your problem seems strange. Try debugging "refreshSourceConnections()" to see if the connections are added by the framework... This function should be called when the node is drawn. If not, can you post your code somewhere?
Re: Displaying Connections [message #1003458 is a reply to message #1003156] Mon, 21 January 2013 09:30 Go to previous message
Tim E. is currently offline Tim E.Friend
Messages: 56
Registered: November 2012

thanks for your help.

I found my bug, while I was writing a reply...

The bug in short:
Imagine a classdiagram (classes A,B) with possible associations:
A - B, A -> B, A <-> B, A <- B.

Now I added associations A - B, as imcoming and outgoing connections in A and B,
which is clearly not really what I want.
It apparently leads to only one connection: A - A, which is not shown or not really visible.

Previous Topic:SWT.TAB key
Next Topic:Creating a "Mini" View
Goto Forum:

Current Time: Sat Apr 21 10:05:22 GMT 2018

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

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