[debugger] one less getSourcePosition usage

GitOrigin-RevId: 9584076caecf6ebcf1426114131b2c4c387ed0e7
This commit is contained in:
Egor Ushakov
2024-10-04 10:48:22 +00:00
committed by intellij-monorepo-bot
parent 5ebc40b83b
commit 6b729379f5
2 changed files with 3 additions and 3 deletions
@@ -2133,7 +2133,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
DebuggerInvocationUtil.swingInvokeLater(project, () -> {
Messages.showErrorDialog(
JavaDebuggerBundle.message("error.running.to.cursor.no.executable.code",
myRunToCursorBreakpoint.getSourcePosition().getFile().getName(),
myRunToCursorBreakpoint.getFileName(),
myRunToCursorBreakpoint.getLineIndex() + 1),
UIUtil.removeMnemonic(ActionsBundle.actionText(XDebuggerActions.RUN_TO_CURSOR)));
DebuggerSession session = debugProcess.getSession();
@@ -1,4 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.debugger.ui.breakpoints;
import com.intellij.debugger.JavaDebuggerBundle;
@@ -41,7 +41,7 @@ public class RunToCursorBreakpoint extends SyntheticLineBreakpoint implements St
}
@Override
protected String getFileName() {
public String getFileName() {
return myCustomPosition.getFile().getName();
}