score:29

Accepted answer

Eclipse outline view supports categories (with @category in javadoc) for showing additional information on methods. See the following screenshots for an example of such usage.

Category definition in the editor

Category and filtering in the Outline view

Unfortunately grouping by categories has not been implemented yet. There is an open feature request for this, but it is nearly four years old and clearly stated that it needs community effort. Personally I do not know such plugin.

score:0

Following up on @ntle, (for PHP anyway), you can also use define() to create a pseudo pragma mark, or function(). See screenshot:

enter image description here

For more discussion & examples on this, see my blog post: https://peacocksoftware.com/blog/create-pragma-separator-eclipse-xcode

score:4

You can use "Add Bookmark".

One way to do that is to right-click on the left side (where line numbers are shown), and select "Add Bookmark...".

You can view them in "Bookmarks" view.

score:4

In order to mimic the #pragma mark functionality I usually create a dummy method that works as a separator. For example:

private static void someDummyMethod(){}

score:9

The horror:

@SuppressWarnings("unused")
private int _______________________________________;

Or if you prefer labels:

@SuppressWarnings("unused")
private int _______________Lifecycle_______________;

enter image description here

Bonus points for varying the number of underscores so you can have many separator lines.


My Android Studio Version

Use code regions:

//region

    ... your code here ... 

//endregion

Bonus points for making the folded presentation look like a comment:

//
//region // Lifecycle

   ... your code here ...

//endregion
//

enter image description here


Related Query

More Query from same tag