mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 21:45:22 +02:00
[225506] [api][breaking] RSE UI leaks non-API types
-removing SystemAdapterHelpers.getSystemViewAdapterFactory()
This commit is contained in:
parent
73ef323898
commit
b8e845710c
2 changed files with 5 additions and 11 deletions
|
@ -20,6 +20,7 @@
|
||||||
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
|
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
|
||||||
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
* Martin Oberhuber (Wind River) - [cleanup] Avoid using SystemStartHere in production code
|
||||||
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
|
* David Dykstal (IBM) - [202630] getDefaultPrivateProfile() and ensureDefaultPrivateProfile() are inconsistent
|
||||||
|
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.ui.view.team;
|
package org.eclipse.rse.internal.ui.view.team;
|
||||||
|
@ -155,7 +156,6 @@ public class SystemTeamViewPart
|
||||||
protected SystemTeamViewRefreshAllAction toolBarRefreshAllAction, menuRefreshAllAction;
|
protected SystemTeamViewRefreshAllAction toolBarRefreshAllAction, menuRefreshAllAction;
|
||||||
protected SystemCollapseAllAction collapseAllAction;
|
protected SystemCollapseAllAction collapseAllAction;
|
||||||
|
|
||||||
protected ISystemViewElementAdapter profileAdapter = RSEUIPlugin.getDefault().getSystemViewAdapterFactory().getProfileAdapter();
|
|
||||||
|
|
||||||
// remember-state variables...
|
// remember-state variables...
|
||||||
private IMemento fMemento;
|
private IMemento fMemento;
|
||||||
|
@ -1425,7 +1425,9 @@ public class SystemTeamViewPart
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (profile != null) {
|
if (profile != null) {
|
||||||
SystemTeamViewProfileAdapter profileAdapter = (SystemTeamViewProfileAdapter) RSEUIPlugin.getDefault().getSystemViewAdapterFactory().getAdapter(profile, SystemTeamViewProfileAdapter.class);
|
|
||||||
|
|
||||||
|
SystemTeamViewProfileAdapter profileAdapter = (SystemTeamViewProfileAdapter)((IAdaptable)profile).getAdapter(ISystemViewElementAdapter.class);
|
||||||
category = profileAdapter.restoreCategory(profile, token);
|
category = profileAdapter.restoreCategory(profile, token);
|
||||||
}
|
}
|
||||||
//System.out.println("Restored category: "+(category==null?"null":category.getLabel()));
|
//System.out.println("Restored category: "+(category==null?"null":category.getLabel()));
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
* Uwe Stieber (Wind River) - [174418] SystemAdapterHelpers.getViewAdapter(Object) try to find adapter twice
|
* Uwe Stieber (Wind River) - [174418] SystemAdapterHelpers.getViewAdapter(Object) try to find adapter twice
|
||||||
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
||||||
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
||||||
|
* David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.view;
|
package org.eclipse.rse.ui.view;
|
||||||
|
@ -22,8 +23,6 @@ import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.jface.viewers.Viewer;
|
import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.rse.core.model.ISystemViewInputProvider;
|
import org.eclipse.rse.core.model.ISystemViewInputProvider;
|
||||||
import org.eclipse.rse.internal.ui.view.SystemViewAdapterFactory;
|
|
||||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,11 +108,4 @@ public class SystemAdapterHelpers {
|
||||||
((ISystemViewElementAdapter)adapter).setViewer(viewer);
|
((ISystemViewElementAdapter)adapter).setViewer(viewer);
|
||||||
return adapter;
|
return adapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* For pathpath access to our adapters for non-local objects in our model. Exploits the knowledge we use singleton adapters.
|
|
||||||
*/
|
|
||||||
public static SystemViewAdapterFactory getSystemViewAdapterFactory() {
|
|
||||||
return RSEUIPlugin.getDefault().getSystemViewAdapterFactory();
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue