>>>>> "Andreas" == Andreas Vallen <[EMAIL PROTECTED]> writes:

  Andreas> Hi

  Andreas> I have some trouble trying to find out why
  Andreas> 'jde-open-class-at-point' does not work as it should. I get
  Andreas> the error-message: "Can not parse the thing at point" when
  Andreas> applying the function to the name of a class that is
  Andreas> imported via an import statement with an asterisk:

  Andreas>   import package.*;

  Andreas> Rewriting the statement to

  Andreas>   import packagename.Classname;

  Andreas> makes the error go away!

  Andreas> Note that the JDK classes are found either way.  Using the
  Andreas> lisp debugger I found that it is the Beanshell which
  Andreas> seemingly chokes on this: 'jde-parse-class-exists' which
  Andreas> invokes the Beanshell does not find the class.

  Andreas> The Beanshell runtime classpath contains the searched for
  Andreas> classes. Any advice?

Use the fully qualified names for imports. It's much more future
proof. When java 1.2 came out all my code which had "import
java.awt.*; import java.util.*" broke because of a name clash over
list. 

In the end more useful for other programmers as well, as they don't
have to guess which of several packages a class might belong to. 

JDE has utilities for enabling you to do these sort of imports
without actually having to type them, so its easy to do. I seem to
remember someone suggesting putting functionality into to do all the
required imports in a new buffer automatically. Don't know if that
functionality has gone in yet. Shouldn't be too hard to write.

Cheers

Phil

Reply via email to