Popup feedback for disallowed connections [message #155928] |
Wed, 27 October 2004 20:20 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02891 seconds