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

Bug 321456

Summary: Changes added to GMF notation model breaks API compatibility between Eclipse 3.4/3.6 in the datatools code
Product: [Modeling] GMF-Runtime Reporter: Rekha <nrekha>
Component: NotationAssignee: Project Inbox <gmf-notation-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: aboyko, ahunter.eclipse, lgrahek, lj, lozanoj
Version: 2.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Rekha CLA 2010-08-01 05:52:13 EDT
Build Identifier: 3.6 - I20100507

In Eclipse 3.6, the following changes have been added to the GMF Notation Model version. Those EMF changes are not compatible with Eclipse 3.4
	* Gradient and Transparency have been added to the GMF notation Model. 
	* DATA_LINE_STYLE__ROUNDED_BENDPOINTS_RADIUS  was added to the GMF notatation Model


Reproducible: Always
Comment 1 Anthony Hunter CLA 2010-08-12 15:59:56 EDT
When you say these have been added and are not compatible with Eclipse 3.4, what does that mean?

Are you extending the notation model?
Comment 2 Loic JULIEN CLA 2010-08-17 14:32:35 EDT
(In reply to comment #1)
> When you say these have been added and are not compatible with Eclipse 3.4,
> what does that mean?
> 
> Are you extending the notation model?

Hi Anthony, 

You are correct, we are extending the GMF Notation Model. Those additional attributes were not in the 3.4 GMF Notation Model and our GMF extension will not allow to correctly create our diagram elements under 3.6 due to this.

Let me know if this clarifies enough or if you would like additional information.
~Loic
Comment 3 Anthony Hunter CLA 2010-09-02 14:59:21 EDT
In this case, you will need to rebuild your notational meta model that is extending the GMF Notation Model.

(In reply to comment #0)
> Build Identifier: 3.6 - I20100507
> 
> In Eclipse 3.6, the following changes have been added to the GMF Notation Model
> version. Those EMF changes are not compatible with Eclipse 3.4
>     * Gradient and Transparency have been added to the GMF notation Model. 
>     * DATA_LINE_STYLE__ROUNDED_BENDPOINTS_RADIUS  was added to the GMF
> notatation Model
> 

These are API additions, there is no way to remove or "correct" the API in this case. Unfortunately, this is a no plan to fix.
Comment 4 Anthony Hunter CLA 2010-09-03 17:11:16 EDT
Loic, You must have this problem:

You are extending the GMF Notational Metamodel and have a ZZZStyle that extends ShapeStyle (rather than just extending Style).

You generate the code in Eclipse 3.4 for the 3.4 based App.

Then you bring the code into a Eclipse 3.6 target and you get compile errors:

The type ZZZStyleImpl must implement the inherited abstract method FillStyle.getGradient().
Etc.

ShapeStyle extends FillStyle and FillStyle has new method getGradient() in 3.6 (actually in 3.5).

Because of the additions, you will need to regenerate your code in Eclipse 3.6. This is the usual simple exercise to do.

However, as a result, the code will no longer compile in the Eclipse 3.4 target. If I understand correctly, that is the issue, the same code will not work in both 3.4 and 3.6.

I am not sure really what the contact is here, as you are extending the metamodel, rather than just using it. By extending the styles, you are tying your application to a particular version of the notation.

I am not sure why you tied yourself to ShapeStyle. If you are just adding a new style, why not extend Style? If ZZZStyle extended Style, then this compatibility issue does not occur.