Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Connection length in pixels, howto get that info?
Connection length in pixels, howto get that info? [message #166564] Wed, 02 January 2008 08:50 Go to next message
Eclipse UserFriend
Originally posted by: mail.micke.gmail.com

Hi all.

I am trying to generate a report from a diagram of mine.
I've created an action which gets a hold of the "base" diagram model
object, in that object I store model objects for all my connections
(Cable objects).

What I would like to do now is to figure out how many pixels long those
connections are and I'm not quite sure of how to do that.

- Is it possible to have that kind of information stored in my model object?
- Should I try and find the corresponding connection edit part and
somehow get the information from there?

This is my first stab at this and i'm a bit lost, any suggestions are
welcome.

Cheers,
Micke
Re: Connection length in pixels, howto get that info? [message #166599 is a reply to message #166564] Wed, 02 January 2008 12:46 Go to previous message
Eclipse UserFriend
Originally posted by: mail.micke.gmail.com

Hi again,
managed to get it working but curious about cleaner approaches, mine
feels like the kind that would wound up on thedailywtf.com :)

Currently I'm traversing the EditPart tree buy using the
sourceConnections, sourceTargets, the point list on the
PolylineConnectionEx and loads of instanceof checks.

Cheers

Mikael Andersson wrote:
> Hi all.
>
> I am trying to generate a report from a diagram of mine.
> I've created an action which gets a hold of the "base" diagram model
> object, in that object I store model objects for all my connections
> (Cable objects).
>
> What I would like to do now is to figure out how many pixels long those
> connections are and I'm not quite sure of how to do that.
>
> - Is it possible to have that kind of information stored in my model
> object?
> - Should I try and find the corresponding connection edit part and
> somehow get the information from there?
>
> This is my first stab at this and i'm a bit lost, any suggestions are
> welcome.
>
> Cheers,
> Micke
Previous Topic:Domain Specific Language and GMF
Next Topic:Link to Link Connection - Problems
Goto Forum:
  


Current Time: Wed Jul 02 15:55:33 EDT 2025

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

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

Back to the top