use of com.sun.jdi.event.MethodExitEvent in project intellij-community by JetBrains.
the class MethodBreakpoint method getEventMessage.
public String getEventMessage(@NotNull LocatableEvent event) {
final Location location = event.location();
final String locationQName = DebuggerUtilsEx.getLocationMethodQName(location);
String locationFileName;
try {
locationFileName = location.sourceName();
} catch (AbsentInformationException e) {
locationFileName = getFileName();
}
final int locationLine = location.lineNumber();
if (event instanceof MethodEntryEvent) {
MethodEntryEvent entryEvent = (MethodEntryEvent) event;
final Method method = entryEvent.method();
return DebuggerBundle.message("status.method.entry.breakpoint.reached", method.declaringType().name() + "." + method.name() + "()", locationQName, locationFileName, locationLine);
}
if (event instanceof MethodExitEvent) {
MethodExitEvent exitEvent = (MethodExitEvent) event;
final Method method = exitEvent.method();
return DebuggerBundle.message("status.method.exit.breakpoint.reached", method.declaringType().name() + "." + method.name() + "()", locationQName, locationFileName, locationLine);
}
return "";
}
use of com.sun.jdi.event.MethodExitEvent in project intellij-community by JetBrains.
the class WildcardMethodBreakpoint method getEventMessage.
public String getEventMessage(LocatableEvent event) {
final Location location = event.location();
final String locationQName = DebuggerUtilsEx.getLocationMethodQName(location);
String locationFileName;
try {
locationFileName = location.sourceName();
} catch (AbsentInformationException e) {
locationFileName = "";
}
final int locationLine = location.lineNumber();
if (event instanceof MethodEntryEvent) {
MethodEntryEvent entryEvent = (MethodEntryEvent) event;
final Method method = entryEvent.method();
return DebuggerBundle.message("status.method.entry.breakpoint.reached", method.declaringType().name() + "." + method.name() + "()", locationQName, locationFileName, locationLine);
}
if (event instanceof MethodExitEvent) {
MethodExitEvent exitEvent = (MethodExitEvent) event;
final Method method = exitEvent.method();
return DebuggerBundle.message("status.method.exit.breakpoint.reached", method.declaringType().name() + "." + method.name() + "()", locationQName, locationFileName, locationLine);
}
return "";
}
Aggregations