Yes, I just checked and I have exactly that same patch in my local version of jde-usages :-)
Thanks for posting it to the list. I haven't seen any messages from Suraj Acharya for a long time (I tried emailing about the eclipse compiler server but had no response), so it seems abandoned - it is a great plugin though. Cheers, Len. On Sun, May 16, 2010 at 4:30 AM, 529pss <[email protected]> wrote: > In case it is useful to someone: > > I've found an issue using jde-usages with the latest jdee (trunk). > Basically I wasn't able to display a inheritance tree (subtypes or > supertypes) for a given class. > > Log shown in the messages buffer: > > --------------------------------------------- > > error : (void-variable java\.io\.printstr...@7a3570b0) [2 times] > error : (void-variable //) [3 times] > Beanshell expression evaluation error. > Expression: { > boolean _prevShowValue = this.interpreter.getShowResults(); > Object _retVal = null; > this.interpreter.setShowResults(false); > _jdeCustEvalFn() { jde.util.Usages.getAllClasses (out); }; > try { _retVal = eval("_jdeCustEvalFn();"); } > finally { > this.interpreter.setShowResults(_prevShowValue); > } > if (_retVal != null) print(_retVal); > } > Error: // Error: // Uncaught Exception: Method Invocation > this.interpreter.eval : at Line: 73 : in file: /bsh/commands/eval.bsh : > this .interpreter .eval ( expression , this .caller .namespace ) > > Called from method: eval : at Line: 29 : in file: <unknown file> : eval > ( "_jdeCustEvalFn();" ) > Target exception: Sourced file: inline evaluation of: > ``_jdeCustEvalFn();'' : Undefined argument: out : at Line: 28 : in > file: <unknown file> : ( out ) > > Called from method: _jdeCustEvalFn : at Line: 1 : in file: inline > evaluation of: ``_jdeCustEvalFn();'' : _jdeCustEvalFn ( ) > [2 times] > > --------------------------------------------- > > > So, basically the error is caused by the undefined argument 'out'. > The error can be fixed by replacing the following 3 lines in the > jde-usages-class-completion.el (line 46): > > (jde-jeval (concat "out = new java.io.PrintStream (new > java.io.BufferedOutputStream (new java.io.FileOutputStream (new > java.io.File (\"" classes-file "\"))));")) > (jde-jeval "jde.util.Usages.getAllClasses (out);") > (jde-jeval "out.close();") > > > By: > > (jde-jeval (concat "out = new java.io.PrintStream (new > java.io.BufferedOutputStream (new java.io.FileOutputStream (new > java.io.File (\"" classes-file "\")))); jde.util.Usages.getAllClasses > (out); out.close();")) > > > Basically, every 'jde-eval' invocation is scoped (between '{...}'). > That's why the 'out' variable is not known in the second 'jde-eval' > invocation. > Replacing the 3 tree evaluations by just one fixes the problem. > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > jdee-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jdee-users > ------------------------------------------------------------------------------ _______________________________________________ jdee-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jdee-users
