// ĠCopyright Ġ 2 0 0 0 - 2 0 1 8 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġorg . editor config . language . file type Ċ Ċ import Ġcom . intellij . application . options . Code Style Ċ import Ġcom . intellij . psi . Psi File Ċ import Ġorg . editor config . language . Editor Config Language Ċ Ċ object ĠEditor ConfigFile Constants Ġ{ ĊĠ Ġconst Ġval ĠFILE _ EXTENSION Ġ= Ġ" editor config " ĊĠ Ġconst Ġval ĠFILE _ NAME _ WITHOUT _ EXTENSION Ġ= Ġ"" ĊĠ Ġconst Ġval ĠFILE _ NAME Ġ= Ġ"$ FILE _ NAME _ WITHOUT _ EXTENSION .$ FILE _ EXTENSION " ĊĠ Ġconst Ġval ĠP SI _ FILE _ NAME Ġ= Ġ" Editor Config Ġfile " ĊĠ Ġconst Ġval ĠFILE TYPE _ NAME Ġ= Ġ" Editor Config " ĊĠ Ġconst Ġval ĠROOT _ KEY Ġ= Ġ" root " ĊĠ Ġconst Ġval ĠROOT _ VALUE Ġ= Ġ" true " ĊĊĠ Ġprivate Ġconst Ġval ĠROOT _ DECL AR ATION _ WITH _ SP ACES Ġ= Ġ"$ ROOT _ KEY Ġ= Ġ$ ROOT _ VALUE " ĊĠ Ġprivate Ġconst Ġval ĠROOT _ DECL AR ATION _ WITHOUT _ SP ACES Ġ= Ġ"$ ROOT _ KEY =$ ROOT _ VALUE " ĊĊĠ Ġfun Ġget Root Declaration For ( file : ĠPsi File ): ĠString Ġ{ ĊĠĠĠ Ġval Ġsettings Ġ= ĠCode Style . get Language Settings ( file , ĠEditor Config Language ) ĊĠĠĠ Ġval Ġneed Space Ġ= Ġsettings . SPACE _ AR O UND _ ASSIGN MENT _ OPER ATORS ĊĠĠĠ Ġreturn Ġif Ġ( need Space ) ĠROOT _ DECL AR ATION _ WITH _ SP ACES ĊĠĠĠ Ġelse ĠROOT _ DECL AR ATION _ WITHOUT _ SP ACES ĊĠ Ġ} Ċ } Ċ