See: Description
Interface | Description |
---|---|
BreakpointStratifier |
Implement this interface to adjust breakpoint properties of newly created
breakpoints according to the strata.
|
EditorContext.BytecodeProvider |
A provider of method bytecode information.
|
Evaluator<PreprocessedInfo> |
Evaluator service for a language that compiles into bytecode.
|
Class | Description |
---|---|
BreakpointsClassFilter |
Filter of breakpoint class names.
|
BreakpointsClassFilter.ClassNames |
The set of class names and excluded class names.
|
EditorContext |
Defines bridge to editor and src hierarchy.
|
EditorContext.MethodArgument |
Representation of an argument to a method.
|
EditorContext.Operation |
The operation definition.
|
EditorContext.Position |
Representation of a position in a source code.
|
Evaluator.Context |
Context of the evaluation.
|
Evaluator.Expression<PreprocessedInfo> |
Representation of an expression that is a subject of evaluation.
|
Evaluator.Result |
Evaluation result.
|
SmartSteppingCallback |
Listens on stepping engine and defines classes / places the debugger can
stop in.
|
SmartSteppingCallback.StopOrStep |
Information about a possibility to stop at the given location,
or suggestion to perform a step.
|
SourcePathProvider |
Defines source path for debugger.
|
Annotation Type | Description |
---|---|
BreakpointsClassFilter.Registration |
Declarative registration of BreakpointsClassFilter implementation.
|
EditorContext.Registration |
Declarative registration of a EditorContext implementation.
|
Evaluator.Registration |
Declarative registration of Evaluator implementation.
|
SmartSteppingCallback.Registration |
Declarative registration of a SmartSteppingCallback implementation.
|
SourcePathProvider.Registration |
Declarative registration of a SourcePathProvider implementation.
|
SmartSteppingFilter
:
Defines list of class exclusion filters to be used to filter stepping
in debugged session.SmartSteppingCallback
:
Listens on stepping engine and defines classes / places the debugger
can stop in. JPDAThread
: Represents
context for SmartSteppingCallback (class name, method name, line
number, ...).SmartSteppingCallback.stopHere(org.netbeans.spi.debugger.ContextProvider, org.netbeans.api.debugger.jpda.JPDAThread, org.netbeans.api.debugger.jpda.SmartSteppingFilter)
method). But this step-by-step method is slow. That is why the second,
more powerfull method is here. SSListener can define some set of class
exclusion patterns (like java.*, com.abba.Loader, ...). This set of
exclusion patterns managed by SmartSteppingFilter
class defines scope
for Step Actions in more powerfull way.class MyClass {
private void xxxBigBusinessMethod () {
// generated code is here!
}
public void userMethod () {
// user code is here...
}
}
SmartSteppingCallback
:public class SmartSteppingCallbackImpl extends SmartSteppingCallback {To register this implementation, add following annotation before the class declaration:
public void initFilter (SmartSteppingFilter f) {}
public boolean stopHere (ContextProvider lookupProvider, JPDAThread thread, SmartSteppingFilter f) {
String methodName = thread.getMethodName ();
return !methodName.startsWith ("xxx"); // if method starts with "xxx" DO NOT stop there!
}
}
@SmartSteppingCallback.Registration(path="netbeans-JPDASession")Or register the full implementation class name (packagename.SmartSteppingCallbackImpl) into the file named:
META-INF\debugger\netbeans-JPDASession\org.netbeans.spi.debugger.jpda.SmartSteppingCallback
org.netbeans.spi.viewmodel.TreeModelFilter
first:public class CallStackFilter implements TreeModelFilter {And register it in file:
public Object[] getChildren (TreeModel original, Object parent, int from, int to) {
Object[] originalCh = original.getChildren (parent, from, to);
int i, k = originalCh.length;
ArrayList newCh = new ArrayList ();
boolean in = false;
for (i = 0; i < k; i++) {
if (! (originalCh [i] instanceof CallStackFrame)) {
newCh.add (originalCh [i]);
continue;
}
CallStackFrame f = (CallStackFrame) originalCh [i];
String className = f.getClassName ();
if (className.startsWith ("java")) {
if (!in) {
newCh.add (new JavaxSwing ());
in = true;
}
} else {
in = false;
newCh.add (f);
}
}
return newCh.toArray ();
}
public Object getRoot (TreeModel original) {
return original.getRoot ();
}
public boolean isLeaf (TreeModel original, Object node)
throws UnknownTypeException {
if (node instanceof JavaxSwing) return true;
return original.isLeaf (node);
}
private static class JavaFrames {}
}
Meta-inf\debugger\netbeans-JPDASession\CallStackView\org.netbeans.spi.viewmodel.TreeModelFilterAs you can see on the picture this Filter replaces some original frames by some dummy node.
public class CallStackFilter implements NodeModel {And registration:
public String getDisplayName (Object node) throws UnknownTypeException {
if (node instanceof JavaFrames)
return "Java Callstack Frames";
throw new UnknownTypeException (node);
}
public String getIconBase (Object node) throws UnknownTypeException {
if (node instanceof JavaFrames)
return "org/netbeans/examples/debugger/jpda/callstackviewfilterring/NonCurrentFrame";
throw new UnknownTypeException (node);
}
public String getShortDescription (Object node) throws UnknownTypeException {
if (node instanceof JavaFrames)
return "Unimportant hidden callstack frames";
throw new UnknownTypeException (node);
}
}
Meta-inf\debugger\netbeans-JPDASession\CallStackView\org.netbeans.spi.viewmodel.TreeModelFilter