|
Commands provided by jde-usages
Usage related commands:
M-x jde-usages-display-call-tree
JDEpi→jde-usages→Usages/Callers for→method or field definition at point
Displays an interactive call tree of the locations where the current method
declaration is called.
If called if a prefix argument, this command will not display usages where the
class of the called object is not the exactly the same as the original class.
M-x jde-usages-display-call-tree-for-thing-at-point
JDEpi→jde-usages→Usages/Callers for→Method call or field reference at point
Uses JDEE's completion mechanism to try to figure out the class of the method call at
point, and then displays usages for this method signature. Since there may be
multiple methods with the same name and the types of the parameters to this method
cannot be easily computed, this command only searchs for method calls with the
same number of paramters as this one. This may return extra results. If you have
"foo(int,int)" and "foo(String,String)" defined for a class, when point is at a
call like "foo (1,1);"
jde-usages-display-call-tree-for-thing-at-point will find usages of
both methods combined.
M-x jde-usages-display-call-tree-for-specified-class
JDEpi→jde-usages→Usages/Callers for→method or field specified interactively
Lets you enter a class name, a method name and the number of parameters it takes, and
will find all usages for such a method. The defaults for these fields are the current
class name (as returned by jde-usages-get-current-class ), the method
"<init>" which is the name of the class constructor and 0. So accepting the
defaults will result in a search for all places the default constructor for this class
is called.
When searching for usages of a method the above commands will also display calls
made using relevant super and sub classes of the original class. Prefixing the above
commands with C-u will force a search for calls only to the orginal class.
Example:
01 class A { void foo() {} }
02
03 class B extends A { void foo() -!- {} }
04
05 class C extends B { }
06
07 class D extends C { void foo() {} }
08
09 {
10 B b = new C();
11 A a = b;
12 C c = (C)b;
13 D d = new D();
14
15 a.foo();
16 b.foo();
17 c.foo();
18 d.foo();
19 }
If "-!-" indicates where point is, the command
JDEpi→jde-usages→Usages→for method defn at point
will show usages on lines 15, 16 and 17. Prefixing this command with "C-u" will result in
only line 16 showing up in the usages. Note that in either case line 18 is not listed as a
usage: since D overrides the defintion of foo(), a call to the method foo of an object of
type D will execute the method defined on line 07 and not line 03.
Class tree commands:
jde-usages-display-subs-and-implementers
JDEpi→jde-usages→Inheritance trees→Subtypes
This command displays a tree of all the subclasses for a class. For an interface all
the implementing classes and all subinterfaces are shown.
jde-usages-display-superclasses
JDEpi→jde-usages→Inheritance trees→Supertypes
This command displays a tree of all the superclasses and implemented interfaces a
class.
jde-usages-display-type-hierarchy
JDEpi→jde-usages→Inheritance trees→Type Hierarchy
This command displays all the superclasses and implemnted interfaces and
superinterfaces for a class.
In the class trees displayed by these commands, class names that have an "(I)" next to
their names are interfaces, while abstract classes are distinguised by an "(A)".
M-x jde-usages-display-subs-implementing-method
JDEpi→jde-usages→Misc→Classes overriding/implementing this method
Shows you all the locations where the current method is overridden or
implemented.
M-x jde-open-class-source-with-completion
JDEpi→jde-usages→Misc→Open class (with name completion)
A wrapper around jde-open-class-source which provides class-name
completion. The list of classes in the project is updated automatically.
M-x jde-usages-locate-class
JDEpi→jde-usages→Misc→Locate class
Find the jar or directory in jde-global-classpath that the entered
class-name is located in.
M-x jde-usages-next-pos
Browses to the next entry in the *usages* buffer. Can be called from any buffer.
|