mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+6
-12
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,9 +15,8 @@
|
||||
*/
|
||||
package com.intellij.debugger.ui.breakpoints;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.xdebugger.XDebuggerUtil;
|
||||
import com.intellij.xdebugger.XSourcePosition;
|
||||
@@ -47,13 +46,13 @@ public abstract class JavaBreakpointTypeBase<T extends JavaBreakpointProperties>
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NotNull
|
||||
@Override
|
||||
public final XBreakpointCustomPropertiesPanel<XBreakpoint<T>> createCustomRightPropertiesPanel(@NotNull Project project) {
|
||||
return new JavaBreakpointFiltersPanel<>(project);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@NotNull
|
||||
@Override
|
||||
public final XDebuggerEditorsProvider getEditorsProvider(@NotNull XBreakpoint<T> breakpoint, @NotNull Project project) {
|
||||
return new JavaDebuggerEditorsProvider();
|
||||
@@ -64,14 +63,9 @@ public abstract class JavaBreakpointTypeBase<T extends JavaBreakpointProperties>
|
||||
public XSourcePosition getSourcePosition(@NotNull XBreakpoint<T> breakpoint) {
|
||||
Breakpoint javaBreakpoint = BreakpointManager.getJavaBreakpoint(breakpoint);
|
||||
if (javaBreakpoint != null) {
|
||||
final PsiClass aClass = javaBreakpoint.getPsiClass();
|
||||
PsiClass aClass = javaBreakpoint.getPsiClass();
|
||||
if (aClass != null) {
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<XSourcePosition>() {
|
||||
@Override
|
||||
public XSourcePosition compute() {
|
||||
return XDebuggerUtil.getInstance().createPositionByElement(aClass);
|
||||
}
|
||||
});
|
||||
return ReadAction.compute(() -> XDebuggerUtil.getInstance().createPositionByElement(aClass));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user