Bug 239904 - Expose o.e.jdt.internal.ui.preferences.ProjectSelectionDialog as API
Summary: Expose o.e.jdt.internal.ui.preferences.ProjectSelectionDialog as API
Status: NEW
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: api
: 342412 (view as bug list)
Depends on:
Blocks: 173414
  Show dependency tree
 
Reported: 2008-07-07 20:02 EDT by Remy Suen CLA
Modified: 2015-04-07 18:05 EDT (History)
8 users (show)

See Also:


Attachments
The requested screenshot of the dialog. (27.52 KB, image/jpeg)
2008-07-24 14:43 EDT, Remy Suen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2008-07-07 20:02:37 EDT
This class is needed to successfully resolve bug 173414.
Comment 1 Dani Megert CLA 2008-07-08 02:46:31 EDT
Sorry, I can't see why providing an API in JDT UI would help Platform UI to fix bug 173414. Maybe you meant that Platform UI should provide this as API?
Comment 2 Remy Suen CLA 2008-07-08 08:06:04 EDT
Yes, I meant that Platform UI should provide this API. I opened it against JDT since JDT owns this class right now. If this is incorrect and Platform should own this bug, please move it accordingly.
Comment 3 Dani Megert CLA 2008-07-08 09:12:06 EDT
> If this is incorrect and Platform should own this bug, please move it 
>accordingly.
Platform UI has to decided whether they want to provide this as API and also make sure that it is in API quality.
Comment 4 Chris Aniszczyk CLA 2008-07-08 11:24:54 EDT
I like this idea

Let's see how hard this is ;)
Comment 5 Eric Moffatt CLA 2008-07-14 15:08:47 EDT
Boris, I'll give this one to you as API-dude (which we don't have a component area for...).
Comment 6 Boris Bokowski CLA 2008-07-15 03:28:52 EDT
ProjectSelectionDialog has references to JDT-specific types:

import org.eclipse.jdt.core.IJavaModel;
import org.eclipse.jdt.core.JavaCore;

import org.eclipse.jdt.ui.JavaElementComparator;
import org.eclipse.jdt.ui.JavaElementLabelProvider;
import org.eclipse.jdt.ui.StandardJavaElementContentProvider;

import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;

This means that we cannot just push it down into the platform.  Could you please explain exactly what you need to resolve bug 173414? (A screenshot of the dialog would help, too.)
Comment 7 Remy Suen CLA 2008-07-24 14:43:24 EDT
Created attachment 108382 [details]
The requested screenshot of the dialog.

Boris, to see it for yourself, please perform the following:

1. Window > Preferences > Java > Compiler
2. Click on the 'Configure Project Settings...' link at the top right hand corner.

There are two similarly named dialogs in PDE. Exposing this as API would help reduce the amount of duplicate code in multiple Eclipse plug-ins (as I imagine other people are also using this code in their product).

The dialog, as you can imagine from the link, allows a user to select a specific project and open that project's properties page so that a user can modify that specific project's settings instead of modifying it globally.

Please see bug 173414 comment 12 for some "wants" of the community. As a first cut, maybe just taking in an IProject[] in the dialog's constructor to determine what should be shown would be good enough for most people?

But what do I know about Platform/UI APIs? :P
Comment 8 Remy Suen CLA 2008-07-24 14:44:17 EDT
(In reply to comment #7)
> The dialog, as you can imagine from the link, allows a user to select a
> specific project and open that project's properties page so that a user can
> modify that specific project's settings instead of modifying it globally.

By globally I mean at the workspace-level of course.
Comment 9 Andrey Loskutov CLA 2008-07-24 15:31:47 EDT
From bug 173414 comment 12:

yes, we would like to extend/reuse this project selection dialog.

We would then like to customize it:

- reduce the scope of projects shown: only some of projects (like "java only"
or "custom nature" only) has to be shown for selection
- change also the text/checkboxes shown etc.

So to do all this things it would be nice to have this dialog as non-internal
(API).
Comment 10 Jigar CLA 2011-04-11 09:29:05 EDT
The jdt.internal.ui.preferences.ProjectSelectionDialog has same implementation as org.eclipse.pde.ui.internal.ui.preferences.ProjectSelectionDialog..

I have reported an enhancement to the Eclipse for publishing the pde ProjectSelectionDialog.

It will be better to reuse the eclipse package itself.
Comment 11 Curtis Windatt CLA 2011-04-11 11:34:40 EDT
*** Bug 342412 has been marked as a duplicate of this bug. ***
Comment 12 Eclipse Genie CLA 2015-04-07 18:05:06 EDT
New Gerrit change created: https://git.eclipse.org/r/45428