Re: [gedit-list] Javascript code outliner?



agreed.  thanks for the pointer.

--KM

On Fri, Nov 19, 2010 at 9:02 AM, Derek Veit <dv8box-nabble yahoo com> wrote:
In addition to using ctags, the Class Browser plugin does some extra parsing for a few other languages.  For example, it has a parser_python.py module for Python, so a nested definition in Python shows as nested in the Class Browser tree.  The easiest and best way to provide the same thing for _javascript_ might be to write a parser_javascript.py module to add to the Class Browser plugin.

Derek Veit

kaleb moreland said the following on 11/18/2010 07:30 AM:
And that did the trick.  Thanks Matej!

As an aside, my JS codebase makes heavy use of closures and prototypal
inheritance.  But apparently ctags parsing won't handle nested definitions.
I guess my search for a Gedit-based class browser for JS continues...

best,
Kaleb


On Thu, Nov 18, 2010 at 10:13 AM, Matěj Cepl <mcepl redhat com> wrote:

  
Dne 18.11.2010 16:08, kaleb moreland napsal(a):
    
Yeah, running Gedit <_javascript_-file> from the command line emits:
ctags: invalid option -- 'n'

Could it be I'm on a wrong ctags version?  Not sure how to check for
that, though.
      
I think gedit expects exuberant tags (there are more implementations of
the ancient tags command). Try to run the following command:

jakoubek:~ $ ctags --version
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
 Compiled: Jan  4 2010, 12:38:14
 Addresses: <dhiebert users sourceforge net>, http://ctags.sourceforge.net
 Optional compiled features: +wildcards, +regex
jakoubek:~ $

or you can try (dpkg -S /usr/bin/ctags would be Debian equivalent I
believe):

jakoubek:~ $ rpm -qif /usr/bin/ctags
Name        : ctags                        Relocations: (not relocatable)
Version     : 5.8                               Vendor: Fedora Project
Release     : 2.fc13                        Build Date:
Po 4. leden 2010, 13:38:16 CET
Install Date: Út 17. srpen 2010, 20:42:29 CEST      Build Host:
x86-01.phx2.fedoraproject.org
Group       : Development/Tools             Source RPM:
ctags-5.8-2.fc13.src.rpm
Size        : 347892                           License: GPLv2+ or Public
Domain
Signature   : RSA/SHA256, So 24. červenec 2010, 23:49:23 CEST, Key ID
421caddb97a1071f
Packager    : Fedora Project
URL         : http://ctags.sourceforge.net/
Summary     : A C programming language indexing and/or cross-reference tool
Description :
Ctags generates an index (or tag) file of C language objects found in
C source and header files.  The index makes it easy for text editors or
other utilities to locate the indexed items.  Ctags can also generate a
cross reference file which lists information about the various objects
found in a set of C language files in human readable form.  Exuberant
Ctags improves on ctags because it can find all types of C language tags,
including macro definitions, enumerated values (values inside enum{...}),
function and method definitions, enum/struct/union tags, external
function prototypes, typedef names and variable declarations.  Exuberant
Ctags is far less likely to be fooled by code containing #if preprocessor
conditional constructs than ctags.  Exuberant ctags supports output of
Emacs style TAGS files and can be used to print out a list of selected
objects found in source files.

Install ctags if you are going to use your system for C programming.
jakoubek:~ $


--
http://www.ceplovi.cz/matej/, Jabber: mcepl<at>ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

Experience is what you get when you don't get what you want.
  -- Dan Stanford



    
  
_______________________________________________ gedit-list mailing list

_______________________________________________
gedit-list mailing list
gedit-list gnome org
http://mail.gnome.org/mailman/listinfo/gedit-list




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