Better Tab Fallback Names

If the active resource cannot be found (Plugin Console created outside of execution function) - Name the tabs in numerical order of the resources processed
This commit is contained in:
Konloch 2021-07-21 06:25:59 -07:00
parent 0729da39f3
commit 3fc02c46fa
2 changed files with 6 additions and 1 deletions

View file

@ -48,4 +48,9 @@ public class JFrameConsoleTabbed extends JFrame
{
tabbedPane.add(console, containerName);
}
public JTabbedPane getTabbedPane()
{
return tabbedPane;
}
}

View file

@ -133,7 +133,7 @@ public final class PluginManager
console.setConsoleID(id);
final String name = (activePlugin == null || activePlugin.activeContainer == null)
? console.getTitle() : activePlugin.activeContainer.name;
? ("#" + (activeTabbedConsole.getTabbedPane().getTabCount() + 1)) : activePlugin.activeContainer.name;
activeTabbedConsole.addConsole(console.getComponent(0), name);
}