mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +02:00
[388364] RDz property view flickers when a user disconnects from zOS system
This commit is contained in:
parent
8d54595a88
commit
1ea4c1a2eb
1 changed files with 39 additions and 2 deletions
|
@ -84,6 +84,7 @@
|
||||||
* David Dykstal (IBM) - [257110] Prompting filter called twice on double click rather than just once
|
* David Dykstal (IBM) - [257110] Prompting filter called twice on double click rather than just once
|
||||||
* David McKnight (IBM) - [380613] Problem in SystemView with disposed TreeItem when Link With Editor toolbar icon is used
|
* David McKnight (IBM) - [380613] Problem in SystemView with disposed TreeItem when Link With Editor toolbar icon is used
|
||||||
* David McKnight (IBM) - [385774] select folder dialog doesn't update enablement properly after new folder created
|
* David McKnight (IBM) - [385774] select folder dialog doesn't update enablement properly after new folder created
|
||||||
|
* David McKnight (IBM) - [388364] RDz property view flickers when a user disconnects from zOS system
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view;
|
package org.eclipse.rse.internal.ui.view;
|
||||||
|
@ -240,6 +241,7 @@ import org.eclipse.ui.progress.PendingUpdateAdapter;
|
||||||
import org.eclipse.ui.progress.UIJob;
|
import org.eclipse.ui.progress.UIJob;
|
||||||
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
|
import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
|
||||||
import org.eclipse.ui.views.framelist.GoIntoAction;
|
import org.eclipse.ui.views.framelist.GoIntoAction;
|
||||||
|
import org.eclipse.ui.views.properties.IPropertyDescriptor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This subclass of the standard JFace tree viewer is used to show a tree
|
* This subclass of the standard JFace tree viewer is used to show a tree
|
||||||
|
@ -414,6 +416,8 @@ public class SystemView extends SafeTreeViewer
|
||||||
|
|
||||||
protected boolean _allowAdapterToHandleDoubleClick = true;
|
protected boolean _allowAdapterToHandleDoubleClick = true;
|
||||||
|
|
||||||
|
private Object[] _lastPropertyValues = null; // to reduce duplicate property sheet updates
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param shell The shell hosting this tree viewer widget
|
* @param shell The shell hosting this tree viewer widget
|
||||||
|
@ -5983,6 +5987,39 @@ public class SystemView extends SafeTreeViewer
|
||||||
{
|
{
|
||||||
Object object = ((IStructuredSelection)selection).getFirstElement();
|
Object object = ((IStructuredSelection)selection).getFirstElement();
|
||||||
if (object != null){
|
if (object != null){
|
||||||
|
ISystemViewElementAdapter adapter = getViewAdapter(object);
|
||||||
|
if (adapter != null){
|
||||||
|
// figure out what properties this object has
|
||||||
|
adapter.setPropertySourceInput(object);
|
||||||
|
IPropertyDescriptor[] descriptors = adapter.getPropertyDescriptors();
|
||||||
|
Object[] propertyValues = new Object[descriptors.length];
|
||||||
|
for (int i = 0; i < descriptors.length; i++){
|
||||||
|
IPropertyDescriptor descriptor = descriptors[i];
|
||||||
|
propertyValues[i] = adapter.getPropertyValue(descriptor.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_lastPropertyValues != null){
|
||||||
|
if (_lastPropertyValues.length == propertyValues.length){
|
||||||
|
boolean theSame = true;
|
||||||
|
// check to see if anything has changed
|
||||||
|
for (int i = 0; i < _lastPropertyValues.length && theSame; i++){
|
||||||
|
Object lastPropertyValue = _lastPropertyValues[i];
|
||||||
|
Object propertyValue = propertyValues[i];
|
||||||
|
if (lastPropertyValue != null && !lastPropertyValue.equals(propertyValue)){
|
||||||
|
theSame = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (theSame){
|
||||||
|
// no need to refresh anything
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_lastPropertyValues = propertyValues;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
IWorkbenchPart ourPart = getWorkbenchPart();
|
IWorkbenchPart ourPart = getWorkbenchPart();
|
||||||
IWorkbenchPart activePart = null;
|
IWorkbenchPart activePart = null;
|
||||||
IWorkbenchWindow win = getWorkbenchWindow(); // from dialog it's possible to not have an active part
|
IWorkbenchWindow win = getWorkbenchWindow(); // from dialog it's possible to not have an active part
|
||||||
|
|
Loading…
Add table
Reference in a new issue