Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331787 - [core] Core should NOT depends on diagram or domain technologies (EMF, GMF, GEF, ...)
Summary: [core] Core should NOT depends on diagram or domain technologies (EMF, GMF, G...
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.7.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-03 12:13 EST by Cedric Dumoulin CLA
Modified: 2014-03-25 15:41 EDT (History)
4 users (show)

See Also:


Attachments
mylyn/context/zip (2.03 KB, application/octet-stream)
2010-12-03 15:52 EST, Cedric Dumoulin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cedric Dumoulin CLA 2010-12-03 12:13:51 EST
The core purpose is to provide a kind of container where diagrams and services can be plugged.
The core is not a repository where to put packages that we don't now where to put :-).
A Service should usually be developed in its own plugin.

The core dependencies should only be on projects or packages required to provide the core basis.
The core should not depends on projects, technologies or packages required by the diagrams or the services themself. 
Such dependencies should be in the diagram, in the service, or in a common plugin used as basis for this technology.

Some (historical) dependencies remains, but will be removed as soon as possible. It is asked to not use this dependencies or add new dependencies.

The following action are to be done:
 - Remove the automatic  dependencies export from plugin imported by the core 
 	- ex: ecore, swt, sasheditor from sasheditor.di
 - do not reexport dependencies on 
     - org.eclipse.gmf.runtime.diagram.ui
     - org.eclipse.emf.edit.ui
 - Add such dependencies in plugins requiring them
 - Move in another plugin classes with dependencies on EMF, GMF, ... 
   (example of such classes :
     /org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/PapyrusEcoreUtils.java
     /org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/ValidationUtils.java
    /org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/CrossReferencerUtil.java
Comment 1 Cedric Dumoulin CLA 2010-12-03 15:52:33 EST
Created attachment 184512 [details]
mylyn/context/zip

Classes and files requiring actions
Comment 2 Yann Tanguy CLA 2010-12-06 07:36:22 EST
In r3435:
/org.eclipse.papyrus.core/src/org/eclipse/papyrus/core/utils/CrossReferencerUtil.java
moved to 
/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/util/CrossReferencerUtil.java
Comment 3 Ansgar Radermacher CLA 2010-12-06 08:54:17 EST
In need to move the ValidationUtil to a plugin on which all diagrams and the model explorer depend.
Thus, diagrams.common is not a good choice (apart from the fact that this plugin is very "big" already).
Does someone CC'ed on this bug have an idea into which plugin ValidationUtil should be moved?
If not, I propose to create a new plugin org.eclipse.papyrus.util in which we could put things that are commonly used, but neither diagram nor UML specific.
Comment 4 Cedric Dumoulin CLA 2010-12-06 10:07:07 EST
My point of view is that is not a good idea to create a "utils" plugin that will serve as fall down for all classes that we don't know where to put. If such  plugin exist, it will grow unexpectedly because we will put everything in it After a while, we will not be able to maintain correctly the plugin.

For your "validation" classes, I think that you really should create a "validation" plugin that we can plug or unplug. Furthermore, the modelexplorer plugin should not be aware of such classes: it should just provide the basis enabling plug/unplug of a validation plugin, regardless of the implementation and of the domain technology (here EMF).
Comment 5 Camille Letavernier CLA 2013-03-25 08:32:41 EDT
Current status:

- The core does not depend on GMF
- The code depends on GEF (Whereas it shouldn't)
- The core editor depends on EMF (And this is required)

Only the GEF dependency is still a problem, and it seems it can't be easily removed.
Comment 6 Mathieu Velten CLA 2013-03-25 09:06:37 EDT
I don't think this is that important, I would even prefer to have GMF runtime (not notation !) in the core to handle all the commands compatibility layer in it. I am ok that we should not depend on diagrams/tables technologies in the core but going further than that is overkill to me.
Comment 7 Camille Letavernier CLA 2014-03-25 15:41:00 EDT
The current status (From Comment 5) is acceptable

I close the task