Community
Participate
Working Groups
One of outcomes which are expected by improving Sirius's modularization is to allow usage of the core APIs in slightly different contexts. Being able to work with Sirius headless - aka with no UI - is one of those contexts. Standalone - aka without OSGi - is another interesting target, some consummers are already using parts of the APIs but have to jump through several hoops. We want the core services of Sirius to be able to work in these contexts, first priority being headless. This will also enable us to write faster tests that don't need any UI. I started a spec document, will push it under review pretty soon. At this point it is more about experimenting and assessing what we could do for 2.0.
Here is the spec https://git.eclipse.org/r/#/c/30112/ The "detailled specification" is fairly light but right now I need to gather comments : - are there other choices and tradeoffs you are aware of ? - do you foresee any issue with the choices being made here ? - other missing piece or concern ?
Some tests results: On top of the ancestor of the headless branch (commit 3de673038d0e554d05c57f60951091dfb72b4cdc - https://github.com/cbrun/org.eclipse.sirius/commits/headless) 6 failures : org.eclipse.sirius.tests.swtbot.RefreshAfterViewCreationTest.testEdgeCreationOnNodeInContainerCreationWithoutAutoRefresh org.eclipse.sirius.tests.swtbot.sequence.MessageExtensionTest.testSessionSyncOnDiagramWithEdgemappingImportOpening org.eclipse.sirius.tests.swtbot.sequence.ExternalModificationsTests.testExecutionReparent org.eclipse.sirius.tests.swtbot.sequence.SyncCallTest.test_SyncCall_Resize_Zoom org.eclipse.sirius.tests.swtbot.sequence.InstanceRoleOrderingTests.testInstanceRoleReorderingAtDiagramOpening org.eclipse.sirius.tests.unit.api.convert.ConvertProjectToModelingProjectTest.testConvertToModelingProjectWithoutRepresentationFileButSemanticResources On top of the headless branch (commit eced51d4c1deb50b030748240963979f05c219ea) 5 failures : org.eclipse.sirius.tests.swtbot.sequence.MessageExtensionTest.testSessionSyncOnDiagramWithEdgemappingImportOpening org.eclipse.sirius.tests.swtbot.sequence.ExternalModificationsTests.testExecutionReparent org.eclipse.sirius.tests.swtbot.sequence.SyncCallTest.test_SyncCall_Resize_Zoom org.eclipse.sirius.tests.swtbot.sequence.InstanceRoleOrderingTests.testInstanceRoleReorderingAtDiagramOpening org.eclipse.sirius.tests.unit.api.convert.ConvertProjectToModelingProjectTest.testConvertToModelingProjectWithoutRepresentationFileButSemanticResources Looks not too bad so far...
A chain of changes is submitted for review, it starts with this one : https://git.eclipse.org/r/#/c/30650/
Would be possible do a diagram export as image in this headless mode?
Technically that's feasible thanks to the OffScreenEditPart & co. It's not part of the tests used by this "chain of changes" though so there is probably more work to do after that.
Some work related to this has been done and already merged under this ticket's umbrella (the commits reference it). This first part will be in the soon to be released Sirius 2.0.0, but this ticket has a much larger scope. Ideally we should have created sub-tickets for specific tasks, so that the part which will be in Sirius 2.0 could be marked as such, but it's too late now. What has been done for now (mostly by Cédric) is moving large parts of the diagram "refresh" logic out of the diagram.ui plug-in and into the core oes.diagram one. The oes.table plug-in also had a UI dependency which could be released easily. With these changes done, the org.eclipse.sirius.runtime feature now contains the core plug-ins of the 3 default dialects, with no UI dependencies. A new repository org.eclipse.sirius.headless.update is now also built (but not promoted) as part of the normal build; it contains only the features which have no UI dependencies. The next iterations will move more and more of the code and plug-ins into this update-site. A new target platform with a minimum set of dependencies to build the headless features has been added in releng/org.eclipse.sirius.targets/headless (only for Luna), and the Maven/Tycho build has been adapted so that one can request a headless build like this: % mvn -P!full clean package NB: you may need to escape the "!" with "\!" depending on your shell. This builds only the subset of features which are needed to produce the org.eclipse.sirius.headless.update repository, and uses the headless target platform to do so. The new Hudson job https://hudson.eclipse.org/sirius/view/gerrit/job/sirius.headless-master/ uses this to validate that what is in this repo can indeed be built without error with the headless target platform. This job is rather fast (Luna only, builds only a subset of Sirius and uses a small TP), so it will be configured as an additional Gerrit trigger, so that any change proposed through gerrit will be blocked if they break the headless build.