Community
Participate
Working Groups
When I create a diagram with the "Init" and "Show on startup" options checked. Then if I create a new project, the diagram is well created but it does not open automatically. But when I close and reopen the project the diagram opens automatically.
org.eclipse.sirius.ui.business.api.session.SessionHelper.openStartupRepresentations(Session, IProgressMonitor) is called from the NewSessionWizard (new representtion file) and OpenRepresentationsFileJob. The issue here is that it is not called from org.eclipse.sirius.ui.tools.internal.wizards.ModelingProjectWizard because we do propose to select some Viewpoint because the wizard does not add any smeantic resources. I am wondering if we should not open the startup representations when the user select a new Viewpoint too. (Note that rep descriptions with init=true are created when the suer selet a new viewpoint)
Mélanie, it seems you activate several Viewpoint in your wizard, you might reuse Viewpoitn selection page as EcoreTools does. I think you should call org.eclipse.sirius.ui.business.api.session.SessionHelper.openStartupRepresentations(Session, IProgressMonitor) from your new UML Project wizard.
Mélanie org.obeonetwork.dsl.uml2.design.InitUmlModel.execute() l79 seems a good candidate in your case, just after your Viewpoint activation.
For my question on the 'startup' representation on Viewpoint activation, note thaht this could have impacts on performances. Please read the corresponding documentation and warning in the documentation [1]. [1] https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#diagram_description)
We have to check how Ecore Tools use our wizard. Eventually we will need to add the openStartupCall.