Hi guys,
I'm looking for help. To give you my level: I work as a (mostly ruby and
java) programmer and have some experience on that level, but this would
be my first bigger open-source project that I work on. So please be kind ;)
I would like to write a geany plugin trying to provide helpful ruby
refactoring (I think thats the word, what I mean is looking up
(possible) declarations and usages), that can extend or replace the
functionality of "go to tag declaration/definition". I wish for that
because the current implementation looks only in open files as far as I
understand and I would like to provide this on a project basis, therefor
scanning also files not currently opened in geany.
I know this is very intensiv to provide for ruby, however I'm thinking
to provide it only at explicit wish (e.g. special button), not to bother
the slim and fast design of geany. And as I'm doing the same for
"reverse engineering"/understanding geany right now with grep, I think
it should be possible at reasonable speed, unlike these java
implementations that they scan and index all at the beginning and kill
my memory ;) Now what do you think, is it appropriate to provide this
for geany or is it against a concept or something?
The features I currently have in mind:
- a menu-point and keybinding for navigating to possible declarations
- a second mode for auto-completion (maybe pressing space another
time), that looks up possible classes the selected instance is of, to
show only relevant tags for autocompletion
- a menu-point and keybinding for listing possible usages (and the
possibility to navigate there)
Now the Questions:
I checked the demoplugin so in general I think I have a clue on how to
create the plugin.
Now what seems for me the best way to go would be to simple override the
callbacks for the existing "Go to Definition" etc. keybindings (as the
ui-buttons seem to also be using them).
The first relevant key_binding_id I would like to overide the callback
for is GEANY_KEYS_GOTO_TAGDECLARATION.
And it is mapped to a function in keybindings.c on line 1886.
Now, this mapping I would like to overide. Is that possible and how? Or
do I have to create new UI-Elements and link them to my function. I
would not like the latter so much as the global settings for keybindings
wouldn't have effect, wouldn't they?
Thanks for your help and I'll be happy to clarify any questions
rory