[Geany-devel] Plugin for haxe-completion

Enrico Tröger enrico.troeger at xxxxx
Mon Jun 29 21:53:26 UTC 2009


On Sun, 28 Jun 2009 19:17:08 +0200, Andreas wrote:

>Hi.
>
>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?

Either you or (I guess) Chow will do it otherwise. Just talk to him, he
is the release manager for geany-plugins and also maintains the
autotools based build system.

For general SVN write access, just tell me your Sourceforge username,
then I add you to project.


>> 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.

Well, the initial setup might be a bit tricky:
- first of all you need Python, install it somewhere and add the path to
the global PATH environment variable so that running 'python' from the
command line interpreter will work
- then you need pkg-config working and it needs to find the installed
headers and libs of the GTK stack
- you need a geany.pc and copy it to your pkg-config installation
directory as well as the necessary header files for Geany, the easiest
way may be to simply copy these from your Linux installation

But then, 'python waf configure' in the geany-plugins directory should
work, at least it does on my system :).


>> 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?

Don't know, ask Chow as said above.
But you don't need to use it if you don't want to. As said earlier, the
autotools based and the Waf build systems can be used alternatively,
that is they work in parallel. Just decide for one and use it (or
even use both if you are too bored, lol).


>> 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?

Yes, sorry. I should have checked it before sending :).


>I have:
>if (nt->nmhdr.code == SCN_CHARADDED
>&& editor->document->file_type->id == GEANY_FILETYPES_HAXE
>&& (nt->ch == '.' || nt->ch == '('))
>	haxe_completion(...);
>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?

It depends what haxe_completion() actually will do. But for now, it
should be ok.


>BTW: Is it OK to put all conditions in that one if-clause?

It's up to you, whatever you like.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090629/b7578264/attachment.pgp>


More information about the Devel mailing list