Bug 186891 - [RCP] Barrier to RCP with resources: IDEWorkbenchAdvisor
Summary: [RCP] Barrier to RCP with resources: IDEWorkbenchAdvisor
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC All
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 68163 79732 225139 240789 (view as bug list)
Depends on: 221977 234252
Blocks:
  Show dependency tree
 
Reported: 2007-05-14 17:49 EDT by Kevin McGuire CLA
Modified: 2019-09-06 16:05 EDT (History)
16 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McGuire CLA 2007-05-14 17:49:36 EDT
3.3 N0510

I am attempting to build an RCP application which makes use of resources.

This is not easily possible because IDEWorkbenchAdvisor is internal, and much of what it calls is internal.  But IDEWorkbenchAdvisor does much that a resource based RCP app would rely on.  Just a read through its initialize() method gives a good idea:

1. Creation of image constants
One would like to make use of all the standard images such as for project, folder, wizards should open with correct banners, etc. 

org.eclipse.ui.internal.WorkbenchImages stores these and is referenced by a number of supporting classes (e.g. the ActionFactory for PRINT).
See also org.eclipse.ui.internal.WorkbenchConfigurer.

2. Saving and restoring workbench state

3. Adapters
org.eclipse.ui.internal.ide.model.WorkbenchAdapterBuilder.registerAdapters() is called. These are required prior to being able to do a variety of things, including filling the resource tree in the explorer.

4. ActivityHelper
org.eclipse.ui.internal.ide.IDEWorkbenchActivityHelper does lots of helpful things with respect to deltas and project natures, amongst other things.  I assume I'd need this to get resources to work properly in the IDE.

5. IDEIdleHelper
Probably important

6. WorkspaceUndoMonitor
Not sure things would work without this being initialized.

etc.

The posts I've seen recommend just copying IDEWorkbenchAdvisor, for example see http://www.cpuidle.de/blog/?p=48#comment-19988.  But that still leaves you with references to internal classes and no guarantee that your RCP app will work if you build it against a new Eclipse version.

If we want people to build resource based RCP apps we need to make this separation cleaner and reuse easier.
Comment 1 Boris Bokowski CLA 2007-06-20 15:44:14 EDT
*** Bug 68163 has been marked as a duplicate of this bug. ***
Comment 2 Boris Bokowski CLA 2007-06-20 16:36:43 EDT
*** Bug 79732 has been marked as a duplicate of this bug. ***
Comment 3 Boris Bokowski CLA 2007-06-20 16:37:28 EDT
another one (from bug 79732):
1. Workspace picker is launched from the internal IDEApplication. You won't get
the picker is you supply your own application.
Comment 4 Paul Webster CLA 2008-04-01 12:51:45 EDT
*** Bug 225139 has been marked as a duplicate of this bug. ***
Comment 5 Arnaud CLA 2008-04-02 03:25:31 EDT
7. In yours RCP WorkbenchWindowAdvisor class, you shouldt return an instance of
internal class: org.eclipse.ui.internal.ide.WorkbenchActionBuilder from
createActionBarAdvisor() method, otherwise at launch time you'll got several error like:
'Invalid Menu Extension: org.eclipse.ui.edit.text.delimiter.unix'
Comment 6 Arnaud CLA 2008-04-08 08:26:36 EDT
Due to current development, the prio should be changed to P2 (or best P1),
and fix in target to IES 3.4.
Thanks a lot.
Comment 7 Paul Webster CLA 2008-04-08 09:58:37 EDT
(In reply to comment #0)
> 
> 3. Adapters
> org.eclipse.ui.internal.ide.model.WorkbenchAdapterBuilder.registerAdapters() is
> called. These are required prior to being able to do a variety of things,
> including filling the resource tree in the explorer.
> 

This but will address issue #3

PW
Comment 8 Emmanuel Wurth CLA 2008-04-08 11:06:10 EDT
Hello, do you know the target milestone ?
We would like to ensure that this will be fixed into the IES 3.4 perspective.
Thank you.
Comment 9 Randy Hudson CLA 2008-08-14 10:30:33 EDT
*** Bug 240789 has been marked as a duplicate of this bug. ***
Comment 10 Will Horn CLA 2009-08-27 20:16:51 EDT
Is there a place to go for the latest status on this issue (i.e. best practices when using resources in an RCP app)?  For example, I notice there is now and API IDE.registerAdapters() which addresses point 3.
Comment 11 Boris Bokowski CLA 2009-10-13 17:21:01 EDT
(In reply to comment #10)
> Is there a place to go for the latest status on this issue (i.e. best practices
> when using resources in an RCP app)?  For example, I notice there is now and
> API IDE.registerAdapters() which addresses point 3.

Not as far as I know, and given how thinly I am spread these days, I won't be able to do it. But maybe the experts on this bug could help write a wiki page that is linked to from the wiki page on RCP? All you need is a Bugzilla account, which if you read this email you already have. ;-)
Comment 12 Boris Bokowski CLA 2009-11-26 16:14:25 EST
Prakash is now responsible for watching bugs in the [RCP] component area.
Comment 13 Eclipse Webmaster CLA 2019-09-06 16:05:29 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.