Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.4.0
-
None
Description
(FYI: this was already discussed on the dev mailing list)
I want to reuse the connections sub-component in a custom rcp.
Problem: When connections ui is not loaded yet, connections core will fail to operate, since it needs a IAuthHandler.
In my case, I did the following (as suggested by Stefan Seelman) just before connections core is used:
---8<-----
IAuthHandler ah = ConnectionCorePlugin.getDefault().getAuthHandler();
if ( ah == null ) {
ah = new IAuthHandler() {
public ICredentials getCredentials(
ConnectionParameter params )
};
}
ConnectionCorePlugin.getDefault().setAuthHandler( ah );
---8<-----
Of course, this works only if user already set up a valid connection through the new connection wizard.
connections core needs to be operable without ui.