Re: How to increase connection point on UML classes?

On Thu, 20 Jun 2002, Tim Ellis wrote:

The brief problem:

I am using UML classes to try to make an entity-relation diagram for the
purpose of eventually creating a SQL Database script to create tables
with columns, indexes, and foreign-key constrainst.

You're sure you don't want the ER symbols?  And have you looked at Dia2SQL
on the Dia links page?

Dia's UML objects seems the right place to start.

My problem is, when I create multiple UML associations between classes,
they start overlapping each other if I use the top/bottom connection
point, and the words on either side of the association bleed into the
class graphic if I use the right/left connection points.

The easy solution:

Increase the number of connection points on the top/bottom of the class.

The less easy solution?:

Allow the text on either side of the association to be moved around (ie:
isn't anchored to the endpoint necessarily).

A patch that improves the text handling was accepted recently.  If you are
willing to try the newest CVS, it may perform better.  
Having the text moveable may be a good idea -- Constraint and Message
already does so.

The least easy solution?:

Somehow make UML be like the Circuit graphics in that they are just XML
.shape files in /usr/share/dia -- I assume this is least easy because the
UML stuff has special dialog boxes associated with them? Certainly there
must be a way to define more complex shapes in XML that would allow for
special checkboxes or text boxes or drop-down list boxes...?

It's been brought up before, and the general consensus is that any XML
language powerful enough to express all the UML things would be about as
complex as the current C code, but slower.

My problem:

I can't even begin to comprehend objects/UML/class.c -- comments in that
file are more sparse than I can deal with -- seems there's something
about ConnectionPoint connections [8] being defined as an array with 9
elements in class.h...? -- but class.c has a hardcoded for(i=0;i<8...)
loop in it.... Not to mention, once I've compiled it, I'm not certain how
to replace the UML in dia with that, ie: how do you compile plug-ins?

Can anyone give me a hint about how I can increase the number of
connection points on the top/bottom of a Class in the UML set?

You'd need to fix the following places (line numbers from newest CVS):

class.c:188 (change assert)
class.c:452 (umlclass_update_data setting connection pos)
class.c:716 (more connection points allocated)
class.c:749 (bound of for over connections)
class.c:945 (bound of for over connections)
class.c:955 (start of extra connections)
class.c:1239 (umlclass_load doing element_init)
class.c:1251 (... and setting up connections)
class.c:1257 (... starting extra connections)

Probably a good idea to have a define for the number of normal connections.


Lars Clausen (| Hårdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]