Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to provide feedback to the user for non creatable edges
How to provide feedback to the user for non creatable edges [message #1689418] Mon, 23 March 2015 14:37 Go to next message
Martin Schreiber is currently offline Martin SchreiberFriend
Messages: 10
Registered: March 2015
Junior Member
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 #1689900 is a reply to message #1689418] Tue, 24 March 2015 15:37 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 270
Registered: July 2009
Senior Member
Le 23/03/2015 15:37, Martin Schreiber a écrit :
> Hi,

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?
>

Unfortunately, there is currently no way to do that.
A such feature requires:
* a technical way in GEF/GMF to display this kind of information when
tool is forbidden.
* adaptation of Sirius to use it with a new field in VSM for this
explanation text

> thanks!
>

Best Regards,

--
Laurent Redor - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to provide feedback to the user for non creatable edges [message #1690098 is a reply to message #1689900] Wed, 25 March 2015 09:11 Go to previous messageGo to next message
Martin Schreiber is currently offline Martin SchreiberFriend
Messages: 10
Registered: March 2015
Junior Member
Hi Laurent,

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.

It would still be a cool feature if Sirius would support that by a new field like "Connection Status Text" or similar...

thanks!
martin
Re: How to provide feedback to the user for non creatable edges [message #1690262 is a reply to message #1690098] Thu, 26 March 2015 08:20 Go to previous message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 270
Registered: July 2009
Senior Member
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


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Domain Class
Next Topic:Refresh diagram representation!
Goto Forum:
  


Current Time: Fri Mar 05 01:49:11 GMT 2021

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

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

Back to the top