Bug 485220 - [General][Releng] Provide a more modular architecture (& builds) for Papyrus
Summary: [General][Releng] Provide a more modular architecture (& builds) for Papyrus
Status: NEW
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: M6   Edit
Assignee: Project Inbox CLA
QA Contact: Camille Letavernier CLA
URL: https://wiki.eclipse.org/Papyrus/Neon...
Whiteboard: Customizability, Scalability
Keywords: api, plan
Depends on:
Blocks:
 
Reported: 2016-01-05 10:40 EST by Camille Letavernier CLA
Modified: 2017-08-07 08:59 EDT (History)
6 users (show)

See Also:
give.a.damus: neon+


Attachments
Successful update of properties bundles (442.49 KB, image/png)
2016-01-25 09:21 EST, Christian Damus CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Camille Letavernier CLA 2016-01-05 10:40:58 EST
In order to get faster feedback on Gerrit builds, we need to build smaller components. However, the current structure does not properly support this, due to several issues:

- Not all plug-ins properly implement the Papyrus architecture (e.g. some infra plug-ins depend on UML or GMF)
- The build is split into 4 units (Main, Main Tests, Extra, Extra Tests). We should get more smaller units (e.g. Infra/Core, Views, Diagrams, Tables, UML Diagrams, UML Tables)
- The tests should be closer to the tested components, to be able to run tests when building tested components. Currently we can only run "Main Tests" or "Extra Tests"
- The lack of clear API doesn't provide enough confidence when changing core components, so we need to rebuild/retest everything to ensure that we don't break anyone

Some components that could be improved (This list is not exhaustive):

- Extract the ServicesRegistry outside infra.core (Or: separate Services from Sash Editor). This "core" plug-in includes both UI Components (Sash Editor) and core service management (Services/ServiceRegistry). Most plug-in depend on it for Services, but end up with a strong UI dependency
- ModelExplorer (UI Trees in general): Semantic Model & Content provider. Currently, the only abstraction we have for a "Semantic Model" is the IModel interface/UmlModel implementation. When we want to retrieve the "Semantic Model" of Papyrus (And content provider), we need to depend on uml.tools.
- Palette: The palette framework has a dependency to UML to support profiles. This means that either a) All our palettes are based on UML, or b) Our generic palette framework has a dependency to UML (For example, infra.gmfdiag.css.palette depends on UML although it simply contributes a Post-Action for the generic palette framework)
- Remove the strong dependency on the *.uml file extension, which makes it impossible to support normative XMI in Papyrus (OMG XMI URIs, properly supported by Eclipse/UML). This extension is used in many places in Papyrus

This task is not related to the build issue but still makes sense for a more modular architecture (It is also probably more complex):

