mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug 474763 - Toggle Command Input Field button is not in sync with active terminal
This commit is contained in:
parent
b1870f60c5
commit
3a721a060d
1 changed files with 6 additions and 2 deletions
|
@ -11,6 +11,7 @@ package org.eclipse.tm.terminal.view.ui.actions;
|
||||||
|
|
||||||
import org.eclipse.jface.action.IAction;
|
import org.eclipse.jface.action.IAction;
|
||||||
import org.eclipse.swt.custom.CTabItem;
|
import org.eclipse.swt.custom.CTabItem;
|
||||||
|
import org.eclipse.tm.internal.terminal.control.ITerminalViewControl;
|
||||||
import org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction;
|
import org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction;
|
||||||
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
|
||||||
import org.eclipse.tm.terminal.view.ui.activator.UIPlugin;
|
import org.eclipse.tm.terminal.view.ui.activator.UIPlugin;
|
||||||
|
@ -60,8 +61,11 @@ public class ToggleCommandFieldAction extends AbstractTerminalAction {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void updateAction(boolean aboutToShow) {
|
public void updateAction(boolean aboutToShow) {
|
||||||
setEnabled(aboutToShow && getCommandFieldHandler() != null
|
TabCommandFieldHandler handler = getCommandFieldHandler();
|
||||||
&& getTarget() != null && getTarget().getState() == TerminalState.CONNECTED);
|
ITerminalViewControl target = getTarget();
|
||||||
|
setEnabled(aboutToShow && handler != null
|
||||||
|
&& target != null && target.getState() == TerminalState.CONNECTED);
|
||||||
|
setChecked(handler != null && handler.hasCommandInputField());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue