Bug 438833 - Show on startup diagram
Summary: Show on startup diagram
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2014-07-03 09:03 EDT by Melanie Bats CLA
Modified: 2014-07-07 11:36 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Melanie Bats CLA 2014-07-03 09:03:13 EDT
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.
Comment 1 Maxime Porhel CLA 2014-07-07 11:12:11 EDT
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)
Comment 2 Maxime Porhel CLA 2014-07-07 11:13:55 EDT
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.
Comment 3 Maxime Porhel CLA 2014-07-07 11:17:30 EDT
Mélanie org.obeonetwork.dsl.uml2.design.InitUmlModel.execute() l79 seems a good candidate in your case, just after your Viewpoint activation.
Comment 4 Maxime Porhel CLA 2014-07-07 11:27:49 EDT
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)
Comment 5 Maxime Porhel CLA 2014-07-07 11:36:27 EDT
We have to check how Ecore Tools use our wizard. Eventually we will need to add the openStartupCall.