Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-07-30 11:09:16 -0400
committerUwe Stieber2014-07-30 11:09:55 -0400
commit0687ab59b6c90301b62612c6a2e2777edee9c292 (patch)
treec28e2e3930cd60cd409bd9ee1eef3452c84d839c
parentf3b82127404fea416573739b22dacf4e6514c001 (diff)
downloadorg.eclipse.tcf-0687ab59b6c90301b62612c6a2e2777edee9c292.tar.gz
org.eclipse.tcf-0687ab59b6c90301b62612c6a2e2777edee9c292.tar.xz
org.eclipse.tcf-0687ab59b6c90301b62612c6a2e2777edee9c292.zip
Terminals: Bug 439677 - A pinned and empty Terminals view can never be unpinned
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java2
2 files changed, 2 insertions, 9 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java
index 477841d83..2604013ac 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/actions/PinTerminalAction.java
@@ -36,6 +36,7 @@ public class PinTerminalAction extends AbstractTerminalAction {
UIPlugin.getImageDescriptor(ImageConsts.ACTION_PinTerminal_Enabled),
UIPlugin.getImageDescriptor(ImageConsts.ACTION_PinTerminal_Disabled), true);
setChecked(view.isPinned());
+ setEnabled(true);
}
/* (non-Javadoc)
@@ -45,12 +46,4 @@ public class PinTerminalAction extends AbstractTerminalAction {
public void run() {
view.setPinned(isChecked());
}
-
- /* (non-Javadoc)
- * @see org.eclipse.tm.internal.terminal.control.actions.AbstractTerminalAction#updateAction(boolean)
- */
- @Override
- public void updateAction(boolean aboutToShow) {
- setEnabled(getTarget() != null && aboutToShow);
- }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java
index d1322eabf..cbeb3e85c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderToolbarHandler.java
@@ -335,7 +335,7 @@ public class TabFolderToolbarHandler extends PlatformObject {
// If the terminal control is not available, the updateAction
// method of certain actions enable the action (bugzilla #260372).
// Workaround by forcing the action to get disabled with setEnabled.
- if (control == null) {
+ if (control == null && !(action instanceof PinTerminalAction)) {
action.setEnabled(false);
}
else {

Back to the top