Bug 132326 - [navigation] Group by categories in Outline view
Summary: [navigation] Group by categories in Outline view
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 141745 158017 158374 159095 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-17 08:33 EST by Dani Megert CLA
Modified: 2011-12-29 15:04 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2006-03-17 08:33:31 EST
I20060315-1200

An initial solution to show categories in the UI has been provided with 3.2.
A nicer solution is to allow grouping of categories in [Quick] Outline view.
Comment 1 Dani Megert CLA 2006-09-20 12:11:13 EDT
*** Bug 158017 has been marked as a duplicate of this bug. ***
Comment 2 Dani Megert CLA 2006-09-23 04:33:08 EDT
*** Bug 141745 has been marked as a duplicate of this bug. ***
Comment 3 Dani Megert CLA 2006-09-23 04:33:09 EDT
*** Bug 158374 has been marked as a duplicate of this bug. ***
Comment 4 Axel Rauschmayer CLA 2006-09-23 06:37:45 EDT
(In reply to comment #0)
> I20060315-1200
> 
> An initial solution to show categories in the UI has been provided with 3.2.
> A nicer solution is to allow grouping of categories in [Quick] Outline view.
> 

In the end, I'd love to have a universal browsing solution that uses "facets" (tags with values). An example of well-done facet navigation is iTunes where you have facets for songs such as composer and title. If you look closely, there is quite a bit of information attached to a method that could be considered tags/facets: Visibility, static vs. non-static, annotations etc. JavaDoc's @category just adds one more dimension here. With a facet browser, one could formulate queries such as the following in a very natural way: "Give me all public methods with annotation @Remote that belong to category 'persistence'". This browser should optionally access *all* methods (of all classes) in order to serve as a universal query mechanism. It would be nice if we could at least go partially beyond trees as a structuring mechanism and allow multiple relations to be layered on top of Java entities (even if only for documentation purposes).

Let me know if I should sketch my UI ideas on this.
Comment 5 Dani Megert CLA 2006-09-23 08:07:50 EDT
This sounds like an excellent idea for plug-in that sits on top of Eclipse and - if it proofs useful and stable - could be integrated into the Eclipse SDK at a later point.
Comment 6 Axel Rauschmayer CLA 2006-09-23 08:50:22 EDT
(In reply to comment #5)
> This sounds like an excellent idea for plug-in that sits on top of Eclipse and
> - if it proofs useful and stable - could be integrated into the Eclipse SDK at
> a later point.

Good point! Would do it myself if I had the time... :-(

We have written a research prototype that improves just the outline view in two ways (so these ideas are directly relevant for the outline):

- Nested methods: If a method n is private and only used by a method m, then file n under m in the hierarchy (thus, n is not visible at the top level, any more). The reasoning here is: "extract method" is a great refactoring for cleaning up code, but it unnecessarily clutters the top level of the code outline.

- Method groups (this can be replaced by @category!): If a sequence of methods is preceded by a commentary
//---------------- foo
then these methods will be filed under a node "foo" in the hierarchy (= one additional level of nesting)

This is described here:
http://www.pst.ifi.lmu.de/Fopra/rauschma/2005/nepper/

For method groups, one can also view categories as tags and, instead of introducing another level of nesting, list the categories as toggle-able buttons that filter the outline:

+-----------------------+
| o | x | @ | # | * | + | <-- icons
+-----------------------+
| (read) (write) (sort) | <-- buttons
| (init)                |
|                       |
| - prepareForSorting() | <-- outline tree
| - writeContents()     |
| ...                   |
+-----------------------+

Thus: Selecting a button filters the outline, unselecting it undoes the filtering. Another possibility is to have filter buttons for "private", "public", "static" etc, too.

This might also be *complementary* to the nesting approach.
Comment 7 Dani Megert CLA 2006-09-28 09:59:26 EDT
*** Bug 159095 has been marked as a duplicate of this bug. ***