mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
[283793] [dstore] Expansion indicator(+) does not reset after no connect
This commit is contained in:
parent
a74fdbac49
commit
8e42638601
1 changed files with 47 additions and 21 deletions
|
@ -71,6 +71,7 @@
|
|||
* David McKnight (IBM) - [190001] [refresh] Avoid unnecessary duplicate queries during drag&drop to filter
|
||||
* Martin Oberhuber (Wind River) - [276195] Avoid unnecessary selectionChanged when restoring connections
|
||||
* David McKnight (IBM) - [277328] Unhandled Event Loop Exception When Right-Clicking on "Pending..." Message
|
||||
* David McKnight (IBM) - [283793] [dstore] Expansion indicator(+) does not reset after no connect
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.ui.view;
|
||||
|
@ -6287,8 +6288,8 @@ public class SystemView extends SafeTreeViewer
|
|||
|
||||
|
||||
public void add(Object parentElementOrTreePath, Object[] childElements) {
|
||||
|
||||
assertElementsNotNull(childElements);
|
||||
|
||||
IContextObject contextObject = null;
|
||||
ISystemFilterReference originalFilter = null;
|
||||
if (parentElementOrTreePath instanceof IContextObject)
|
||||
|
@ -6299,6 +6300,7 @@ public class SystemView extends SafeTreeViewer
|
|||
|
||||
}
|
||||
|
||||
|
||||
List matches = new Vector();
|
||||
findAllRemoteItemReferences(parentElementOrTreePath, parentElementOrTreePath, matches);
|
||||
|
||||
|
@ -6309,10 +6311,28 @@ public class SystemView extends SafeTreeViewer
|
|||
ISystemViewElementAdapter adapter = (ISystemViewElementAdapter)((IAdaptable)parentElementOrTreePath).getAdapter(ISystemViewElementAdapter.class);
|
||||
if (adapter != null)
|
||||
{
|
||||
IHost parentHost = adapter.getSubSystem(parentElementOrTreePath).getHost();
|
||||
ISubSystem subSystem = adapter.getSubSystem(parentElementOrTreePath);
|
||||
|
||||
boolean unexpandContainer = false;
|
||||
// if the subsystem is not connected, then need to keep the widget expandable
|
||||
if (childElements.length == 0 && !subSystem.isConnected()){
|
||||
unexpandContainer = true;
|
||||
}
|
||||
|
||||
|
||||
IHost parentHost = subSystem.getHost();
|
||||
for (int i = 0; i < matches.size(); i++)
|
||||
{
|
||||
Widget match = (Widget) matches.get(i);
|
||||
|
||||
// for bug 283793
|
||||
if (match instanceof TreeItem && unexpandContainer){
|
||||
TreeItem titem = ((TreeItem)match);
|
||||
if (titem.getExpanded()){
|
||||
setExpanded(titem, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Object data = null;
|
||||
try {
|
||||
data = match.getData();
|
||||
|
@ -6338,6 +6358,12 @@ public class SystemView extends SafeTreeViewer
|
|||
}
|
||||
}
|
||||
}
|
||||
if (unexpandContainer){
|
||||
// brings back the + icon
|
||||
refresh(parentElementOrTreePath);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (invalidMatches.size() > 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue