Add shutDown to DevtoolsPlugin
Remove navigation button on shutdown Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -62,6 +62,7 @@ public class DevToolsPlugin extends Plugin
|
|||||||
int itemIndex = -1;
|
int itemIndex = -1;
|
||||||
|
|
||||||
private Font font;
|
private Font font;
|
||||||
|
private NavigationButton navButton;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void configure(Binder binder)
|
public void configure(Binder binder)
|
||||||
@@ -74,7 +75,7 @@ public class DevToolsPlugin extends Plugin
|
|||||||
protected void startUp() throws Exception
|
protected void startUp() throws Exception
|
||||||
{
|
{
|
||||||
final DevToolsPanel panel = injector.getInstance(DevToolsPanel.class);
|
final DevToolsPanel panel = injector.getInstance(DevToolsPanel.class);
|
||||||
final NavigationButton navButton = new NavigationButton(
|
navButton = new NavigationButton(
|
||||||
"Developer Tools",
|
"Developer Tools",
|
||||||
ImageIO.read(getClass().getResourceAsStream("devtools_icon.png")),
|
ImageIO.read(getClass().getResourceAsStream("devtools_icon.png")),
|
||||||
() -> panel);
|
() -> panel);
|
||||||
@@ -85,6 +86,12 @@ public class DevToolsPlugin extends Plugin
|
|||||||
.deriveFont(Font.BOLD, 16);
|
.deriveFont(Font.BOLD, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void shutDown() throws Exception
|
||||||
|
{
|
||||||
|
ui.getPluginToolbar().removeNavigation(navButton);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Overlay getOverlay()
|
public Overlay getOverlay()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user