Empty diagram [message #1695085] |
Mon, 11 May 2015 23:55 |
Julien Delange Messages: 82 Registered: October 2011 |
Member |
|
|
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 07:27 |
|
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
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
Re: Empty diagram [message #1695199 is a reply to message #1695164] |
Tue, 12 May 2015 15:00 |
|
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
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Re: Empty diagram [message #1695200 is a reply to message #1695172] |
Tue, 12 May 2015 15:06 |
|
This stack corresponds to this bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=433859
Le 12/05/2015 15:19, Julien Delange a écrit :
> Follow up. I am also trying to do the tutorial again and have some
> issue. I got the following stack trace. Is there any special version I
> should try? For now, I am using the last Luna build.
> Thansk!
>
>
> org.eclipse.swt.SWTException: Failed to execute runnable
> (java.lang.NullPointerException)
> at org.eclipse.swt.SWT.error(SWT.java:4441)
> at org.eclipse.swt.SWT.error(SWT.java:4356)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
>
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3774)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3412)
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:175)
>
> at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:390)
> at
> org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:331)
>
> at
> org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:637)
>
> at
> org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:153)
>
> at
> org.eclipse.ltk.ui.refactoring.resource.DeleteResourcesWizard$DeleteResourcesRefactoringConfigurationPage.performFinish(DeleteResourcesWizard.java:202)
>
> at
> org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:710)
>
> at
> org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:455)
>
> at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:466)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
> at org.eclipse.jface.window.Window.open(Window.java:808)
> at
> org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:187)
>
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:202)
>
> at
> org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:122)
>
> at
> org.eclipse.ltk.internal.ui.refactoring.actions.DeleteResourcesHandler.execute(DeleteResourcesHandler.java:40)
>
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
>
> at
> org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:483)
> at
> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
>
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
>
> at
> org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommandInContext(LegacyHandlerService.java:396)
>
> at
> org.eclipse.ui.internal.ide.actions.LTKLauncher.runCommand(LTKLauncher.java:95)
>
> at
> org.eclipse.ui.internal.ide.actions.LTKLauncher.openDeleteWizard(LTKLauncher.java:47)
>
> at
> org.eclipse.ui.actions.DeleteResourceAction.run(DeleteResourceAction.java:474)
>
> at
> org.eclipse.jdt.internal.ui.refactoring.reorg.DeleteAction.run(DeleteAction.java:197)
>
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
>
> at
> org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4454)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3799)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3409)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>
> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:483)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.ui.part.MultiPageEditorPart.deactivateSite(MultiPageEditorPart.java:946)
>
> at
> org.eclipse.ui.part.MultiPageEditorPart.dispose(MultiPageEditorPart.java:513)
>
> at
> org.eclipse.sirius.editor.editorPlugin.SiriusEditor.dispose(SiriusEditor.java:1320)
>
> at
> org.eclipse.sirius.editor.tools.internal.presentation.CustomSiriusEditor.dispose(CustomSiriusEditor.java:370)
>
> at
> org.eclipse.sirius.editor.editorPlugin.SiriusEditor$3$1.run(SiriusEditor.java:410)
>
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
>
> ... 77 more
> Loading ECPProjectManage
--
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.04434 seconds