eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

saveProfile() #79

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 10 years ago

Add a utility function to write formatting options to a profile file (mainly for ceylon/ceylon-ide-eclipse#987).

lucaswerkmeister commented 10 years ago

Should we write it “by hand” (using ceylon.file) or should we use CeylonConfig.setOption()?

AFAICT, the main difference would be that using CeylonConfig would keep any additional config that users have in there. I can’t imagine why someone would put other configuration there, but I suppose it’s still better to not disturb it.

(Also, perhaps CeylonConfig will at some point work on Node as well?)

quintesse commented 10 years ago

Also, perhaps CeylonConfig will at some point work on Node as well?

At some point, long time ago, I started writing a Ceylon version of the CeylonConfig stuff, but the language module and SDK were still a bit too unfinished at that time so in the end I didn't continue. But yes it would probably be nice to have a native API that can read / write the Ceylon config format at some time. JUst don't hold your breath :)

lucaswerkmeister commented 10 years ago

Actually, does CeylonConfig.setOption() even write to the config file? It seems to me that all it does is update a hash map – I don’t see where a write-back happens.

lucaswerkmeister commented 10 years ago

Oh, I see – ConfigWriter.