Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 61725

Summary: [projection] Do not use triangles for code folding toggles
Product: [Eclipse Project] JDT Reporter: Vladimir Blagojevic <vladimir>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: aiproulx, bogofilter+eclipse.org, danbaleanu, davor.cubranic, eclipse, ed.burnette, email, jmockler
Version: 3.0   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 81991    

Description Vladimir Blagojevic CLA 2004-05-11 09:51:49 EDT
Although eclipse users are undoubtly very much delighted that a long awaited 
code folding feature will finally be included in M9, I was not so impressed by 
its look-and-feel. Based on responses from eclipse.tools.jdt newsgroup, other 
users find the rotating triangle toggles rather confusing as well. The 
triangles (which currently are used on Windows) can be confused with 
the "overrides/is overridden" markers which are also triangles. Is it not 
a "standard way" to present code folding using +/- toggles similar to Netbean 
[1] and Idea [2]. 


[1]http://ui.netbeans.org/docs/ui/code_folding/cf_uispec.html
[2]http://www.jetbrains.com/idea/docs/help/editing/codeFolding.html
Comment 1 Kai-Uwe Maetzel CLA 2004-05-11 10:08:37 EDT
Most likely, we are not going to change the visual presentation for the 
folding control for 3.0.
Comment 2 Davor Cubranic CLA 2004-06-13 13:46:17 EDT
Personally, I think the triangles look tons better than the pluses. The
triangles are what outliners have been using to indicate folding since at least
More on Mac in late 80's.

Also, if it is decided to use "+" as the folding marker, I hope it will be only
on the Windows platform, as the triangles are used to indicate collapsed nodes
in tree views on Gtk and Mac.
Comment 3 Davor Cubranic CLA 2004-06-13 13:47:33 EDT
Bug 65448 looks like a duplicate.
Comment 4 Ed Burnette CLA 2004-06-13 14:23:49 EDT
*** Bug 65448 has been marked as a duplicate of this bug. ***
Comment 5 Ed Burnette CLA 2004-06-13 14:26:40 EDT
Copied text from bug 65448:

In 3.0RC1 on Windows the code folding icons are as follows: a filled in 
triangle pointing right for folded text, and an empty triangle pointing down 
for expanded text. These should be changed to standard plus/minus icons for 
the following reasons:

- The triangles have a Java Swing-ish look about them that doesn't fit with 
the rest of the native SWT interface.
- Triangles are inconsistent with the plus/minus icons used in the Package 
Explorer and Navigator and several other views.
- They're also also different from other products developers are familiar with 
such as Visual Studio and Netbeans 3.6, including SAS products (Display 
Manager, webAf Studio, and Enterprise Guide). All these products use plus and 
minus icons for code folding on Windows.
- The filled and unfilled triangles don't look as good (admittedly this is 
subjective).
- They can get confused with the Java inheritance icon which is an empty 
triangle of the same size and shape (except it's a little further to the left 
and pointing up).
- They have less visual surface area than the standard plus/minus icons so 
they are harder to target with the mouse cursor.
- They give no hint about the keyboard shortcut for expand/collapse (Ctrl-
Keypad_Plus and Ctrl-Keypad_Minus).

It would be best to use native expand/collapse icons, i.e., the same ones that 
the tree and table tree widgets use, if that's possible. But always using the 
standard plus and minus icons would be the second best (and perhaps simpler) 
option. Either would be better than the triangles.

Please forward to the UI design team for consideration if needed.

Additional Comment From Billy Biggs 2004-06-02 17:34 ------- 
FWIW, the plus/minus icons used in the package explorer are platform dependent.
With most Gtk+ themes they are unfilled triangles (and happen to match the 
code folding triangles).
Comment 6 Ben Youngdahl CLA 2004-06-13 14:36:16 EDT
Interesting comments.  I think Ed's comment that:
"- They can get confused with the Java inheritance icon which is an empty 
triangle of the same size and shape (except it's a little further to the left 
and pointing up)."
is probably the main concern I had with the triangles.

If the decision is made to stay with the triangles, would it be too much effort
to provide a preference to change those icons to something else?  I would think
that would be pretty straightforward to code.  Customization is good.  :-)
Comment 7 R.J. Lorimer CLA 2004-09-07 21:57:26 EDT
Hello - I recently introduced icon swapping along with other features in my code
folding plug-in for eclipse.

Check it out!
http://www.coffee-bytes.com/servlet/PlatformSupport
Comment 8 Dani Megert CLA 2005-03-15 04:53:38 EST
*** Bug 61499 has been marked as a duplicate of this bug. ***
Comment 9 Dani Megert CLA 2005-05-09 19:08:37 EDT
Fixed in HEAD.
Available in builds >= I20050509-2000.