diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java index 6f0b15f85ea..ee99afab06f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewWorkbook.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2008 IBM Corporation and others. + * Copyright (c) 2002, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -15,6 +15,7 @@ * {Name} (company) - description of contribution. * Kevin Doyle (IBM) - [177587] createTabItem sets the wrapped selection provider * Kevin Doyle (IBM) - [242431] Register a new unique context menu id, so contributions can be made to all our views + * Zhou Renjian (Kortide) - [282239] Monitor view does not update icon according to connection status *******************************************************************************/ package org.eclipse.rse.internal.ui.view.monitor; @@ -281,4 +282,22 @@ public class MonitorViewWorkbook extends Composite } } } + + // Fix bug#282239: Monitor view does not update icon according to connection status + public void updateTitleIcon(IAdaptable root) + { + for (int i = 0; i < _folder.getItemCount(); i++) + { + CTabItem item = _folder.getItem(i); + if (!item.isDisposed()) + { + MonitorViewPage page = (MonitorViewPage) item.getData(); + if (page != null && page.getInput() == root) + { + setTabTitle(root, item); + break; + } + } + } + } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java index ff70aa09077..c27d80a3148 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/SystemMonitorViewPart.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2008 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2009 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -20,6 +20,7 @@ * Kevin Doyle (IBM) - [212940] Duplicate Help Context Identifiers * David McKnight (IBM) - [223103] [cleanup] fix broken externalized strings * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types + * Zhou Renjian (Kortide) - [282239] Monitor view does not update icon according to connection status ********************************************************************************/ package org.eclipse.rse.internal.ui.view.monitor; @@ -898,6 +899,13 @@ class SubSetAction extends BrowseAction updateActionStates(); } break; + + // Fix bug#282239: Monitor view does not update icon according to connection status + case ISystemResourceChangeEvents.EVENT_ICON_CHANGE: + { + _folder.updateTitleIcon((IAdaptable)child); + } + break; case ISystemResourceChangeEvents.EVENT_RENAME: { if (child == input)