Bug 84878

Summary: [misc] Draw vertical lines in control flow statements
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: b.muskalla, czesc1, daniel_megert, deepakazad, eclipse, eclipse, enonimus.juzer, evermind, fabian.pfaff, fernandoacorreia, fukanchik, gro.espilce, harshad.rj, heyeli, johnys, Konstantin.Scheglov, lukas.eder, mauromol, mlists, purebill, remy.suen, stephan.herrmann, tobias_henkel
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Philipe Mulet CLA 2005-02-10 07:03:15 EST
Build 20050202

In order to help reading complex algorithm, one could imagine having some
graphical connections in between constructs (remember when we learned
algorithmics at school).

if (...) {
|  if (...) {
|  |
|  }
} else {
|
|
}


I would magine a thin line directly in the code, anchored on left side of
control flow keyword, and t would only look nice if correctly indented (would
encourage formatting and highlight indentation issues which sometimes are
revealing obscure bugs - you thought it did something, but it is actually doing
something else)
Comment 1 Dani Megert CLA 2006-07-19 06:30:31 EDT
We will see whether we can do something for 3.3.
Time permitting.
Comment 2 Philipe Mulet CLA 2006-07-19 06:31:18 EDT
When an algorithm would span beyond editor's range, scrolling down will hide the top part of the control statement. At school, a good practice was to number each bar for easily matching them when clipped.

if (...) {
|  if (...) {
|  |
1  2

// page break

1  2
|  |
|  }
} else {
|
|
}
Comment 3 Dani Megert CLA 2008-03-17 12:03:07 EDT
See also bug 222946.
Comment 4 Dani Megert CLA 2008-05-13 03:04:51 EDT
See also bug 231321.
Comment 5 Dani Megert CLA 2008-07-02 07:03:09 EDT
See also bug 69455.
Comment 6 Fernando Correia CLA 2008-08-09 10:08:07 EDT
These indentation guides help a lot. They would be especially useful for Python, where indentation has syntatic meaning. There is a feature request for the PyDev plugin about this: https://sourceforge.net/tracker/?func=detail&atid=577332&aid=1541397&group_id=85796

Notepad++ has a great implementation of this feature as shown in these screenshots:

http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_braceIndentGuideHiLiting.gif

http://notepad-plus.sourceforge.net/commun/screenshots/scrsh_lexerJava.gif
Comment 7 Dani Megert CLA 2008-08-11 03:30:15 EDT
Hopefully we can do something here for 3.5.
Comment 8 Ilya Sedlovsky CLA 2011-09-28 07:13:56 EDT
Is there any chance to get this feature?
Comment 9 Dani Megert CLA 2011-09-29 04:01:31 EDT
(In reply to comment #8)
> Is there any chance to get this feature?

We'd still like to do it at some point (probably not for 3.8) but are currently busy with other stuff. A good quality patch is welcome.
Comment 10 John YS CLA 2012-09-14 13:50:56 EDT
Just chiming in to bump this thread up again. I think it would be a hugely valuable feature, if it could be added. Is it only the list for a later release?
Comment 11 Dani Megert CLA 2012-09-17 03:19:19 EDT
(In reply to comment #10)
> Is it only the list for a later release?

Currently there are no plans to work on this.
Comment 12 Evermind CLA 2013-08-07 10:15:18 EDT
FYI: Some guy has kindly worked this out. Maybe you eclipse guys could try to integrate this into the product?

http://atlanto.github.io/IndentGuide/
Comment 13 Dani Megert CLA 2013-08-07 10:33:01 EDT
(In reply to comment #12)
> FYI: Some guy has kindly worked this out. Maybe you eclipse guys could try
> to integrate this into the product?
> 
> http://atlanto.github.io/IndentGuide/

This is a generic plug-in which only honors indentation and ignores the Java language completely. This is not what the intention of this bug is.
Comment 14 Dani Megert CLA 2014-07-08 17:01:17 EDT
*** Bug 438753 has been marked as a duplicate of this bug. ***
Comment 15 Harshad RJ CLA 2014-11-30 11:41:06 EST
(In reply to Dani Megert from comment #13)
> > 
> > http://atlanto.github.io/IndentGuide/

It is now being hosted here: http://sschaef.github.io/IndentGuide/

> This is a generic plug-in which only honors indentation and ignores the Java
> language completely. This is not what the intention of this bug is.

I think the original description *is* about syntax based visual cues. Even if it isn't, it would be nice to have *atleast* syntax based visual cues rather than nothing.
Comment 16 Dani Megert CLA 2015-07-23 09:40:12 EDT
*** Bug 458739 has been marked as a duplicate of this bug. ***
Comment 17 Stephan Herrmann CLA 2015-07-28 09:45:51 EDT
(In reply to Harshad RJ from comment #15)
> (In reply to Dani Megert from comment #13)
> > > 
> > > http://atlanto.github.io/IndentGuide/
> 
> It is now being hosted here: http://sschaef.github.io/IndentGuide/
> 
> > This is a generic plug-in which only honors indentation and ignores the Java
> > language completely. This is not what the intention of this bug is.
> 
> I think the original description *is* about syntax based visual cues. Even
> if it isn't, it would be nice to have *atleast* syntax based visual cues
> rather than nothing.

Is the implementation based on indentation or syntax?

If the latter, I think it would be helpful to use the implementation through some API, so that, e.g., requests like Bug 458739 can be implemented on top. From such API I would expect a method for graphically highlighting the range of one particular block statement.
Comment 18 Lars Vogel CLA 2017-11-22 10:18:23 EST
*** Bug 222946 has been marked as a duplicate of this bug. ***