use of com.intellij.debugger.engine.jdi.VirtualMachineProxy in project intellij-community by JetBrains.
the class SpringLoadedPositionManagerFactory method usesSpringLoaded.
private static boolean usesSpringLoaded(@NotNull final DebugProcess process) {
Boolean force = process.getProcessHandler().getUserData(FORCE_SPRINGLOADED);
if (force == Boolean.TRUE)
return true;
try (AccessToken ignored = ApplicationManager.getApplication().acquireReadActionLock()) {
JavaPsiFacade facade = JavaPsiFacade.getInstance(process.getProject());
if (facade.findPackage("com.springsource.loaded") != null || facade.findPackage("org.springsource.loaded") != null) {
return true;
}
}
// Check spring loaded for remote process
VirtualMachineProxy proxy = process.getVirtualMachineProxy();
return !proxy.classesByName("com.springsource.loaded.agent.SpringLoadedAgent").isEmpty() || !proxy.classesByName("org.springsource.loaded.agent.SpringLoadedAgent").isEmpty();
}
use of com.intellij.debugger.engine.jdi.VirtualMachineProxy in project intellij-community by JetBrains.
the class FieldBreakpoint method createRequestForPreparedClass.
@Override
public void createRequestForPreparedClass(DebugProcessImpl debugProcess, ReferenceType refType) {
VirtualMachineProxy vm = debugProcess.getVirtualMachineProxy();
try {
RequestManagerImpl manager = debugProcess.getRequestsManager();
Field field = refType.fieldByName(getFieldName());
if (field == null) {
manager.setInvalid(this, DebuggerBundle.message("error.invalid.breakpoint.missing.field.in.class", getFieldName(), refType.name()));
return;
}
if (isWatchModification() && vm.canWatchFieldModification()) {
manager.enableRequest(manager.createModificationWatchpointRequest(this, field));
LOG.debug("Modification request added");
}
if (isWatchAccess() && vm.canWatchFieldAccess()) {
manager.enableRequest(manager.createAccessWatchpointRequest(this, field));
if (LOG.isDebugEnabled()) {
LOG.debug("Access request added field = " + field.name() + "; refType = " + refType.name());
}
}
} catch (Exception ex) {
LOG.debug(ex);
}
}
Aggregations