This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 202808 - Folded comments - show in pop up tooltip (mouse hover)
Summary: Folded comments - show in pop up tooltip (mouse hover)
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Code folding (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 08:39 UTC by monk.e.boy
Modified: 2012-02-20 10:13 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description monk.e.boy 2011-09-29 08:39:58 UTC
Proposal: Comment folding icon should look different and be positioned differently.

If a line of code is preceded by 'n' lines of comments, if these are code folded, the folded icon is positioned after the end of the line of code (a little (i)?) Hovering the icon would open a tooltip. My crap ascii diagram:

original code:

$a = 0;
/**
 * some lines
 * of comments
 * here talking
 * about stuff
 */
$b = 1;
$c = 2;
$d = 3;

Comment is folded:

$a = 0;
$b = 1; (i)
$c = 2;
$d = 3;

Now mouse hovered over the (i) icon:

$a = 0;       +--------------+
$b = 1; (i) <-| some lines   |
$c = 2;       | of comments  |
$d = 3;       | here talking |
              | about stuff  |
              +--------------+
              
Clicking the (i) icon would make the pop up stay (clicking the (i) would toggle show/hide.)

I'd love to be able to click in the comment pop up and edit the text :) (A WYSIWYG HTML editor with BOLD and H1 and stuff?! Yes please!!)

monk.e.boy
Comment 1 Svata Dedic 2012-02-20 10:13:05 UTC
While I understand how nice the solution works for a specific case, in general it is not (IMHO) much suitable and will interfere with other text-oriented functions. 

Functions operating on a region of text would become more complicated, because the code (comment) is not only folder, but also visually repositioned / mixed with the other text.

Indication at EOL is also not suitable for long lines, the indicator may be cut of by the window right border. Why not use glyph gutter for indication ?

Re. editing in popup: inline editing if Codefold tooltip was disabled recently because issues it had with the main editor window. It should really serve as a tooltip, not a secondary editor. 

WYSIWYG (or assisted) editing of the javadoc comment html request should be filed as another issue.