Bug 216373 - [expressions] "Create Watch Expression" action should appear in any view (like an objectContribution).
Summary: [expressions] "Create Watch Expression" action should appear in any view (lik...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Platform-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-01-23 22:43 EST by Pawel Piech CLA
Modified: 2008-02-11 14:18 EST (History)
2 users (show)

See Also:


Attachments
Patch with fix. (24.69 KB, patch)
2008-01-23 22:43 EST, Pawel Piech CLA
no flags Details | Diff
Updated patch with fix. (24.68 KB, patch)
2008-01-23 23:30 EST, Pawel Piech CLA
no flags Details | Diff
replacement patch (12.94 KB, patch)
2008-02-11 13:21 EST, Darin Wright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2008-01-23 22:43:02 EST
Created attachment 87729 [details]
Patch with fix.

The patch to bug 209883 changed some expressions actions from being an objectContribution to a viewContribution.  This change means that third party views which count on this action to be automatically contributed will be broken.  The attached patch fixes this change by using a command and a handler to achieve the same functionality as the previous objectContribution.


P.S. The patch is a little messy with respect to copyright statements and placement of extensions in the plugin.xml file.  But my guess is that I couldn't get those right anyway.
Comment 1 Pawel Piech CLA 2008-01-23 23:30:37 EST
Created attachment 87733 [details]
Updated patch with fix.

It seems that introduced a bug in the previous patch just before creating it, which caused the new action not to appear in the menu.  Attaching an updated patch without the bug.
Comment 2 Darin Wright CLA 2008-02-11 13:21:02 EST
Created attachment 89435 [details]
replacement patch

Thanks Pawel, I updated the patch (and it's a nice example of how to use the comand/handler/menu extension).

* removed an unused class (WatchExpressionHandler)
* removed the WatchAction class from the patch (it was the same as in HEAD already)
* modified the "visibleWhen" attribute of the handler to only be visible when selection "count = +"  (else the action appears enabled for an empty selection)

Do you agree with the contents of the new patch?
Comment 3 Pawel Piech CLA 2008-02-11 13:31:02 EST
(In reply to comment #2)
> Do you agree with the contents of the new patch?
I most certainly do.  Thanks :-)

Comment 4 Darin Wright CLA 2008-02-11 14:18:19 EST
Applied patch. Deleted now unused WatchAction.
Comment 5 Darin Wright CLA 2008-02-11 14:18:44 EST
Verified.