[Geany] [ANNOUNCE] gproject - yet another geany project plugin

Jiří Techet techet at xxxxx
Mon Jun 7 21:38:19 UTC 2010


Hi,

I would like to announce yet another project management plugin for
geany. The main reason behind its creation is that I work with
thousands of source files and the session-based "project" geany uses
isn't sufficient for my purpose. I also had a look at geanyprj and
while I like some of the ideas behind it, there are some things that
don't fit my needs so I decided to create a new plugin (even though I
took geanyprj as a base of the plugin, it has been completely
rewritten). The things similar to geanyprj are:

* the location of the configuration file determines the root path of the project
* glob-like patterns are used to determine the files belonging to the
project (contrary to geanyprj this is the only way to set the files
belonging to the project)

On the other hand, there are quite many differences:

* the project files are displayed in the form of a tree in the sidebar
(absolutely necessary for big projects)
* several projects can be opened simultaneously (one of them is the
active project, depending on the current document)
* you can specify patterns for source and header files separately -
there is a "swap header/source" functionality that finds the
corresponding header/source to the currently opened document (same
base name matching header/source pattern)
* in addition, you can specify "other" project files - headers,
sources and other files have different icons in the sidebar, which
makes them easier to distinguish
* patterns can also be used to ignore some directories you don't want
to belong to the project (CVS, .git, ...)
* all the project files can be scanned for tags, but this can also be
disabled for big projects.
* there is a possibility to find a project file by name
* search in project files - the project file patterns are passed to
grep, which speeds up things considerably by not having to search the
binaries
* many minor usability improvements
* works well for huge projects (I used linux kernel for testing it and
it works quite well if tag generation is disabled)

The sidebar has its own toolbar so most of the actions are available
directly from there. The first item in the menu, Reload all, is
probably the most important one - it automatically opens the
corresponding project for all the opened files (geanyprj does this
automatically, but for big projects this is rather annoying). In
addition, there is a menu under Tools; however, the items in the menu
are not supposed to be used from the menu - you should rather assign a
keybinding for them as these are used frequently (header/source
swapping, searching in project files, finding project file). Also
there is a context menu for the items in the sidebar - the menu
differs for different elements - projects, folders, files.

You can get the sources here:

http://gitorious.org/gproject

Unfortunately, I had to make a few modifications to geany itself
because its API just didn't provide the functionality I needed in
several cases. I created a new geany project at gitorious:

http://gitorious.org/geany

(you may want to take it over and keep it up-to-date - it's better
than your html-accessed git repository and allows external developers
create their own clones [you may also want to switch to git completely
- it's so much better than svn]). This is just a clone of the
mainline. Then there is my personal clone with the modifications:

http://gitorious.org/~techy/geany/techys-geany

There are four branches:
* gproject-deps - API additions required by gproject
* fixes - fixes that should be applied regardless of gproject
* changebar - this is just for those interested - I've ported the
changebar from codeblocks - something I can't live without. This
however means to maintain a branch of scintilla and I'm not sure if
this is something you want.
* all - all the above branches combined

(For those less familiar with git - these are remote branches and you
have to create a remote tracking branch; type something like this
after cloning the repository:

git checkout remotes/origin/all -b all

to checkout the "all" branch)

The sources aren't yet in the state I would normally require before
making a release but I can see that geany release 0.19 is coming and
it would be nice if it could include the API changes I've made. So
here are a few things which I feel would deserve some more attention:
* there are possibly some minor leaks - I have to go through the
sources carefully to make sure that I deallocate everything. There
shouldn't be any dramatic leaks though.
* during the implementation I was just lazy to convert utf8 to locale
and back - it's present somewhere but there are places where I don't
do that so if you have your sources with some locale characters, some
things may not work
* no support for windows - this is something that someone else has to
do - I don't use windows myself
* no localization support yet - TODO
* for big projects I'd like to create some basic ctags support. The
tag manager used by geany is totally unusable for big projects because
building the object hierarchy has quadratic to exponential complexity.
I need a simple tag support that works in linear time.

Comments and feature requests are welcome. However, beware that I want
to keep the project management simple - I've spent quite a lot of time
thinking how to keep it minimal. So while I'm sure there are many
usability improvements possible, don't be too disappointed if I refuse
your feature suggestion because I feel it complicates things too much.
I really don't want to create Eclipse v2.

Finally, there are a few things I dislike about geany and that I'd
wish to be addressed in some way:
* I'd like to have the same "rights" as the session-based project
support has. However, there are things I just can't do - I can't set
the base directory where build is performed, I can't set per-project
indentation options and so on. (It's totally unclear to me how I'm
supposed to use the GeanyProject structure - apparently it's meant to
be read-only, but then what is it good for?)
* I find the session-based project conceptually wrong - having several
files opened doesn't mean that they belong to the same project - for
instance I often work on several projects in parallel and have their
files opened in parallel. Briefly, session != project
* Is there any technical reason why searches and builds cannot be
interrupted? It's pretty annoying because the build of some of the
subsystems of the project I'm working on takes half an hour and I want
to be able to interrupt it when I start the build by accident.

And there are lots of things I _like_ about geany - especially that
it's so lightweight, yet powerful - this is why I found it worth
spending my time creating the plugin. Thanks for the nice editor and
tell me your opinion about my plugin!

Cheers,

Jiri



More information about the Users mailing list