Re: Improved patch to jde-wiz.el (for deep inner-class names)

Len Trigg <[email protected]>
Newsgroups gmane.emacs.jdee.devel
Message-ID <hbhbss1p5f.wl%[email protected]>
Jeff Peck wrote:
> Improved patch to jde-wiz.el, so implement-interface can find deeply nested class/interface.
> (recurse, replacing last '.' with '$' until class is found)

Needs some improvement to error handling. I tried invoking
jde-wiz-implement-interface FooBar from within Blah in the following
small test file I had around.

Before the patch:

error : (error "Error: could not find interface named: ZCat.FooBar. Note: name must be qualified.") [2 times]
error : (error "Error: could not find interface named: ZCat$FooBar. Note: name must be qualified.") [2 times]
Error: could not find interface named: ZCat$FooBar. Note: name must be qualified.


After the patch:

error : (error "Error: could not find interface named: ZCat.FooBar. Note: name must be qualified.") [2 times]
error : (error "Error: could not find interface named: ZCat$FooBar. Note: name must be qualified.") [1220 times]
error in process filter: typep: Variable binding depth exceeds max-specpdl-size
error in process filter: Variable binding depth exceeds max-specpdl-size
error : (error "Error: could not find interface named: ZCat$FooBar. Note: name must be qualified.") [2 times]
error in process filter: byte-code: Variable binding depth exceeds max-specpdl-size
error in process filter: Variable binding depth exceeds max-specpdl-size
error : (error "Error: could not find interface named: ZCat$FooBar. Note: name must be qualified.")
error in process filter: apply: Variable binding depth exceeds max-specpdl-size
error in process filter: Variable binding depth exceeds max-specpdl-size
error in process filter: timer--time-less-p: Variable binding depth exceeds max-specpdl-size
error in process filter: Variable binding depth exceeds max-specpdl-size
error : (error "Error: could not find interface named: ZCat$FooBar. Note: name must be qualified.")
error in process filter: typep: Variable binding depth exceeds max-specpdl-size
error in process filter: Variable binding depth exceeds max-specpdl-size
error : (error "Error: could not find interface named: ZCat$FooBar. Note: name must be qualified.")
error in process filter: eieio-validate-slot-value: Variable binding depth exceeds max-specpdl-size
error in process filter: Variable binding depth exceeds max-specpdl-size

And I get left at a minibuffer prompt "Lisp expression:"


Cheers,
Len.


----------- ZCat.java ---------------
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.zip.GZIPInputStream;

public class ZCat {

  public interface FooBar {
    public void someMethod();
  }

  public class Blah {
    
  }
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(new GZIPInputStream(System.in)));
    String line;
    int lines = 0;
    while ((line = br.readLine()) != null) {
      System.out.println(line);
      lines++;
    }
    System.err.println("Read " + lines + " lines");
  }
}

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.