Bug 117537 - Mark our public interfaces as not meant to be implemented
Summary: Mark our public interfaces as not meant to be implemented
Status: RESOLVED FIXED
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P1 major
Target Milestone: 1.0   Edit
Assignee: Cherie Revells CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2005-11-22 13:03 EST by Cherie Revells CLA
Modified: 2008-08-13 13:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cherie Revells CLA 2005-11-22 13:03:17 EST
If a client is implementing an interface in our public API, it is not possible to add a method to that interface without breaking the client code.  We should look through our interfaces and indicate in the javadoc that they are not meant to be implemented.

For example, the EditPolicy interface in GEF says the following:
 * IMPORTANT: This interface is <EM>not</EM> intended to be implemented by clients. 
 * Clients should inherit from {@link org.eclipse.gef.editpolicies.AbstractEditPolicy}.  
 * New methods may be added in the future.

Examples in our code:  
IDecoratorProvider -- we should create an AbstractDecoratorProvider and clients should subclass this instead.

I'm not sure if there are more cases in our code.  Maybe we should do a search.
Comment 1 Steven R. Shaw CLA 2005-11-22 19:28:41 EST
We should also check for class that we don't want people to extend and mark them final.  i.e. Services...
Comment 2 Steven R. Shaw CLA 2006-02-27 11:35:45 EST
moving to M6
Comment 3 Steven R. Shaw CLA 2006-03-09 15:01:30 EST
Move to RC
Comment 4 Cherie Revells CLA 2006-04-24 13:28:27 EDT
Marked the following interfaces as "not meant to be implemented":
oegr.diagram.core.providers.IViewProvider -- Subclass AbstractViewProvider instead.
oegr.diagram.ui.actions.ActionIds -- Defines constants only.
oegr.diagram.ui.editpolicies.EditPolicyRoles -- Defines constants only.
oegr.diagram.ui.figures.DiagramColorConstants -- Defines constants only.
oegr.diagram.ui.preferences.IPreferenceConstants -- Defines constants only.
oegr.diagram.ui.requests.RequestConstants -- Defines constants only.
oegr.diagram.ui.services.decorator.IDecoratorKeys -- Defines constants only.
oegr.diagram.ui.services.decorator.IDecoratorTarget -- The service creates and uses the implementor internally.  No need to implement.
oegr.diagram.ui.services.editpart.IEditPartOperation -- No reason for clients to subclass.  Used by the editpart service only.
oegr.diagram.ui.services.palette.PaletteFactory -- Subclass the empty adapter class provided instead.
oegr.diagram.ui.render.ui.render.actions.ActionIds -- Defines constants only.

It is too late to mark classes as final.
Comment 5 Richard Gronback CLA 2008-08-13 13:04:10 EDT
[target cleanup] 1.0 RC was the original target milestone for this bug
Comment 6 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