Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Passing column and row semantic object when creating a table from a table
Passing column and row semantic object when creating a table from a table [message #1816305] Fri, 25 October 2019 20:54 Go to next message
Sam Procter is currently offline Sam ProcterFriend
Messages: 1
Registered: October 2019
Junior Member
I've solved the following problem but my solution wasn't very clean, so I'd like to know if there is a better way.

I have a cross table (call it "Overview") like the following:

              col1  col2  col3
row1                 X
row2                 X
row3

I have a table creation with a mapping to the intersections, so a user can right-click an X and get a new cross table (call it "Refinement"). Both tables use relation-based intersections.

The Refinement table needs both the row and the column that the user selected from the Overview. Is there a clean way to do this?

I couldn't figure one out. I can easily pass the row's semantic object, but getting the column requires stripping it out of the ContainerView (with the following java code: containerView.getColumn().getSemanticElements().get(0);, which generates a non-API warning).

The problem is worse, though, because the containerView isn't initalized / passed to the Refinement table unless an external Java action is called. So, I created an implementation of IExternalJavaAction where the execute(...) method has an empty body. This works, but feels very clunky.

Is there a better way?

Thanks.
Re: Passing column and row semantic object when creating a table from a table [message #1816376 is a reply to message #1816305] Mon, 28 October 2019 16:32 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

I think that when we designed table representations, the representation creation tools were think up to be executed on the table "semantic root" (The semantic element used for creating the table) not the currently selected intersection. This explains why you are limited to the containerView variable and not have a lineSemantic and columnSemantic like the "Create Cell" tool.
From the top of my head, I do not have a better solution than your own for the moment. I will need to test this case in order to see if I can find a better way to do it.

Best regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Creating views for diagram
Next Topic:Sequence diagram - Basic Message Creation
Goto Forum:
  


Current Time: Fri Apr 26 04:58:30 GMT 2024

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

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

Back to the top