Empty diagram [message #1695085] |
Mon, 11 May 2015 19:55  |
Eclipse User |
|
|
|
Dear all,
I tried the 4 minutes tutorial and everything was running without problem. I was able to create the diagram, etc. Now, I would like to do the next step and be able to generate a diagram from my own metamodel. So, I created my meta model, generate the edit/editor code. Then, I made a first model and start to make a viewpoint.
Unfortunately, when trying to show something on the default diagram, nothing appear and the diagram is not created. So, I am trying to figure out what is going on what what I missed.
I mainly have two main questions:
1. How to debug a sirius application? Basically, in that case, how can I try to see what did I do wrong?
2. Is there anything special required in the ecore or genmodel file? As I started my model from scratch, I might have missed something. Any idea/suggestion is appreciated!
Note: my code is available (metamodel, example, sirius design, etc.) is available on https://github.com/juli1/emfta is you want to see what is looks like
Thanks!
|
|
|
Re: Empty diagram [message #1695120 is a reply to message #1695085] |
Tue, 12 May 2015 03:27   |
Eclipse User |
|
|
|
Le 12/05/2015 01:55, Julien Delange a écrit :
> Dear all,
>
> I tried the 4 minutes tutorial and everything was running without
> problem. I was able to create the diagram, etc. Now, I would like to do
> the next step and be able to generate a diagram from my own metamodel.
> So, I created my meta model, generate the edit/editor code. Then, I made
> a first model and start to make a viewpoint.
>
> Unfortunately, when trying to show something on the default diagram,
> nothing appear and the diagram is not created. So, I am trying to figure
> out what is going on what what I missed.
>
> I mainly have two main questions:
> 1. How to debug a sirius application? Basically, in that case, how can I
> try to see what did I do wrong?
You can use the validation (Validate context menu on the root of the
VSM). There are here 2 errors:
* The Class edu.cmu.emfta.emfta.Event does not exist.
* A style is missing for EventNode.
Not useful in your case, for the time being,
but you can also use the Interpreter view to varify that the expressions
used in the VSM return the expected result.
> 2. Is there anything special required in the ecore or genmodel file? As
> I started my model from scratch, I might have missed something. Any
> idea/suggestion is appreciated!
There is nothing special required in the ecore or genmodel file. I have
done 3 modifications in your VSM and it's OK now.
* Change the 2 Domain Class: see [1] in documentation for information
about typaes name
* Add a style on the EventNode
I have made a pull request corresponding to these changes [2]
>
> Note: my code is available (metamodel, example, sirius design, etc.) is
> available on https://github.com/juli1/emfta is you want to see what is
> looks like
>
> Thanks!
>
>
Regards,
[1]
http://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html#type_names
[2] https://github.com/juli1/emfta/pull/1
--
Laurent Redor - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Re: Empty diagram [message #1695199 is a reply to message #1695164] |
Tue, 12 May 2015 11:00   |
Eclipse User |
|
|
|
Oups sorry, I've used my current dev environment to test your model and
to make the changes. This corresponds to the next Sirius 3.0.0 that will
be released with Eclipse Mars.
There are improvment on validation in this version. This, perhaps,
explains the difference with your environment.
But, if you use the pull request as starting point, you should have a
first operational diagram.
Le 12/05/2015 14:18, Julien Delange a écrit :
> Hi,
>
> I did not expect such a help and quick support! I tried the fixed but it
> does not work. Also, when I try to validate the model and I put bad
> class names, the model still validates even if I am using a non-existing
> class.
>
> In fact, after running in debug mode, I got the following trace (see
> below). Anything I did wrong?
>
>
>
> !ENTRY org.eclipse.emf.validation 2 80 2015-05-12 08:17:24.845
> !MESSAGE The constraint
> "org.eclipse.sirius.constraints.ValidInterpretedExpressionConstraint" is
> disabled. It will not be evaluated.
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.sirius.common.tools.internal.interpreter.FeatureInterpreter.getCurrentElementType(FeatureInterpreter.java:160)
>
> at
> org.eclipse.sirius.common.tools.internal.interpreter.FeatureInterpreter.validateExpression(FeatureInterpreter.java:117)
>
> at
> org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.checkExpression(ValidInterpretedExpressionConstraint.java:83)
>
> at
> org.eclipse.sirius.tools.internal.validation.description.constraints.ValidInterpretedExpressionConstraint.validate(ValidInterpretedExpressionConstraint.java:56)
>
> at
> org.eclipse.emf.validation.internal.util.JavaConstraintParser$ConstraintAdapter.validate(JavaConstraintParser.java:80)
>
> at
> org.eclipse.emf.validation.internal.service.AbstractValidator.evaluateConstraints(AbstractValidator.java:241)
>
> at
> org.eclipse.emf.validation.internal.service.BatchValidator.validate(BatchValidator.java:264)
>
> at
> org.eclipse.emf.validation.internal.service.BatchValidator.validate(BatchValidator.java:211)
>
> at
> org.eclipse.emf.validation.internal.service.BatchValidator.doValidate(BatchValidator.java:149)
>
> at
> org.eclipse.emf.validation.internal.service.AbstractValidator.validate(AbstractValidator.java:147)
>
> at
> org.eclipse.emf.validation.internal.service.AbstractValidator.validate(AbstractValidator.java:126)
>
> at
> org.eclipse.emf.validation.internal.service.BatchValidator.validate(BatchValidator.java:117)
>
> at
> org.eclipse.sirius.tools.internal.validation.EValidatorAdapter.validate(EValidatorAdapter.java:80)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.doValidate(Diagnostician.java:171)
> at
> org.eclipse.emf.edit.ui.action.ValidateAction$3.doValidate(ValidateAction.java:309)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:158)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
> at
> org.eclipse.emf.edit.ui.action.ValidateAction.validate(ValidateAction.java:264)
>
> at
> org.eclipse.emf.edit.ui.action.ValidateAction$1.run(ValidateAction.java:176)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
>
> Retrieving for: DatatypeDefinitionString
> Constant: DatatypeDefinitionString
> Not replacing default for DatatypeDefinitionString with
> LinewrapConfigurationImpl, as there is already a default:
> org.eclipse.rmf.reqif10.pror.presentation.linewrap.impl.LinewrapConfigurationImpl
>
>
--
Laurent Redor - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04658 seconds