ctags 'preprocessor' and project groups

Discussion Forums discussion ctags 'preprocessor' and project groups

This topic contains 0 voices and has 4 replies.

Viewing 5 posts - 1 through 5 (of 5 total)
Author Posts
Author Posts
October 22, 2009 at 10:39 am #712

dbubud
Member

Hi,

concerning the fact that ctags isn’t able to evaluate multiline posix regex’s, would’nt it be possible to pass temporarily ‘preprocessed’ source code to it, such as

Line# – Content

1 – 1 & 2

2 – 2 & 3

3 – 3 & 4

and then apply the results to the displayed script?

And possibly beforehand replace all stream-/block comments with spaces, thus avoiding complications with tags found in the midst of those.

I’d also appreciate to see found tags displayed below files in the project strip, and so to have a ‘true’ project panel.

Can’t more than one project groups be shown on that panel, as well?

October 22, 2009 at 12:12 pm #16837

dbubud
Member

Simon,

in addition,

when I write a supplementary ctags.exe to do the things above, changing the scripts you pass to ctags.exe, and call a renamed one afterwards with the same parameters except exchanging the filename with my tempfilename, pnotepad hangs and I have to kill it’s process.

Does it wait for the appearance of the file ‘tags’ or do you catch stdout?

October 23, 2009 at 12:47 pm #16838

simon
Key Master

Project-wide tag support is definitely something I want to do at some point, there have been lots of requests for it. Showing the tags aligned with your project browser selection could be a nice UI feature too.

As for pre-processing the results some alternative version of ctags is one way to do this, providing a custom tagger (c++ plugin) is the other.

PN doesn’t read a tags file, it reads the stdout from ctags. You can see the code here:

http://code.google.com/p/pnotepad/source/browse/trunk/pnwtl/taggers/ctagsnavigator/ctagsnavigator.cpp#176

October 25, 2009 at 4:15 pm #16839

dbubud
Member

As a quick solution, I intend to replace ctags.exe, which you are calling, and, instead of patching it, pass manipulated sources to a renamed copy of it. As long as the tag’s positions in the results match with the ones in the original sources, there should’nt be any problems occuring with pnotepad, right?

Thank you for the hint, I am going to try to pass the results to stdout.

October 26, 2009 at 5:09 pm #16840

simon
Key Master

Should be fine!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.