use of org.jkiss.dbeaver.debug.core.model.DatabaseVariable in project dbeaver by dbeaver.
the class DatabaseDebugModelPresentation method getText.
@Override
public String getText(Object element) {
// FIXME:AF: register adapters
try {
if (element instanceof IDatabaseDebugTarget) {
IDatabaseDebugTarget databaseDebugTarget = (IDatabaseDebugTarget) element;
return databaseDebugTarget.getName();
}
if (element instanceof DatabaseProcess) {
DatabaseProcess process = (DatabaseProcess) element;
return process.getLabel();
}
if (element instanceof DatabaseThread) {
DatabaseThread thread = (DatabaseThread) element;
return thread.getName();
}
if (element instanceof DatabaseStackFrame) {
DatabaseStackFrame stackFrame = (DatabaseStackFrame) element;
return stackFrame.getName();
}
if (element instanceof DatabaseVariable) {
DatabaseVariable variable = (DatabaseVariable) element;
return variable.getName();
}
if (element instanceof DatabaseLineBreakpoint) {
DatabaseLineBreakpoint breakpoint = (DatabaseLineBreakpoint) element;
String database = breakpoint.getDatabaseName();
String schema = breakpoint.getSchemaName();
String procedure = breakpoint.getProcedureName();
int lineNumber = breakpoint.getLineNumber();
String pattern = "{0}.{1}.{2} - [line:{3}]";
Object[] bindings = new Object[] { database, schema, procedure, lineNumber };
return NLS.bind(pattern, bindings);
}
} catch (CoreException e) {
return "<not responding>";
}
return labelProvider.getText(element);
}
Aggregations