From: Jim B. <jf_...@co...> - 2014-02-21 03:23:38
|
I am trying to get CtagsSideKick to do a better job of parsing beanshell files. Both the ctags and the default parser will recognize a function with no parameters as a function ie myFunc(){}. If the function has parameters ie myFunc(a){} neither of them seems to recognize it as function. As a test I gave the file an extension of .java and ctags did a much better job of recognizing them. I looked for a config file but could not find any, or are they in a jar? Thamks, Jim |
From: Robert S. <Rob...@ka...> - 2014-02-21 20:16:29
|
<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body text="#000000" bgcolor="#FFFFFF"> <div class="moz-cite-prefix"><tt><tt>For me, w</tt>hen my active buffer has a .bsh extension and jedit is </tt><tt>in beanshell edit mode,</tt><tt><br> </tt><tt>the java parser</tt><tt> only lists import</tt><tt> statements. But CtagsSideKick </tt><tt>is very informative. Even the following statement <br> </tt><tt><br> </tt><i><tt> private void addErrorToList(View view, String Type, String File, int Line, int StartColumn, int EndColumn, String Message, String ExtraLines) {</tt></i><tt><i><br> </i><br> is listed as a <b>meth</b><b>od.</b></tt><tt> I'm not using any java or beanshell custom config for ctags. I'm on Windows and "ctags --version" output is:<br> <br> <i>Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert</i><i><br> </i><i> Compiled: Jul 9 2009, 17:05:35</i><i><br> </i><i> Addresses: <a class="moz-txt-link-rfc2396E" href="mailto:dhi...@us..."><dhi...@us...></a>, <a class="moz-txt-link-freetext" href="http://ctags.sourceforge.net">http://ctags.sourceforge.net</a></i><i><br> </i><i> Optional compiled features: +win32, +regex, +internal-sort</i><i><br> </i><br> Robert<br> </tt><br> </div> <blockquote cite="mid:530...@co..." type="cite"> <pre wrap="">I am trying to get CtagsSideKick to do a better job of parsing beanshell files. Both the ctags and the default parser will recognize a function with no parameters as a function ie myFunc(){}. If the function has parameters ie myFunc(a){} neither of them seems to recognize it as function. As a test I gave the file an extension of ..java and ctags did a much better job of recognizing them. I looked for a config file but could not find any, or are they in a jar? Thamks, Jim ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. <a class="moz-txt-link-freetext" href="http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk">http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk</a> </pre> </blockquote> <br> </body> </html> |
From: Jim B. <jf_...@co...> - 2014-02-21 20:47:57
|
On 02/21/2014 02:16 PM, Robert Schwenn wrote: > For me, when my active buffer has a .bsh extension and jedit is in beanshell > edit mode, > the java parseronly lists importstatements. But CtagsSideKick is very > informative. Even the following statement > > / private void addErrorToList(View view, String Type, String File, int Line, > int StartColumn, int EndColumn, String Message, String ExtraLines) {// > / > is listed as a *meth**od.*I'm not using any java or beanshell custom config for > ctags. I'm on Windows and "ctags --version" output is: > > /Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert// > // Compiled: Jul 9 2009, 17:05:35// > // Addresses: <dhi...@us...>, http://ctags.sourceforge.net// > // Optional compiled features: +win32, +regex, +internal-sort// > / > Robert I'm on Ubuntu and mine is: Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert Compiled: Nov 9 2011, 17:42:21 Addresses: <dhi...@us...>, http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex Looks like I have some digging to do as mine behaves as I outlined below. I was hoping to find the regex it was using to parse the .bsh files so maybe I could modify it. Thanks, Jim >> I am trying to get CtagsSideKick to do a better job of parsing beanshell >> files. Both the ctags and the default parser will recognize a function >> with no parameters as a function ie myFunc(){}. >> >> If the function has parameters ie myFunc(a){} neither of them seems to >> recognize it as function. As a test I gave the file an extension of >> ..java and ctags did a much better job of recognizing them. >> >> I looked for a config file but could not find any, or are they in a jar? >> >> Thamks, Jim >> >> >> ------------------------------------------------------------------------------ >> Managing the Performance of Cloud-Based Applications >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> Read the Whitepaper. >> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk > > > |
From: Alan E. <ala...@gm...> - 2014-02-23 15:23:57
|
I just downloaded the source code of ctags and tried to find where the rules for java are, and it seems the rules for some of the languages are actually implemented in .c files, instead of as regex configuration files. parsers.h makes reference to "JavaParser" and searching that symbol in the source tree, we can see it is defined in a file called "c.c" which is where the C language parser is defined. So the java parser is somehow defined in terms of the c language parser and to customize it or extend it, you need to do some C programming (*I think*). |
From: Jim B. <jf_...@co...> - 2014-02-23 16:53:51
|
On 02/23/2014 09:23 AM, Alan Ezust wrote: > I just downloaded the source code of ctags and tried to find where the > rules for java are, and it seems the rules for some of the languages are > actually implemented in .c files, instead of as regex configuration files. > > parsers.h makes reference to "JavaParser" and searching that symbol in the > source tree, we can see it is defined in a file called "c.c" which is where > the C language parser is defined. > > So the java parser is somehow defined in terms of the c language parser and > to customize it or extend it, you need to do some C programming (*I think*). > Alan, Thanks for looking. I'm afraid I don't know c. However after poking around the ctags help and a little experimenting I did find a workaround. If I add --langmap=java:+.bsh to my .ctags file the built in java parser will then be used to parse beanshell files. I haven't had it in place for very long but it seems to solve the function(with parameters) problem I was seeing and over all seems to do a good enough job for my needs. Thanks, Jim |