diff --git a/bundles/org.eclipse.remote.jsch.ui/plugin.xml b/bundles/org.eclipse.remote.jsch.ui/plugin.xml index d25045b6819..cee211b4d54 100644 --- a/bundles/org.eclipse.remote.jsch.ui/plugin.xml +++ b/bundles/org.eclipse.remote.jsch.ui/plugin.xml @@ -46,6 +46,11 @@ factory="org.eclipse.remote.internal.jsch.ui.JSchUIFileService$Factory" service="org.eclipse.remote.ui.IRemoteUIFileService"> + + diff --git a/bundles/org.eclipse.remote.jsch.ui/src/org/eclipse/remote/internal/jsch/ui/JSchUserAuthenticator.java b/bundles/org.eclipse.remote.jsch.ui/src/org/eclipse/remote/internal/jsch/ui/JSchUserAuthenticator.java index 646fa3a303d..ec78a40ba60 100644 --- a/bundles/org.eclipse.remote.jsch.ui/src/org/eclipse/remote/internal/jsch/ui/JSchUserAuthenticator.java +++ b/bundles/org.eclipse.remote.jsch.ui/src/org/eclipse/remote/internal/jsch/ui/JSchUserAuthenticator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014 IBM Corporation and others. + * Copyright (c) 2014, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - Initial API and implementation + * Bernd Hufmann - Implement IRemoteConnection.Service.Factory *******************************************************************************/ package org.eclipse.remote.internal.jsch.ui; @@ -105,4 +106,16 @@ public class JSchUserAuthenticator implements IUserAuthenticatorService { } return display; } + + public static class Factory implements IRemoteConnection.Service.Factory { + @Override + @SuppressWarnings("unchecked") + public T getService(IRemoteConnection connection, Class service) { + if (IUserAuthenticatorService.class.equals(service)) { + return (T) new JSchUserAuthenticator(connection); + } else { + return null; + } + } + } }