mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
[411398] SystemView event handling for icon changes needs to handle
multi-source
This commit is contained in:
parent
c66b4cab97
commit
3ec0a08800
1 changed files with 24 additions and 13 deletions
|
@ -2219,21 +2219,32 @@ public class SystemView extends SafeTreeViewer
|
||||||
if (multiSource != null && multiSource.length > 1){
|
if (multiSource != null && multiSource.length > 1){
|
||||||
src = multiSource; // use multi source instead
|
src = multiSource; // use multi source instead
|
||||||
}
|
}
|
||||||
if (src instanceof Object[]){
|
if (src instanceof Object[] && ((Object[])src).length < 1000){ // too expensive when there are tons of children
|
||||||
Object[] srcs = (Object[])src;
|
Object[] srcs = (Object[])src;
|
||||||
for (int s = 0; s < srcs.length; s++){
|
// only do this if there's an associated item
|
||||||
if (initViewerFilters != null && initViewerFilters.length > 0) {
|
Object src1 = srcs[0];
|
||||||
Widget w = findItem(srcs[s]);
|
Widget w = findItem(src1);
|
||||||
if (w == null) {
|
if (w == null){ // can't find item in tree - so fall back to refresh
|
||||||
refresh(parent);
|
refresh(parent);
|
||||||
} else {
|
}
|
||||||
properties[0] = IBasicPropertyConstants.P_IMAGE;
|
else {
|
||||||
update(srcs[s], properties); // for refreshing non-structural properties in viewer when model changes
|
for (int s = 0; s < srcs.length; s++){
|
||||||
|
Object srcObj = srcs[s];
|
||||||
|
if (srcObj != null){
|
||||||
|
if (initViewerFilters != null && initViewerFilters.length > 0) {
|
||||||
|
w = findItem(srcs[s]);
|
||||||
|
if (w == null) {
|
||||||
|
refresh(parent);
|
||||||
|
} else {
|
||||||
|
properties[0] = IBasicPropertyConstants.P_IMAGE;
|
||||||
|
update(srcObj, properties); // for refreshing non-structural properties in viewer when model changes
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
properties[0] = IBasicPropertyConstants.P_IMAGE;
|
||||||
|
update(srcObj, properties); // for refreshing non-structural properties in viewer when model changes
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
properties[0] = IBasicPropertyConstants.P_IMAGE;
|
|
||||||
update(srcs[s], properties); // for refreshing non-structural properties in viewer when model changes
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue