Skip to content

Commit

Permalink
#2780 Added line number to the stack frame presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hurricup committed Oct 15, 2023
1 parent e0d28a9 commit 69c4973
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2021 Alexandr Evstigneev
* Copyright 2015-2023 Alexandr Evstigneev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,7 @@
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.openapi.util.NullableLazyValue;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
Expand Down Expand Up @@ -83,7 +84,9 @@ public PerlStackFrame(PerlStackFrameDescriptor frameDescriptor, PerlExecutionSta

@Override
public void customizePresentation(@NotNull ColoredTextContainer component) {
component.append(myFrameDescriptor.getFileDescriptor().getNameOrPath(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
@NlsSafe var frameName =
String.join(":", myFrameDescriptor.getFileDescriptor().getNameOrPath(), String.valueOf(myFrameDescriptor.getLine()));
component.append(frameName, SimpleTextAttributes.REGULAR_ATTRIBUTES);
component.setIcon(AllIcons.Debugger.Frame);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 Alexandr Evstigneev
* Copyright 2015-2023 Alexandr Evstigneev
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,13 +16,14 @@

package com.perl5.lang.perl.debugger.protocol;

import com.intellij.openapi.util.NlsSafe;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;


public class PerlLoadedFileDescriptor {
@SuppressWarnings("unused") private String path;
@SuppressWarnings("unused") private String name;
@SuppressWarnings("unused") private @NlsSafe String path;
@SuppressWarnings("unused") private @NlsSafe String name;

public @NotNull String getPath() {
return path;
Expand All @@ -32,7 +33,7 @@ public class PerlLoadedFileDescriptor {
return name;
}

public @NotNull String getNameOrPath() {
public @NotNull @NlsSafe String getNameOrPath() {
return name == null ? path : name;
}

Expand Down

0 comments on commit 69c4973

Please sign in to comment.