Re: [anjuta-devel] Code assistance plugin



Hi Sébastien, all,

I may be slightly late, but here are my thoughts anyway.

              في خ، 12-04-2012 عند 23:06 +0200 ، كتب Sébastien Granjoux:
Hi all,


There are some work planned to use clang to improve code assistance in 
Anjuta. There is a gedit plugin written in Vala which is already doing 
it. But it's not clear for me what has to be done and how to do it.

I also think this needs to be discussed.

1. The gedit plugin is written in Vala. Do we plan to add Vala code in 
Anjuta or do we have to rewrite it in C?

Anjuta already has some Vala code (the Vala plugin), so I don't think
this should be a problem.

2. This is a gedit plugin, it cannot be loaded in Anjuta. Do you think 
it's better to rewrite it or check if we can load gedit plugin?

Anjuta and gedit expose different interfaces (for example, Anjuta
doesn't expose GtkSourceView directly), so I don't think it's worth the
trouble to try loading a gedit plugin.

3. After a quick look at the code I think the plugin is already split in 
3 libraries:
* libgcp is the common part, including the GUI working with GEdit.
* libgcpbackendc is the C backend using clang. It is a GEdit plugin and 
depends on libgcp too.
* gcpbackendpython is the python backend. It is a GEdit plugin and 
depends on libgcp too.
How do we plan to remove the dependency with GEdit?

I don't know. My understanding is that we want to use libclang the same
way as we use the libvala in the Vala plugin (or perhaps a little more).

4. Which features do we plan to add?
* Auto completion.
* List symbols
* Searching symbols
* Renaming symbols
* Parameter reordering.
* Background compiling and reporting errors while editing the file.
* Display call graph
* Static analysis

Just a personal opinion, but I think auto completion and background
compilation are the first things to do, then adding refactoring
(renaming symbols and reordering parameters, and maybe something else)
would be useful as well.

5. Several features (auto completion (in C and python), symbol list) 
already exist in Anjuta. Do we keep them or is it planned to replace them?

I don't know about python (but I think the current plugin uses rope,
while gedit's uses the ast module), but for C I think using an actual
compiler would give better results than we have now.

6. Comparing to anjuta-tags for C, I think clang is much better but 
anjuta-tags works for much more languages. Moreover an important part of 
the symbol-db plugin is the database management which is not existing in 
the gedit plugin. I would prefer to keep it. Is it planned?

I think that using clang means making the C plugin do more or less the
same thing as is currently done in the Vala plugin: by using a real
compiler, we can have a better understanding of the code and thus get
better results for the completion. I think symbol-db could still be
useful for other languages (the javascript plugin as also using it) and
for the symbol list.

Cheers,
Abderrahim




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