Search in sources :

Example 1 with DBGController

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;
}
Also used : DBGController(org.jkiss.dbeaver.debug.DBGController)

Example 2 with DBGController

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);
}
Also used : DatabaseDebugTarget(org.jkiss.dbeaver.debug.core.model.DatabaseDebugTarget) CoreException(org.eclipse.core.runtime.CoreException) DBGController(org.jkiss.dbeaver.debug.DBGController) DatabaseProcess(org.jkiss.dbeaver.debug.core.model.DatabaseProcess) DataSourceDescriptor(org.jkiss.dbeaver.registry.DataSourceDescriptor)

Example 3 with DBGController

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);
}
Also used : DBGException(org.jkiss.dbeaver.debug.DBGException) DBGController(org.jkiss.dbeaver.debug.DBGController)

Example 4 with DBGController

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;
}
Also used : DBGController(org.jkiss.dbeaver.debug.DBGController)

Example 5 with DBGController

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;
}
Also used : DBGController(org.jkiss.dbeaver.debug.DBGController)

Aggregations

DBGController (org.jkiss.dbeaver.debug.DBGController)5 CoreException (org.eclipse.core.runtime.CoreException)1 DBGException (org.jkiss.dbeaver.debug.DBGException)1 DatabaseDebugTarget (org.jkiss.dbeaver.debug.core.model.DatabaseDebugTarget)1 DatabaseProcess (org.jkiss.dbeaver.debug.core.model.DatabaseProcess)1 DataSourceDescriptor (org.jkiss.dbeaver.registry.DataSourceDescriptor)1