use of org.jkiss.dbeaver.debug.DBGController in project dbeaver by dbeaver.
the class DatabaseDebugTarget method requestSource.
protected String requestSource(DBGStackFrame stack) throws DBGException {
DBGController controller = getController();
String source = controller.getSource(sessionKey, stack);
return source;
}
use of org.jkiss.dbeaver.debug.DBGController in project dbeaver by dbeaver.
the class DatabaseLaunchDelegate method launch.
@Override
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
String datasourceId = DebugCore.extractDatasourceId(configuration);
DataSourceDescriptor datasourceDescriptor = DataSourceRegistry.findDataSource(datasourceId);
if (datasourceDescriptor == null) {
String message = NLS.bind("Unable to find data source with id {0}", datasourceId);
throw new CoreException(DebugCore.newErrorStatus(message));
}
Map<String, Object> attributes = extractAttributes(configuration);
DBGController controller = createController(datasourceDescriptor);
if (controller == null) {
String message = NLS.bind("Unable to find debug controller for datasource {0}", datasourceDescriptor);
throw new CoreException(DebugCore.newErrorStatus(message));
}
controller.init(attributes);
DatabaseProcess process = createProcess(launch, configuration.getName());
DatabaseDebugTarget target = createDebugTarget(launch, controller, process);
target.connect(monitor);
launch.addDebugTarget(target);
}
use of org.jkiss.dbeaver.debug.DBGController in project dbeaver by dbeaver.
the class DebugCore method findProcedureController.
public static DBGController findProcedureController(DBPDataSourceContainer dataSourceContainer) throws DBGException {
DBGController controller = Adapters.adapt(dataSourceContainer, DBGController.class);
if (controller != null) {
return controller;
}
String providerId = dataSourceContainer.getDriver().getProviderId();
String message = NLS.bind("Unable to find controller for datasource \"{0}\"", providerId);
throw new DBGException(message);
}
use of org.jkiss.dbeaver.debug.DBGController in project dbeaver by dbeaver.
the class DatabaseDebugTarget method requestStackFrames.
protected List<? extends DBGStackFrame> requestStackFrames() throws DBGException {
DBGController controller = getController();
List<? extends DBGStackFrame> stack = controller.getStack(sessionKey);
return stack;
}
use of org.jkiss.dbeaver.debug.DBGController in project dbeaver by dbeaver.
the class DatabaseDebugTarget method requestVariables.
protected List<? extends DBGVariable<?>> requestVariables(DBGStackFrame stack) throws DBGException {
DBGController controller = getController();
List<? extends DBGVariable<?>> variables = controller.getVariables(sessionKey, stack);
return variables;
}
Aggregations