Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Move and Add with highlight
Move and Add with highlight [message #899398] Tue, 31 July 2012 16:48 Go to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi everyone
Do you think it is possible to highlight the position where the new shape is gonna be positionate

I'm trying to do a semi-automatic layout, this is, I'm aligning objects regarding the position they are dropped.

So I want to give feedback, drawing a dashed line or something, at the position where the object goes efectively.

I noticed that in CanCreate Context parameter we can get the mouse position, but What can I invoke to draw and undraw this dashed line.

Do you think it's possible?
And accessing some internal?

Thanks in advance
Re: Move and Add with highlight [message #899477 is a reply to message #899398] Wed, 01 August 2012 06:24 Go to previous messageGo to next message
Matthias Gorning is currently offline Matthias GorningFriend
Messages: 81
Registered: April 2010
Location: Germany
Member
There is a method isShowGuides() in the IToolBehaviorProvider. The default implementation simply returns TRUE.

In this case helper lines will be drawn to simplify the alignment of shapes. Did you see this? Is that sufficient for you?

BR,
Matthias
Re: Move and Add with highlight [message #899500 is a reply to message #899477] Wed, 01 August 2012 08:15 Go to previous messageGo to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi. Maybe. I'm gonna try.
Later I post feedback.

Anyway, where should I draw the alignment line. In this method (isShowGuides?) Confused


Thank you for replying.
Rui.

[Updated on: Wed, 01 August 2012 08:22]

Report message to a moderator

Re: Move and Add with highlight [message #899531 is a reply to message #899500] Wed, 01 August 2012 10:18 Go to previous messageGo to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Hi again.

Is it possible to redefine somewhere how the guidelines are drawn?

Thanks
Re: Move and Add with highlight [message #899544 is a reply to message #899531] Wed, 01 August 2012 11:17 Go to previous messageGo to next message
Matthias Gorning is currently offline Matthias GorningFriend
Messages: 81
Registered: April 2010
Location: Germany
Member
If you return TRUE in the method isShowGuides() the alignment lines will be drawn automatically.

Currently it is not possible for the Graphiti customer (editor developer) to draw anything while moving/adding a shape in/to the diagram.
Re: Move and Add with highlight [message #899568 is a reply to message #899544] Wed, 01 August 2012 13:11 Go to previous messageGo to next message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
Ah. Ok then. I thought it could be done somehow.
Actually I managed to draw a line, recurring to static references (bad practices), in createfeature.

In createfeature , I assign some value to a public static field, and invoke parent layout (which checks the value of the static field).

But I can't remove or change line properties, because layout is not invoked when the mouse is over something else (palete, other eclipse view, or other forbiden container... etc)

If you any hint else, please post.

Thanks anyway.
Re: Move and Add with highlight [message #899775 is a reply to message #899568] Thu, 02 August 2012 10:09 Go to previous message
Rui Domingues is currently offline Rui DominguesFriend
Messages: 194
Registered: October 2010
Senior Member
HI again.
Maybe Mathias can answer me to this question, and maybe this is not the right place to post it.

Regarding the behaviour I explained in this thread: with GMF, would it be possible to achieve that beaviour: highlight the place during the process of creation..

I'm exploring my hypothesis, and as I only have used GME before (Academic/Vanderbuilt) and DSLTools (Comercial), I'd like to know if it would be possible with GMF or even with EuGENia.

Thanks in advance. If someone can advise me, i'd be grateful.

Rui
Previous Topic:Move Shepe
Next Topic:Diagram Options mixture
Goto Forum:
  


Current Time: Fri Apr 19 21:45:21 GMT 2024

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

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

Back to the top