Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Eclipse Sirius - Overriding/Customisation of Native Features(Advice on layout algorithm, popup menu and widget customisation)
Eclipse Sirius - Overriding/Customisation of Native Features [message #1858006] Fri, 10 March 2023 15:37 Go to next message
Cydney Minkowitz is currently offline Cydney MinkowitzFriend
Messages: 1
Registered: March 2023
Junior Member
index.php/fa/43016/0/I have nearly completed a prototype for an editor for a particular DSL via the construction of a Sirius VSM.
I've managed to realise most of the requirments using just the eclipse/sirius API and acceleo queries, including validation of complex semantic conditions of the language.
I am now at the stage where I am anlaysing means to override some of the 'native behaviour' of the resulting VSM interface for which I would like some advice.
in particular, because I know or suspect that I will need to implement extensions in java for these.

The main behaviour is to do with the automatic diagram layout.

To provide some information, my VSM consists of diagram, table and tree representations and semantic class specific property views.
It is possible to construct and/or visualise the DSL model using different operations of each of these representations.
For example, in the case when a user constructs part of the model via the tree representation, the corresponding diagram is refreshed automically.

I've managed to specify the diagrams so that the automatic layout is almost as desired apart from the 'order' of the edges.
The diagrams are each comprised of nested containers with nodes and edges, using vertical stack / free form arrangements as illustrated in the attached screenshot.
Each type of a diagram has a Left to Right composite layout.

The edges are relational-based and are used to depict composite 1 to 1 or 1 to many relations.
For information, the 1 to many relations are specified in the domain model as ordered, unique, although I suppose that the native layout algorithm is not taking into account, because it probably creates all the nodes first and then creates the edges that connect them.

As you can see from the attached screenshot, the currently selected diagram is not layed out to show the edges in their specified order, if compared with the order of the corresponding tree items at the left of the diagram.
In fact, because the order is very significant to the DSL, I added numbers on the edge labels to indicate the order.

I've made a quick study of how to 'tailor' the layout algorithms provided in sirius, but my impression is that it would be necessary to implement a new algorithm (perhaps reusing some of the code from the existing ones).

What would be the easiest and/or most feasible way to arrange the diagrams so that:
. the whole/part relations are depicted from left to right (as they are now)
. the edges are depicted from top to bottom in ascending order of the relations?


The other behaviours that I'd like to override are the following.

1. Disabling of cut/copy in diagram and edge popup dialogs (with inhibited delete/paste operations)
================================================================================================
I have created Delete Item and Paste operations with false preconditions for diagrams and edges, however the Copy/Paste commands are shown as enabled in the diagram/edge popup menus.
In fact, the Cut command is shown as enabled in the edge popup menus.
Is there a simple way to show them as disabled?

2. Prohibiting change of default diagram title
===========================================
I have specified title expressions for all diagrams.
The native dialog that appears when creating diagrams displays the title constructed from these expressions in an enabled text box.
Is there a simple way to disable the text box?

3. Restricting selection of single item, and reselection of last selected item, in a List widget
=============================================================================================
I have implemented a List widget with actions that resemble a Reference widget.
I did not use the Reference widget because I wanted to tailor the expressions of the list items and perform specific actions when the items are manipulated.
The Reference widget works on a single item select (i.e. it prevents users from selecting multiple items in the list).
It also leaves shows the last selected item as selected.
Is there a simple way to implement this same behaviour?
index.php/fa/43016/0/
Re: Eclipse Sirius - Overriding/Customisation of Native Features [message #1858015 is a reply to message #1858006] Sat, 11 March 2023 07:01 Go to previous message
Ed Merks is currently online Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Better to look on this page for support options and where to ask questions:

https://www.eclipse.org/sirius/support.html


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Adding attributes to a class via modeling workbench
Next Topic:Import element to diagram individually
Goto Forum:
  


Current Time: Fri Apr 26 06:03:03 GMT 2024

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

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

Back to the top