- Diagram Runtime: GMF is split between "GMF Runtime" and "GMF Diagram UI" (The first one doesn't depend on GEF). We don't do this distinction in Papyrus, which means that all our generic diagram components depend on GEF3.x (Making it complicated to support both GEF3 and GEF4 without duplicating code or introducing a dependency from GEF4 Editors to GMF Editors). We should have a clearer separation of the Runtime and UI components for the diagrams
Comment 1 Camille Letavernier CLA 2016-01-05 10:46:11 EST
Regarding the tests, we should probably have a better separation between Unit tests (That can be executed along with the tested component) and integration tests (That still require a complete Papyrus configuration, and should be executed in a single pass to avoid restarting Eclipse N times during the build)

While Maven typically runs tests for each plug-in, this doesn't work well in the context of Eclipse because building the Eclipse installation and starting the workbench may take a lot of time (This is done in e.g. SysML 1.4 and Papyrus-RT, but they are much smaller projects). So we should keep the option to run "All Tests" for each build. Maybe use a more hierarchical test configuration?

- Main
-- Infra
--- Infra.core
--- Infra.Services
-- GMF
--- Infra.GMF
--- ...
...

We probably need a similar structure for the Maven build (And it may change over time - it already changed a few times in Mars), so maybe we should get a flexible model for the papyrus layers (With the ability to easily move a component from a layer to another, or introduce new intermediate layers, and generate the AllTests/Maven POM structure). Maybe ADL4Eclipse could be used here
Comment 2 Christian Damus CLA 2016-01-05 10:48:18 EST
(In reply to Camille Letavernier from comment #1)
> 
> - Main
> -- Infra
> --- Infra.core
> --- Infra.Services
> -- GMF
> --- Infra.GMF
> --- ...
> ...

To some degree, the test-suite infrastructure is already prepared for this.  See, for example, how the Diagram Assistants component has an all-tests suite of its own that is aggregated into the Papyrus All Tests.
Comment 3 Christian Damus CLA 2016-01-05 13:58:09 EST
The architectural problems go all the way to the bottom of the plug-in layer stack:  the oep.infra.tools bundle, on which oep.infra.core depends, also has many UI dependencies and re-exports UI concepts in its own APIs.
Comment 4 Christian Damus CLA 2016-01-05 14:48:00 EST
If we want to commit to this omelette for Neon, then we are going to have to break a lot of eggs.  Many very core and widely used classes will have to move to new packages to get the benefit of clean layering and separation of dependencies.  That is, if we want to avoid splitting packages [1], which I think should be avoided.

Basically, many of the core APIs will be renamed and therefore will break Papyrus clients and extenders.  That implies Papyrus version 2.0 for Neon.  Are we okay with that?


[1] http://wiki.osgi.org/wiki/Split_Packages
Comment 5 Eclipse Genie CLA 2016-01-05 17:20:16 EST
New Gerrit change created: https://git.eclipse.org/r/63594
Comment 6 Camille Letavernier CLA 2016-01-06 03:59:35 EST
> Basically, many of the core APIs will be renamed and therefore will break Papyrus clients and extenders. That implies Papyrus version 2.0 for Neon. Are we okay with that?

Yes, I think so (Actually I've never doubted that would be required :) )

> That is, if we want to avoid splitting packages [1], which I think should be avoided.

Agreed; it's important to keep consistency in bundles. We have so many bundles that splitting packages would only introduce more confusion; we don't really need that :)
Comment 8 Eclipse Genie CLA 2016-01-06 12:30:00 EST
New Gerrit change created: https://git.eclipse.org/r/63660
Comment 10 Eclipse Genie CLA 2016-01-06 19:05:38 EST
New Gerrit change created: https://git.eclipse.org/r/63689
Comment 12 Christian Damus CLA 2016-01-07 14:05:29 EST
Added URL reference to the Wiki page documenting the analysis of the Papyrus bundle dependencies, initially in the Infra Layer.
Comment 13 Christian Damus CLA 2016-01-07 15:04:13 EST
Review 63777 [1] demonstrates the scale of the impact of such a (conceptually) simple change as extracting the UI-dependent APIs from the infra.tools bundle into infra.ui.  This includes refactoring the test bundle similarly and introducing two new OSGi services to invert crucial UI dependencies that headless code will still need:

* IExecutorService extends Java Platform's ExecutorService with
  APIs for synchronous execution (a la Display.syncExec).  A new
  CoreExecutors class in the infra.tools bundle supplies the instance
  provided by the OSGi service implementation in the infra.ui bundle.
  This provides compatibility for clients of various UIUtil APIs that
  they can no longer access

* IContextualServiceRegistryTracker abstracts the concept of the
  default ServicesRegistry found in the currently active editor, which
  the ServiceUtilsForHandlers class (and hence all of its clients)
  relies on.  Again an OSGi service implementation in the infra.ui
  bundle supplies the implementation of this tracker, which is exposed
  in infra.core through the service-utils API

Note that this gerrit change covers all of the Main plug-ins (afaik) but not the Extras.  The main all-tests suite shows no obvious regressions, and the diagram editors still seem to work as normal in a run-time workbench.

Attempting to pursue these kinds of migrations across the board (this is extracting the UI out of a single plug-in!) for illegal UI, GEF/GMF, and UML dependencies will be a large undertaking and probably difficult to do in parallel with *any* other development activities!

[1] https://git.eclipse.org/r/63777
Comment 14 Camille Letavernier CLA 2016-01-08 04:35:52 EST
Another thing I didn't mention in the bug description (And I didn't see it in the wiki page either):

We have some dependencies from the Table layer to the GMF one, because infra.gmfdiag.common provides the NotationModel (IModel). Since the Notation resource is shared by various components (CSS, GMF Notation, Table Model, and potentially others), it should be moved to a non-GMF layer. I'm not sure how much the GMF NotationResource implementation is required for this shared resource (i.e. if we can really get rid of the GMF dependency), but I think it shouldn't be an issue (We may have to configure the resource save/load options ourselves, but we already do that for most resources anyway)
Comment 15 Christian Damus CLA 2016-01-08 08:21:56 EST
(In reply to Camille Letavernier from comment #14)
> Another thing I didn't mention in the bug description (And I didn't see it
> in the wiki page either):

Yes, indeed.  I just hadn't looked at the Nattable bundles, yet.  Note that, as I mentioned on the wiki page, I don't consider infra.nattable as an "infra layer" component.  It really should just be called "nattable".  Maybe there's an "infra" of the "nattable", but the "nattable" is not an "infra" of Papyrus.  :-)
Comment 16 Remi Schnekenburger CLA 2016-01-08 08:42:57 EST
(In reply to Christian W. Damus from comment #15)
> (In reply to Camille Letavernier from comment #14)
> > Another thing I didn't mention in the bug description (And I didn't see it
> > in the wiki page either):
> 
> Yes, indeed.  I just hadn't looked at the Nattable bundles, yet.  Note that,
> as I mentioned on the wiki page, I don't consider infra.nattable as an
> "infra layer" component.  It really should just be called "nattable".  Maybe
> there's an "infra" of the "nattable", but the "nattable" is not an "infra"
> of Papyrus.  :-)

Just for your information, Christian, I pushed a new version of the ADL4Eclipse tool today on gerrit, that helps looking at the architecture of plugins and feature in Papyrus. That tool lets you reverse the architecture of the current platform or plugin/features in the workspace, creating a UML view of this architecture. You can then run some analyzes on the result model. 

About these analyzes, I pushed on gerrit an additional action on the root of the reversed model, to the refactoring popp menu area on model explorer. This refactoring creates  dependencies between the features, by looking at the plugins contained in the feature and their own plugin dependencies. I can do a quick demo of this tool if you think that could be of interest for your work. This helps finding architectural issues between plugins (e.g. uml.gmfdiag.export that depends on gmfdiag.css, where it should not). The dependencies between features are ordered the following way: Papyrus intra-dependencies, External features to Papyrus (should be empty for now), Papryus to external features (our technology dependencies), and the dependencies between our external features (not the most interesting thing for now)  

link to the gerrit: https://git.eclipse.org/r/#/c/63841/
Comment 17 Christian Damus CLA 2016-01-08 08:51:50 EST
(In reply to Remi Schnekenburger from comment #16)
> 
> Just for your information, Christian, I pushed a new version of the
> ADL4Eclipse tool today on gerrit, that helps looking at the architecture of
> plugins and feature in Papyrus. That tool lets you reverse the architecture
> of the current platform or plugin/features in the workspace, creating a UML
> view of this architecture. You can then run some analyzes on the result
> model. 

Thanks, yes, this should help a good deal.  The bulk of the work is, of course, in poring over the problems and deciding what to do about them.  But this should make it easier to keep track of the issues, for sure.
Comment 18 Christian Damus CLA 2016-01-08 08:53:51 EST
In any case, the scope of the effort is such that it really has to be staged.  So, I am proceeding from the bottom (infra.core.*) up.  It would be good to actually implement refactorings in a staged manner, too.  The core level refactorings will be most disruptive to the team's parallel development in git, so it would be nice to get those out of the way first, which is why I have a draft gerrit in progress as discussed in comment 13.
Comment 19 Christian Damus CLA 2016-01-08 17:58:57 EST
As I have noted in the Wiki page, I am running into various refactoring problems caused by sloppiness in API controls on our bundle activators.  Every bundle activator has the same name and is exported as public API.  That really needs to change:  these must be internal and their use restricted to the bundle that they belong to only.
Comment 20 Christian Damus CLA 2016-01-08 19:48:10 EST
A new update of the gerrit change 63777 expands the joy by moving UI APIs from the org.eclipse.papyrus.infra.core bundle into org.eclipse.papyrus.infra.ui.  This includes

* moving the 'papyrusDiagram' and 'papyrusContentOutline' extension points
  into the org.eclipse.papyrus.infra.ui namespace
  
* moving various UI-related services such as EditorLifeycleManager,
  SaveLayoutBeforeClose, and the IMultiDiagramEditor, itself, into the
  org.eclipse.papyrus.infra.ui bundle
  
This necessitates not only widespread refactorings on the moved APIs, but also
concomitant move of other APIs in other bundles because they cannot plausibly
use these moved APIs from their new home in org.eclipse.papyrus.infra.ui and/or
they cannot reasonably also be moved to the UI bundle and/or they must be used
by bundles that now have no UI dependency:

* the DI/sash-windows EMF model is moved out of the infra.core.sasheditor.di
  bundle into a new model-only org.eclipse.papyrus.infra.sashwindows.di
  bundle (which symbolic name incidentally now better reflects the contained
  Java package names)
  
* the edit advices dealing with the IPageManager (e.g., for closing pages when
  diagrams are deleted) are moved from the org.eclipse.papyrus.infra.emf
  bundle into org.eclipse.papyrus.infra.ui
  
* the MultiDiagramEditorGefDelegate (which has a GEF 3 dependency) is moved
  from the org.eclipse.papyrus.infra.core.sasheditor bundle to a new
  org.eclipse.papyrus.infra.gmfdiag.gef bundle.  Its usage for an adapter
  of ActionRegistry type is extracted out of the CoreMultiDiagramEditor class
  into a new external adapter-factory in the infra.gmfdiag.gef bundle
  
Tests all still pass (inasmuch as they do in the nightly master builds) and ad hoc tests find no regressions in creation of new models and diagrams and simple editing scenarios in the explorer, diagrams, and properties.

I would expect this to be one of the biggest stages of the refactoring, as so many components use so many of these UI APIs from the infra.core bundle.  I do not look forward to rebasing this change.
Comment 21 Eclipse Genie CLA 2016-01-09 10:04:46 EST
New Gerrit change created: https://git.eclipse.org/r/63777
Comment 22 Camille Letavernier CLA 2016-01-11 05:22:35 EST
> As I have noted in the Wiki page, I am running into various refactoring problems caused by sloppiness in API controls on our bundle activators. Every bundle activator has the same name and is exported as public API. That really needs to change: these must be internal and their use restricted to the bundle that they belong to only.

Since we don't use the Activators (In 99% of the bundles), we could even remove them entirely. They are only used to give a simple access to the Logger (And PLUGIN_ID constant)
Comment 23 Christian Damus CLA 2016-01-11 07:52:24 EST
(In reply to Camille Letavernier from comment #22)
> 
> Since we don't use the Activators (In 99% of the bundles), we could even
> remove them entirely. They are only used to give a simple access to the
> Logger (And PLUGIN_ID constant)

Agreed.  The Activators should be replaced by a LogUtil class that passes calls through to a LogHelper using the appropriate plug-in ID (we don't want all logs to use a foreign ID, right?) and that LogUtil should be private to the plug-in.

It's really the insertion of the Activator into the unneeded bundle lifecycle hooks that is the potential performance problem, I think?  Usually the LogUtil class would only be loaded when the first exception happens.
Comment 24 Eclipse Genie CLA 2016-01-12 14:36:42 EST
New Gerrit change created: https://git.eclipse.org/r/64168
Comment 25 Francois Le Fevre CLA 2016-01-15 09:55:35 EST
Hello,
Once it has been done / or during the move phase, it could be good to ask for the creation of dedicated git repository for for instance papyrus core plugins.

I would also to know if we could also create a dedicated repo for papyrus-emf-facet that do not really change overtime in papyrus.
By doing so, we could reduce also the time of the build: we will never build again papyrus emf facte if we do not touch them. We could add a job on hudson to triggerpapyrus core in case of change in papyrus-emffacte.
Comment 26 Camille Letavernier CLA 2016-01-15 10:02:32 EST
The size of the repository does not affect the build time.

Split repositories only affect developers (Development times) by making their life harder
Comment 27 Christian Damus CLA 2016-01-15 10:02:45 EST
(In reply to Francois Le Fevre from comment #25)
> Hello,
> Once it has been done / or during the move phase, it could be good to ask
> for the creation of dedicated git repository for for instance papyrus core
> plugins.

No.  The Papyrus Main plug-ins should all be in one repository.  Building each component individually and test each component individually are goals.  Managing them separately in git repositories is not a goal.

Note that the refactorings that I am actually implementing cover only the Main and Extras components that are in the papyrus.git repository.  Any components that are taken out into their own repository will not be included in refactorings, so they will break until they are migrated following the Migration Guide that will be published with each refactoring.
Comment 28 Francois Le Fevre CLA 2016-01-15 10:22:50 EST
Hey, I belongs to people that have pushed to continue to refactor the architecture of Papyrus.
I do not agree with the remark that splitting project into separate projects with their own git repository make harder the life of developers. This is the main strategy of software developement: Separation Of Concern.
Many projects of Eclipse have switched to this view.
perhaps they make the life harder for the final builder, but not for the developer.
To my point of view, we should have also a dedicated git reposiotry that holds only the main parent pom, with perhaps some shared scripts for papyrus components.

Thanks for providing the migration guide, it will be very usefull for the migration but also to share the guidelines: for instance, I have baddly copy/paste the Activator pattern to have the loger. It seems it was a bad idea. I will switch to our proposition as soon as possible.

Thanks a lot for this huge effort and the time you all take to explain the situation and the decision.
Comment 29 Eclipse Genie CLA 2016-01-17 12:31:39 EST
New Gerrit change created: https://git.eclipse.org/r/64516
Comment 30 Christian Damus CLA 2016-01-17 12:49:07 EST
(In reply to Eclipse Genie from comment #29)
> New Gerrit change created: https://git.eclipse.org/r/64516

This third Gerrit change now completes the essential UI refactorings for the Infra Layer bundles.  The preceding two changes are rebased again onto the latest Master.

The Migration Guide for these refactorings is ready to go.  It would be great to be able to review and merge these changes this week.
Comment 31 Francois Le Fevre CLA 2016-01-18 08:13:49 EST
Christian
when you say "the migration guide is ready to go", is there a place to look at it?


I have an additional question relative to this new modular architecture.
I am not sure, it is the place to discuss about it.

What about:
- adding Maven nature to all plugins? [1] We have ready spoken about it: Christian has made a good report on this interest to go on it. 
- adding intermediate pom to group togther functionnal units ? for instance for nattable, elementtype [2]. It will allow to have a more visible architecture. I would like we have the matching between the architecvture and the repository layout.
- create the following repositories
-- papyrus-doc move all doc in it? [3], it will reduce the git clone --depth 1
-- papyrus-extra move all extraplugins in it ? [4]

I could do some actions with your agreement.

[1]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=464852
[2]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470576
[3]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=470547
[4]: https://bugs.eclipse.org/bugs/show_bug.cgi?id=486034
Comment 32 Christian Damus CLA 2016-01-18 08:58:56 EST
(In reply to Francois Le Fevre from comment #31)
> Christian
> when you say "the migration guide is ready to go", is there a place to look
> at it?

I have a markdown document on my machine that is ready to be transformed to wikimedia for the Papyrus Wiki and to PDF for easy consumption.  I just don't want to publish it until the refactorings are actually pushed, because otherwise it might cause confusion.

Perhaps there is a way that it could be posted on the Eclipse Wiki in some kind of a draft status that is not visible to users that aren't logged in or aren't editing the wiki?

> I have an additional question relative to this new modular architecture.
> I am not sure, it is the place to discuss about it.
> 
> What about:
> - adding Maven nature to all plugins? [1] We have ready spoken about it:
> Christian has made a good report on this interest to go on it. 

Yes, we should do this, but it's orthogonal to the purpose at hand which is purely an API partitioning/modularity/packaging concern.


> - adding intermediate pom to group togther functionnal units ? for instance
> for nattable, elementtype [2]. It will allow to have a more visible
> architecture. I would like we have the matching between the architecvture
> and the repository layout.
> - create the following repositories
> -- papyrus-doc move all doc in it? [3], it will reduce the git clone --depth
> 1
> -- papyrus-extra move all extraplugins in it ? [4]
> 
> I could do some actions with your agreement.

Again, I think these are all good discussions to have but in a different scope than this bug, which is focused on the API.
Comment 33 Francois Le Fevre CLA 2016-01-18 09:22:55 EST
OK, I doc understand this ticket is focused on API, we will discuss the other points in their owned tickets.

For the migration guide why not publish it, directly in the code in order to enhance the developer documentation. If so, it cold be inside the main papyrus plugin.
For SysML, we have tried to gather information in order to build a dedicated web site for developers. We have used the mecanism of maven site to do it.
We add documentation under a fodler named src/site/xdoc or src/site/markdown, in order to generate the corresponding html, pdf. We have a protype here www.eclipse.org/papyrus-sysml/
Comment 34 Christian Damus CLA 2016-01-18 10:04:27 EST
(In reply to Francois Le Fevre from comment #33)
> 
> For the migration guide why not publish it, directly in the code in order to
> enhance the developer documentation. If so, it cold be inside the main
> papyrus plugin.

Yes, that's certainly a possibility.  The wiki is probably an easier place to manage contributions/edits, and I would link to that in the Papyrus Developer Guide in the org.eclipse.papyrus.doc bundle.
Comment 35 Christian Damus CLA 2016-01-19 08:35:56 EST
François raised a good question in code review:  Do we want all UI-oriented bundles in Papyrus to include a "ui" segment in the plug-in ID?  I would recommend that for consistency with every other Eclipse project.

The next question, if the first is agreed "yes", would be how to formulate these UI-bundle names.  Would the pattern be

   org.eclipse.papyrus.ui.<layer>.<specific...>

or
   org.eclipse.papyrus.<layer>.ui.<specific...>

or

   org.eclipse.papyrus.<layer>.<specific...>.ui[.<more>]

which is to say, would the headless/UI partitioning be a primary, layer-wise, or low-level architectural dimension?
Comment 36 Camille Letavernier CLA 2016-01-19 10:43:53 EST
For Diagrams, Tables and other views, we agreed (Back in 0.9/Juno) that the language was first (org.eclipse.papyrus.uml.*, oep.sysml.*, ...), then the technology (.diagram, .table, ...) then the specifics

So that would be either org.eclipse.papyrus.<layer>.ui.<specific> or oep.<layer>.<specific>.ui (I prefer the later)

That would also make sense for Diagrams if we split the Runtime part from the GEF3.x dependencies (oep.uml.diagram.clazz vs oep.uml.diagram.clazz.ui)

Now, while this obviously makes sense for new or split bundles, I'm not sure if that's a good idea for existing UI bundles that don't contain the *.ui segment. Certainly for consistency, but this introduces more changes that may not be absolutely required. So... I don't know for this case (e.g. the tables will mostly be unaffected by the refactoring, so do we really want to rename them all? That includes changing URIs to Table configurations and such, meaning that the user models will need to be migrated, etc. Seems a lot of pain for a very minor gain).

The same goes for the current "views" layer, which is obviously a UI layer already, and may not need to go through a complete renaming (Which might break a lot of Facets/Customs and Properties view URIs)
Comment 37 Christian Damus CLA 2016-01-19 10:50:23 EST
(In reply to Camille Letavernier from comment #36)
> For Diagrams, Tables and other views, we agreed (Back in 0.9/Juno) that the
> language was first (org.eclipse.papyrus.uml.*, oep.sysml.*, ...), then the
> technology (.diagram, .table, ...) then the specifics

Works for me.


> So that would be either org.eclipse.papyrus.<layer>.ui.<specific> or
> oep.<layer>.<specific>.ui (I prefer the later)
> 
> That would also make sense for Diagrams if we split the Runtime part from
> the GEF3.x dependencies (oep.uml.diagram.clazz vs oep.uml.diagram.clazz.ui)
> 
> Now, while this obviously makes sense for new or split bundles, I'm not sure
> if that's a good idea for existing UI bundles that don't contain the *.ui
> segment. Certainly for consistency, but this introduces more changes that
> may not be absolutely required. So... I don't know for this case (e.g. the

Yes, perhaps best not to change these existing names without a good API reason.


> The same goes for the current "views" layer, which is obviously a UI layer
> already, and may not need to go through a complete renaming (Which might
> break a lot of Facets/Customs and Properties view URIs)

There was actually one case in the "views" layer that I would like to change:

  org.eclipse.papyrus.view.properties.model

This is required by several "infra" layer plug-ins, and is really a core model for the Papyrus tooling, so it would be nice to rename it as

  org.eclipse.papyrus.infra.properties

(without the .model, which is conventionally omitted in EMF model bundles)

Responses to that?
Comment 38 Camille Letavernier CLA 2016-01-19 11:44:00 EST
> There was actually one case in the "views" layer that I would like to change:

Yes, I noticed this one as well when looking at the views layer. +1
Comment 39 Eclipse Genie CLA 2016-01-20 22:03:44 EST
New Gerrit change created: https://git.eclipse.org/r/64823
Comment 40 Eclipse Genie CLA 2016-01-21 16:52:44 EST
New Gerrit change created: https://git.eclipse.org/r/64929
Comment 46 Christian Damus CLA 2016-01-22 15:00:00 EST
The five Gerrit patches implementing the proposed refactorings in the Infra Layer for the M5 milestone are pushed to master.

A first draft of the Papyrus 2.0 Migration Guide covers the details, to help Papyrus extenders to adopt these changes:

https://wiki.eclipse.org/Papyrus/Migration_Guide/Neon
Comment 47 Christian Damus CLA 2016-01-25 09:21:04 EST
Created attachment 259365 [details]
Successful update of properties bundles

The attached image shows a successful update of the renamed Properties Model bundles.  The p2.inf instructions let the p2 engine understand the renaming, so the org.eclipse.papyrus.infra.properties* bundles correctly replaced the org.eclipse.papyrus.views.properties.model* bundles in an update from the nightly build repository.

And using the p2 UI to roll back the install to the previous bundles works, too.  So, all in all, this refactoring doesn't impede smooth update for end users.
Comment 48 Camille Letavernier CLA 2016-01-25 09:35:38 EST
> The attached image shows a successful update of the renamed Properties Model bundles. The p2.inf instructions let the p2 engine understand the renaming, so the org.eclipse.papyrus.infra.properties* bundles correctly replaced the org.eclipse.papyrus.views.properties.model* bundles in an update from the nightly build repository.

If you had installed the Papyrus UML feature, then p2.inf would probably not be necessary anyway. P2 properly handles the "included" elements (Features + Plugins), for additions, updates and removals

What is not properly handled is the dependencies between plug-ins from different features. So for example if you installed an extra feature of Papyrus and let it pull all the dependencies it needs, it would fetch the latest version. Then if you updated this extra feature, it would consider that all its dependencies are resolved, and wouldn't update Papyrus plug-ins again. Local bundles would also add to the chaos (e.g. If you updated Papyrus to the refactored branch without updating Git), but then I'm not sure p2.inf would be used anyway

So a relevant scenario would be:

- Don't install Papyrus
- Create a plug-in depending on Papyrus 1.1.0 (With a dependency to oep.views.properties)
- Install this plug-in and let it pull all the dependencies it needs (That would include views.properties and views.properties.model plus a few others)
- Change this plug-in to depend on Papyrus 1.2.0/2.0.0 (Or add an explicit dependency to oep.infra.properties, as I don't think the version numbers have been changed yet)
- Update this plug-in

Since Papyrus in this scenario is not installed, P2 will not try to update it (Unless new dependencies are required, in which case it will only update/install these new dependencies). This causes much more chaotic updates (And a more relevant test case :) )
Comment 49 Camille Letavernier CLA 2016-01-25 09:52:56 EST
> So a relevant scenario would be:

I've done that and it works as well :)
Comment 50 Christian Damus CLA 2016-01-25 09:53:42 EST
(In reply to Camille Letavernier from comment #49)
> > So a relevant scenario would be:
> 
> I've done that and it works as well :)

That was fast!  I was just about to do the same experiment.  Thanks for saving me the trouble.
Comment 51 Eclipse Genie CLA 2016-01-25 12:19:20 EST
New Gerrit change created: https://git.eclipse.org/r/65120
Comment 52 Christian Damus CLA 2016-01-25 13:35:18 EST
(In reply to Eclipse Genie from comment #51)
> New Gerrit change created: https://git.eclipse.org/r/65120

This is a first step to enforcing headless API bundles:  a test suite that includes all of the tests that can, and henceforth must be able to, run in "headless mode".

A new @Headless annotation for a bundle's AllTests suite class asserts that the tests included in it run in headless mode.  Suites that are thus annotated are collected automatically in the AllHeadlessTests super-suite, which makes it easy to run all headless tests (and which, without all of the UI overhead, doesn't take long at all to run).

Thus, this new suite is actually a good candidate for execution in the Gerrit builds!
Comment 54 Benoit Maggi CLA 2016-01-29 03:20:48 EST
org.eclipse.papyrus.infra.viewpoints.policy is using icons from org.eclipse.papyrus.infra.viewpoints.configuration.edit 
(See Bug 486708)

@Christian: Are you aware of this point? Do you intend to change that during the refactoring?
Comment 55 Christian Damus CLA 2016-01-29 07:04:55 EST
(In reply to Benoit Maggi from comment #54)
> org.eclipse.papyrus.infra.viewpoints.policy is using icons from
> org.eclipse.papyrus.infra.viewpoints.configuration.edit 
> (See Bug 486708)
> 
> @Christian: Are you aware of this point? Do you intend to change that during
> the refactoring?

No, I wasn't aware of this.  I have been fixing a number of cases where Infra Layer bundles pull images out of UML Layer bundles, which of course totally doesn't work in an UML-less deployment.  However, the situation that you have is contained within the viewpoint bundles, so it's not in the scope of this refactoring.  So, no, I am not planning to do anything about it.
Comment 56 Eclipse Genie CLA 2016-02-09 01:46:13 EST
New Gerrit change created: https://git.eclipse.org/r/66171
Comment 58 Eclipse Genie CLA 2016-02-13 09:55:12 EST
New Gerrit change created: https://git.eclipse.org/r/66549
Comment 60 Eclipse Genie CLA 2016-02-19 14:16:31 EST
New Gerrit change created: https://git.eclipse.org/r/66959
Comment 62 Eclipse Genie CLA 2016-02-24 19:43:11 EST
New Gerrit change created: https://git.eclipse.org/r/67303
Comment 64 Eclipse Genie CLA 2016-02-26 09:05:25 EST
New Gerrit change created: https://git.eclipse.org/r/67413
Comment 66 Eclipse Genie CLA 2016-03-01 14:45:25 EST
New Gerrit change created: https://git.eclipse.org/r/67624
Comment 68 Eclipse Genie CLA 2016-04-29 12:20:47 EDT
New Gerrit change created: https://git.eclipse.org/r/71721
Comment 70 Christian Damus CLA 2017-03-21 14:22:01 EDT
The Papyrus team has done some work in Oxygen to partition the test builds and to break out components into separate repositories.  Returning this bug to the pool for re-assessment.