Re: [java-gnome-hackers] sourceview development branch
Brought to you by:
afcowie
From: Stefan S. <ste...@gm...> - 2009-05-23 15:57:04
|
On Sat, 2009-05-23 at 18:37 +1000, Andrew Cowie wrote: > As I was reading through this branch this afternoon, I noticed that > you > don't have a no-arg SourceBuffer constructor. Yes, a no-arg constructor would be nice. Will have a look at that. > Dare I suggest preconfigured constants, ie Language.JAVA maybe? See > org.gnome.gtk's PaperSize.A4 and friends. I am not sure about the constants. GtkSourceView supports 70 languages or so and they may not always be available because the search path can be changed. There is a method to do that in LanguageManager (not exposed yet). This could be useful for special-purpose language files that are shipped with a java-gnome application. > Weighing against all of this is "we only diverge the API mapping if > we've got a good reason to" but avoiding intermediate factory classes > that don't do anything are in the category of good reason, IMHO. > > Failing all that, it seems like the static method could simply be on > Language, leaving LanguageManager out of it entirely. Again - if > there's > more purpose for that class, fine, but it sure doesn't seem that way. There are more things in LanguageManager that I did not (yet?) expose: the already mentioned method to change the search path for language files and there is a method to guess the language from a given file. So, I do not think LanguageManager is useless. Stefan |