1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 20:05:35 +02:00

[200541][api][breaking] Rename terminalConnector -> terminalConnectors and add some Javadoc and @since tags

This commit is contained in:
Martin Oberhuber 2008-04-04 15:23:10 +00:00
parent fc86a78f14
commit 0c2a2d41ff
6 changed files with 61 additions and 144 deletions

View file

@ -13,7 +13,7 @@
--> -->
<plugin> <plugin>
<extension <extension
point="org.eclipse.tm.terminal.terminalConnector"> point="org.eclipse.tm.terminal.terminalConnectors">
<connector name="%sshConnection" <connector name="%sshConnection"
id="org.eclipse.tm.internal.terminal.ssh.SshConnector" id="org.eclipse.tm.internal.terminal.ssh.SshConnector"
class="org.eclipse.tm.internal.terminal.ssh.SshConnector"/> class="org.eclipse.tm.internal.terminal.ssh.SshConnector"/>

View file

@ -13,7 +13,7 @@
--> -->
<plugin> <plugin>
<extension <extension
point="org.eclipse.tm.terminal.terminalConnector"> point="org.eclipse.tm.terminal.terminalConnectors">
<connector name="%telnetConnection" <connector name="%telnetConnection"
id="org.eclipse.tm.internal.terminal.telnet.TelnetConnector" id="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"
class="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"/> class="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"/>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?> <?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 # All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0 # are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at # which accompanies this distribution, and is available at
@ -13,7 +13,7 @@
--> -->
<plugin> <plugin>
<extension <extension
point="org.eclipse.tm.terminal.terminalConnector"> point="org.eclipse.tm.terminal.terminalConnectors">
<connector name="Speed Test" <connector name="Speed Test"
id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector" id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"/> class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"/>

View file

@ -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>

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2007 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 * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -17,19 +17,21 @@ import org.eclipse.core.runtime.IAdaptable;
/** /**
* Manage a single connection. Implementations of this class are contributed * Manage a single connection. Implementations of this class are contributed via
* via <code>org.eclipse.tm.terminal.terminalConnector</code> extension point. * <code>org.eclipse.tm.terminal.terminalConnectors</code> extension point.
* This class is a handle to a {@link ITerminalConnector connector} that comes from an * This class is a handle to a {@link ITerminalConnector connector} that comes
* extension. It maintains {@link TerminalConnectorImpl} to the connector to allow lazy initialization of the * from an extension. It maintains {@link TerminalConnectorImpl} to the
* real {@link ITerminalConnector connector} that comes from an extension. * connector to allow lazy initialization of the real
* {@link ITerminalConnector connector} that comes from an extension.
*
* @author Michael Scharf * @author Michael Scharf
* <p> * <p>
* <strong>EXPERIMENTAL</strong>. This class or interface has been added as * <strong>EXPERIMENTAL</strong>. This class or interface has been
* part of a work in progress. There is no guarantee that this API will * added as part of a work in progress. There is no guarantee that this
* work or that it will remain the same. Please do not use this API without * API will work or that it will remain the same. Please do not use this
* consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team. * API without consulting with the <a
* </p> * href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
* </p>
*/ */
public interface ITerminalConnector extends IAdaptable { public interface ITerminalConnector extends IAdaptable {
/** /**

View file

@ -47,13 +47,18 @@ 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 * @param id the id of the terminal connector in the
* <code>org.eclipse.tm.terminal.terminalConnector</code> extension point * <code>org.eclipse.tm.terminal.terminalConnectors</code>
* @return a new ITerminalConnector with id or <code>null</code> if there is no * extension point
* extension with that id. * @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) { 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++) { for (int i = 0; i < config.length; i++) {
if(id.equals(config[i].getAttribute("id"))) { //$NON-NLS-1$ if(id.equals(config[i].getAttribute("id"))) { //$NON-NLS-1$
return makeConnector(config[i]); return makeConnector(config[i]);
@ -62,11 +67,19 @@ public class TerminalConnectorExtension {
return null; return null;
} }
/** /**
* @return a new list of {@link ITerminalConnector} instances defined in * Return a list of available terminal connectors (connection types).
* the <code>org.eclipse.tm.terminal.terminalConnector</code> extension point *
* 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() { 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(); List result=new ArrayList();
for (int i = 0; i < config.length; i++) { for (int i = 0; i < config.length; i++) {
result.add(makeConnector(config[i])); result.add(makeConnector(config[i]));