Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Java package sort order
Java package sort order [message #257331] Tue, 11 November 2008 22:13 Go to next message
Eclipse UserFriend
When using the flat package presentation layout all packages are sorted
alphabetically by default in the PE. Is this possible to change the order
via a built-in in feature or possibly with a custom plugin? Thanks!

-Vlad
Re: Java package sort order [message #257337 is a reply to message #257331] Wed, 12 November 2008 06:38 Go to previous messageGo to next message
Eclipse UserFriend
Vladimir Grishchenko wrote:
> When using the flat package presentation layout all packages are
> sorted alphabetically by default in the PE. Is this possible to change
> the order via a built-in in feature or possibly with a custom plugin?
> Thanks!
It depends what you mean by "PE". While it is definitely not possible
for the Package Explorer it might be possible for the Project Explorer
with an org.eclipse.ui.navigator.navigatorContent extension but this
might lead to strange results because JDT already registers its own sorter.

Dani

>
> -Vlad
>
Re: Java package sort order [message #257340 is a reply to message #257337] Wed, 12 November 2008 11:31 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the pointer. I meant Package Explorer. Perhaps someone already
came across a plugin that does more or less of what I'm trying to achieve?
Re: Java package sort order [message #257368 is a reply to message #257337] Thu, 13 November 2008 13:27 Go to previous messageGo to next message
Eclipse UserFriend
Having looked into adding this introducing a sorter to Project Explorer
seem to require more effort that I'd like to put into this, essentially
sorters cannot be defined outside of content contributions which means I'd
have to define my own content and label providers for java content as jdt
ones are internal. See the following discussion for more details....

https://bugs.eclipse.org/bugs/show_bug.cgi?id=141724

-V.


Daniel Megert wrote:

> It depends what you mean by "PE". While it is definitely not possible
> for the Package Explorer it might be possible for the Project Explorer
> with an org.eclipse.ui.navigator.navigatorContent extension but this
> might lead to strange results because JDT already registers its own sorter.

> Dani
Re: Java package sort order [message #257389 is a reply to message #257337] Fri, 14 November 2008 21:14 Go to previous message
Eclipse UserFriend
It turns out it is possible to get hold of the Package Explorer tree
viewer through public API, with a little creativity I was able to install
a custom comparator for the viewer, so problem is solved in a more or less
clean way and minimal effort.

-V


> Daniel Megert wrote:

> It depends what you mean by "PE". While it is definitely not possible
> for the Package Explorer it might be possible for the Project Explorer
> with an org.eclipse.ui.navigator.navigatorContent extension but this
> might lead to strange results because JDT already registers its own sorter.

> Dani
Previous Topic:Fastest? JavaProject.findType() or SearchEngine.findAllTypeNames(TypeNameMatchRequestor) or SearchEn
Next Topic:How to declare dependencies between plug-in and plain old java projects
Goto Forum:
  


Current Time: Fri Apr 18 10:41:35 EDT 2025

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

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

Back to the top