Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Extending package explorer with a sort (or a filter) for closed projects
Extending package explorer with a sort (or a filter) for closed projects [message #508240] Sun, 17 January 2010 21:49 Go to next message
Eclipse UserFriend
Howdy,

Basically I'm looking for a way or a little bit of documentation for the following scenario:

I've got a particular workspace that has several projects in it -- many of which I sometimes come back to (we get into trouble with bagillions of branches, and we're only on svn 1.5, but hey, that's work).

What I want to be able to do is to sort the package/project explorer to move all of the closed projects to the bottom of the list. I've looked at extending the functionality with a filter (after days of searching on google), and thought I was getting close but just got utterly confused again.

I see that any of the filters have to extend ViewerFilter and override select, taking a viewer as an argument -- the return from here is a boolean that defines whether something is in or not in the filter.

I also see that in the same package as ViewerFilter (jface.viewers) a ViewerComparator, with a sort I can override and sort the list of elements I want, and return to whoever is using them.

The problem is I'm a bit stumped on where exactly the list of projects in the package explorer are being held or who are using them.

Any thoughts? Thanks much, and if theres a much simpler way to do this (I didn't see how with core expressions plugin) I'd greatly appreciate the suggestion.

PS -- Just using working sets are out for a variety of reasons, namely open type being shared across multiple open projects even if they're in the same working set. Also, there's no way to sort the closed projects working set to the bottom of the list, and you still have to maintain multiple working sets if you change the status of a project to open/close and move back and forth between several (I do use other working sets, just not for this particular filter).

[Updated on: Sun, 17 January 2010 21:51] by Moderator

Re: Extending package explorer with a sort (or a filter) for closed projects [message #508370 is a reply to message #508240] Mon, 18 January 2010 10:12 Go to previous message
Eclipse UserFriend
Bobby Smith wrote:
> Howdy,
>
> Basically I'm looking for a way or a little bit of documentation for
> the following scenario:
>
> I've got a particular workspace that has several projects in it --
> many of which I sometimes come back to (we get into trouble with
> bagillions of branches, and we're only on svn 1.5, but hey, that's work).
>
> What I want to be able to do is to sort the package/project explorer
> to move all of the closed projects to the bottom of the list. I've
> looked at extending the functionality with a filter (after days of
> searching on google), and thought I was getting close but just got
> utterly confused again.
A filter is there to remove elements from the view. Doing this makes no
sense since the Package and the Project Explorer already offer a filter
for hiding closed projects. The Package Explorer can't be extended with
a new/different sorter and I'm not sure it's possible with the Project
Explorer.
>
> I see that any of the filters have to extend ViewerFilter and override
> select, taking a viewer as an argument -- the return from here is a
> boolean that defines whether something is in or not in the filter.
>
> I also see that in the same package as ViewerFilter (jface.viewers) a
> ViewerComparator, with a sort I can override and sort the list of
> elements I want, and return to whoever is using them.
>
> The problem is I'm a bit stumped on where exactly the list of projects
> in the package explorer are being held or who are using them.
>
> Any thoughts? Thanks much, and if theres a much simpler way to do
> this (I didn't see how with core expressions plugin) I'd greatly
> appreciate the suggestion.
>
> PS -- Just using working sets are out for a variety of reasons, namely
> open type being shared across multiple open projects even if they're
> in the same working set. Also, there's no way to sort the closed
> projects working set to the bottom of the list :p
This is possible in the Package Explorer.

Dani
Previous Topic:eclipse hangs on startup - solved
Next Topic:running two consoles at the same time
Goto Forum:
  


Current Time: Wed Mar 19 23:13:03 EDT 2025

Powered by FUDForum. Page generated in 0.03688 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top