Re: [Anjuta-list] suggestion



OK - I figured out a way to do this without touching the code. Do this:

Go to the root directory of your project and type
$ HEADERS=`find . -name "*.h" -exec echo -n "{} " \;`
$ ctags --excmd=number --c-types=pcdgstu $HEADERS

This should create a file called 'tags'.
Then login as root and type:
$ python /usr/local/share/anjuta/tags2api.py tags 
>>/usr/local/share/anjuta/linux-gnome-c.api

Then restart anjuta. That's it.

I agree, however, that there should be a way to do this dynamically. Maybe 
the anjuta developers are working on it ? The relevant code seems to be this 
(aneditor.cxx line 1774)
	SString apifilename = props->GetNewExpand("api.", 
fileNameForExtension.c_str());
	if (apifilename.length()) {
		FILE *fp = fopen(apifilename.c_str(), "rb");
		if (fp) {
			fseek(fp, 0, SEEK_END);
			int len = ftell(fp);
			char *buffer = apis.Allocate(len);
			if (buffer) {
				fseek(fp, 0, SEEK_SET);
				fread(buffer, 1, len, fp);
				apis.SetFromAllocated();
			}
			fclose(fp);


- Biswa.

On Friday 07 September 2001 09:58 am, crispin iinet net au wrote:
> Just a suggestion...
>
> when I go "strlen(" I get a beaut tooltip giving me the prototype and
> taking me through it.
>
> What would be cool is when I #include a header, anjuta parses the headed
> and adds it to its tool tips. So I go
>
> #include <newt.h>
>
> And then
>
> button=newtButton(
>
> and I'd get
>
> newtButton(int left, int top, const char * text)
>
> which is straight from /usr/include/newt.h
>
> Thanks for the great IDE. I used Kdevelop a long while ago, but I like to
> code Gnome and GTK stuff. Thus I gave up KDevelop and used Nedit for
> straight code file editing. Im swithing to anjuta. Its great with the
> ability to edit your Makefile.am's and configure.in's.
>
> I really should learn LISP and then emacs, but Im way too busy :)
>
> Crispin
>
>
> _______________________________________________
> Anjuta-list mailing list
> Anjuta-list lists sourceforge net
> https://lists.sourceforge.net/lists/listinfo/anjuta-list

-- 
- Biswapesh.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]