Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 423051

Summary: Introduce library extension bundles for non Sirius-specifc code
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: CoreAssignee: Pierre-Charles David <pierre-charles.david>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: alex.lagarde, florian.barbin, stephane.begaudeau
Version: unspecifiedKeywords: triaged
Target Milestone: 1.0.0M5   
Hardware: All   
OS: All   
Whiteboard:

Description Pierre-Charles David CLA 2013-12-03 11:01:04 EST
See the description of library extensions at http://wiki.eclipse.org/Sirius/Modularization#Library_Extensions_2.

For 1.0M4, we should at least introduce the basic structure for most of these, and start to move the relevant code there, breaking inappropriate dependencies as we go.
Comment 1 Pierre-Charles David CLA 2013-12-03 11:02:06 EST
Marking as P1/major for 1.0.0M4, as this will break all the concerned APIs, so we should do this as early as possible.
Comment 2 Alex Lagarde CLA 2013-12-05 04:49:36 EST
This library bundle should definitely include org.eclipse.sirius.tools.internal.resource.ResourceSetUtil, which allows to load EMF Resources within a ProgressMonitor and provide progression feedback while loading the resource.
Comment 3 Alex Lagarde CLA 2013-12-05 05:33:41 EST
It may also be useful to provide another UI library bundle, including for example the BooleanFieldEditorWithHelp provided by sirius.ui. It makes censes for this component to be used by sirius contributors
Comment 4 Alex Lagarde CLA 2013-12-05 07:40:24 EST
The org.eclipse.sirius.ui.tools.internal.util.ItemSearcher could be written without relying on sirius and extracted in the UI library bundle.
Comment 5 Pierre-Charles David CLA 2013-12-05 09:32:41 EST
(In reply to Alex Lagarde from comment #3)
> It may also be useful to provide another UI library bundle

That's the plan, see http://wiki.eclipse.org/Sirius/Modularization#Library_Extensions_2 for a (partial) list of library extensions which could be extracted.
Comment 6 Stephane Begaudeau CLA 2013-12-06 10:11:59 EST
Will you keep using eclipse extension points for your services and dependencies to eclipse runtime? Some services could be realy useful in stand alone environments.
Comment 7 Pierre-Charles David CLA 2013-12-06 10:33:35 EST
(In reply to Stephane Begaudeau from comment #6)
> Will you keep using eclipse extension points for your services and
> dependencies to eclipse runtime? Some services could be realy useful in
> stand alone environments.

I agree that as a general rule these libraries should not use or define Eclipse extension points (and they should not use or define any other kind of singleton either). All those can be defined in the other Sirius plug-ins, but the library extensions should be usable in standalone mode. We'll see if this is workable in practice.
Comment 8 Pierre-Charles David CLA 2013-12-20 10:50:14 EST
See commit 80e4a71e5ba13b29c2583f6793835670a062317b and preceding for a first pass, which introduces several new library extension plug-ins. Some are empty, some already have a little content. The scope of this ticket is not to fill them completly but to initialize the structure and provide enough examples.

Before I close this, the remaining task is to provide a clear reference document (probably on the wiki) explaining the purpose of these extensions and the associated coding rules (e.g. naming, dependencies allowed or forbidden, etc.).
Comment 9 Pierre-Charles David CLA 2014-01-24 04:27:13 EST
See https://wiki.eclipse.org/Sirius/Library_Extensions. It's far from perfect, but will do as a first iteration.
Comment 10 Pierre-Charles David CLA 2014-01-27 11:06:47 EST
Validated using:
* Luna M4
* Sirius 1.0M5rc1 (1.0.0-N20140127-060036)
Comment 11 Pierre-Charles David CLA 2014-01-31 05:38:10 EST
Available in Sirius 1.0.0M5, see https://wiki.eclipse.org/Sirius/1.0.0M5 for availability details.