Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Popup feedback for disallowed connections
Popup feedback for disallowed connections [message #155928] Wed, 27 October 2004 20:20 Go to next message
Eclipse UserFriend
Originally posted by: pavan.podila.gmail.com

I want to show feedback to the user when he tries to connect two nodes.
There are some conditions under which connections are disallowed. I
check for these conditions inside Command.canExecute() and inside the
getConnectionCreateCommand() and getConnectionCompleteCommand() methods
of NodeEditPolicy. When any of the conditions fail, I want to show a
popup indicating the reason for failure. I have read some posts here
which indicate that showSourceFeedback() and showTargetFeedback() could
be used. But my problem how do I know which condition failed inside
these methods.
In my implementation there is a separate class, ConnectionValidator
that determines if a connection is valid. The static methods of this
class are called from canExecute() and methods of NodeEditPolicy. I
certainly don't want to pass any EditPart/EditPolicy references to this
class.
I am stuck and can't figure out how I can get this thing working.

~ Pavan
Re: Popup feedback for disallowed connections [message #156126 is a reply to message #155928] Fri, 29 October 2004 19:07 Go to previous message
Eclipse UserFriend
Originally posted by: pavan.podila.gmail.com

I resorted to the StatusLine for displaying the reasons for errors. I
wanted to use the little line at the bottom for a long time. ;-)

Pavan Podila wrote:

> I want to show feedback to the user when he tries to connect two
> nodes. There are some conditions under which connections are
> disallowed. I check for these conditions inside Command.canExecute()
> and inside the getConnectionCreateCommand() and
> getConnectionCompleteCommand() methods of NodeEditPolicy. When any of
> the conditions fail, I want to show a popup indicating the reason for
> failure. I have read some posts here which indicate that
> showSourceFeedback() and showTargetFeedback() could be used. But my
> problem how do I know which condition failed inside these methods.
> In my implementation there is a separate class, ConnectionValidator
> that determines if a connection is valid. The static methods of this
> class are called from canExecute() and methods of NodeEditPolicy. I
> certainly don't want to pass any EditPart/EditPolicy references to
> this class.
> I am stuck and can't figure out how I can get this thing working.
>
> ~ Pavan
Previous Topic:JDT breakpoints
Next Topic:Query Regarding Custom Layout
Goto Forum:
  


Current Time: Wed Jan 22 12:24:42 GMT 2025

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

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

Back to the top