[Geany-devel] Plugin for haxe-completion

Andreas Mokros am at xxxxx
Sun Jun 28 17:17:08 UTC 2009


On Sun, 28 Jun 2009 11:07:49 +0200
Enrico Tröger <enrico.troeger at uvena.de> wrote:
> And still you can choose whether you want to have it as part of the
> geany-plugins project with its advantages like no need to maintain an
> own build system and getting translations and releases for free (i.e.
> you don't need to manage it yourself)

As I really don't know yet how to set up a proper build system, I'd say
this is good idea. Just what I needed actually :-)
So I'd have to add a Makefile.am in my plugin-dir like the other plugins
do now?

> Waf is by no means deprecated, on the contrary, now we can very easily
> build the plugins even on Windows, thanks to the Waf build system we
> are using.

I remember I compiled some plugins some time ago on Windows, but
haven't tried waf yet. Will try it for my plugin.

> So, neither Waf nor autotools are deprecated at all, we just moved
> some plugins and changed their organisation a bit.

I saw the reordering and I also saw that the waf-script had changed a
bit (and that adding my plugin still worked flawlessly).
Using autotools would mean run ./autogen.sh, right?
Are there any options for it as well for compiling just one plugin?

> Just add it globally, this is how it is intended to be used. In the
> handler simply add a prominent check like this:
> 	if (editor->document->file_type != GEANY_FILETYPES_HAXE)
> 		return FALSE;

You mean editor->document->file_type->id, right?
I have:
if (nt->nmhdr.code == SCN_CHARADDED
&& editor->document->file_type->id == GEANY_FILETYPES_HAXE
&& (nt->ch == '.' || nt->ch == '('))
return FALSE;
So I always return false, because in the docs it says:
Your callback function should return FALSE to allow Geany processing
the event as well. Should be OK?
BTW: Is it OK to put all conditions in that one if-clause?

> No, not really.
> AFAIK the only plugin which makes use of this is the geanyprj plugin.
> Maybe having a look at its sources gives some insight.

I think some project-modifying code in geanyprj was removed recently. It
used to hide the standard projects menu, but doesn't do this anymore.
Also it uses its own config files and all. Anyway, will have a look ...


More information about the Devel mailing list