Home > front end >  How to collapse and expand collapsible files (XML, JSON) in IntelliJ Idea?
How to collapse and expand collapsible files (XML, JSON) in IntelliJ Idea?

Time:04-30

I have a fairly large XML, JSON, or any file format with structured data following the tree hierarchy. I want to collapse/expand all the items in IntelliJ Idea but I am lazy to do it manually, how to do it?

XML:

enter image description here

JSON:

enter image description here

CodePudding user response:

The way to go is very simple, but it is not intuitive and visible as took me a while to find it out.

Open the file and navigate to the top bar Code -> Folding and a new panel would open with choices of expanding/collapsing either all or recursively.

enter image description here

  • Related