提交 07cc5c6d 编写于 作者: A Alexander Fedorov

#2556 remove <DEBUG_OBJECT extends DBGObject> from DBGSession

上级 33064fe3
......@@ -40,7 +40,7 @@ public abstract class DBGBaseController implements DBGController {
}
@Override
public DBGSession<?> connect(DBRProgressMonitor monitor) throws DBGException {
public DBGSession connect(DBRProgressMonitor monitor) throws DBGException {
DBPDataSource dataSource = dataSourceContainer.getDataSource();
if (!dataSourceContainer.isConnected()) {
throw new DBGException("Not connected to database");
......@@ -55,22 +55,22 @@ public abstract class DBGBaseController implements DBGController {
}
}
protected abstract DBGSession<?> createSession(DBRProgressMonitor monitor, DBPDataSource dataSource) throws DBGException;
protected abstract DBGSession createSession(DBRProgressMonitor monitor, DBPDataSource dataSource) throws DBGException;
@Override
public void resume(DBRProgressMonitor monitor, DBGSession<?> session) throws DBGException {
public void resume(DBRProgressMonitor monitor, DBGSession session) throws DBGException {
// TODO Auto-generated method stub
}
@Override
public void suspend(DBRProgressMonitor monitor, DBGSession<?> session) throws DBGException {
public void suspend(DBRProgressMonitor monitor, DBGSession session) throws DBGException {
// TODO Auto-generated method stub
}
@Override
public void terminate(DBRProgressMonitor monitor, DBGSession<?> session) throws DBGException {
public void terminate(DBRProgressMonitor monitor, DBGSession session) throws DBGException {
}
......
......@@ -24,13 +24,13 @@ import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
*/
public interface DBGController {
DBGSession<?> connect(DBRProgressMonitor monitor) throws DBGException;
DBGSession connect(DBRProgressMonitor monitor) throws DBGException;
void resume(DBRProgressMonitor monitor, DBGSession<?> session) throws DBGException;
void resume(DBRProgressMonitor monitor, DBGSession session) throws DBGException;
void suspend(DBRProgressMonitor monitor, DBGSession<?> session) throws DBGException;
void suspend(DBRProgressMonitor monitor, DBGSession session) throws DBGException;
void terminate(DBRProgressMonitor monitor, DBGSession<?> session) throws DBGException;
void terminate(DBRProgressMonitor monitor, DBGSession session) throws DBGException;
void dispose() throws DBGException;
......
......@@ -20,7 +20,7 @@ package org.jkiss.dbeaver.debug;
import java.util.List;
public interface DBGSession<DEBUG_OBJECT extends DBGObject> {
public interface DBGSession {
DBGSessionInfo getSessionInfo();
......@@ -28,7 +28,7 @@ public interface DBGSession<DEBUG_OBJECT extends DBGObject> {
List<? extends DBGBreakpoint> getBreakpoints();
DBGBreakpoint setBreakpoint(DEBUG_OBJECT obj, DBGBreakpointProperties properties) throws DBGException;
DBGBreakpoint setBreakpoint(DBGObject obj, DBGBreakpointProperties properties) throws DBGException;
void removeBreakpoint(DBGBreakpoint bp) throws DBGException;
......
......@@ -27,13 +27,13 @@ public interface DBGSessionManager {
List<? extends DBGSessionInfo> getSessions() throws DBGException;
DBGSession<? extends DBGObject> getDebugSession(Object id) throws DBGException;
DBGSession getDebugSession(Object id) throws DBGException;
List<DBGSession<?>> getDebugSessions() throws DBGException;
List<DBGSession> getDebugSessions() throws DBGException;
void terminateSession(Object id);
DBGSession<? extends DBGObject> createDebugSession(DBCExecutionContext connection) throws DBGException;
DBGSession createDebugSession(DBCExecutionContext connection) throws DBGException;
boolean isSessionExists(Object id);
......
......@@ -48,7 +48,7 @@ public class PostgreDebugController extends DBGBaseController {
}
@Override
protected DBGSession<?> createSession(DBRProgressMonitor monitor, DBPDataSource dataSource) throws DBGException {
protected DBGSession createSession(DBRProgressMonitor monitor, DBPDataSource dataSource) throws DBGException {
PostgreDebugSessionManager sessionManager = getSessionManager(monitor);
try {
JDBCExecutionContext sessionContext = (JDBCExecutionContext) getDataSourceContainer().getDataSource().openIsolatedContext(monitor, "Debug session");
......
......@@ -211,7 +211,7 @@ public class Debugger {
PostgreDebugSession debugSession = null;
List<DBGSession<?>> sessions = pgDbgManager.getDebugSessions();
List<DBGSession> sessions = pgDbgManager.getDebugSessions();
Scanner scArg;
......@@ -225,7 +225,7 @@ public class Debugger {
int sessNo = 1;
for (DBGSession<?> s : sessions) {
for (DBGSession s : sessions) {
System.out.println(String.format(" (%d) %s", sessNo++, s.toString()));
}
......@@ -662,7 +662,7 @@ public class Debugger {
System.out.println("no debug sessions");
break;
}
for (DBGSession<?> s : pgDbgManager.getDebugSessions()) {
for (DBGSession s : pgDbgManager.getDebugSessions()) {
System.out.println(s);
}
......
......@@ -33,6 +33,7 @@ import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.debug.DBGBreakpoint;
import org.jkiss.dbeaver.debug.DBGBreakpointProperties;
import org.jkiss.dbeaver.debug.DBGException;
import org.jkiss.dbeaver.debug.DBGObject;
import org.jkiss.dbeaver.debug.DBGSession;
import org.jkiss.dbeaver.debug.DBGSessionInfo;
import org.jkiss.dbeaver.debug.DBGStackFrame;
......@@ -42,7 +43,7 @@ import org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext;
import org.jkiss.dbeaver.model.runtime.VoidProgressMonitor;
@SuppressWarnings("nls")
public class PostgreDebugSession implements DBGSession<PostgreDebugObject> {
public class PostgreDebugSession implements DBGSession {
private static final Log log = Log.getLog(PostgreDebugSession.class);
......@@ -165,14 +166,14 @@ public class PostgreDebugSession implements DBGSession<PostgreDebugObject> {
}
@Override
public DBGBreakpoint setBreakpoint(PostgreDebugObject obj, DBGBreakpointProperties properties) throws DBGException {
public DBGBreakpoint setBreakpoint(DBGObject obj, DBGBreakpointProperties properties) throws DBGException {
acquireReadLock();
PostgreDebugBreakpoint bp = null;
try {
bp = new PostgreDebugBreakpoint(this, obj, (PostgreDebugBreakpointProperties) properties);
bp = new PostgreDebugBreakpoint(this, (PostgreDebugObject)obj, (PostgreDebugBreakpointProperties) properties);
breakpoints.add(bp);
} finally {
......
......@@ -131,7 +131,7 @@ public class PostgreDebugSessionManager implements DBGSessionManager {
}
@Override
public DBGSession<PostgreDebugObject> getDebugSession(Object id)
public DBGSession getDebugSession(Object id)
throws DBGException {
return sessions.get(id);
}
......@@ -174,8 +174,8 @@ public class PostgreDebugSessionManager implements DBGSessionManager {
}
@Override
public List<DBGSession<?>> getDebugSessions() throws DBGException {
return new ArrayList<DBGSession<?>>(sessions.values());
public List<DBGSession> getDebugSessions() throws DBGException {
return new ArrayList<DBGSession>(sessions.values());
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册