Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Why are .ecore models loaded into each session resource set?
Why are .ecore models loaded into each session resource set? [message #1480539] Thu, 20 November 2014 09:07 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
Hi,

When I look at a session ResourceSet at runtime, I note that its
resources include all our semantic models. Do I understand correctly
that each session resource set loads in a copy of the semantic ecore
models? Why is that needed? Wouldn't it be sufficient to just rely on
the global package registry which already provides access to the
required semantic EPackages?

Felix
Re: Why are .ecore models loaded into each session resource set? [message #1480570 is a reply to message #1480539] Thu, 20 November 2014 09:39 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 20/11/2014 10:07, Felix Dorner a écrit :
> Hi,

Hi

>
> When I look at a session ResourceSet at runtime, I note that its
> resources include all our semantic models. Do I understand correctly
> that each session resource set loads in a copy of the semantic ecore
> models? Why is that needed? Wouldn't it be sufficient to just rely on
> the global package registry which already provides access to the
> required semantic EPackages?
>
> Felix

I think that you reference your meta-model in your VSM (.odesign file).
So when EMF loads your VSM, it also loads your meta-model.

The problem is that the metamodel "references" are stored with a href (a
link to the root of the MM). A better solution would be to only store a
String attribute that Sirius interprets when needed.

Regards,

Laurent

--
Laurent - 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: Why are .ecore models loaded into each session resource set? [message #1781680 is a reply to message #1480570] Mon, 12 February 2018 06:59 Go to previous messageGo to next message
Muhammad Abbas is currently offline Muhammad AbbasFriend
Messages: 5
Registered: January 2018
Junior Member
Follow up Question:
My resource set have nothing in there. I am using the following code:
siriusSession= SessionManager.INSTANCE.getSession(URI.createURI(projectName+"/"+airdFile), new NullProgressMonitor());

The above code returns a session object with no semantic resources and with nothing inside DAnalysis.
Can some one please tell me what's wrong?
Bellow is some part of the .aird file
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:concern="http://www.eclipse.org/sirius/diagram/description/concern/1.1.0" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:description_2="http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:filter="http://www.eclipse.org/sirius/diagram/description/filter/1.1.0" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:org.polarsys.capella.core.data.capellacore="http://www.polarsys.org/capella/core/core/1.1.0" xmlns:org.polarsys.capella.core.data.cs="http://www.polarsys.org/capella/core/cs/1.1.0" xmlns:org.polarsys.capella.core.data.ctx="http://www.polarsys.org/capella/core/ctx/1.1.0" xmlns:org.polarsys.capella.core.data.fa="http://www.polarsys.org/capella/core/fa/1.1.0" xmlns:org.polarsys.capella.core.data.information="http://www.polarsys.org/capella/core/information/1.1.0" xmlns:org.polarsys.capella.core.data.interaction="http://www.polarsys.org/capella/core/interaction/1.1.0" xmlns:org.polarsys.capella.core.data.la="http://www.polarsys.org/capella/core/la/1.1.0" xmlns:org.polarsys.capella.core.data.oa="http://www.polarsys.org/capella/core/oa/1.1.0" xmlns:sequence="http://www.eclipse.org/sirius/diagram/sequence/2.0.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/diagram/description/concern/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/concern http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/sequence/description/2.0.0 http://www.eclipse.org/sirius/diagram/sequence/2.0.0#//description http://www.eclipse.org/sirius/diagram/description/filter/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/filter http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
  <viewpoint:DAnalysis xmi:id="_M9QSINv7EeeXMoq2nQFYkQ" selectedViews="_M_XK8Nv7EeeXMoq2nQFYkQ _NJKnMNv7EeeXMoq2nQFYkQ _NJR78Nv7EeeXMoq2nQFYkQ _NJTxINv7EeeXMoq2nQFYkQ _NJae0Nv7EeeXMoq2nQFYkQ _NJhMgNv7EeeXMoq2nQFYkQ _NJpIUNv7EeeXMoq2nQFYkQ" version="11.1.0.201608251200">
    <semanticResources>CUAV.afm</semanticResources>
    <semanticResources>CUAV.melodymodeller</semanticResources>
    <ownedViews xmi:type="viewpoint:DView" xmi:id="_M_XK8Nv7EeeXMoq2nQFYkQ">
      <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.polarsys.kitalpha.ad.integration.sirius/description/ad.odesign#//@ownedViewpoints[name='ad']"/>
    </ownedViews>
    <ownedViews xmi:type="viewpoint:DView" xmi:id="_NJKnMNv7EeeXMoq2nQFYkQ">
      <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/oa.odesign#//@ownedViewpoints[name='Operational%20Analysis']"/>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_JfJsMNv-EeeXMoq2nQFYkQ" name="[OEBD] Operational Entities and Actors" representation="_JfY8wNv-EeeXMoq2nQFYkQ">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/oa.odesign#//@ownedViewpoints[name='Operational%20Analysis']/@ownedRepresentations[name='Operational%20Entity%20Breakdown']"/>
        <target xmi:type="org.polarsys.capella.core.data.oa:OperationalContext" href="CUAV.melodymodeller#f4a85e9d-4143-4535-af25-5bfba6c6fe76"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_sOWc4NwDEeeXMoq2nQFYkQ" name="[OAB] Operational Architecture" representation="_sOpX0NwDEeeXMoq2nQFYkQ">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/oa.odesign#//@ownedViewpoints[name='Operational%20Analysis']/@ownedRepresentations[name='Operational%20Entity%20Blank']"/>
        <target xmi:type="org.polarsys.capella.core.data.oa:OperationalContext" href="CUAV.melodymodeller#f4a85e9d-4143-4535-af25-5bfba6c6fe76"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_AkraoN5mEeeZeNKEZESg2A" name="[OCB] UAV Operational Capabilities" representation="_AkvsEN5mEeeZeNKEZESg2A">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/oa.odesign#//@ownedViewpoints[name='Operational%20Analysis']/@ownedRepresentations[name='Operational%20Capabilities%20Blank']"/>
        <target xmi:type="org.polarsys.capella.core.data.oa:OperationalCapabilityPkg" href="CUAV.melodymodeller#3978d6ca-0750-4927-96d4-728ab2743c00"/>
      </ownedRepresentationDescriptors>
    </ownedViews>
    <ownedViews xmi:type="viewpoint:DView" xmi:id="_NJR78Nv7EeeXMoq2nQFYkQ">
      <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/EPBS.odesign#//@ownedViewpoints[name='EPBS%20architecture']"/>
    </ownedViews>
    <ownedViews xmi:type="viewpoint:DView" xmi:id="_NJTxINv7EeeXMoq2nQFYkQ">
      <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/physical.odesign#//@ownedViewpoints[name='Physical%20Architecture']"/>
    </ownedViews>
    <ownedViews xmi:type="viewpoint:DView" xmi:id="_NJae0Nv7EeeXMoq2nQFYkQ">
      <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/common.odesign#//@ownedViewpoints[name='Common']"/>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_mM-4cN8FEeeNy9M2kZV0ww" name="[ES] Perform Optical Surveillance - Manual Camera Movement" representation="_mNIpcN8FEeeNy9M2kZV0ww">
        <description xmi:type="description_2:SequenceDiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/common.odesign#//@ownedViewpoints[name='Common']/@ownedRepresentations[name='Component%20Exchanges%20Scenario']"/>
        <target xmi:type="org.polarsys.capella.core.data.interaction:Scenario" href="CUAV.melodymodeller#9524fb15-e80e-4245-8cc2-59f3c328be80"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_L82hoN8HEeeNy9M2kZV0ww" name="[ES] Execute Mission - Target Get Set" representation="_L9ASoN8HEeeNy9M2kZV0ww">
        <description xmi:type="description_2:SequenceDiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/common.odesign#//@ownedViewpoints[name='Common']/@ownedRepresentations[name='Component%20Exchanges%20Scenario']"/>
        <target xmi:type="org.polarsys.capella.core.data.interaction:Scenario" href="CUAV.melodymodeller#c49f88f8-4181-480e-9a9f-fa4e9a0044d5"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_V9UrkN8IEeeNy9M2kZV0ww" name="[ES] Perform Optical Surveillance - Manual Area Scan" representation="_V9d1gN8IEeeNy9M2kZV0ww">
        <description xmi:type="description_2:SequenceDiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/common.odesign#//@ownedViewpoints[name='Common']/@ownedRepresentations[name='Component%20Exchanges%20Scenario']"/>
        <target xmi:type="org.polarsys.capella.core.data.interaction:Scenario" href="CUAV.melodymodeller#77f1b3e1-cb61-4c82-a276-58f0fceeb3de"/>
      </ownedRepresentationDescriptors>
    </ownedViews>
    <ownedViews xmi:type="viewpoint:DView" xmi:id="_NJhMgNv7EeeXMoq2nQFYkQ">
      <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/logical.odesign#//@ownedViewpoints[name='Logical%20Architecture']"/>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="__5guwN8KEeeNy9M2kZV0ww" name="[LFBD] Root Logical Function for CUAV" representation="__5tjEN8KEeeNy9M2kZV0ww">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/logical.odesign#//@ownedViewpoints[name='Logical%20Architecture']/@ownedRepresentations[name='Logical%20Function%20Breakdown']"/>
        <target xmi:type="org.polarsys.capella.core.data.la:LogicalFunction" href="CUAV.melodymodeller#bcc47d82-fd60-44a3-8f58-95912fe3cc18"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_KW4FgN8LEeeNy9M2kZV0ww" name="[LAB] CUAV Logical Architecture" representation="_KXB2gN8LEeeNy9M2kZV0ww">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/logical.odesign#//@ownedViewpoints[name='Logical%20Architecture']/@ownedRepresentations[name='Logical%20Architecture%20Blank']"/>
        <target xmi:type="org.polarsys.capella.core.data.la:LogicalComponent" href="CUAV.melodymodeller#3fe10c3c-312a-4191-9070-2a9d1afd612e"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_V2mCYN8REeeZeNKEZESg2A" name="Clone of [LAB] CUAV Logical Architecture" representation="_V2oeoN8REeeZeNKEZESg2A">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/logical.odesign#//@ownedViewpoints[name='Logical%20Architecture']/@ownedRepresentations[name='Logical%20Architecture%20Blank']"/>
        <target xmi:type="org.polarsys.capella.core.data.la:LogicalComponent" href="CUAV.melodymodeller#3fe10c3c-312a-4191-9070-2a9d1afd612e"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_XLexsN8REeeZeNKEZESg2A" name="Clone of [LFBD] Root Logical Function for CUAV" representation="_XLhN8N8REeeZeNKEZESg2A">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/logical.odesign#//@ownedViewpoints[name='Logical%20Architecture']/@ownedRepresentations[name='Logical%20Function%20Breakdown']"/>
        <target xmi:type="org.polarsys.capella.core.data.la:LogicalFunction" href="CUAV.melodymodeller#bcc47d82-fd60-44a3-8f58-95912fe3cc18"/>
      </ownedRepresentationDescriptors>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_MND4IN8YEeeNy9M2kZV0ww" name="[LDFB] Root Logical Function Flow Diagram" representation="_MNO3QN8YEeeNy9M2kZV0ww">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/logical.odesign#//@ownedViewpoints[name='Logical%20Architecture']/@ownedRepresentations[name='Logical%20Data%20Flow%20Blank']"/>
        <target xmi:type="org.polarsys.capella.core.data.la:LogicalFunction" href="CUAV.melodymodeller#bcc47d82-fd60-44a3-8f58-95912fe3cc18"/>
      </ownedRepresentationDescriptors>
    </ownedViews>
    <ownedViews xmi:type="viewpoint:DView" xmi:id="_NJpIUNv7EeeXMoq2nQFYkQ">
      <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/context.odesign#//@ownedViewpoints[name='System%20Analysis']"/>
      <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_-EB8MN78EeeNy9M2kZV0ww" name="[SAB] CSSP Sub-System Architecture" representation="_-ELGIN78EeeNy9M2kZV0ww">
        <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.polarsys.capella.core.sirius.analysis/description/context.odesign#//@ownedViewpoints[name='System%20Analysis']/@ownedRepresentations[name='System%20Architecture%20Blank']"/>
        <target xmi:type="org.polarsys.capella.core.data.ctx:System" href="CUAV.melodymodeller#8303aea4-814f-4e7a-957b-bc721c5acc88"/>
      </ownedRepresentationDescriptors>
    </ownedViews>
  </viewpoint:DAnalysis>
  <diagram:DSemanticDiagram xmi:id="_JfY8wNv-EeeXMoq2nQFYkQ" name="[OEBD] Operational Entities and Actors">
    <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_JfY8wdv-EeeXMoq2nQFYkQ" source="DANNOTATION_CUSTOMIZATION_KEY">
      <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_JfY8wtv-EeeXMoq2nQFYkQ"/>
    </ownedAnnotationEntries>
    <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_Jgl2oNv-EeeXMoq2nQFYkQ" source="GMF_DIAGRAMS">
      <data xmi:type="notation:Diagram" xmi:id="_Jgl2odv-EeeXMoq2nQFYkQ" type="Sirius" element="_JfY8wNv-EeeXMoq2nQFYkQ" measurementUnit="Pixel">
        <children xmi:type="notation:Node" xmi:id="_SX2yQNv-EeeXMoq2nQFYkQ" type="2001" element="_SXWb8Nv-EeeXMoq2nQFYkQ">
          <children xmi:type="notation:Node" xmi:id="_SZ6AsNv-EeeXMoq2nQFYkQ" type="5002">
            <layoutConstraint xmi:type="notation:Location" xmi:id="_SZ6Asdv-EeeXMoq2nQFYkQ" y="-21"/>
          </children>
Re: Why are .ecore models loaded into each session resource set? [message #1781789 is a reply to message #1781680] Tue, 13 February 2018 10:30 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

You called SessionManager.INSTANCE.getSession() which created the session but did not open it.
You now need to open the session, for example: session.open(new NullProgressMonitor();

Note that you might also directly ask the SessionManager to create and open the session: session = SessionManager.INSTANCE.openSession(representationsFileURI, new NullProgressMonitor(), SiriusEditPlugin.getPlugin().getUiCallback());

Regards,


or after


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Why are .ecore models loaded into each session resource set? [message #1781790 is a reply to message #1781680] Tue, 13 February 2018 10:30 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

You called SessionManager.INSTANCE.getSession() which created the session but did not open it.
You now need to open the session, for example: session.open(new NullProgressMonitor();

Note that you might also directly ask the SessionManager to create and open the session: session = SessionManager.INSTANCE.openSession(representationsFileURI, new NullProgressMonitor(), SiriusEditPlugin.getPlugin().getUiCallback());

Regards,


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Why are .ecore models loaded into each session resource set? [message #1781791 is a reply to message #1781680] Tue, 13 February 2018 10:31 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

You called SessionManager.INSTANCE.getSession() which created the session but did not open it.
You now need to open the session, for example: session.open(new NullProgressMonitor();

Note that you might also directly ask the SessionManager to create and open the session: session = SessionManager.INSTANCE.openSession(representationsFileURI, new NullProgressMonitor(), SiriusEditPlugin.getPlugin().getUiCallback());

Regards,


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:The font representation problem of text label in Sirius
Next Topic:Unable to assign a Domain Class
Goto Forum:
  


Current Time: Thu Apr 25 09:25:20 GMT 2024

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

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

Back to the top