Bug 391945 - [Refactoring] Part 2: Refactoring on Kepler (0.10)
Summary: [Refactoring] Part 2: Refactoring on Kepler (0.10)
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: M4   Edit
Assignee: Camille Letavernier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 359057
  Show dependency tree
 
Reported: 2012-10-15 11:35 EDT by Camille Letavernier CLA
Modified: 2013-03-08 08:08 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Camille Letavernier CLA 2012-10-15 11:35:13 EDT
The second part of the refactoring should be completed before Kepler M4 (2012/12/19) at worst. End of november at best (Between M3 and M4).

Here are the main steps:

-	Fix the core plug-ins of Papyrus (e.g. infra.core.*)
	-	Remove all UML and GMF dependencies from these plug-ins. Replacement methods will be provided in external plug-ins (e.g. uml plug-ins for uml-dependent methods, gmfdiag plug-ins for gmf-dependent ones)
	-	Implement a new version of the ServicesRegistry
-	Implement new services to reduce the couple for generic services (e.g. retrieve the semantic model root and libraries, instantiate technology-specific label providers, etc.)
-	Cleanup the deprecated code whenever a replacement is available (Especially in core components)
-	Cleanup all technology-specific components to remove unwished dependencies (e.g. hyperlink -> table) (Based on the new services)
-	Provide a migration guide for Papyrus extenders
Comment 1 Camille Letavernier CLA 2012-10-15 12:35:02 EDT
r9209, 9210:

Initial refactoring of the core plug-ins, and propagation to all dependent plug-ins. 

- Most dependencies to UML and GMF have been removed (GMF dependencies for the CoreMultiDiagramEditor have been replaced by an AdapterFactory in infra.gmfdiag.common)
- UML and Notation IModels have been moved to uml.tools and infra.gmfdiag.common
- BusinessModelResolver has been moved to infra.emf
- Most methods from the DiResourceSet have been removed, to remove the dependencies to Notation and UML IModels. They've been replaced with helpers in respective plug-ins (uml.tools and infra.gmfdiag.common), e.g. NotationUtils.getNotationResource(ModelSet) instead of DiResourceSet#getNotationResource()
- PapyrusEcoreUtils (from infra.core) has been merged in EMFHelper (from infra.emf). 
- IRevealSemanticElement has been moved to infra.widgets instead of infra.core. We may need a more generic plug-in on top of infra.widgets, and this interface may move again. Maybe infra.tools.

New services will be required to go further, as we cannot yet decouple the declaration (interfaces) from the instantiation (implementation).
Comment 2 Camille Letavernier CLA 2012-11-23 05:58:34 EST
r9457:

- Replace most calls to EditorUtils#... (Which relies on the Active Editor) by specific implementations of ServiceUtils (Which relies on a specific context, such as the selection or the IWorkbenchPart on which the handler is invoked)
- New implementations of ServiceUtils have been provided to help manipulating the Papyrus services/ServiceRegistry
- A few classes have been moved to a more appropriate plug-in:
	- SemanticElementHelper from oep.infra.gmfdiag.css to oep.infra.gmfdiag.common
	- LabelProvider-related classes/interfaces from oep.infra.widgets to oep.infra.services.labelprovider
	
UML Diagrams have not been changed (Most of them still rely on the deprecated EditorUtils#... methods)
Comment 3 Camille Letavernier CLA 2012-11-23 06:03:14 EST
r9458: Minor fix of the previous commit (Invalid contribution in oep.uml.modelexplorer/plugin.xml)
Comment 4 Camille Letavernier CLA 2012-11-23 09:11:58 EST
r9462:

- Fix dependencies
Comment 5 Camille Letavernier CLA 2012-12-05 08:06:34 EST
r9570 - 9572:

Hyperlink refactoring. The Hyperlink feature has been moved to its own set of features (infra.hyperlink, infra.gmfdiag.hyperlink, infra.table.common)

The Hyperlink EditPolicy is now provided by infra.gmfdiag.hyperlink, which makes all diagram independent from the Hyperlink feature
Comment 6 Camille Letavernier CLA 2012-12-06 07:32:23 EST
r9583:

Modifications of the Diagram Hyperlinks:

- Hyperlinks can now handle "Papyrus Pages" (Relying on the Papyrus IPageMngr). We don't need to distinguish Tables and Diagrams anymore
- The EAnnotations PapyrusHyperLink_Diagram and PapyrusHyperLink_Table have been removed, and are now replaced with a single EAnnotation, named PapyrusHyperLink_Page (Old EAnnotations are still supported, but only the new one will be created).
- Consequently, oep.infra.table.common doesn't depend on infra.hyperlink anymore. There are now only two plug-ins contributing hyperlinks:
	- infra.hyperlink: general infrastructure
	- infra.gmfdiag.hyperlink: EditPolicies & specific diagram-related tab
Comment 7 Camille Letavernier CLA 2012-12-07 07:34:04 EST
r9592:

Removed a few more calls to deprecated EditorUtils# methods, especially in UML Diagrams
Comment 8 Camille Letavernier CLA 2013-03-08 08:08:54 EST
Status of the Kepler refactoring:

The following tasks have been completed:
> -	Fix the core plug-ins of Papyrus (e.g. infra.core.*)
> -	Implement new services to reduce the couple for generic services (e.g. retrieve the semantic model root and libraries, instantiate technology-specific label providers, etc.)
> -	Cleanup all technology-specific components to remove unwished dependencies (e.g. hyperlink -> table) (Based on the new services)

Partially (mostly) complete:
> -	Remove all UML and GMF dependencies from these plug-ins. Replacement methods will be provided in external plug-ins (e.g. uml plug-ins for uml-dependent methods, gmfdiag plug-ins for gmf-dependent ones)
> -	Cleanup the deprecated code whenever a replacement is available (Especially in core components)

Postponed:
> -	Implement a new version of the ServicesRegistry
The initial version of the ServicesRegistry has been improved to allow the refactoring. The new implementation should be available in Kepler M6-M7, and will progressively replace the current one.