This topic contains 0 voices and has 3 replies.
|April 27, 2010 at 5:35 pm #2794|
I’m trying out PN to work on my AVR C/H files. I made a magic folder to point to the AVR include tree. When I click on a header file I see in ctag tab view that the output of ctag make sections like macros, functions typedef ,.. so that’s ok. But if I take a look in the function section where I expect all API function names together of that particular header file this is not the case. For instance if I click on the stdio.h file the function section is only filled with the fflush API and there are of course a couple of other function declared in that header file as you’ll know.
The fflush prototype is like:
static __inline__ int fflush(FILE *stream __attribute__((unused)))
Where it’s actually inline defined here.
And for instance the get string prototype is only defined like:
extern char *gets(char *__str);
and this is not showing up in the tags view.
Maybe ctag is only default configured to translate actual API function strings when having a c files searched instead of the header files I don’t know.
But only giving the headers and libs is a very common thing to do when it comes to using third party code it would be great to have the list complete when selecting the header where the API is declared.
Also the fact that autocompletion works only in the file your’re in is a bit of limitation comparing this to other IDEs. But I know this will be a future feature so that’s great. Maybe also adding the view of the complete function signature with return , body and argument list would be a high class quality future feature.
Nevertheless PN has the ability of becoming a nice editor in the programming world.
So if I can make some changes to ctag config file I’ll be happy to know them to extend with the catch of API functions in regular header files.
|April 27, 2010 at 6:31 pm #17102|
Meanwhile I started to look a bit around on this forum and I found something useful in an other post by adding the following two lines to the additionallanguage.conf file located in the taggers subdirectory:
This works indeed the tag view adds now a prototype section to the tree where all the prototypes are proper listed.
By default this file has the following config parameters:
So I just appended the two lines like:
This seems to work although the langdef parameter now is twice given so I don’t know exactly if this is the proper way to alter the conf file. Maybe I will dig a bit deeper in the ctag stuff to find out. It’s also a fact that by default the langdef is pointed to the “properties” an ini map.
In the additionalSupportedSchemes.ini file in the same directory I find some list of sections:
Each section represents corresponds to a scheme name with tagging defined
externally in additionalLanguages.conf.
For each tag type in your scheme, add a line to the section. The key is the
letter corresponding to your tag type, the value is a tag type number from the
s = 39
So this is a bit unclear to me in respect to the effect of the two added lines.
Maybe I can find some detail description on how to configure ctags to point to file types for some particular language and what will be contructed as an actual tag listed in the view.
All info welcome.
|April 28, 2010 at 1:16 pm #17103|
Your added lines are fine, the changes in the other file are used to tell PN about entirely new languages (like properties) that there is no built-in support for.
|April 28, 2010 at 10:41 pm #17104|
thanks simon !
You must be logged in to reply to this topic.