mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
idea: fix support for 2024.1+
This commit is contained in:
parent
683b80b2ec
commit
55657036a1
|
@ -20,6 +20,7 @@ import com.intellij.execution.ui.ExecutionConsole;
|
||||||
import com.intellij.icons.AllIcons;
|
import com.intellij.icons.AllIcons;
|
||||||
import com.intellij.openapi.application.Application;
|
import com.intellij.openapi.application.Application;
|
||||||
import com.intellij.openapi.application.ApplicationManager;
|
import com.intellij.openapi.application.ApplicationManager;
|
||||||
|
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||||
import com.intellij.openapi.util.Key;
|
import com.intellij.openapi.util.Key;
|
||||||
import com.intellij.xdebugger.XDebugProcess;
|
import com.intellij.xdebugger.XDebugProcess;
|
||||||
import com.intellij.xdebugger.XDebugSession;
|
import com.intellij.xdebugger.XDebugSession;
|
||||||
|
@ -44,6 +45,8 @@ import org.teavm.debugging.information.URLDebugInformationProvider;
|
||||||
|
|
||||||
public class TeaVMDebugProcess extends XDebugProcess {
|
public class TeaVMDebugProcess extends XDebugProcess {
|
||||||
public static final Key<Breakpoint> INNER_BREAKPOINT_KEY = new Key<>("TeaVM breakpoint");
|
public static final Key<Breakpoint> INNER_BREAKPOINT_KEY = new Key<>("TeaVM breakpoint");
|
||||||
|
private static final ExtensionPointName<TeaVMBreakpointProvider<?>> BREAKPOINT_EXT_NAME =
|
||||||
|
new ExtensionPointName<>("org.teavm.extensions.breakpointProvider");
|
||||||
private TeaVMDebuggerEditorsProvider editorsProvider;
|
private TeaVMDebuggerEditorsProvider editorsProvider;
|
||||||
private final Debugger innerDebugger;
|
private final Debugger innerDebugger;
|
||||||
private final List<TeaVMLineBreakpointHandler<?>> breakpointHandlers = new ArrayList<>();
|
private final List<TeaVMLineBreakpointHandler<?>> breakpointHandlers = new ArrayList<>();
|
||||||
|
@ -91,15 +94,11 @@ public class TeaVMDebugProcess extends XDebugProcess {
|
||||||
breakpointHandlers.add(new TeaVMLineBreakpointHandler<>(JavaLineBreakpointType.class, session.getProject(),
|
breakpointHandlers.add(new TeaVMLineBreakpointHandler<>(JavaLineBreakpointType.class, session.getProject(),
|
||||||
innerDebugger, this));
|
innerDebugger, this));
|
||||||
|
|
||||||
var breakpointProvider = session.getProject().getExtensionArea()
|
for (var provider : BREAKPOINT_EXT_NAME.getExtensionList()) {
|
||||||
.<TeaVMBreakpointProvider<?>>getExtensionPoint("org.teavm.extensions.breakpointProvider");
|
|
||||||
if (breakpointProvider != null) {
|
|
||||||
for (TeaVMBreakpointProvider<?> provider : breakpointProvider.getExtensions()) {
|
|
||||||
breakpointHandlers.add(new TeaVMLineBreakpointHandler<>(provider.getBreakpointType(),
|
breakpointHandlers.add(new TeaVMLineBreakpointHandler<>(provider.getBreakpointType(),
|
||||||
session.getProject(), innerDebugger, this));
|
session.getProject(), innerDebugger, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private Debugger initDebugger() {
|
private Debugger initDebugger() {
|
||||||
debugServer = new ChromeRDPServer();
|
debugServer = new ChromeRDPServer();
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</extensions>
|
</extensions>
|
||||||
|
|
||||||
<extensionPoints>
|
<extensionPoints>
|
||||||
<extensionPoint qualifiedName="org.teavm.extensions.breakpointProvider" area="IDEA_PROJECT"
|
<extensionPoint qualifiedName="org.teavm.extensions.breakpointProvider"
|
||||||
interface="org.teavm.idea.debug.TeaVMBreakpointProvider"/>
|
interface="org.teavm.idea.debug.TeaVMBreakpointProvider"/>
|
||||||
</extensionPoints>
|
</extensionPoints>
|
||||||
</idea-plugin>
|
</idea-plugin>
|
Loading…
Reference in New Issue
Block a user