How to provide feedback to the user for non creatable edges [message #1689418] |
Mon, 23 March 2015 10:37  |
Eclipse User |
|
|
|
Hi,
I do have an "Element based Edge" and a creation tool for it.
I am using a java service to determine if a connection is possible or not using the service in the "Connection Complete Precondition" expression.
There is this icon next to the mouse pointer showing if a connection is possible or not (based on what the "Connection Complete Precondition" expression returns. That is great, but there might be different cases why a connection cannot be made.
Is there a way to set a text (like a tooltip) right next to the icon showing that the connection cannot be made?
thanks!
|
|
|
|
|
Re: How to provide feedback to the user for non creatable edges [message #1690262 is a reply to message #1690098] |
Thu, 26 March 2015 04:20  |
Eclipse User |
|
|
|
Le 25/03/2015 10:11, Martin Schreiber a écrit :
> Hi Laurent,
>
Hi,
> thanks for your response.
>
> I did find a way that works for me.
> As I said, I am using a service which checks as precondition if a
> connection could be created or not.
>
> Connection Complete Precondition:
> "[isConnectionPossible(preSource, preTarget) /]"
>
> Within that service method ("isConnectionPossible") I do something like
> this:
>
> Display.getDefault().asyncExec(() -> {
> if (Display.getDefault().getCursorControl() != null) {
>
> Display.getDefault().getCursorControl().setToolTipText("The message why
> connection not possible");
> }
> });
>
> in case I want to display why the connection could not be made.
> Not sure if this is an elegant way to do it, but it works fine for me.
Indeed, there is a risk with asyncExec. The toolTip could be displayed
on the standard cursor and never removed.
>
> It would still be a cool feature if Sirius would support that by a new
> field like "Connection Status Text" or similar...
We have no plans to work on this feature in the following weeks. That
said this feature can move forward if you provide a solution for it (see
the Contributor Guide) or you contact Obeo for sponsored work.
>
> thanks!
> martin
>
Best regards,
--
Laurent Redor - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.04472 seconds