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:
parent
0729da39f3
commit
3fc02c46fa
2 changed files with 6 additions and 1 deletions
|
@ -48,4 +48,9 @@ public class JFrameConsoleTabbed extends JFrame
|
||||||
{
|
{
|
||||||
tabbedPane.add(console, containerName);
|
tabbedPane.add(console, containerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public JTabbedPane getTabbedPane()
|
||||||
|
{
|
||||||
|
return tabbedPane;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ public final class PluginManager
|
||||||
console.setConsoleID(id);
|
console.setConsoleID(id);
|
||||||
|
|
||||||
final String name = (activePlugin == null || activePlugin.activeContainer == null)
|
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);
|
activeTabbedConsole.addConsole(console.getComponent(0), name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue