Lines 36-41
Link Here
|
36 |
* David McKnight (IBM) - [187205] Prevented expansion of non-expanded on remote refresh |
36 |
* David McKnight (IBM) - [187205] Prevented expansion of non-expanded on remote refresh |
37 |
* David McKnight (IBM) - [196930] Don't add the connection when it's not supposed to be shown |
37 |
* David McKnight (IBM) - [196930] Don't add the connection when it's not supposed to be shown |
38 |
* Tobias Schwarz (Wind River) - [197484] Provide ContextObject for queries on all levels |
38 |
* Tobias Schwarz (Wind River) - [197484] Provide ContextObject for queries on all levels |
|
|
39 |
* David McKnight (IBM) - [196662] Avoid main thread query to check exists when remote refreshing |
39 |
********************************************************************************/ |
40 |
********************************************************************************/ |
40 |
|
41 |
|
41 |
package org.eclipse.rse.internal.ui.view; |
42 |
package org.eclipse.rse.internal.ui.view; |
Lines 2175-2180
Link Here
|
2175 |
} |
2176 |
} |
2176 |
if (ss != null) |
2177 |
if (ss != null) |
2177 |
{ |
2178 |
{ |
|
|
2179 |
// for bug 196662 |
2180 |
// if we're refreshing a previously unexpanded node, then a query will not happen |
2181 |
// so we should refresh it's parent in this case |
2182 |
Widget w = findItem(src); |
2183 |
if (w instanceof TreeItem) |
2184 |
{ |
2185 |
TreeItem titem = (TreeItem)w; |
2186 |
TreeItem[] titems = titem.getItems(); |
2187 |
if (titems.length > 0 && !titem.getExpanded()) |
2188 |
{ |
2189 |
src = adapter.getParent(src); |
2190 |
} |
2191 |
} |
2192 |
|
2193 |
/* old code - issue in 196662 |
2178 |
String key = adapter.getAbsoluteName(src); |
2194 |
String key = adapter.getAbsoluteName(src); |
2179 |
if (key != null) |
2195 |
if (key != null) |
2180 |
{ |
2196 |
{ |
Lines 2199-2204
Link Here
|
2199 |
e.printStackTrace(); |
2215 |
e.printStackTrace(); |
2200 |
} |
2216 |
} |
2201 |
} |
2217 |
} |
|
|
2218 |
*/ |
2202 |
} |
2219 |
} |
2203 |
} |
2220 |
} |
2204 |
} |
2221 |
} |
Lines 5741-5751
Link Here
|
5741 |
{ |
5758 |
{ |
5742 |
ref = getContainingFilterReference((TreeItem)match); |
5759 |
ref = getContainingFilterReference((TreeItem)match); |
5743 |
} |
5760 |
} |
|
|
5761 |
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class); |
5762 |
|
5744 |
if (matches.size() > 1 && ref != null && ref != originalFilter) |
5763 |
if (matches.size() > 1 && ref != null && ref != originalFilter) |
5745 |
{ |
5764 |
{ |
5746 |
// could have the same object under multiple filters |
5765 |
// could have the same object under multiple filters |
5747 |
// need to apply filter |
5766 |
// need to apply filter |
5748 |
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class); |
|
|
5749 |
|
5767 |
|
5750 |
Object[] newChildren = null; |
5768 |
Object[] newChildren = null; |
5751 |
if (match instanceof TreeItem) |
5769 |
if (match instanceof TreeItem) |
Lines 5757-5764
Link Here
|
5757 |
|
5775 |
|
5758 |
} |
5776 |
} |
5759 |
else |
5777 |
else |
5760 |
{ |
5778 |
{ |
|
|
5779 |
|
5780 |
|
5781 |
|
5761 |
internalAdd(match, parentElementOrTreePath, childElements); |
5782 |
internalAdd(match, parentElementOrTreePath, childElements); |
|
|
5783 |
|
5784 |
// refresh parent in this case because the parentElementOrTreePath may no longer exist |
5785 |
if (childElements.length == 0 || childElements[0] instanceof SystemMessageObject) |
5786 |
{ |
5787 |
if (adapter.isRemote(parentElementOrTreePath) && !adapter.hasChildren((IAdaptable)parentElementOrTreePath)) |
5788 |
{ |
5789 |
// refresh the parent |
5790 |
Object par = adapter.getParent(parentElementOrTreePath); |
5791 |
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); |
5792 |
sr.fireEvent(new SystemResourceChangeEvent(par, ISystemResourceChangeEvents.EVENT_REFRESH_REMOTE, null)); |
5793 |
} |
5794 |
} |
5762 |
} |
5795 |
} |
5763 |
} |
5796 |
} |
5764 |
} |
5797 |
} |