Community
Participate
Working Groups
On last release, the wizard ends with an error with message (model XXX.notation is missing) Steps to reproduce: 1/ launch "new model" wizard 2/ give "UML1" name for model 3/ choose "UML" as language 4/ select check box "primitives types" and choose "UC" as first diagram 5/ OK If no diagram is checked no error appears. In both cases, the model resource is not present in project explorer and F5 is needed to make it appear.
This bug is present in 0.8.x and 0.9.x This bug can also be reproduced in a more general way: - start with no (zero) editors opened in Eclipse - create or open a Papyrus editor (editor1) - create a second Papyrus editor, the creation wizard appears - choose UML, select at least one diagram (Class) to create - finish the wizard An error occurs: Resource '/testWizard/model3.notation' does not exist. The file is correctly created in the workspace. The editor opens, but the diagram is not open. It is created in the modelExplorer. The editor1 is now in error. The wizard has tried to create the diagram in editor1.
The problem comes from the commands that open the created diagram: - org.eclipse.papyrus.infra.core.utils.OpenDiagramCommand. - called from oep.infra.gmfdiag.common.AbstractPapyrusGmfCreateDiagramCommandHandler The command try to get the ServiceRegistry from the currently selected editor. But, we are in the initialization phase of Papyrus, and the currently selected editor IS NOT the Papyrus editor that we are currently initialiing. So, the command is executed on objects belonging to another editor ... Note that the command call a deprecated methods (EditorUtils.getServiceRegistry()), which is known to return the wrong ServiceRegistry during the initialization phase. The command itself is deprecated since a long time ... Note also that the AbstractPapyrusGmfCreateDiagramCommandHandler was originally designed to be called from an ActionHandler, and not during the editor initialization phase. A simple workaround is to not use the the faulty call, and to get the requested IPageMngr in another, but costly way. But a more robust solution has to be provided. The two commands seem to request only the Models to work. Maybe we should provide this objects to the command, rather than trying to find them from inside the command.
Hi, With nightly version, I can't reproduce it. If bug still present, gives more information to reproduce it. Else, this correction will be in next release. Thank's
Impossible to reproduce. Closing.