1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 17:55:39 +02:00

[341281] amendment to fix for bug 308983

This commit is contained in:
David McKnight 2011-03-29 20:34:54 +00:00
parent 4270ba7417
commit 277ef77115

View file

@ -77,6 +77,7 @@
* David McKnight (IBM) - [308783] Value in Properties view remains "Pending..." * David McKnight (IBM) - [308783] Value in Properties view remains "Pending..."
* David McKnight (IBM) - [241726] Move doesn't select the moved items * David McKnight (IBM) - [241726] Move doesn't select the moved items
* David McKnight (IBM) - [333196] New member filter dialogue keep popping up when creating a shared member filter. * David McKnight (IBM) - [333196] New member filter dialogue keep popping up when creating a shared member filter.
* David McKnight (IBM) - [341281] amendment to fix for bug 308983
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.ui.view; package org.eclipse.rse.internal.ui.view;
@ -5960,22 +5961,14 @@ public class SystemView extends SafeTreeViewer
// only fire this event if the view actually has focus // only fire this event if the view actually has focus
if (force || getControl().isFocusControl()) if (force || getControl().isFocusControl())
{ {
IStructuredSelection parentSelection = null; IStructuredSelection fakeSelection = null;
// create events in order to update the property sheet // create events in order to update the property sheet
if (selection instanceof IStructuredSelection){ if (selection instanceof IStructuredSelection){
Object first = ((IStructuredSelection)selection).getFirstElement(); fakeSelection = new StructuredSelection(new Object());
ISystemViewElementAdapter adapter = getViewAdapter(first);
if (adapter != null){
Object parent = adapter.getParent(first);
if (parent != null){
parentSelection = new StructuredSelection(parent);
}
}
} }
if (fakeSelection != null){
if (parentSelection != null){ SelectionChangedEvent dummyEvent = new SelectionChangedEvent(this, fakeSelection);
SelectionChangedEvent dummyEvent = new SelectionChangedEvent(this, parentSelection);
// first change the selection, then change it back (otherwise the property sheet ignores the event) // first change the selection, then change it back (otherwise the property sheet ignores the event)
fireSelectionChanged(dummyEvent); fireSelectionChanged(dummyEvent);
} }