Skip to content

Commit d406353

Browse files
committed
Reflect filters in pane label text
1 parent 4688d05 commit d406353

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/club/bytecode/the/jda/gui/fileviewer/DecompileThread.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import club.bytecode.the.jda.api.ExceptionUI;
55
import club.bytecode.the.jda.decompilers.JDADecompiler;
66
import club.bytecode.the.jda.decompilers.bytecode.BytecodeDecompiler;
7+
import club.bytecode.the.jda.decompilers.filter.DecompileFilter;
78
import club.bytecode.the.jda.settings.Settings;
89
import com.strobel.annotations.Nullable;
910
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
@@ -62,7 +63,11 @@ public void run() {
6263
panelArea.setText(stripUndisplayableChars(decompileResult));
6364
panelArea.setCaretPosition(0);
6465
panelArea.setEditable(viewer.isPaneEditable(paneId));
65-
scrollPane.setColumnHeaderView(new JLabel(decompiler.getName() + " Decompiler - Editable: " + panelArea.isEditable()));
66+
StringBuilder topLabelText = new StringBuilder(decompiler.getName());
67+
for (DecompileFilter filter : decompiler.getSettings().getEnabledFilters()) {
68+
topLabelText.append(" + ").append(filter.getName());
69+
}
70+
scrollPane.setColumnHeaderView(new JLabel(topLabelText.toString()));
6671
panelArea.setFont(new Font(Settings.FONT_FAMILY.getString(), Settings.FONT_OPTIONS.getInt(), Settings.FONT_SIZE.getInt()));
6772

6873
SwingUtilities.invokeLater(() -> target.add(scrollPane));

0 commit comments

Comments
 (0)