diff --git a/terminal/org.eclipse.tm.terminal.ssh/plugin.xml b/terminal/org.eclipse.tm.terminal.ssh/plugin.xml index 193d10b1e10..6efde09a04e 100644 --- a/terminal/org.eclipse.tm.terminal.ssh/plugin.xml +++ b/terminal/org.eclipse.tm.terminal.ssh/plugin.xml @@ -13,7 +13,7 @@ --> + point="org.eclipse.tm.terminal.terminalConnectors"> diff --git a/terminal/org.eclipse.tm.terminal.telnet/plugin.xml b/terminal/org.eclipse.tm.terminal.telnet/plugin.xml index d307c988764..21ed3872404 100644 --- a/terminal/org.eclipse.tm.terminal.telnet/plugin.xml +++ b/terminal/org.eclipse.tm.terminal.telnet/plugin.xml @@ -13,7 +13,7 @@ --> + point="org.eclipse.tm.terminal.terminalConnectors"> diff --git a/terminal/org.eclipse.tm.terminal.test/plugin.xml b/terminal/org.eclipse.tm.terminal.test/plugin.xml index 8a517646e4e..a6fe6ae019f 100644 --- a/terminal/org.eclipse.tm.terminal.test/plugin.xml +++ b/terminal/org.eclipse.tm.terminal.test/plugin.xml @@ -1,7 +1,7 @@ + point="org.eclipse.tm.terminal.terminalConnectors"> diff --git a/terminal/org.eclipse.tm.terminal/schema/terminalConnector.exsd b/terminal/org.eclipse.tm.terminal/schema/terminalConnector.exsd deleted file mode 100644 index 61098975c03..00000000000 --- a/terminal/org.eclipse.tm.terminal/schema/terminalConnector.exsd +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A class implementing ITerminalConnector - - - - - - - - - - Uniquely identify this connector - - - - - - - The name of the connection (used in the UI) - - - - - - - - - - - - - - - - - - - Copyright (c) 2006 Wind River Systems, Inc. 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 -http://www.eclipse.org/legal/epl-v10.html - -Contributors: -Michael Scharf (Wind River) - initial API and implementation -Martin Oberhuber (Wind River) - fixed copyright headers and beautified - - - - diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java index 7b3ec92a151..9d71f6398d3 100644 --- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java +++ b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: + * Copyright (c) 2006, 2008 Wind River Systems, Inc. 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: * Michael Scharf (Wind River) - initial API and implementation * Martin Oberhuber (Wind River) - fixed copyright headers and beautified *******************************************************************************/ @@ -17,19 +17,21 @@ import org.eclipse.core.runtime.IAdaptable; /** - * Manage a single connection. Implementations of this class are contributed - * via org.eclipse.tm.terminal.terminalConnector extension point. - * This class is a handle to a {@link ITerminalConnector connector} that comes from an - * extension. It maintains {@link TerminalConnectorImpl} to the connector to allow lazy initialization of the - * real {@link ITerminalConnector connector} that comes from an extension. - + * Manage a single connection. Implementations of this class are contributed via + * org.eclipse.tm.terminal.terminalConnectors extension point. + * This class is a handle to a {@link ITerminalConnector connector} that comes + * from an extension. It maintains {@link TerminalConnectorImpl} to the + * connector to allow lazy initialization of the real + * {@link ITerminalConnector connector} that comes from an extension. + * * @author Michael Scharf - *

- * EXPERIMENTAL. This class or interface has been added as - * part of a work in progress. There is no guarantee that this API will - * work or that it will remain the same. Please do not use this API without - * consulting with the Target Management team. - *

+ *

+ * EXPERIMENTAL. This class or interface has been + * added as part of a work in progress. There is no guarantee that this + * API will work or that it will remain the same. Please do not use this + * API without consulting with the Target Management team. + *

*/ public interface ITerminalConnector extends IAdaptable { /** @@ -48,7 +50,7 @@ public interface ITerminalConnector extends IAdaptable { * returns the error message. */ boolean isInitialized(); - + /** * This method initializes the connector if it is not initialized! * If the connector was initialized successfully, null is @@ -89,16 +91,16 @@ public interface ITerminalConnector extends IAdaptable { OutputStream getTerminalToRemoteStream(); /** - * Load the state of this connection. Is typically called before + * Load the state of this connection. Is typically called before * {@link #connect(ITerminalControl)}. - * - * @param store a string based data store. Short keys like "foo" can be used to + * + * @param store a string based data store. Short keys like "foo" can be used to * store the state of the connection. */ void load(ISettingsStore store); - + /** - * When the view or dialog containing the terminal is closed, + * When the view or dialog containing the terminal is closed, * the state of the connection is saved into the settings store store * @param store */ @@ -108,13 +110,13 @@ public interface ITerminalConnector extends IAdaptable { * @return a new page that can be used in a dialog to setup this connection. * The dialog should persist its settings with the {@link #load(ISettingsStore)} * and {@link #save(ISettingsStore)} methods. - * + * */ ISettingsPage makeSettingsPage(); /** * @return A string that represents the settings of the connection. This representation - * may be shown in the status line of the terminal view. + * may be shown in the status line of the terminal view. */ String getSettingsSummary(); diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java index 6c9fe13ace8..fc10bc7d5ef 100644 --- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java +++ b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java @@ -1,11 +1,11 @@ /******************************************************************************* * Copyright (c) 2006, 2007 Wind River Systems, Inc. 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: * Michael Scharf (Wind River) - initial API and implementation * Martin Oberhuber (Wind River) - fixed copyright headers and beautified *******************************************************************************/ @@ -20,7 +20,7 @@ import org.eclipse.tm.internal.terminal.connector.TerminalConnector; /** * A factory to get {@link ITerminalConnector} instances. - * + * * @author Michael Scharf * *

@@ -47,26 +47,39 @@ public class TerminalConnectorExtension { } /** + * Return a specific terminal connector for a given connector id. The + * terminal connector is not yet instantiated to any real connection. + * * @param id the id of the terminal connector in the - * org.eclipse.tm.terminal.terminalConnector extension point - * @return a new ITerminalConnector with id or null if there is no - * extension with that id. + * org.eclipse.tm.terminal.terminalConnectors + * extension point + * @return a new ITerminalConnector with id or null if there + * is no extension with that id. + * @since 3.0 */ public static ITerminalConnector makeTerminalConnector(String id) { - IConfigurationElement[] config=RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnector"); //$NON-NLS-1$ + IConfigurationElement[] config = RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnectors"); //$NON-NLS-1$ for (int i = 0; i < config.length; i++) { if(id.equals(config[i].getAttribute("id"))) { //$NON-NLS-1$ return makeConnector(config[i]); } } - return null; + return null; } /** - * @return a new list of {@link ITerminalConnector} instances defined in - * the org.eclipse.tm.terminal.terminalConnector extension point + * Return a list of available terminal connectors (connection types). + * + * The terminal connectors returned are not yet instantiated to any real + * connection. Each terminal connector can connect to one remote system at a + * time. + * + * @return a new list of {@link ITerminalConnector} instances defined in the + * org.eclipse.tm.terminal.terminalConnectors + * extension point + * @since 3.0 */ public static ITerminalConnector[] makeTerminalConnectors() { - IConfigurationElement[] config=RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnector"); //$NON-NLS-1$ + IConfigurationElement[] config = RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnectors"); //$NON-NLS-1$ List result=new ArrayList(); for (int i = 0; i < config.length; i++) { result.add(makeConnector(config[i]));