problems with Edges in the Database Schema Editor DirectedGraphLayoutVisitor [message #516879] |
Thu, 25 February 2010 07:50 |
Eclipse User |
|
|
|
Originally posted by: luimarr1.upvnet.upv.es
Hi all,
I´m developing a GEF Editor wich is very simmilar to the DatabaseSchema
example. I want to be able to join a figure(source) to one of the
nodes(target) contained in other figure. My problem is that for some
figures(as source) it works, but for ohers appears the
java.lang.NullPointerException
at org.eclipse.draw2d.graph.Edge.<init>(Edge.java:164)
at
graphicalMapping.layout.DirectedGraphLayoutVisitor.addEdges( DirectedGraphLayoutVisitor.java:227)
it seems to be that when executing the line:
Edge e = new Edge(relationshipPart, source, target); target is null so
it fails. It only happens when using XYLayout and i already created the
Relationship in the model. Has anyone idea of what could be the problem???
Thanks in advance:)
Luis
|
|
|
Re: problems with Edges in the Database Schema Editor DirectedGraphLayoutVisitor [message #518234 is a reply to message #516879] |
Wed, 03 March 2010 14:54 |
Eclipse User |
|
|
|
Originally posted by: luimarr1.upvnet.upv.es
Hi again, finally i found the solution. I´ll write it in case someone
finds the same probem.
In the DirectedGraphLayoutVisitor i had to add an addNode for the
columns and the same for addEdges. Before calling the addNode(table) i
call addNode for every column and the same has to be done for
addEdges(table). With this every node has an edge and the algorithm has
no problems when joining a connection with a column.
|
|
|
Powered by
FUDForum. Page generated in 0.03479 seconds