Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350251 - Strategy for porting useful org.eclipse.ui.* bits for Eclipse4 RCP apps
Summary: Strategy for porting useful org.eclipse.ui.* bits for Eclipse4 RCP apps
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.5 M4   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 351363 370046 392715 (view as bug list)
Depends on: 401655 440366 440367 449452
Blocks:
  Show dependency tree
 
Reported: 2011-06-24 09:22 EDT by Brian de Alwis CLA
Modified: 2014-11-06 13:10 EST (History)
18 users (show)

See Also:


Attachments
Patch to add ListSelectionDialog to JFace (19.18 KB, patch)
2012-08-15 12:23 EDT, Lars Vogel CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian de Alwis CLA 2011-06-24 09:22:27 EDT
org.eclipse.ui.* has some useful bits that are now off-limits for pure Eclipse4 RCP apps.  If the org.eclipse.ui.* bundles cannot be adapted to be included in such apps without the compatibility layer, perhaps we could consider introducing a new bundle, say org.eclipse.e4.ui.rcp or org.eclipse.e4.ui.rcp.jface, to hold equivalents?

Useful bits that I've come across:
  * Useful dialogs, like the enhanced preferences dialog (FilteredPreferenceDialog, though it's internal)
  * ScopedPreferenceStore
  * SelectAllHandler

Other areas that would be nice to have work, perhaps by reducing their dependencies solely to JFace:

  * the simplfied p2 UI dialogs
  * the Equinox Security dialogs
  * UI Forms
Comment 1 Eric Moffatt CLA 2011-06-27 16:04:35 EDT
Brian, this (at least part of it) is already in the works for Eclipse 4.2. We were already looking into moving a variety of the more useful views over but we hadn't considered these bits...

The views we can move over using Tom's 'forward compatibility layer' (after removing dependencies) because we 'own' them but I'm less sure whether we own everything on this list (such as UI Forms) so it'd be a selling job to convince the component devs to do the work (we will of course help where we can, keeping Eclipse 4 RCP apps as tight as possible is a really good thing IMO).
Comment 2 Remy Suen CLA 2011-06-28 07:56:16 EDT
(In reply to comment #0)
> Other areas that would be nice to have work, perhaps by reducing their
> dependencies solely to JFace:
> 
>   * the simplfied p2 UI dialogs
>   * the Equinox Security dialogs
>   * UI Forms

Forms has a dependency on the workbench because there are those form editors. The other pieces in its repertoire does not actually need the workbench though.
Comment 3 Brian de Alwis CLA 2011-10-17 09:53:42 EDT
I wonder if it's worth creating split bundles as happened with the breakup of org.eclipse.core.runtime into different pieces.  I'd guess that 99% of our consumers were using 'Require-Bunde: org.eclipse.ui'.
Comment 4 Brian de Alwis CLA 2012-01-29 21:25:03 EST
*** Bug 370046 has been marked as a duplicate of this bug. ***
Comment 5 Remy Suen CLA 2012-01-29 21:41:18 EST
Also see bug 369657.
Comment 6 Lars Vogel CLA 2012-01-30 03:02:51 EST
Just for completeness I think the following dialogs are worth saving:

ElementListSelectionDialog

ListDialog

ElementTreeSelectionDialog

CheckTreeSelectionDialog

Looks to me like the whole org.eclipse.ui.dialogs package could be
moved to a new plug-in.
Comment 7 Lars Vogel CLA 2012-08-14 10:06:20 EDT
I would like to port a few dialogs. Which plug-in ID should I use?org.eclipse.ui.dialogs sounds good but I guess this would overlap with org.eclipse.ui.*
Comment 8 Paul Webster CLA 2012-08-14 10:13:59 EDT
(In reply to comment #7)
> I would like to port a few dialogs. Which plug-in ID should I
> use?org.eclipse.ui.dialogs sounds good but I guess this would overlap with
> org.eclipse.ui.*

Which dialogs would you like to port?  Just the ones mentioned in comment #6 ?  What are their purpose?  And by that I mean, what unit of functionality do they expose (and so we should group them together)?  What would keep them from being moved into org.eclipse.jface.dialogs?

PW
Comment 9 Lars Vogel CLA 2012-08-14 10:38:41 EDT
@Paul, I ported ListSelectionDialog and SelectionDialog because there was a question on the Eclipse Forums for them: http://www.eclipse.org/forums/index.php/t/369279/

I think org.eclipse.jface.dialogs would be a good place for them. If you desire I can create a patch from them.
Comment 10 Thomas Schindl CLA 2012-08-14 10:45:32 EDT
(In reply to comment #9)
> @Paul, I ported ListSelectionDialog and SelectionDialog because there was a
> question on the Eclipse Forums for them:
> http://www.eclipse.org/forums/index.php/t/369279/
> 
> I think org.eclipse.jface.dialogs would be a good place for them. If you
> desire I can create a patch from them.

Don't they need workspace stuff like Help, ...?
Comment 11 Eric Moffatt CLA 2012-08-14 10:57:32 EDT
If they don't require anything except SWT then JFace would be the appropriate place. But if we expect to use DI etc then perhaps we should make 'org.eclipse.e4.dialogs' ??
Comment 12 Lars Vogel CLA 2012-08-14 11:13:28 EDT
ListSelectionDialog sets an ID for the help system but it looks to me that consumer anyhow override this value. For example:

ListSelectionDialog:

PlatformUI.getWorkbench().getHelpSystem().setHelp(shell,
				IWorkbenchHelpContextIds.LIST_SELECTION_DIALOG);

FeatureSelectionDialog: 

 PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell,
				helpContextId);

My assumption would be that we can safely remove them in ListSelectionDialog without heavily affecting consumers.
Comment 13 Paul Webster CLA 2012-08-14 11:20:57 EDT
(In reply to comment #12)
> My assumption would be that we can safely remove them in ListSelectionDialog
> without heavily affecting consumers.

We would probably want to allow ui.workbench functionality to be pluggable into the refactored dialogs, regardless of if they end up in jface or e4.ui.dialogs.

PW
Comment 14 Lars Vogel CLA 2012-08-14 11:27:17 EDT
@Paul: I will check if a user in ui.workbench does not reset the help ID.
Comment 15 Lars Vogel CLA 2012-08-15 12:22:17 EDT
I don't find a lot of usage for ListSelectionDialog in the platform. I checked ProjectSourceContainerDialog and CategoryFilterSelectionDialog and they reset the help ID. 

I think migrating this dialog to JFace is be save and the platform could use this dialog. 

Patch attached, I introduced the package *.listdialogs as *.dialogs seemed already crowed. Please let me know if I should change that.
Comment 16 Lars Vogel CLA 2012-08-15 12:23:53 EDT
Created attachment 219910 [details]
Patch to add ListSelectionDialog to JFace
Comment 17 Eric Moffatt CLA 2012-08-15 15:08:38 EDT
Just to muddy the waters a bit...;-)

While looking into this you may want to see whether it makes sense to port the view over to using data binding. This at least gives us a shot at having the view itself run in non-SWT environments.
Comment 18 Lars Vogel CLA 2012-08-16 07:57:52 EDT
@Eric: I like that the report go into the JFace plug-in and JFace should not depend on Databinding.
Comment 19 Eric Moffatt CLA 2013-06-12 10:10:20 EDT
OK, time to start working on this one. I'm taking a first cut at 'porting' the LogView. So far it's not so bad but there some issues that are already surfacing:

Many (most?) of our standard views are *very* old and us JFace Actions. Right now I'm looking at various options since the low-level model code is even more verbose than what it's replacing.

We will also need to find a strategy for hosting common helper classes like IMemento / XMLMemento. After going over this with Paul we're gonna start by moving the classes into a different bundle and leaving stubs that 'extend' the existing ones for backwards compatibility.
Comment 20 Lars Vogel CLA 2013-06-12 13:32:33 EDT
@Eric, sounds great. Looking forward to the first port.
Comment 21 Lars Vogel CLA 2014-01-23 16:45:20 EST
*** Bug 351363 has been marked as a duplicate of this bug. ***
Comment 22 Lars Vogel CLA 2014-07-02 14:36:23 EDT
*** Bug 392715 has been marked as a duplicate of this bug. ***
Comment 23 Eric Moffatt CLA 2014-07-04 14:30:10 EDT
Just to report back...the attempt to port the Log View was an abject failure...there are just too many dangling 3.x bits to do this easily (I spent a full week on the simplest view I could find).
Comment 24 Paul Webster CLA 2014-07-04 15:34:18 EDT
But the progress view is coming along nicely.  It just needs some e4 consumer feedback.  Bug 429505
Comment 25 Lars Vogel CLA 2014-10-09 08:22:40 EDT
(In reply to Eric Moffatt from comment #11)
> If they don't require anything except SWT then JFace would be the
> appropriate place. But if we expect to use DI etc then perhaps we should
> make 'org.eclipse.e4.dialogs' ??

org.eclipse.e4.dialogs sounds good to me but I think we should also add ui to it, e.g. org.eclipse.e4.ui.dialogs to be consistent with the other e4.ui plug-in namings. Created Bug 440367 for this.
Comment 26 Lars Vogel CLA 2014-10-09 08:29:41 EDT
(In reply to Thomas Schindl from comment #10)
> Don't they need workspace stuff like Help, ...?

For the help we should work on a e4 help service. I suggest one improvement in Bug 445600.
Comment 27 Lars Vogel CLA 2014-11-03 02:05:45 EST
With http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=dbc9a53ba623739a3663582936502e295d5ad293 we have now a new plug-in to migrate org.eclipse.ui.dialogs components (which can not go to JFace because of their dependencies).

Also for the Help we have a strategy with Bug 445600. I mark this general bug therefore as fixed and suggest we open / work on more specific bugs for additional migration work.
Comment 28 Lars Vogel CLA 2014-11-06 13:10:58 EST
.