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

Bug 309858

Summary: Public class BorderedNodeFigure exposes internal interface IExpandableFigure
Product: [Modeling] GMF-Runtime Reporter: Dusko <dmisic>
Component: GeneralAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: aboyko, ahunter.eclipse, wdiu
Version: unspecified   
Target Milestone: 2.3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to fix the issue.
none
Patch to fix the issue.
none
Patch to fix the issue. none

Description Dusko CLA 2010-04-20 15:24:40 EDT
Build Identifier: Eclipse 3.6,  build id I20100406-1034

Public class"org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure" exposes internal interface "org.eclipse.gmf.runtime.diagram.ui.internal.figures.IExpandableFigure". That breaks public API contract.

Marking as major because of firm requirement to use public API only and this implementation brings in internal API usage indirectly.

Reproducible: Always

Steps to Reproduce:
1. Please see the BorderedNodeFigure class.
2.
3.
Comment 1 Anthony Hunter CLA 2010-04-28 21:04:14 EDT
Created attachment 166408 [details]
Patch to fix the issue.

Alex can you review the patch?

I moved IExpandableFigure to the public package.
I left the original in the internal package, but made it deprecated and extending the public version.
All usages of IExpandableFigure in GMF have been changed to use the public version.

API Tools reports no errors, so we look to be good and are not introducing any binary incompatible changes.
Comment 2 Anthony Hunter CLA 2010-04-28 21:10:21 EDT
Created attachment 166409 [details]
Patch to fix the issue.

Alex, review this one instead. The previous patch showed the entire file replaced to two of the changes and not just the imports. 

Interestingly Syed had the same issue with his patch, every line changed and not just the real changes in the patch.
Comment 3 Alex Boyko CLA 2010-04-29 10:22:14 EDT
Looks good to me.
Just one thing, there seems to be a few more references to the internal IExpandableFigure that the patch misses:
 - GroupFigure
 - BorderItemContainerFigure
 - GroupTests
BTW, these could be corrected at a later time.

Anyway, looks good!
Comment 4 Dusko CLA 2010-04-29 11:19:08 EDT
If we are fixing this then I think we should fix those remaining references as well.
Comment 5 Anthony Hunter CLA 2010-04-29 14:13:03 EDT
Created attachment 166540 [details]
Patch to fix the issue.

New patch. I fixed the three classes that referenced the internal IExpandableFigure. I somehow missed them the first time. Since these also are just fixing imports I figure we are good to commit.
Comment 6 Anthony Hunter CLA 2010-04-29 14:39:17 EDT
Committed to HEAD for Helios
Comment 7 Eclipse Webmaster CLA 2010-07-16 23:38:28 EDT
[target cleanup] 2.3 M7 was the original target milestone for this
bug
Comment 8 Eclipse Webmaster CLA 2010-07-19 12:30:27 EDT
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug