Mattias Gärtner wrote:
> Zitat von Al Boldi <[EMAIL PROTECTED]>:
> > > > > > Exactly right!  The best feature is find
> > > > > > declaration/implementation, but this only works for pascal code.
> > > > > >  What is needed to make this work for c/c++?
> > > > >
> > > > > Maybe a plugin for ctags can be written.
> > > >
> > > > Yes, that may be the easiest way.  But I think we should use ctags
> > > > inlined, so that the index is created on-the-fly, and then fed into
> > > > the codetools as you open each file.  Do the codetools support this?
> > >
> > > Partially.
> > > The codetools already support three 'languages': pascal (delphi,
> > > objfpc, parts of macpas, parts of tp), lfm and pascal directives.
> > >
> > > The file caches could and should be used (for speed and for integrity
> > > with the other IDE tools).
> >
> > The problem with the caches is that they are somewhat misleading when
> > you start changing the code, and then forget to reindex.  So doing it
> > on-the-fly should be much safer and faster for large trees.
>
> I can't follow you here.
> I was talking about the caches for files. For example the cache for the
> file unit1.pas. The pascal parser reads and creates a code tree. This code
> tree is cached as well, but this is another cache and can not be used by
> the ctags. I only said, that the plugin should use the file caches instead
> of accessing the files on disk directly.

Ok, then we are in agreement.

> > I think the least we should handle are the #include's, otherwise the
> > on-the-fly ctags may not work.  Parsing the files for #include's should
> > be easy, right?
>
> I'm no ctags expert. I don't know if ctags has a preprocessor.

AFAIK it doesn't.  For example "ctags *" only indexes the current dir, and 
doesn't pick up includes, whereas "ctags -R" does it recursively picking up 
the whole tree except external includes.  Which means that we have to handle 
the #include's manually.


Thanks!

--
Al

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to