Commit fa07d747 authored by Artem Bochkarev's avatar Artem Bochkarev
Browse files

IDEA-163208: minor fixes of showing logic

rename onShow -> onBeforeShow, call it before show
parent bd28fa50
Branches unavailable Tags unavailable
No related merge requests found
Showing with 10 additions and 10 deletions
+10 -10
......@@ -129,7 +129,7 @@ public class TouchBar implements NSTLibrary.ItemCreator {
NST.selectItemsToShow(myNativePeer, ids, ids.length);
}
public void onShow() {}
public void onBeforeShow() {}
public void onHide() {}
private TBItem findItem(String uid) {
......
......@@ -49,12 +49,13 @@ public class TouchBarActionBase extends TouchBarProjectBase implements Execution
ActionManager.getInstance().removeTransparentTimerListener(myTimerListener);
}
public void onShow() {
ActionManager.getInstance().addTransparentTimerListener(500, myTimerListener); // NOTE: delay param doesn't affect anything
}
public void onHide() {
ActionManager.getInstance().removeTransparentTimerListener(myTimerListener);
@Override
public void onBeforeShow() {
_updateActionItems();
ActionManager.getInstance().addTransparentTimerListener(500/*delay param doesn't affect anything*/, myTimerListener);
}
@Override
public void onHide() { ActionManager.getInstance().removeTransparentTimerListener(myTimerListener); }
TBItemAnActionButton addAnActionButton(String actId) {
return addAnActionButton(ActionManager.getInstance().getAction(actId), true, TBItemAnActionButton.SHOWMODE_IMAGE_ONLY, myComponent, null);
......
......@@ -10,7 +10,6 @@ public class TouchBarDebuggerAlt extends TouchBarActionBase {
public TouchBarDebuggerAlt(@NotNull Project project, Component component) {
super("debugger_alt", project, component);
addAnActionButton("ViewBreakpoints", false);
addFlexibleSpacing();
addAnActionButton("ViewBreakpoints", false);
addSpacing(true);
......
......@@ -184,7 +184,7 @@ public class TouchBarsManager {
ourTouchBarStack.remove(bar);
ourTouchBarStack.push(bar);
ourTouchBarChanger.updateTouchBar(bar.get());
_setBarContainer(bar);
}
synchronized public static void closeTouchBar(BarContainer tb) {
......@@ -235,9 +235,9 @@ public class TouchBarsManager {
if (myCurrentBar != null)
myCurrentBar.onHide();
myCurrentBar = myNextBar;
NST.setTouchBar(myCurrentBar);
if (myCurrentBar != null)
myCurrentBar.onShow();
myCurrentBar.onBeforeShow();
NST.setTouchBar(myCurrentBar);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment