Bug 244123 - [JFace] SWTUtil should be in only one place
Summary: [JFace] SWTUtil should be in only one place
Status: RESOLVED DUPLICATE of bug 253798
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2008-08-14 02:41 EDT by Francis Upton IV CLA
Modified: 2008-11-04 19:17 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Upton IV CLA 2008-08-14 02:41:38 EDT
There are a lot of SWTUtil classes in various projects, and other things like that that have similar or identical implementation of the same set of utility methods.  

To start with we should make a single implementation of this in SWT so that the other versions can gradually be removed (and the main implementation enhanced as required).  This would be an excellent project for a SOC student, and Dave Carver has someone in mind.
Comment 1 Steve Northover CLA 2008-08-14 16:08:14 EDT
SWT won't do this.  We can't decide which methods are used (good) and which ones are not.  It's up to application code to share code how it sees fit, not a system library.

Is UI interested in owning the SWTUtil to rule the world?
Comment 2 David Carver CLA 2008-08-14 17:29:11 EDT
This actually is a good thing, that needs to happen.   Too many places are duplicating common utility classes and methods, just because they aren't available as API.    This type of refactoring while it can  affect a lot of projects is long term a good thing to do.   I'd mark this as bug day at least to get some community help, but Steve you are right, it needs a home...Hopefully though it doesn't become a Not In My Backyard item.
Comment 3 Kim Horne CLA 2008-08-14 21:13:41 EDT
Aww geez, not in my backyard...
Comment 4 Boris Bokowski CLA 2008-08-15 01:08:54 EDT
JFace is an obvious choice, but we would need to be specific - how much code duplication is there in the Eclipse SDK (and beyond)?
Comment 5 Francis Upton IV CLA 2008-08-15 01:42:15 EDT
Dave, maybe Laknath can do this research?  There are some classes in org.eclipse.ui.navigator.tests called DisplayHelper, DisplayWaiter, and SWTEventHelper that might contain similar functionality as SWTUtils.  Maybe searching for certain method names will yield good results.
Comment 6 Francis Upton IV CLA 2008-11-04 19:17:34 EST

*** This bug has been marked as a duplicate of bug 253798 ***