Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Unable to use my own model, following tutorial example
Unable to use my own model, following tutorial example [message #1432194] Fri, 26 September 2014 19:35 Go to next message
Dennis Doubleday is currently offline Dennis DoubledayFriend
Messages: 4
Registered: September 2014
Junior Member
I am using Sirius 1.0.0 (upgrading to 1.0.1 as a I type)

I followed the 4 minute tutorial, no problem, all worked as advertised. Nice work!

Now, I am trying to use my own Ecore model instead of the imported sample one.

I created the .ecore
I created the .genmodel
I generated the plugins for my model (it is called "workflow")
I run in a test workspace

I created a Modeling project, and created an instance of my model, "example.workflow", instead of importing the basicfamily model

I created a View Specification Project, and define a Viewpoint and a diagram view, as in the tutorial.

I right click on my model project, selected "Viewpoint Selection", my viewpoint is there and I enable it. Everything is going great!

But.....now there is no menu choice "New Representation" when I right click on the root of my workflow model, just the grayed out "Control" and "Export diagrams as images" choices.

The only difference I could see between the imported basicfamily model and my workflow model was that there was a "basicfamaily.aird" file that I didn't have in my model.

So, I created a workflow.aird file in my model project, using "New-->Representations File". However, it doesn't look completely like the one in the sample basicfamily model, and I still can't get the "New Representation" menu choice.

The first image is what I see in the Model Explorer for basicfamily.aird.
index.php/fa/19290/0/
The second image is what I see for workflow.aird.
index.php/fa/19291/0/

Thanks for any help.
Re: Unable to use my own model, following tutorial example [message #1434018 is a reply to message #1432194] Mon, 29 September 2014 14:56 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 Dennis,

Le 26/09/2014 22:31, Dennis Doubleday a écrit :
> I am using Sirius 1.0.0 (upgrading to 1.0.1 as a I type)
>
> I followed the 4 minute tutorial, no problem, all worked as advertised. Nice work!
>
> Now, I am trying to use my own Ecore model instead of the imported sample one.
>
> I created the .ecore
> I created the .genmodel
> I generated the plugins for my model (it is called "workflow")
> I run in a test workspace
>
> I created a Modeling project, and created an instance of my model, "example.workflow", instead of importing the basicfamily model
>
> I created a View Specification Project, and define a Viewpoint and a diagram view, as in the tutorial.
>
> I right click on my model project, selected "Viewpoint Selection", my viewpoint is there and I enable it. Everything is going great!
>
> But.....now there is no menu choice "New Representation" when I right click on the root of my workflow model, just the grayed out "Control" and "Export diagrams as images" choices.
>
> The only difference I could see between the imported basicfamily model and my workflow model was that there was a "basicfamaily.aird" file that I didn't have in my model.

You have created a Modeling Project, it should contains a
representations.aird file which corresponds to the "basicfamaily.aird" .
You will find more information on Modeling Projects and aird files in
[1] and [2]

>
> So, I created a workflow.aird file in my model project, using "New-->Representations File". However, it doesn't look completely like the one in the sample basicfamily model, and I still can't get the "New Representation" menu choice.
>
In a modeling project only one main representation file (aird) is accepted.

You should remove one of the aird file, close and then reopen the
Modeling Project. Then you will check thaht you can expand your
example.workflow file (ie check that it is loaded by Sirius). You could
also check that at least one of the objects it contains is compatible
with the representation you would like to create: which domain class did
you specify for the Diagram Description in your odesign file ?

> The first image is what I see in the Model Explorer for basicfamily.aird.
>
> The second image is what I see for workflow.aird.

Your images shows the existing EcoreTools diagrams
created on your ecore model and on the basicfamily ecore model.

>
>
> Thanks for any help.
>

Regards,

--
Maxime - Obeo

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

[1]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#MP
[2]
https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#LegacyMode


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Unable to use my own model, following tutorial example [message #1435668 is a reply to message #1434018] Wed, 01 October 2014 20:42 Go to previous messageGo to next message
Dennis Doubleday is currently offline Dennis DoubledayFriend
Messages: 4
Registered: September 2014
Junior Member
Maybe this additional picture will help clarify the situation. At this screen shot, I can right click on the Family object and get "New Representation" as a context menu choice.

If I right click on the Workflow object, I don't get "New Representation" in the context menu--it just doesn't appear. And you can see in the respective .aird outlines that representations.aird expands to "new Persons Diagram" in the basicfamily example, but there is no parallel "new Workflow Diagram" under representations.aird in the workflows example, even though, as you can see in the odesign editor, I have defined a WorkflowDiagram.

index.php/fa/19344/0/

Re: Unable to use my own model, following tutorial example [message #1449827 is a reply to message #1435668] Tue, 21 October 2014 21:48 Go to previous messageGo to next message
Dennis Doubleday is currently offline Dennis DoubledayFriend
Messages: 4
Registered: September 2014
Junior Member
Solved the issue myself, though I'm not sure why it works. My problem was I was using a fully qualified class name "com.myorg.Workflow" as the "Domain Class" for the WorkflowDiagram. When I changed it to just "Workflow", things started working. I'm not sure why that would be the case, since "basicfamily.Family" works in the example.
Re: Unable to use my own model, following tutorial example [message #1451052 is a reply to message #1449827] Thu, 23 October 2014 09:01 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 Dennis,

Le 21/10/2014 23:48, Dennis Doubleday a écrit :
> Solved the issue myself, though I'm not sure why it works. My problem
> was I was using a fully qualified class name "com.myorg.Workflow" as the
> "Domain Class" for the WorkflowDiagram. When I changed it to just
> "Workflow", things started working. I'm not sure why that would be the
> case, since "basicfamily.Family" works in the example.

As described in the Sirius specifier guide [1], the syntax for type
names can be the basic name, like Class, a qualified name using name of
the EMF EPackage which defines the type, like uml.Class, or a fully
qualified URI like http://www.eclipse.org/uml2/3.0.0/UML#//Class.

Note that auto-completion is available in these fields using the
Ctrl+Space shortcut. It is recommended to explicitly associate a
meta-model (or more) to your representations definitions (Metamodels
property tab) to allow for smarter completion. Otherwise by default it
will include all types from any EMF meta-model available.

Regards

--
Maxime - Obeo

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

--

[1]
https://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html#type_names


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Unable to use my own model, following tutorial example [message #1451357 is a reply to message #1451052] Thu, 23 October 2014 18:09 Go to previous messageGo to next message
Dennis Doubleday is currently offline Dennis DoubledayFriend
Messages: 4
Registered: September 2014
Junior Member
Thank you. I missed the Ctrl-Space completion. That helps. Since my models are generated in the "com.dennis.workflow" package, I was surprised that "workflow.Workflow" is offered as a completion, but not "com.dennis.workflow.Workflow"? I guess now that it is because the "com.dennis" part is specified as the Base Package in the genmodel, and "workflow" is all the ECore model knows about.
Re: Unable to use my own model, following tutorial example [message #1695340 is a reply to message #1451357] Wed, 13 May 2015 14:31 Go to previous messageGo to next message
Omar Mazouz is currently offline Omar MazouzFriend
Messages: 4
Registered: May 2015
Junior Member
Hi !
I am also experiencing the same problem , i can't find the "New representation menu " as in the tutorial !
Please can anyone provide me a solution !
Thanks,
Regards
Omar Mazouz
Re: Unable to use my own model, following tutorial example [message #1695353 is a reply to message #1695340] Wed, 13 May 2015 16:45 Go to previous messageGo to next message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 13/05/2015 16:31, Omar Mazouz a écrit :
> Hi !

Hi,

> I am also experiencing the same problem , i can't find the "New
> representation menu " as in the tutorial !
> Please can anyone provide me a solution !
> Thanks,
> Regards
> Omar Mazouz

The initial problem of this post has been solved. So without detail on
your specific problem, it's difficult to help you.
That's the same for your other response on "Unable to create view point
selection" post.

Regards,

--
Laurent Redor - 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: Unable to use my own model, following tutorial example [message #1695599 is a reply to message #1695353] Sun, 17 May 2015 20:10 Go to previous messageGo to next message
Omar Mazouz is currently offline Omar MazouzFriend
Messages: 4
Registered: May 2015
Junior Member
Hi,

When i right click on " Service 1" the equivalent of " persons " in the tutorial i have the first picture
index.php/fa/21840/0/

I followed the tutorial but with some adaptation to my case so i have :
MyDSL <=> basic family

I used the following properties

index.php/fa/21841/0/

index.php/fa/21842/0/

Maybe the domain class is not right ?!

Thanks in advance !

Regards,
Omar
Re: Unable to use my own model, following tutorial example [message #1695649 is a reply to message #1695599] Mon, 18 May 2015 11:43 Go to previous message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 17/05/2015 22:10, Omar Mazouz a écrit :
> Hi,
>
Hi,

> When i right click on " Service 1" the equivalent of " persons " in the tutorial i have the first picture
>
>
> I followed the tutorial but with some adaptation to my case so i have :
> MyDSL <=> basic family
>
> I used the following properties
>
>
>
>
>
> Maybe the domain class is not right ?!

"mydsl" is a class name? For Domain Class field, you can refer to this
documentation [1].
>
> Thanks in advance !
>
> Regards,
> Omar
>

Regards,

[1]
http://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html#type_names


--
Laurent Redor - 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
Previous Topic:Exception when creating a new project
Next Topic:Can we Modify the domain model DSL dynamically with sirius ?!
Goto Forum:
  


Current Time: Thu Mar 28 20:10:45 GMT 2024

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

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

Back to the top