mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +02:00
[200541][api][breaking] Rename terminalConnector -> terminalConnectors and add some Javadoc and @since tags
This commit is contained in:
parent
7cd42a7466
commit
1692d941ab
6 changed files with 61 additions and 144 deletions
|
@ -13,7 +13,7 @@
|
|||
-->
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.tm.terminal.terminalConnector">
|
||||
point="org.eclipse.tm.terminal.terminalConnectors">
|
||||
<connector name="%sshConnection"
|
||||
id="org.eclipse.tm.internal.terminal.ssh.SshConnector"
|
||||
class="org.eclipse.tm.internal.terminal.ssh.SshConnector"/>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
-->
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.tm.terminal.terminalConnector">
|
||||
point="org.eclipse.tm.terminal.terminalConnectors">
|
||||
<connector name="%telnetConnection"
|
||||
id="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"
|
||||
class="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.2"?>
|
||||
<!--
|
||||
# Copyright (c) 2006 Wind River Systems, Inc. and others.
|
||||
# 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
|
||||
|
@ -13,7 +13,7 @@
|
|||
-->
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.tm.terminal.terminalConnector">
|
||||
point="org.eclipse.tm.terminal.terminalConnectors">
|
||||
<connector name="Speed Test"
|
||||
id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
|
||||
class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"/>
|
||||
|
|
|
@ -1,98 +0,0 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Schema file written by PDE -->
|
||||
<schema targetNamespace="org.eclipse.tm.terminal" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnector" name="TerminalConnector"/>
|
||||
</appinfo>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<element name="extension">
|
||||
<complexType>
|
||||
<sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<element ref="connector"/>
|
||||
</sequence>
|
||||
<attribute name="point" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="id" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
<appinfo>
|
||||
<meta.attribute translatable="true"/>
|
||||
</appinfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="connector">
|
||||
<complexType>
|
||||
<attribute name="class" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
A class implementing ITerminalConnector
|
||||
</documentation>
|
||||
<appinfo>
|
||||
<meta.attribute kind="java" basedOn="org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorImpl:"/>
|
||||
</appinfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="id" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
Uniquely identify this connector
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
The name of the connection (used in the UI)
|
||||
</documentation>
|
||||
<appinfo>
|
||||
<meta.attribute translatable="true"/>
|
||||
</appinfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<meta.section type="copyright"/>
|
||||
</appinfo>
|
||||
<documentation>
|
||||
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
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
</schema>
|
|
@ -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 <code>org.eclipse.tm.terminal.terminalConnector</code> 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
|
||||
* <code>org.eclipse.tm.terminal.terminalConnectors</code> 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
|
||||
* <p>
|
||||
* <strong>EXPERIMENTAL</strong>. 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 <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
|
||||
* </p>
|
||||
* <p>
|
||||
* <strong>EXPERIMENTAL</strong>. 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 <a
|
||||
* href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
|
||||
* </p>
|
||||
*/
|
||||
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, <code>null</code> 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 <code>store</code>
|
||||
* @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();
|
||||
|
||||
|
|
|
@ -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
|
||||
*
|
||||
* <p>
|
||||
|
@ -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
|
||||
* <code>org.eclipse.tm.terminal.terminalConnector</code> extension point
|
||||
* @return a new ITerminalConnector with id or <code>null</code> if there is no
|
||||
* extension with that id.
|
||||
* <code>org.eclipse.tm.terminal.terminalConnectors</code>
|
||||
* extension point
|
||||
* @return a new ITerminalConnector with id or <code>null</code> 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 <code>org.eclipse.tm.terminal.terminalConnector</code> 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
|
||||
* <code>org.eclipse.tm.terminal.terminalConnectors</code>
|
||||
* 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]));
|
||||
|
|
Loading…
Add table
Reference in a new issue