Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Empty viewpoint.getOwnedRepresentations() list in e4 application
Empty viewpoint.getOwnedRepresentations() list in e4 application [message #1586094] Mon, 26 January 2015 17:06 Go to next message
Francois Cabrol is currently offline Francois CabrolFriend
Messages: 32
Registered: January 2015
Member
Hello everyone,

I am currently working on a POC. My objective is to create a simple multi-view Eclipse RCP application enabling to load a semantic model (serialized with the standard XMI format) and display its contents as trees or diagrams or tables. I have defined the corresponding representations in Sirius's graphical .odesign editor, as explained in the 4-minute tutorial.

But in the Activator class of my design plugin (generated by Sirius at design project creation), after the following line is executed :

viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/proto.odesign")); 


then viewpoints contains only one Viewpoint object (as expected), but getOwnedRepresentations() returns an empty EList.

I don't understand why, because I defined 4 representations in my .odesign file.

I have exactly the same problem when I try to load a .aird file using SessionManager.INSTANCE.getSession() : getOwnedRepresentations() of every DView is empty.

What did I miss ?

Here are the first lines of my .odesign file (after replacing // with ||) :

<?xml version="1.0" encoding="UTF-8"?>
<description:Group xmi:version="2.0" xmlns:xmi="http:||www.omg.org/XMI" xmlns:xsi="http:||www.w3.org/2001/XMLSchema-instance" 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/tree/description/1.0.0" xmlns:description_3="http:||www.eclipse.org/sirius/table/description/1.1.0" xmlns:style="http:||www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:tool="http:||www.eclipse.org/sirius/diagram/description/tool/1.1.0" xmlns:tool_1="http:||www.eclipse.org/sirius/description/tool/1.1.0" name="proto" version="8.1.0">
  <ownedViewpoints name="myViewpoint" modelFileExtension="proto">
    <ownedRepresentations xsi:type="description_1:DiagramDescription" name="proto.positions" label="Positions" titleExpression="Positions" initialisation="true" showOnStartup="true" domainClass="proto.Container">
      <metamodel href="../../proto.model/model/proto.ecore#/"/>
      <metamodel href="../../proto.model/model/proto.ecore#//package1"/>
      <metamodel href="../../model/model/proto.ecore#//package2"/>
      <metamodel href="../../proto.model/model/proto.ecore#//package3"/>
      <defaultLayer name="Default">

[Updated on: Thu, 29 January 2015 14:28]

Report message to a moderator

Re: Empty viewpoint.getOwnedRepresentations() list [message #1589741 is a reply to message #1586094] Wed, 28 January 2015 16:25 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 26/01/2015 21:17, Francois Cabrol a écrit :
> Hello everyone,
>

Hi,

> I am currently working on a POC. My objective is to create a simple
> multi-view Eclipse RCP application enabling to load a semantic model
> (serialized with the standard XMI format) and display its contents as
> trees or diagrams or tables. I have defined the corresponding
> representations in Sirius's graphical .odesign editor, as explained in
> the 4-minute tutorial.
>
> But in the Activator class of my design plugin (generated by Sirius at
> design project creation), after the following line is executed :
>
> viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID
> + "/description/proto.odesign"));
> then viewpoints contains only one Viewpoint object (as expected), but
> the ownedRepresentations list of this object is null.
>
> I don't understand why, because I defined 4 representations in my
> .odesign file.

I don't understand either. If you debug in the method
org.eclipse.sirius.business.api.componentization.ViewpointRegistryImpl.registerFromPlugin(String)
,is the root object (a group) contained your Viewpoint (reference
ownedViewpoints) and is this viewpoint contained your representations
(reference ownedRepresentations)?

Is there any error in the error log view?

>
> What did I miss ?
>
> Here are the first lines of my .odesign file (after replacing // with
> ||) :
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <description:Group xmi:version="2.0" xmlns:xmi="http:||www.omg.org/XMI"
> xmlns:xsi="http:||www.w3.org/2001/XMLSchema-instance"
> 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/tree/description/1.0.0"
> xmlns:description_3="http:||www.eclipse.org/sirius/table/description/1.1.0"
> xmlns:style="http:||www.eclipse.org/sirius/diagram/description/style/1.1.0"
> xmlns:tool="http:||www.eclipse.org/sirius/diagram/description/tool/1.1.0" xmlns:tool_1="http:||www.eclipse.org/sirius/description/tool/1.1.0"
> name="proto" version="8.1.0">
> <ownedViewpoints name="myViewpoint" modelFileExtension="proto">
> <ownedRepresentations xsi:type="description_1:DiagramDescription"
> name="proto.positions" label="Positions" titleExpression="Positions"
> initialisation="true" showOnStartup="true" domainClass="proto.Container">
> <metamodel href="../../proto.model/model/proto.ecore#/"/>
> <metamodel href="../../proto.model/model/proto.ecore#//package1"/>
> <metamodel href="../../model/model/proto.ecore#//package2"/>
> <metamodel href="../../proto.model/model/proto.ecore#//package3"/>
> <defaultLayer name="Default">
>

Regards,

--
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: Empty viewpoint.getOwnedRepresentations() list [message #1589801 is a reply to message #1589741] Wed, 28 January 2015 17:11 Go to previous messageGo to next message
Francois Cabrol is currently offline Francois CabrolFriend
Messages: 32
Registered: January 2015
Member
I already tried debugging. Just after the call to load(fileURI, resourceSet) in the method you mentioned, I can see that my Group contains one Viewpoint, but the ownedRepresentations list of this Viewpoint is null.
I have exactly the same problem when I try to load an .aird file with method SessionManager.INSTANCE.getSession() : getOwnedRepresentations() of every DView is empty.

I tried to create a very simple .odesign defining a Tree representation (the attached proto-tree.odesign), but when I run my standalone application, viewpoint.getOwnedRepresentations() still returns an empty list.
Re: Empty viewpoint.getOwnedRepresentations() list in an e4 application [message #1591383 is a reply to message #1589801] Thu, 29 January 2015 13:54 Go to previous messageGo to next message
Francois Cabrol is currently offline Francois CabrolFriend
Messages: 32
Registered: January 2015
Member
I forgot to explain that my POC is an e4 application. I just realized that if I try to deploy my design plugin in a e3 application, then the viewpoint.getOwnedRepresentations() list contains the expected representations.
The problem is that when I include my design plugin in an e4 product, the behaviour of this method is not the same, and no error message appears (neither in a console nor in the error log).
Is it a known problem ? Are there any successful examples of e4 applications using Sirius ?
Re: Empty viewpoint.getOwnedRepresentations() list in an e4 application [message #1591624 is a reply to message #1591383] Thu, 29 January 2015 16:54 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 29/01/2015 14:54, Francois Cabrol a écrit :
> I forgot to explain that my POC is an e4 application. I just realized
> that if I try to deploy my design plugin in a e3 application, then the
> viewpoint.getOwnedRepresentations() list contains the expected
> representations.
> The problem is that when I include my design plugin in an e4 product,
> the behaviour of this method is not the same, and no error message
> appears (neither in a console nor in the error log).
> Is it a known problem ?

No. Are you sure that diagram plugins are available in your e4
application? Indeed the Group and the Viewpoint are concept defined in
the core plugins but Diagram representations are defined in another MM
part not in the core plugins.

Are there any successful examples of e4
> applications using Sirius ?

Obeo Designer is an application based on Sirius and on Eclipse Luna.


--
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: Empty viewpoint.getOwnedRepresentations() list in an e4 application [message #1740786 is a reply to message #1591624] Thu, 18 August 2016 14:33 Go to previous messageGo to next message
Laurent BOD is currently offline Laurent BODFriend
Messages: 4
Registered: June 2016
Junior Member
I have exactly the same problem. I work with Eclipse RCP luna (4.4.2), I installed the plugin 3.1.5 Sirius, the plugin Ecore diagram editor 3.0.3 and when I want to load my views in proceedings Eclipse RCP, the list is always empty. No error in the console, an idea? (The model used is the sirius: basicfamily)
Re: Empty viewpoint.getOwnedRepresentations() list in an e4 application [message #1740986 is a reply to message #1740786] Mon, 22 August 2016 07:52 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Laurent,

Could you list the Sirius plugins which are included in your resulting application ?

Do you also deploy the basicfamily sample (metamodel + VSM) in it ?

Regards

--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Passing variables from odesign to Java Service
Next Topic:Storable values in SiriusLayoutDataManager
Goto Forum:
  


Current Time: Thu Sep 26 08:09:09 GMT 2024

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

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

Back to the top