[Geany-devel] question about templates

2009-07-04 Thread Andreas Mokros
Hi. While setting up Geany as my haxe-IDE I saw that I can now add custom templates (for haxe e.g.). This is quite new, isn't it? Thanks for that :-) But templates in haxe are always commented like this: // // name: unknown // @param // @return while C-templates are commented like this: /* * *

Re: [Geany-devel] question about templates

2009-07-04 Thread Enrico Tröger
On Sat, 4 Jul 2009 13:46:53 +0200, Andreas wrote: >But templates in haxe are always commented like this: >// >// name: unknown >// @param >// @return >while C-templates are commented like this: >/* > * > * name: unknown > * @param > * @return > */ >Is there a switch somewhere to change this, i.

Re: [Geany-devel] question about templates

2009-07-04 Thread Andreas Mokros
On Sat, 4 Jul 2009 15:34:57 +0200 Enrico Tröger wrote: > Changing comment_open and comment_close in filetypes.haxe should help. No, that was my first thought also. But that doesn't change anything about the comment-style for header and function description. Also the c-filedef has comment_open=//

Re: [Geany-devel] question about templates

2009-07-05 Thread Enrico Tröger
On Sat, 4 Jul 2009 18:54:56 +0200, Andreas wrote: >On Sat, 4 Jul 2009 15:34:57 +0200 >Enrico Tröger wrote: >> Changing comment_open and comment_close in filetypes.haxe should >> help. > >No, that was my first thought also. But that doesn't change anything >about the comment-style for header and f

Re: [Geany-devel] question about templates

2009-07-05 Thread Andreas Mokros
On Sun, 5 Jul 2009 16:47:23 +0200 Enrico Tröger wrote: > It *should* that but it doesn't do yet :(. > Have a look at src/templates.c make_comment_block() and remove the > case for Haxe. OK, I see. > I guess blackdog preferred the // style when we added > the filetype. Not sure what's best as th

Re: [Geany-devel] question about templates

2009-07-05 Thread Enrico Tröger
On Sun, 5 Jul 2009 17:52:14 +0200, Andreas wrote: >> We should rewrite this function so that it uses the >> comment_open/comment_close settings > >Definitely. Then you can choose yourself. > >> but there is still the lack for >> the line_prefix information. > >You mean tabs or spaces at the begin

Re: [Geany-devel] question about templates

2009-07-05 Thread Andreas Mokros
On Sun, 5 Jul 2009 18:47:09 +0200 Enrico Tröger wrote: > No, the line_prefix means to insert an asterisk at the beginning of > lines inside the multi line comment, e.g. > /* > * blah > * blah > */ > line_prefix would be " *" in this case. I see. > Function name should be inserted into the temp

Re: [Geany-devel] question about templates

2009-07-05 Thread Enrico Tröger
On Sun, 5 Jul 2009 19:11:50 +0200, Andreas wrote: >> This can be improved but doesn't necessarily need to. > >I'll have a look at the code. Maybe I can make it work for haxe, >too ... The problem is that Geany doesn't really know about the current scope. Check the 'scope' field in the statusbar,

Re: [Geany-devel] question about templates

2009-07-05 Thread Andreas Mokros
On Sun, 5 Jul 2009 19:17:10 +0200 Enrico Tröger wrote: > So, fixing this means to fix the code which determines the current > scope which is not completely trivial but surely possible. > Have a look at symbols_get_current_function(), the code uses > information from Scintilla and from tagmanager t

Re: [Geany-devel] question about templates

2009-07-08 Thread Enrico Tröger
On Sun, 5 Jul 2009 21:00:57 +0200, Andreas wrote: >On Sun, 5 Jul 2009 19:17:10 +0200 >Enrico Tröger wrote: >> So, fixing this means to fix the code which determines the current >> scope which is not completely trivial but surely possible. >> Have a look at symbols_get_current_function(), the code

Re: [Geany-devel] question about templates

2009-07-09 Thread Andreas Mokros
Hi. On Thu, 9 Jul 2009 00:45:46 +0200 Enrico Tröger wrote: > Nah, "function" is a keyword, not an identifier. The function name > instead is indeed an identifier > "secondary keywords" (=2) is styled with the keyword style 2 > (SCE_C_WORD2), so yes, this is intentional even though defined by > Sc

Re: [Geany-devel] question about templates

2009-07-09 Thread Enrico Tröger
On Thu, 9 Jul 2009 13:50:10 +0200, Andreas wrote: >Hi. > >On Thu, 9 Jul 2009 00:45:46 +0200 >Enrico Tröger wrote: >> Nah, "function" is a keyword, not an identifier. The function name >> instead is indeed an identifier >> "secondary keywords" (=2) is styled with the keyword style 2 >> (SCE_C_WORD

Re: [Geany-devel] question about templates

2009-07-09 Thread Andreas Mokros
On Thu, 9 Jul 2009 16:25:09 +0200 Enrico Tröger wrote: > Yes, good catch. Amazing that nobody noticed that earlier. It might > indicate how many users do use Haxe with Geany...:( From what I've seen, blackdog did quite a lot of haxe stuff for Geany, like his hxDev-plugin, but at some point didn't

Re: [Geany-devel] question about templates

2009-07-09 Thread Enrico Tröger
On Thu, 9 Jul 2009 17:19:05 +0200, Andreas wrote: >> I will fix this unless you want to provide a patch? > >Well, a patch for changing a "2" into a "3" is not really necessary. Ok, committed. >> Well, the manual describes it basically: >> http://geany.org/manual/#generating-a-global-tags-file

Re: [Geany-devel] question about templates

2009-07-12 Thread Andreas Mokros
On Thu, 9 Jul 2009 17:32:12 +0200 Enrico Tröger wrote: > >Well, a patch for changing a "2" into a "3" is not really > >necessary. > Ok, committed. Thanks. Works nicely :-) > Well, gint, gchar and such are C typedefs, defined in the GLib header > files. These are parsed by Geany when generating

Re: [Geany-devel] question about templates

2009-07-12 Thread Andreas Mokros
On Thu, 9 Jul 2009 16:25:09 +0200 Enrico Tröger wrote: > >Well, parse_cpp_function_at_line() *should* actually work with haxe > >then at first glance. Maybe symbols_get_current_function does > >something wrong? I'll try to debug it ... > Cool, much appreciated. Seems like the symbol parser for

Re: [Geany-devel] question about templates

2009-07-14 Thread Enrico Tröger
On Sun, 12 Jul 2009 19:12:15 +0200, Andreas wrote: >On Thu, 9 Jul 2009 17:32:12 +0200 >Enrico Tröger wrote: >> >Well, a patch for changing a "2" into a "3" is not really >> >necessary. >> Ok, committed. > >Thanks. Works nicely :-) > >> Well, gint, gchar and such are C typedefs, defined in the G

Re: [Geany-devel] question about templates

2009-07-14 Thread Enrico Tröger
On Mon, 13 Jul 2009 02:52:54 +0200, Andreas wrote: >On Thu, 9 Jul 2009 16:25:09 +0200 >Enrico Tröger wrote: >> >Well, parse_cpp_function_at_line() *should* actually work with haxe >> >then at first glance. Maybe symbols_get_current_function does >> >something wrong? I'll try to debug it ... >>

Re: [Geany-devel] question about templates

2009-07-14 Thread Andreas Mokros
On Tue, 14 Jul 2009 21:19:34 +0200 Enrico Tröger wrote: > On the Ctags project website I found > http://ctags.sourceforge.net/EXTENDING.html. Thanks for the detailed information. Will look into it. -- Mockey ___ Geany-devel mailing list Geany-devel@uve