Bug 298676 - [CommonNavigator]override resourceAction (refresh,open, close, build)
Summary: [CommonNavigator]override resourceAction (refresh,open, close, build)
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-31 07:17 EST by Simon Bernard CLA
Modified: 2019-09-06 15:37 EDT (History)
3 users (show)

See Also:


Attachments
a patch for this bug (25.68 KB, patch)
2010-01-04 09:00 EST, Simon Bernard CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Bernard CLA 2009-12-31 07:17:00 EST
Build Identifier: 

  I need  to override the behavior of the refreshAction used by the commonNavigator.

  The RefreshAction is contributed via the ResourceMgmtActionProvider.

  The only solution I found to override this behavior, is to create MyResourceMgmtActionProvider by copy/paste the ResourceMgmtActionProvider because :
 - this class is internal
 - even if I override it and I can't override actions contributed because fields is private. 

This class could be public and refactored to allow easy overriding

Reproducible: Always
Comment 1 Simon Bernard CLA 2009-12-31 07:18:03 EST
I will propose a patch
Comment 2 Simon Bernard CLA 2010-01-04 09:00:31 EST
Created attachment 155229 [details]
a patch for this bug
Comment 3 Francis Upton IV CLA 2010-03-05 06:08:27 EST
See also bug 294416
Comment 4 Francis Upton IV CLA 2010-03-06 23:50:57 EST
Thank you for your patch Simon, but I'm afraid we can't go with it, at it extends more API in using Actions which is something that we don't want to extend the API for, since Actions have been superseded by Commands. However, unfortunately the CNF has not really had good support for commands, and this is the subject of bug 304925. I had hoped to try to get something in for that in time for M6 (API freeze) but that is not to be. 

Ultimately we want to have handlers/commands to replace the Actions that are used by the Project Explorer and will thus be available for users of the CNF with resources.

In the meantime, I can offer that the RefreshAction and the ResourceMgtActionProviders are essentially copied nearly verbatim from the (now deprecated) Resource Navigator. You can find their corresponding classes in o.e.ui.ide under o.e.ui.views.navigator (look at the WorkspaceActionGroup class).  These are public and can therefore be subclassed as required, even though they are deprecated.

It looks like the real solution to your problem (using Commands and Handlers) will not be possible until after 3.6.

Sorry for the bureaucracy about this, but we have to be really careful about what we add to API since we end up supporting it forever.
Comment 5 Simon Bernard CLA 2010-03-09 05:14:44 EST
I understand, thanks for your answer :)
Comment 6 Eclipse Webmaster CLA 2019-09-06 15:37:18 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.