/** * Map a debuggercore Session to one of ours */ public static NativeSession map(Session coreSession) { return coreSession.lookupFirst(null, NativeSession.class); }
private void registerListener(Session session) { final JPDADebugger jpda = (JPDADebugger)session.lookupFirst(null, JPDADebugger.class); if (jpda != null) { jpda.addPropertyChangeListener(JPDADebugger.PROP_STATE, new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { RequestProcessor.Task task; synchronized (DebuggerStateListener.this) { if (refreshTask == null) { refreshTask = DEBUGGER_STATE_PROCESSOR.create(new Runnable() { public void run() { if (jpda.getState() == JPDADebugger.STATE_STOPPED) { setServerState(ServerInstance.STATE_SUSPENDED); } else { setServerState(ServerInstance.STATE_DEBUGGING); } } }); } task = refreshTask; } // group fast arriving refresh calls task.schedule(500); } }); } } }
@Override public DebuggingView.DVSupport getDVSupport() { return debugger.session().coreSession().lookupFirst(null, DebuggingView.DVSupport.class); }
private JPDADebugger getCurrentDebugger() { Session s = DebuggerManager.getDebuggerManager().getCurrentSession(); if (s != null) { JPDADebugger debugger = s.lookupFirst(null, JPDADebugger.class); if (debugger != null) { debugger.addPropertyChangeListener(JPDADebugger.PROP_BREAKPOINTS_ACTIVE, this); } return debugger; } else { return null; } }
try { Session s = (Session) debugger.getClass().getMethod("getSession").invoke(debugger); rp = s.lookupFirst(null, RequestProcessor.class); if (rp == null) { rp = new RequestProcessor(FixActionProvider.class.getName());
Session s = sessions[i]; if (s != null) { Object o = s.lookupFirst(null,AttachingDICookie.class); if (o != null) { Object d = s.lookupFirst(null,JPDADebugger.class); if (d != null) { JPDADebugger jpda = (JPDADebugger)d;
continue; Object o = s.lookupFirst(null, AttachingDICookie.class); if (o == null) { continue; Object d = s.lookupFirst(null, JPDADebugger.class); if (d != null) { return (JPDADebugger) d; && attCookie.getPortNumber() == sdi.getPort()) { Object d = s.lookupFirst(null, JPDADebugger.class); if (d != null) { return (JPDADebugger) d;
Session s = sessions[i]; if (s != null) { Object o = s.lookupFirst(null, AttachingDICookie.class); if (o != null) { AttachingDICookie attCookie = (AttachingDICookie)o; if (shmem == null) continue; if (shmem.equalsIgnoreCase(sdi.getShmemName())) { Object d = s.lookupFirst(null, JPDADebugger.class); if (d != null) { JPDADebugger jpda = (JPDADebugger)d; if (host.equalsIgnoreCase(sdi.getHost())) { if (attCookie.getPortNumber() == sdi.getPort()) { Object d = s.lookupFirst(null, JPDADebugger.class); if (d != null) { JPDADebugger jpda = (JPDADebugger)d;
@Override public void run() { if (ServerRegistry.getInstance().getServerInstance(url) == null) { return; } Target target = _retrieveTarget(null); ServerDebugInfo sdi = getServerDebugInfo(target); if (sdi == null) { LOGGER.log(Level.FINE, "DebuggerInfo cannot be found for: " + ServerInstance.this); return; // give it up } AttachingDICookie attCookie = (AttachingDICookie)session.lookupFirst(null, AttachingDICookie.class); if (attCookie == null) { LOGGER.log(Level.FINE, "AttachingDICookie cannot be found for: " + ServerInstance.this); return; // give it up } if (ServerDebugInfo.TRANSPORT_SHMEM.equals(sdi.getTransport())) { String shmem = attCookie.getSharedMemoryName(); if (shmem != null && shmem.equalsIgnoreCase(sdi.getShmemName())) { registerListener(session); } } else { String host = attCookie.getHostName(); if (host != null && isSameHost(host, sdi.getHost()) && attCookie.getPortNumber() == sdi.getPort()) { registerListener(session); } } } });
private boolean isDebugged() { J2eeModuleProvider jmp = getProject().getLookup().lookup(J2eeModuleProvider.class); ServerDebugInfo sdi = jmp.getServerDebugInfo(); if (sdi == null) { return false; } Session[] sessions = DebuggerManager.getDebuggerManager().getSessions(); for (int i=0; i < sessions.length; i++) { Session s = sessions[i]; if (s != null) { Object o = s.lookupFirst(null, AttachingDICookie.class); if (o != null) { AttachingDICookie attCookie = (AttachingDICookie)o; if (sdi.getTransport().equals(ServerDebugInfo.TRANSPORT_SHMEM)) { if (attCookie.getSharedMemoryName().equalsIgnoreCase(sdi.getShmemName())) { return true; } } else { if (attCookie.getHostName().equalsIgnoreCase(sdi.getHost()) && attCookie.getPortNumber() == sdi.getPort()) { return true; } } } } } return false; }
Session s = sessions[i]; if (s != null) { Object o = s.lookupFirst(null, AttachingDICookie.class); if (o != null) { AttachingDICookie attCookie = (AttachingDICookie)o;
Session s = sessions[i]; if (s != null) { Object o = s.lookupFirst(null, AttachingDICookie.class); if (o != null) { AttachingDICookie attCookie = (AttachingDICookie)o;
Session s = sessions[i]; if (s != null) { Object o = s.lookupFirst(null,AttachingDICookie.class); if (o != null) { Object d = s.lookupFirst(null,JPDADebugger.class); if (d != null) { JPDADebugger jpda = (JPDADebugger)d;
Session s = sessions[i]; if (s != null) { Object o = s.lookupFirst(null, AttachingDICookie.class); if (o != null) { AttachingDICookie attCookie = (AttachingDICookie) o;
Session s = sessions[i]; if (s != null) { AttachingDICookie attCookie = (AttachingDICookie)s.lookupFirst(null, AttachingDICookie.class); if (attCookie != null) { if (sdi.getTransport().equals(ServerDebugInfo.TRANSPORT_SHMEM)) {