Re: [anjuta-devel] Vala and the new code-assistance architecture



Hi,


Quoting Johannes Schmid <jhs jsschmid de>:
But splitting the plugins further won't fix the problem. Thinking
about
it, the best solution would be to put the configuration in some other
plugin, maybe the editor plugin (as it already provides means for
code
completion). What do the others think?

Good Idea! But what will we do, if a language-support plugin won't
support some options? Should we hide this option from the user, if this
plugin is activated?

That's a tricky problem. Python and C are quite different to indent so I
assume we won't be able to do this with a single preference dialog.

I think it would be better to have one preference dialog for each language where
you can change only the preferences used by this language.


And
it's not clear if all users really want the same settings for C and
Python, some projects use quite different settings there.

I don't know neither if the users want the same settings or not. I think it
could be better to have something even project specific.

Anyway, it is possible to store the preference in common keys. I have already
implemented this:
http://git.gnome.org/browse/anjuta/commit/?id=70b56b507a51aa99d3bb779cdc630ebadab6d8f8

You need to add a dot at the beginning of the key name and you can add
directories. I have by example put the keys in org.gnome.anjuta.editor.

In my case, I need to know the indentation preferences (using tab or not, the
size of indentation and the size of a tab). These preferences are editor
preferences but as we can have at least two editors (scintilla and
gtksourceview), I would have to know which is the current editor. This is even
unknown if there is no file open, so I have created these common keys.

Other plugin, typically the project and the file wizard can directly check these
key to know how to indent the source files. The editor plugin doesn't even need
to be loaded.

Probably we can use such keys here too.


Regards,

Sébastien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]