Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to set/ unset cross table entries?(cross table, intersection, label edit, create cell, set, unset)
How to set/ unset cross table entries? [message #1802205] Mon, 04 February 2019 09:20 Go to next message
Mars Keez is currently offline Mars KeezFriend
Messages: 16
Registered: January 2015
Junior Member
Hello Everybody

Trying to create an intersection edititing tool, but I somehow don't get it. After checking docu and and answer in the forum it comes down to this:

a) Tried a "Label Edit" with a "Change Context" and "Set" operation. Doesn't set the cell.
b) Did the same with a "Create Cell" tool (same context, same set ops.), there it works.

So, as far as my understanding goes: shouldn't it be the same for label edit as well as for change cell in this case?

Regards
make

PS
This is just an intermediate step. My actual objective is to set/ unset the cell depending on the input from the edit.
Re: How to set/ unset cross table entries? [message #1802213 is a reply to message #1802205] Mon, 04 February 2019 10:50 Go to previous messageGo to next message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 182
Registered: October 2014
Senior Member
Hello

Yes operation in both "Create cell" or "Label Edit" tools are supposed to word in the same may. In each case, the changes on the model are done with an EMF Command in an EMF Transaction.
Nevertheless make sure you have not misused the variables that are not the same in each tool.
Without information of you odesign file I can't say if there is a bug or a misuse on your side.

If you found a bug with a reproducible scenario, feel free to open a bug https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius

Regards
Laurent


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to set/ unset cross table entries? [message #1802334 is a reply to message #1802213] Wed, 06 February 2019 16:02 Go to previous message
Mars Keez is currently offline Mars KeezFriend
Messages: 16
Registered: January 2015
Junior Member
Yippee - finally got it. At least this works. Required create and edit tool together. Don't know if this is the way it's supposed to be, but nevermind.
Regards
make

    <ownedRepresentations xsi:type="description_2:CrossTableDescription" name="crsExS" label="Entity x Space" domainClass="cx4::Context">
      <ownedLineMappings name="etyLine" label="Entity" domainClass="er3::Entity" semanticCandidatesExpression="aql:self.erm.entity " headerLabelExpression="feature:name">
        <defaultForeground labelSize="9">
          <foreGroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
        </defaultForeground>
      </ownedLineMappings>
      <ownedColumnMappings name="spcColumn" label="Space" headerLabelExpression="feature:name" domainClass="cx4::SubSpace" semanticCandidatesExpression="aql:self.space">
        <defaultForeground labelSize="9">
          <foreGroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
        </defaultForeground>
      </ownedColumnMappings>
      <intersection name="xEtySpc" lineMapping="//@ownedViewpoints[name='Context4Vp']/@ownedRepresentations[name='crsExS']/@ownedLineMappings[name='etyLine']" columnMapping="//@ownedViewpoints[name='Context4Vp']/@ownedRepresentations[name='crsExS']/@ownedColumnMappings.0" labelExpression="X" columnFinderExpression="aql:self.eInverse('sspEntity')">
        <directEdit>
          <variables name="element" documentation="The semantic currently edited element."/>
          <variables name="table" documentation="The current DTable."/>
          <variables name="line" documentation="The DLine of the current DCell."/>
          <variables name="lineSemantic" documentation="The semantic element corresponding to the line."/>
          <variables name="columnSemantic" documentation="The semantic element corresponding to the column (only available for Intersection Mapping)."/>
          <variables name="root" documentation="The semantic root element of the table."/>
          <firstModelOperation xsi:type="tool_1:ChangeContext" browseExpression="aql:columnSemantic">
            <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:arg0=''">
              <subModelOperations xsi:type="tool_1:Unset" featureName="sspEntity" elementExpression="aql:lineSemantic"/>
            </subModelOperations>
          </firstModelOperation>
          <mask mask="{0}"/>
        </directEdit>
        <defaultForeground labelSize="9">
          <foreGroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
        </defaultForeground>
        <create name="testit">
          <variables name="lineSemantic" documentation="The semantic element corresponding to the line."/>
          <variables name="columnSemantic" documentation="The semantic element corresponding to the column."/>
          <variables name="root" documentation="The semantic root element of the table."/>
          <firstModelOperation xsi:type="tool_1:ChangeContext" browseExpression="aql:columnSemantic">
            <subModelOperations xsi:type="tool_1:If" conditionExpression="aql:arg0&lt;>''">
              <subModelOperations xsi:type="tool_1:SetValue" featureName="sspEntity" valueExpression="aql:lineSemantic"/>
            </subModelOperations>
          </firstModelOperation>
          <mask mask="{0}"/>
        </create>
      </intersection>
    </ownedRepresentations>
Previous Topic:Only one node creation and deletion detection
Next Topic:Creating custom layout
Goto Forum:
  


Current Time: Thu Apr 25 23:12:18 GMT 2024

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

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

Back to the top