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 |
Dennis Doubleday 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.
The second image is what I see for workflow.aird.
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 |
|
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 #1451052 is a reply to message #1449827] |
Thu, 23 October 2014 09:01 |
|
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 #1695353 is a reply to message #1695340] |
Wed, 13 May 2015 16:45 |
|
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
|
|
| | |
Goto Forum:
Current Time: Thu Mar 28 20:10:45 GMT 2024
Powered by FUDForum. Page generated in 0.04090 seconds
|