@Override
public String getSourceName(Object object) throws CoreException {
if (object instanceof TeaVMJavaStackFrame) {
TeaVMJavaStackFrame stackFrame = (TeaVMJavaStackFrame)object;
SourceLocation location = stackFrame.callFrame.getLocation();
if (location != null) {
return location.getFileName();
}
JavaScriptLocation jsLocation = stackFrame.callFrame.getOriginalLocation();
return jsLocation != null ? jsLocation.getScript() : null;
} else if (object instanceof TeaVMJSStackFrame) {
TeaVMJSStackFrame stackFrame = (TeaVMJSStackFrame)object;
JavaScriptLocation location = stackFrame.callFrame.getLocation();
return location != null ? location.getScript() : null;
} else {
return null;
}
}