Bug 276630 - [sort members] Provide more control over sorting order
Summary: [sort members] Provide more control over sorting order
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-17 17:08 EDT by Marvin Fröhlich CLA
Modified: 2009-05-18 09:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Fröhlich CLA 2009-05-17 17:08:20 EDT
Build ID: I20080617-2000

Steps To Reproduce:
I would like different sorting in the outline view. Currently constructors are fixed to the top and overloaded methods with more parameters are listed below those with less parameters.

Since I am more or less strictly following the "used methods must be defined above the using methods" paradigm (including constructors), I would prefer the configure the outline view to put constructors to the bottom (where they are in my code) and overloaded methods with more parameters listed above those with less parameters, since the ones with less parameters will just forward to (call the) ones with more parameters.

And if I have two methods like this:

public void setThePoint( int x, int y )
{
    this.x = x;
    this.y = y;
}

public final void setThePoint( Point p )
{
    setThePoint( p.x, p.y );
}

The method with the Point parameter will always call the one with the primitive parameters and hence must be noted below the primitive method.

It would be very cool, if I could configure the Outline view like this.

Thanks in advance and sorry, if this is the wrong place to report it.

Marvin

More information:
Comment 1 Dani Megert CLA 2009-05-18 04:05:47 EDT
You can at move constructors to the end, see Java > Appearance > Members Sort Order.
Comment 2 Marvin Fröhlich CLA 2009-05-18 09:14:42 EDT
(In reply to comment #1)
> You can at move constructors to the end, see Java > Appearance > Members Sort
> Order.
> 

Thanks. This solves one point of my proposal.

Do I get it right, that "static initializers" are static methods, that more or less just call one of the constructors and return the result?

Marvin
Comment 3 Dani Megert CLA 2009-05-18 09:17:04 EDT
>Do I get it right, that "static initializers" are static methods, that more or
>less just call one of the constructors and return the result?
It's code like this:

static {
 // do some init code
}