mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-18 14:35:23 +02:00
[411398] SystemView event handling for icon changes needs to handle
multi-source
This commit is contained in:
parent
58100b0455
commit
e6acb4f40e
1 changed files with 25 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (c) 2002, 2012 IBM Corporation and others. All rights reserved.
|
* Copyright (c) 2002, 2013 IBM Corporation and others. All rights reserved.
|
||||||
* This program and the accompanying materials are made available under the terms
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -87,6 +87,7 @@
|
||||||
* David McKnight (IBM) - [388364] RDz property view flickers when a user disconnects from zOS system
|
* David McKnight (IBM) - [388364] RDz property view flickers when a user disconnects from zOS system
|
||||||
* David Mcknight (IBM) - [374681] Incorrect number of children on the properties page of a directory
|
* David Mcknight (IBM) - [374681] Incorrect number of children on the properties page of a directory
|
||||||
* David McKnight (IBM) - [404396] delete doesn't always properly unmap tree items in SystemView
|
* David McKnight (IBM) - [404396] delete doesn't always properly unmap tree items in SystemView
|
||||||
|
* David McKnight (IBM) - [411398] SystemView event handling for icon changes needs to handle multi-source
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -1883,7 +1884,7 @@ public class SystemView extends SafeTreeViewer
|
||||||
ISubSystem ss = null;
|
ISubSystem ss = null;
|
||||||
Widget item = null;
|
Widget item = null;
|
||||||
Widget parentItem = null;
|
Widget parentItem = null;
|
||||||
Object[] multiSource = null;
|
Object[] multiSource = _event.getMultiSource();
|
||||||
Object previous = null;
|
Object previous = null;
|
||||||
boolean wasSelected = false;
|
boolean wasSelected = false;
|
||||||
boolean originatedHere = true;
|
boolean originatedHere = true;
|
||||||
|
@ -2215,7 +2216,9 @@ public class SystemView extends SafeTreeViewer
|
||||||
*/
|
*/
|
||||||
case ISystemResourceChangeEvents.EVENT_ICON_CHANGE:
|
case ISystemResourceChangeEvents.EVENT_ICON_CHANGE:
|
||||||
if (debug) logDebugMsg("SV event: EVENT_ICON_CHANGE "); //$NON-NLS-1$
|
if (debug) logDebugMsg("SV event: EVENT_ICON_CHANGE "); //$NON-NLS-1$
|
||||||
|
if (multiSource != null && multiSource.length > 1){
|
||||||
|
src = multiSource; // use multi source instead
|
||||||
|
}
|
||||||
if (src instanceof Object[]){
|
if (src instanceof Object[]){
|
||||||
Object[] srcs = (Object[])src;
|
Object[] srcs = (Object[])src;
|
||||||
for (int s = 0; s < srcs.length; s++){
|
for (int s = 0; s < srcs.length; s++){
|
||||||
|
@ -4874,11 +4877,27 @@ public class SystemView extends SafeTreeViewer
|
||||||
String fqn = remoteAdapter.getAbsoluteName(rawData);
|
String fqn = remoteAdapter.getAbsoluteName(rawData);
|
||||||
if (debugRemote) System.out.println("TESTING FINDALL: '" + fqn + "' vs '" + elementName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
if (debugRemote) System.out.println("TESTING FINDALL: '" + fqn + "' vs '" + elementName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||||
if ((fqn != null) && fqn.equals(elementName)) {
|
if ((fqn != null) && fqn.equals(elementName)) {
|
||||||
|
// make sure this is the right kind of match
|
||||||
|
boolean correctSubsystem = false;
|
||||||
|
if (subsystem == null){
|
||||||
|
correctSubsystem = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Object data = parent.getData();
|
||||||
|
if (data != null){
|
||||||
|
ISystemViewElementAdapter adapter = getViewAdapter(data);
|
||||||
|
if (adapter != null && adapter.getSubSystem(data).equals(subsystem)){
|
||||||
|
correctSubsystem = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (correctSubsystem){
|
||||||
occurrences.add(parent); // found a match!
|
occurrences.add(parent); // found a match!
|
||||||
if (debugRemote) System.out.println("...and remote item name match found"); //$NON-NLS-1$
|
if (debugRemote) System.out.println("...and remote item name match found"); //$NON-NLS-1$
|
||||||
return occurrences; // no point in checking the kids
|
return occurrences; // no point in checking the kids
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// if we have been given a subsystem to restrict to, that is a hint to us...
|
// if we have been given a subsystem to restrict to, that is a hint to us...
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Reference in a new issue