代码默认不可折叠,idea版本2018.2或2018.3 选择Setting或按Ctrl+Alt+S 选择editor->General->Editor Tabs 在右面选择上Hide tabs if there is no space