mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
[218304] Improve deferred adapter loading
This commit is contained in:
parent
dc383c52f3
commit
bfbabda969
1 changed files with 16 additions and 7 deletions
|
@ -11,6 +11,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
|
* Martin Oberhuber (Wind River) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util
|
||||||
* David Dykstal (IBM) - [210474] Deny save password function missing
|
* David Dykstal (IBM) - [210474] Deny save password function missing
|
||||||
* David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
|
* David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
|
||||||
|
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
package org.eclipse.rse.ui.subsystems;
|
package org.eclipse.rse.ui.subsystems;
|
||||||
|
|
||||||
|
@ -376,7 +377,15 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
|
||||||
|
|
||||||
private ISystemValidator getUserIdValidator() {
|
private ISystemValidator getUserIdValidator() {
|
||||||
ISubSystemConfiguration subsystemConfiguration = getPrimarySubSystem().getSubSystemConfiguration();
|
ISubSystemConfiguration subsystemConfiguration = getPrimarySubSystem().getSubSystemConfiguration();
|
||||||
ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) Platform.getAdapterManager().getAdapter(subsystemConfiguration, ISubSystemConfigurationAdapter.class);
|
ISubSystemConfigurationAdapter adapter = (ISubSystemConfigurationAdapter) subsystemConfiguration.getAdapter(ISubSystemConfigurationAdapter.class);
|
||||||
|
// TODO This typically runs in the UI thread. It should probably be
|
||||||
|
// moved into the promptForCredentials() method which typically runs in
|
||||||
|
// a Job, or even into {@link SubSystem#promptForPassword()}. See
|
||||||
|
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=218304
|
||||||
|
if (adapter == null) {
|
||||||
|
Platform.getAdapterManager().loadAdapter(subsystemConfiguration, ISubSystemConfigurationAdapter.class.getName());
|
||||||
|
adapter = (ISubSystemConfigurationAdapter) subsystemConfiguration.getAdapter(ISubSystemConfigurationAdapter.class);
|
||||||
|
}
|
||||||
ISystemValidator validator = adapter.getUserIdValidator(subsystemConfiguration);
|
ISystemValidator validator = adapter.getUserIdValidator(subsystemConfiguration);
|
||||||
return validator;
|
return validator;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue