Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 116975 Details for
Bug 252912
SystemRemoteFileDialog shows Local contents even when specifying a SystemType
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
updated patch
patch.txt (text/plain), 3.34 KB, created by
David McKnight
on 2008-11-04 12:46:29 EST
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
David McKnight
Created:
2008-11-04 12:46:29 EST
Size:
3.34 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.ui >Index: UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java,v >retrieving revision 1.7 >diff -u -r1.7 SystemResourceSelectionInputProvider.java >--- UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java 7 Apr 2008 22:54:53 -0000 1.7 >+++ UI/org/eclipse/rse/internal/ui/view/SystemResourceSelectionInputProvider.java 4 Nov 2008 17:45:24 -0000 >@@ -15,9 +15,13 @@ > * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry > * Martin Oberhuber (Wind River) - [202866] Fix exceptions in RSE browse dialog when SystemRegistry is not yet fully initialized > * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types >+ * David McKnight (IBM) - [252912] SystemRemoteFileDialog shows Local contents even when specifying a SystemType > ********************************************************************************/ > > package org.eclipse.rse.internal.ui.view; >+import java.util.ArrayList; >+import java.util.List; >+ > import org.eclipse.rse.core.IRSESystemType; > import org.eclipse.rse.core.RSECorePlugin; > import org.eclipse.rse.core.model.IHost; >@@ -44,13 +48,48 @@ > public SystemResourceSelectionInputProvider() > { > // choose random host >- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); >- IHost[] hosts = registry.getHosts(); >+ IHost[] hosts = getValidHosts(); > if (hosts != null && hosts.length>0) { > _connection = hosts[0]; > } > } > >+ private boolean validHost(IHost host){ >+ if (_systemTypes != null){ >+ IRSESystemType hostType = host.getSystemType(); >+ for (int t = 0; t < _systemTypes.length; t++){ >+ IRSESystemType type = _systemTypes[t]; >+ if (hostType == type){ >+ return true; >+ } >+ } >+ return false; >+ } >+ else { >+ return true; >+ } >+ } >+ >+ private IHost[] getValidHosts() { >+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); >+ IHost[] hosts = registry.getHosts(); >+ >+ // make sure the hosts are valid for the specified system types >+ if (_systemTypes != null){ >+ List hostList = new ArrayList(); >+ for (int i = 0; i < hosts.length; i++){ >+ IHost host = hosts[i]; >+ if (validHost(host)){ >+ hostList.add(host); >+ } >+ } >+ return (IHost[])hostList.toArray(new IHost[hostList.size()]); >+ } >+ else { >+ return hosts; >+ } >+ } >+ > public IHost getSystemConnection() > { > return _connection; >@@ -85,16 +124,20 @@ > public void setSystemTypes(IRSESystemType[] types) > { > _systemTypes = types; >+ if (_connection != null){ // reset the connection if isn't valid >+ if (!validHost(_connection)){ >+ _connection = null; >+ } >+ } > } > > public Object[] getSystemViewRoots() > { > if (_connection == null) > { >- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry(); >- IHost[] hosts = registry.getHosts(); >+ IHost[] hosts = getValidHosts(); > if (hosts!=null && hosts.length!=0) { >- _connection = registry.getHosts()[0]; >+ _connection = hosts[0]; > } > } > return getConnectionChildren(_connection);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252912
:
116654
| 116975