-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to update the jdwp request timeout setting (#348)
- Loading branch information
1 parent
079a9c9
commit 13eb9c8
Showing
8 changed files
with
149 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...ebug.core/src/main/java/com/microsoft/java/debug/core/adapter/IVirtualMachineManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 Microsoft Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Microsoft Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
|
||
package com.microsoft.java.debug.core.adapter; | ||
|
||
public interface IVirtualMachineManager extends com.sun.jdi.VirtualMachineManager { | ||
boolean connectVirtualMachine(com.sun.jdi.VirtualMachine vm); | ||
|
||
boolean disconnectVirtualMachine(com.sun.jdi.VirtualMachine vm); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
...ava.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/handler/VMHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2020 Microsoft Corporation and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Microsoft Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
|
||
package com.microsoft.java.debug.core.adapter.handler; | ||
|
||
import com.microsoft.java.debug.core.adapter.IVirtualMachineManager; | ||
import com.microsoft.java.debug.core.adapter.IVirtualMachineManagerProvider; | ||
import com.sun.jdi.VirtualMachine; | ||
import com.sun.jdi.VirtualMachineManager; | ||
|
||
public class VMHandler { | ||
private IVirtualMachineManagerProvider vmProvider = null; | ||
|
||
public VMHandler() { | ||
} | ||
|
||
public VMHandler(IVirtualMachineManagerProvider vmProvider) { | ||
this.vmProvider = vmProvider; | ||
} | ||
|
||
public IVirtualMachineManagerProvider getVmProvider() { | ||
return vmProvider; | ||
} | ||
|
||
public void setVmProvider(IVirtualMachineManagerProvider vmProvider) { | ||
this.vmProvider = vmProvider; | ||
} | ||
|
||
public void connectVirtualMachine(VirtualMachine vm) { | ||
if (vm != null && vmProvider != null) { | ||
VirtualMachineManager vmManager = vmProvider.getVirtualMachineManager(); | ||
if (vmManager instanceof IVirtualMachineManager) { | ||
((IVirtualMachineManager) vmManager).connectVirtualMachine(vm); | ||
} | ||
} | ||
} | ||
|
||
public void disconnectVirtualMachine(VirtualMachine vm) { | ||
if (vm != null && vmProvider != null) { | ||
VirtualMachineManager vmManager = vmProvider.getVirtualMachineManager(); | ||
if (vmManager instanceof IVirtualMachineManager) { | ||
((IVirtualMachineManager) vmManager).disconnectVirtualMachine(vm); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters