Bug 315742 - [projection] Comment sections support for collapse/expand and outline view.
Summary: [projection] Comment sections support for collapse/expand and outline view.
Status: CLOSED DUPLICATE of bug 63808
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 05:23 EDT by Raphael Jolivet CLA
Modified: 2010-06-04 06:06 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Jolivet CLA 2010-06-04 05:23:06 EDT
Build Identifier: I20080617-2000

Hi,

I'm used to organizing my code (Java code here, but this applies to any language) in a hierarchy of "sections" delimited by nice comments.

Something like 

// ---------------------------------------------------- 
// Private utils                 
// ---------------------------------------------------- 

[... some code ...]

// ---------------------------------------------------- 
// Implementation of the interface Foo
// ---------------------------------------------------- 

[... some code ...]

// ---------------------------------------------------- 
// Getters / Setters
// ----------------------------------------------------

[... some code ...]

I also include such comment blocks within large methods, to organize them.
This really increases the readability of the code, and we all know that this is important, right ? :-)

So my wish would be that eclipse could recognize these special "section" comments.

It could then show the expand/collapse button in the editor, or even show this hierarchy in the outline view.

The syntax of these comments could be configurable : A syntax for opening and closing section of codes.
Something like :

//{ Section 1
 
  [ ... code ... ]

//} 

//{ Section 2

   [... code ...]

   //{ Sub Section

   [... code ...]

   //}

//} 

Alternatively, we could directly use blocks of code as delimited per the language. I do it sometime for large methods, but this is not really suitable for top level section (not within methods) :

//! Section
{
   [... Code ...]
}

Thanks for your attention.

Regards,

Raphael

Reproducible: Always
Comment 1 Remy Suen CLA 2010-06-04 05:51:55 EDT
Bugs and enhancement requests about Eclipse's Java tooling goes to JDT.
Comment 2 Dani Megert CLA 2010-06-04 06:06:14 EDT

*** This bug has been marked as a duplicate of bug 63808 ***