Bug 328797 - [package explorer] Provide a parametrized command to toggle filters in the Package Explorer
Summary: [package explorer] Provide a parametrized command to toggle filters in the Pa...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Prakash Rangaraj CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-27 04:01 EDT by Prakash Rangaraj CLA
Modified: 2010-12-15 05:50 EST (History)
2 users (show)

See Also:


Attachments
Possible fix (8.71 KB, patch)
2010-10-27 07:42 EDT, Prakash Rangaraj CLA
daniel_megert: review-
Details | Diff
Patch v02 (9.90 KB, patch)
2010-12-01 06:30 EST, Prakash Rangaraj CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Prakash Rangaraj CLA 2010-10-27 04:01:28 EDT
I frequently use few filters and it would be nice if a command is available for it, so that I can bind a shortcut key for those filters (or at least I can use them with QuickAccess)
Comment 1 Dani Megert CLA 2010-10-27 04:13:48 EDT
What do you mean by "PE", Package Explorer or Project Explorer?

(In reply to comment #0)
> I frequently use few filters and it would be nice if a command is available 
> for it
By "it" do you mean one command for each filter to toggle the enable state?
Comment 2 Prakash Rangaraj CLA 2010-10-27 04:17:06 EDT
(In reply to comment #1)
> What do you mean by "PE", Package Explorer or Project Explorer?
> 
> (In reply to comment #0)
> > I frequently use few filters and it would be nice if a command is available 
> > for it
> By "it" do you mean one command for each filter to toggle the enable state?

   No. Just one command with a parameter to say which filter to toggle.
Comment 3 Dani Megert CLA 2010-10-27 04:26:28 EDT
What do you mean by "PE", Package Explorer or Project Explorer?
Comment 4 Prakash Rangaraj CLA 2010-10-27 04:30:23 EDT
(In reply to comment #3)
> What do you mean by "PE", Package Explorer or Project Explorer?

   Package Explorer. If its Project Explorer, then I would have raised the bug against Platform UI :-)
Comment 5 Prakash Rangaraj CLA 2010-10-27 07:42:50 EDT
Created attachment 181823 [details]
Possible fix
Comment 6 Dani Megert CLA 2010-10-28 02:58:19 EDT
I'll take a look during M4.
Comment 7 Dani Megert CLA 2010-11-24 06:14:48 EST
The patch is going into the right direction. The problem is that custom filters are used in several JDT views and hence I would expect that toggling works in all of them and not just in the Package Explorer.

Minor issue: make sure the new code is formatted according to the project's formatter settings.
Comment 8 Prakash Rangaraj CLA 2010-11-25 00:24:35 EST
(In reply to comment #7)

> Minor issue: make sure the new code is formatted according to the project's
> formatter settings.

    Any particular reason why Save Actions are not enabled on the project?
Comment 9 Dani Megert CLA 2010-11-25 02:28:27 EST
>     Any particular reason why Save Actions are not enabled on the project?
There are two:
1. we could not agree on which actions should be enabled
2. we use a non-public save action
Comment 10 Prakash Rangaraj CLA 2010-12-01 06:30:50 EST
Created attachment 184241 [details]
Patch v02

Now the command works on other Java views that support filtering. As a side effect, now this works only when the view is active, and the user cannot assign a keybinding to a specific filter.
Comment 11 Dani Megert CLA 2010-12-15 05:50:43 EST
It doesn't work yet:
1. assign a key binding to e.g. toggle the empty packages filter
2. verify: it works in the Package Explorer
3. try in Packages view: it does not work
4. go to the Keys preference page: oops the command is now there twice

Besides that it looks like the code for the Java Outline view filters is missing.

The description: "A parameterizable command that toggles a custom filter in the active view, if it supports" should be more Java specific.