Class JavaHotCodeReplaceProvider
java.lang.Object
com.microsoft.java.debug.plugin.internal.JavaHotCodeReplaceProvider
- All Implemented Interfaces:
com.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider,com.microsoft.java.debug.core.adapter.IProvider,EventListener,org.eclipse.core.resources.IResourceChangeListener
public class JavaHotCodeReplaceProvider
extends Object
implements com.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider, org.eclipse.core.resources.IResourceChangeListener
The hot code replace provider listens for changes to class files and notifies
the running debug session of the changes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voiddropToStackFrame(StackFrame frame) static org.eclipse.jdt.core.IJavaElementfindElement(String qualifiedTypeName, org.eclipse.jdt.core.IJavaProject project) Returns the class file or compilation unit containing the given fully qualified name in the specified project.io.reactivex.Observable<com.microsoft.java.debug.core.adapter.HotCodeReplaceEvent>voidinitialize(com.microsoft.java.debug.core.adapter.IDebugAdapterContext context, Map<String, Object> options) voidonClassRedefined(Consumer<List<String>> consumer) protected voidpopStackFrame(StackFrame frame) voidresourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
-
Constructor Details
-
JavaHotCodeReplaceProvider
public JavaHotCodeReplaceProvider()
-
-
Method Details
-
initialize
public void initialize(com.microsoft.java.debug.core.adapter.IDebugAdapterContext context, Map<String, Object> options) - Specified by:
initializein interfacecom.microsoft.java.debug.core.adapter.IProvider
-
close
public void close()- Specified by:
closein interfacecom.microsoft.java.debug.core.adapter.IProvider
-
resourceChanged
public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event) - Specified by:
resourceChangedin interfaceorg.eclipse.core.resources.IResourceChangeListener
-
onClassRedefined
- Specified by:
onClassRedefinedin interfacecom.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider
-
redefineClasses
- Specified by:
redefineClassesin interfacecom.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider
-
getEventHub
public io.reactivex.Observable<com.microsoft.java.debug.core.adapter.HotCodeReplaceEvent> getEventHub()- Specified by:
getEventHubin interfacecom.microsoft.java.debug.core.adapter.IHotCodeReplaceProvider
-
popStackFrame
- Throws:
com.microsoft.java.debug.core.DebugException
-
dropToStackFrame
protected void dropToStackFrame(StackFrame frame) throws com.microsoft.java.debug.core.DebugException - Throws:
com.microsoft.java.debug.core.DebugException
-
findElement
public static org.eclipse.jdt.core.IJavaElement findElement(String qualifiedTypeName, org.eclipse.jdt.core.IJavaProject project) throws org.eclipse.core.runtime.CoreException Returns the class file or compilation unit containing the given fully qualified name in the specified project. All registered java like file extensions are considered.- Parameters:
qualifiedTypeName- fully qualified type nameproject- project to search in- Returns:
- class file or compilation unit or
null - Throws:
org.eclipse.core.runtime.CoreException- if an exception occurs
-