Bug 300776 - [JFace] Too many SWTFactory classes
Summary: [JFace] Too many SWTFactory classes
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-26 03:48 EST by Udo Walker CLA
Modified: 2019-09-06 16:12 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Udo Walker CLA 2010-01-26 03:48:40 EST
Build Identifier: 20090619-0625

I found many SWTFactory classes in my Eclipse installation:

org.eclipse.debug.internal.ui.SWTFactory
org.eclipse.pde.api.tools.ui.internal.SWTFactory
org.eclipse.jdt.internal.debug.ui.SWTFactory
org.eclipse.pde.internal.ui.SWTFactory

probably there more of these classes.

All of them contain similar or exactly the same methods and method bodies. Why is there not only 1 class? Maybe it should be located in the SWT main bundle already?

Reproducible: Always
Comment 1 Udo Walker CLA 2010-01-26 03:51:46 EST
It would be good to be able to use it from my own plugin, too.
Comment 2 Remy Suen CLA 2010-01-26 06:05:46 EST
I somehow doubt that SWT would take this. Maybe UI, maybe.
Comment 3 Felipe Heidrich CLA 2010-01-26 09:11:27 EST
SWT doesn't have any class by the name SWTFactory, 
Debug has one
JDT has one
PDE has two

I'll send this bug to PDE first, not sure if they will be able to changed it.
Comment 4 Darin Wright CLA 2010-01-26 09:16:54 EST
The factory classes are not API - they are internal utility classes. I agree it would be good to centralize the code someplace - but PDE, JDT, and Debug are too high on the food chain. Moving to platform UI for consideration.
Comment 5 Olivier Thomann CLA 2010-01-26 09:21:57 EST
We need to check that there is no usage of these internal classes outside of Eclipse bundles.
Comment 6 Gabriel BARBIER CLA 2010-02-15 09:16:06 EST
(In reply to comment #5)
> We need to check that there is no usage of these internal classes outside of
> Eclipse bundles.

Hello,
We are using this class (from org.eclipse.debug) in MoDisco project (Modeling/GMT). And we planned to ask for a promotion to have a public access to this class. As it is required to suppress warnings about discouraged access to join Helios train.

Regards,
Gabriel
Comment 7 Udo Walker CLA 2010-02-16 04:24:08 EST
(In reply to comment #5)
> We need to check that there is no usage of these internal classes outside of
> Eclipse bundles.

Why do you want to hide this class? All of the implementations have similar functionality, some have exactly the same methods, so I think the second developer also wanted to use that functionality but couldn't use it because it was internal and so just "copied" it in his own plugin, also in the internal area because it is just a helper class. If it would be public and in a place where it belongs to, e.g. SWT or JFace or platform ui then everybody can use it without duplicating it.
Comment 8 Eclipse Webmaster CLA 2019-09-06 16:12:36 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.