Skip to main content



      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 04:20 Go to next message
Eclipse UserFriend
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 05:50 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: How to set/ unset cross table entries? [message #1802334 is a reply to message #1802213] Wed, 06 February 2019 11:02 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 11:20:25 EDT 2025

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

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

Back to the top