I have problem with folding when I'm writing code in XML. Actually, when I'm writing Java code there is no problem and I can expand/collapse my codes.
However, in XML there is no folding icon although it is active. In side bar (line number), I right click then I select Folding > Enable Folding
the width of bar becomes wider but I can't see folding icon. My background of screen is black is it possible this color covers folding icon? I don't think it because of this because when I click those area nothing happens.
-ctrl + 0 = collapse all. -ctrl + 9 = exand all.
In Eclipse, you try to open Preferences, select XML, select XML Files and then select Editor to change the configuration of the indentation size when using space (Indent using spaces -> Indentation size). Sometimes, you will not be able to change the number in this box or press the + or – button.
Eclipse Mars (4.5.1)
XML file having the .xml extension
Just edit / open the file and the folding option will be available:
But if you disable and then enable the folding from right click on the left side bar:
there is a bug: folding won't be available.
Workaround: change the tab to another file and then come again to the previous tab. The icons will be back.
XML file having a different extension (E.g.: .xaml)
You can try to open the file using the XML Editor from the right click:
and if it fails, just add the file extension to the XML (Illformed) from Window > Preferences > General > Content Types:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With