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

Bug 422957

Summary: Remove all deprecated APIs in Sirius
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: CoreAssignee: Pierre-Charles David <pierre-charles.david>
Status: CLOSED FIXED QA Contact: Maxime Porhel <maxime.porhel>
Severity: normal    
Priority: P3 CC: cedric.brun, florian.barbin, laurent.redor, maxime.porhel
Version: unspecifiedKeywords: triaged
Target Milestone: 1.0.0M6   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=423406
Whiteboard:

Description Pierre-Charles David CLA 2013-12-02 09:42:51 EST
Sirius contains a lot of deprecated APIs, which we refrained from removing, sometimes for a long time, to ensure backward compatibility in the Viewpoint days. With the switch to Sirius which imposes large-scale API breakage (because of the rebranding), it is a good time to remove these.

Note that this ticket is about deprecated APIs defined in Sirius, not Sirius's usage of deprecated APIs from other products (this is bad too, but another subject).

We should review all elements which are marked as deprecated:
* If a better alternative already exists (which should be the more common case), remove the legacy version and make sure all Sirius code use the new version.
* If no better alternative exists (sometimes we marked stuff as deprecated to remind us that we should find a better solution but never got the time to do it), either create a bugzilla for it, implement the alternative if it is not too costly (and migrate to it as above), or remove the deprecation and create a bugzilla to remember that some sub-optimal mechanism should be replaced.
Comment 1 Pierre-Charles David CLA 2013-12-05 10:00:59 EST
Note that the initial description mentions "APIs", but we should not limit ourselves to cleaning up public APIs: while it is less a priority, "internal APIs" shoudl also be cleaned up.
Comment 2 Laurent Redor CLA 2013-12-09 09:23:10 EST
All deprecated tags have been removed (some still under review).
See these commits for more details: 
* http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=a7a66bc0b60a24f862b73dc41bbd5c095d27d913
* http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=a99b7506fbd222c221eb7fb667421ee9b76966a6
* http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c4ab02c594517ea6b5802485a478ae7795313934

Pending  reviews:
* https://git.eclipse.org/r/#/c/19486/
* https://git.eclipse.org/r/#/c/19501/

After that, there will still be 19 matches to "@deprecated" corresponding to static getPackage method of the generated EMF "*FactoryImpl" classes.
Comment 4 Cedric Brun CLA 2013-12-27 11:04:31 EST
org.eclipse.sirius.business.api.session.SessionManagerListener still is deprecated and already has a replacement with SessionManagerListener2 .

We should probably merge both in a single listener.

Not that I think this API is the best in the world but it proved to be quite useful and one of the first en encounter from an adopter perspective.
Comment 5 Laurent Redor CLA 2014-01-08 10:13:23 EST
Cédric: Indeed, all "@Deprecated" java annotations were missed during the previous iteration.
Comment 6 Pierre-Charles David CLA 2014-01-21 05:14:26 EST
Moving to M6 for the remaining bits.
Comment 7 Florian Barbin CLA 2014-02-03 05:33:59 EST
New pending reviews:

* https://git.eclipse.org/r/21439
* https://git.eclipse.org/r/21440
* https://git.eclipse.org/r/21441

those reviews concern the merge of SessionManagerListener with SessionManagerListener2:

* https://git.eclipse.org/r/21444
* https://git.eclipse.org/r/21449
Comment 8 Florian Barbin CLA 2014-02-03 05:38:01 EST
(In reply to Florian Barbin from comment #7)
> New pending reviews:
> 
> * https://git.eclipse.org/r/21439
> * https://git.eclipse.org/r/21440
> * https://git.eclipse.org/r/21441
> 
> those reviews concern the merge of SessionManagerListener with
> SessionManagerListener2:
> 
> * https://git.eclipse.org/r/21444
> * https://git.eclipse.org/r/21449

The release note is not yet updated.
Comment 9 Florian Barbin CLA 2014-02-04 05:06:48 EST
Two more gerrit reviews:

* https://git.eclipse.org/r/21496
* https://git.eclipse.org/r/21502
Comment 10 Florian Barbin CLA 2014-02-04 08:39:43 EST
After this work, it will remain all the "@deprecated" into the generated code.
Comment 11 Pierre-Charles David CLA 2014-03-04 09:55:57 EST
See also  https://git.eclipse.org/r/22857 and https://git.eclipse.org/r/22858
Comment 12 Pierre-Charles David CLA 2014-03-05 05:36:17 EST
All the remaining deprecated code is in some way or another linked to the metamodel(s) definitions, and they will all be treated in that context (see bug 427247). This includes https://git.eclipse.org/r/22858 mentioned above, which was abandoned in the scope of this ticket.
Comment 13 Maxime Porhel CLA 2014-03-07 05:39:07 EST
Verified as technical issue on 1.0.0-N20140306-1631 nightly build.
Comment 14 Pierre-Charles David CLA 2014-03-17 10:07:11 EDT
Available in Sirius 1.0.0M6 (see https://wiki.eclipse.org/Sirius/1.0.0M6).