Package com.dci.intellij.dbn.database

Examples of com.dci.intellij.dbn.database.DatabaseDebuggerInterface


        if (databaseFile == null) {
            XDebuggerManager.getInstance(session.getProject()).getBreakpointManager().removeBreakpoint(breakpoint);
        } else {
            DBSchemaObject object = databaseFile.getObject();
            if (object.getConnectionHandler() == connectionHandler) {
                DatabaseDebuggerInterface debuggerInterface = connectionHandler.getInterfaceProvider().getDebuggerInterface();

                Connection debugConnection = debugProcess.getDebugConnection();
                try {
                    Integer breakpointId = breakpoint.getUserData(BREAKPOINT_ID_KEY);

                    if (breakpointId != null) {
                        BreakpointOperationInfo breakpointOperationInfo = debuggerInterface.enableBreakpoint(breakpointId, debugConnection);
                        String error = breakpointOperationInfo.getError();
                        if (error != null) {
                            session.updateBreakpointPresentation( breakpoint,
                                    Icons.DEBUG_INVALID_BREAKPOINT,
                                    "INVALID: " + error);
                        }

                    } else {
                        BreakpointInfo breakpointInfo = debuggerInterface.addBreakpoint(
                                object.getSchema().getName(),
                                object.getName(),
                                object.getObjectType().getName().toUpperCase(),
                                breakpoint.getLine(),
                                debugConnection);

                        String error = breakpointInfo.getError();
                        if (error != null) {
                            session.updateBreakpointPresentation( breakpoint,
                                    Icons.DEBUG_INVALID_BREAKPOINT,
                                    "INVALID: " + error);
                        } else {
                            breakpoint.putUserData(BREAKPOINT_ID_KEY, breakpointInfo.getBreakpointId());

                            if (!breakpoint.isEnabled()) {
                                BreakpointOperationInfo breakpointOperationInfo = debuggerInterface.disableBreakpoint(breakpointInfo.getBreakpointId(), debugConnection);
                                error = breakpointOperationInfo.getError();
                                if (error != null) {
                                    session.updateBreakpointPresentation( breakpoint,
                                            Icons.DEBUG_INVALID_BREAKPOINT,
                                            "INVALID: " + error);
View Full Code Here


        if (!debugProcess.getStatus().CAN_SET_BREAKPOINTS) return;
       
        DatabaseEditableObjectFile databaseFile = getDatabaseFile(breakpoint);
        DBSchemaObject object = databaseFile.getObject();
        if (object.getConnectionHandler() == debugProcess.getConnectionHandler()) {
            DatabaseDebuggerInterface debuggerInterface = object.getConnectionHandler().getInterfaceProvider().getDebuggerInterface();
            Integer breakpointId = breakpoint.getUserData(BREAKPOINT_ID_KEY);

            if (breakpointId != null) {
                try {
                    Connection debugConnection = debugProcess.getDebugConnection();
                    if (temporary) {
                        debuggerInterface.disableBreakpoint(breakpointId, debugConnection);
                    } else {
                        debuggerInterface.removeBreakpoint(breakpointId, debugConnection);
                        breakpoint.putUserData(BREAKPOINT_ID_KEY, null);
                    }
                } catch (SQLException e) {
                    e.printStackTrace();
                }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.database.DatabaseDebuggerInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.