Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 200541 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (-1 / +1 lines)
Lines 13-19 Link Here
13
-->
13
-->
14
<plugin>
14
<plugin>
15
   <extension
15
   <extension
16
         point="org.eclipse.tm.terminal.terminalConnector">
16
         point="org.eclipse.tm.terminal.terminalConnectors">
17
      <connector name="%sshConnection"
17
      <connector name="%sshConnection"
18
      id="org.eclipse.tm.internal.terminal.ssh.SshConnector"
18
      id="org.eclipse.tm.internal.terminal.ssh.SshConnector"
19
      class="org.eclipse.tm.internal.terminal.ssh.SshConnector"/>
19
      class="org.eclipse.tm.internal.terminal.ssh.SshConnector"/>
(-)plugin.xml (-1 / +1 lines)
Lines 13-19 Link Here
13
-->
13
-->
14
<plugin>
14
<plugin>
15
   <extension
15
   <extension
16
         point="org.eclipse.tm.terminal.terminalConnector">
16
         point="org.eclipse.tm.terminal.terminalConnectors">
17
      <connector name="%telnetConnection"
17
      <connector name="%telnetConnection"
18
      id="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"
18
      id="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"
19
      class="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"/>
19
      class="org.eclipse.tm.internal.terminal.telnet.TelnetConnector"/>
(-)plugin.xml (-2 / +2 lines)
Lines 1-7 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.2"?>
2
<?eclipse version="3.2"?>
3
<!--
3
<!--
4
# Copyright (c) 2006 Wind River Systems, Inc. and others.
4
# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
5
# All rights reserved. This program and the accompanying materials
5
# All rights reserved. This program and the accompanying materials
6
# are made available under the terms of the Eclipse Public License v1.0
6
# are made available under the terms of the Eclipse Public License v1.0
7
# which accompanies this distribution, and is available at
7
# which accompanies this distribution, and is available at
Lines 13-19 Link Here
13
-->
13
-->
14
<plugin>
14
<plugin>
15
   <extension
15
   <extension
16
         point="org.eclipse.tm.terminal.terminalConnector">
16
         point="org.eclipse.tm.terminal.terminalConnectors">
17
      <connector name="Speed Test" 
17
      <connector name="Speed Test" 
18
      id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
18
      id="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"
19
      class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"/>
19
      class="org.eclipse.tm.internal.terminal.speedtest.SpeedTestConnector"/>
(-)plugin.xml (-2 / +2 lines)
Lines 1-7 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
2
<?eclipse version="3.0"?>
3
<!--
3
<!--
4
# Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
4
# Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
5
# All rights reserved. This program and the accompanying materials
5
# All rights reserved. This program and the accompanying materials
6
# are made available under the terms of the Eclipse Public License v1.0
6
# are made available under the terms of the Eclipse Public License v1.0
7
# which accompanies this distribution, and is available at
7
# which accompanies this distribution, and is available at
Lines 12-18 Link Here
12
# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
12
# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
13
-->
13
-->
14
<plugin>
14
<plugin>
15
   <extension-point id="terminalConnector" name="Terminal Connector" schema="schema/terminalConnector.exsd"/>
15
   <extension-point id="terminalConnectors" name="Terminal Connectors" schema="schema/terminalConnectors.exsd"/>
16
   <extension point="org.eclipse.ui.contexts">           
16
   <extension point="org.eclipse.ui.contexts">           
17
      <context
17
      <context
18
            name="%terminal.context.name"
18
            name="%terminal.context.name"
(-)src/org/eclipse/tm/internal/terminal/provisional/api/ITerminalConnector.java (-27 / +29 lines)
Lines 1-11 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
2
 * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0 
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at 
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html 
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors: 
8
 * Contributors:
9
 * Michael Scharf (Wind River) - initial API and implementation
9
 * Michael Scharf (Wind River) - initial API and implementation
10
 * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
10
 * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
11
 *******************************************************************************/
11
 *******************************************************************************/
Lines 17-35 Link Here
17
17
18
18
19
/**
19
/**
20
 * Manage a single connection. Implementations of this class are contributed 
20
 * Manage a single connection. Implementations of this class are contributed via
21
 * via <code>org.eclipse.tm.terminal.terminalConnector</code> extension point.
21
 * <code>org.eclipse.tm.terminal.terminalConnectors</code> extension point.
22
 * This class is a handle to a {@link ITerminalConnector connector} that comes from an
22
 * This class is a handle to a {@link ITerminalConnector connector} that comes
23
 * extension. It maintains {@link TerminalConnectorImpl} to the connector to allow lazy initialization of the
23
 * from an extension. It maintains {@link TerminalConnectorImpl} to the
24
 * real {@link ITerminalConnector connector} that comes from an extension.
24
 * connector to allow lazy initialization of the real
25
25
 * {@link ITerminalConnector connector} that comes from an extension.
26
 *
26
 * @author Michael Scharf
27
 * @author Michael Scharf
27
 * <p>
28
 *         <p>
28
 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
29
 *         <strong>EXPERIMENTAL</strong>. This class or interface has been
29
 * part of a work in progress. There is no guarantee that this API will
30
 *         added as part of a work in progress. There is no guarantee that this
30
 * work or that it will remain the same. Please do not use this API without
31
 *         API will work or that it will remain the same. Please do not use this
31
 * consulting with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
32
 *         API without consulting with the <a
32
 * </p>
33
 *         href="http://www.eclipse.org/dsdp/tm/">Target Management</a> team.
34
 *         </p>
33
 */
35
 */
34
public interface ITerminalConnector extends IAdaptable {
36
public interface ITerminalConnector extends IAdaptable {
35
	/**
37
	/**
Lines 48-54 Link Here
48
	 * returns the error message.
50
	 * returns the error message.
49
	 */
51
	 */
50
	boolean isInitialized();
52
	boolean isInitialized();
51
	
53
52
	/**
54
	/**
53
	 * This method initializes the connector if it is not initialized!
55
	 * This method initializes the connector if it is not initialized!
54
	 * If the connector was initialized successfully, <code>null</code> is
56
	 * If the connector was initialized successfully, <code>null</code> is
Lines 89-104 Link Here
89
    OutputStream getTerminalToRemoteStream();
91
    OutputStream getTerminalToRemoteStream();
90
92
91
	/**
93
	/**
92
	 * Load the state of this connection. Is typically called before 
94
	 * Load the state of this connection. Is typically called before
93
	 * {@link #connect(ITerminalControl)}.
95
	 * {@link #connect(ITerminalControl)}.
94
	 * 
96
	 *
95
	 * @param store a string based data store. Short keys like "foo" can be used to 
97
	 * @param store a string based data store. Short keys like "foo" can be used to
96
	 * store the state of the connection.
98
	 * store the state of the connection.
97
	 */
99
	 */
98
	void load(ISettingsStore store);
100
	void load(ISettingsStore store);
99
	
101
100
	/**
102
	/**
101
	 * When the view or dialog containing the terminal is closed, 
103
	 * When the view or dialog containing the terminal is closed,
102
	 * the state of the connection is saved into the settings store <code>store</code>
104
	 * the state of the connection is saved into the settings store <code>store</code>
103
	 * @param store
105
	 * @param store
104
	 */
106
	 */
Lines 108-120 Link Here
108
	 * @return a new page that can be used in a dialog to setup this connection.
110
	 * @return a new page that can be used in a dialog to setup this connection.
109
	 * The dialog should persist its settings with the {@link #load(ISettingsStore)}
111
	 * The dialog should persist its settings with the {@link #load(ISettingsStore)}
110
	 * and {@link #save(ISettingsStore)} methods.
112
	 * and {@link #save(ISettingsStore)} methods.
111
	 *  
113
	 *
112
	 */
114
	 */
113
	ISettingsPage makeSettingsPage();
115
	ISettingsPage makeSettingsPage();
114
116
115
	/**
117
	/**
116
	 * @return A string that represents the settings of the connection. This representation
118
	 * @return A string that represents the settings of the connection. This representation
117
	 * may be shown in the status line of the terminal view. 
119
	 * may be shown in the status line of the terminal view.
118
	 */
120
	 */
119
	String getSettingsSummary();
121
	String getSettingsSummary();
120
122
(-)src/org/eclipse/tm/internal/terminal/provisional/api/TerminalConnectorExtension.java (-15 / +28 lines)
Lines 1-11 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
2
 * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others.
3
 * All rights reserved. This program and the accompanying materials 
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0 
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at 
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html 
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 *
8
 * Contributors: 
8
 * Contributors:
9
 * Michael Scharf (Wind River) - initial API and implementation
9
 * Michael Scharf (Wind River) - initial API and implementation
10
 * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
10
 * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
11
 *******************************************************************************/
11
 *******************************************************************************/
Lines 20-26 Link Here
20
20
21
/**
21
/**
22
 * A factory to get {@link ITerminalConnector} instances.
22
 * A factory to get {@link ITerminalConnector} instances.
23
 * 
23
 *
24
 * @author Michael Scharf
24
 * @author Michael Scharf
25
 *
25
 *
26
 * <p>
26
 * <p>
Lines 47-72 Link Here
47
	}
47
	}
48
48
49
	/**
49
	/**
50
	 * Return a specific terminal connector for a given connector id. The
51
	 * terminal connector is not yet instantiated to any real connection.
52
	 *
50
	 * @param id the id of the terminal connector in the
53
	 * @param id the id of the terminal connector in the
51
	 * <code>org.eclipse.tm.terminal.terminalConnector</code> extension point
54
	 *            <code>org.eclipse.tm.terminal.terminalConnectors</code>
52
	 * @return a new ITerminalConnector with id or <code>null</code> if there is no
55
	 *            extension point
53
	 * extension with that id.
56
	 * @return a new ITerminalConnector with id or <code>null</code> if there
57
	 *         is no extension with that id.
58
	 * @since 3.0
54
	 */
59
	 */
55
	public static ITerminalConnector makeTerminalConnector(String id) {
60
	public static ITerminalConnector makeTerminalConnector(String id) {
56
		IConfigurationElement[] config=RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnector"); //$NON-NLS-1$
61
		IConfigurationElement[] config = RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnectors"); //$NON-NLS-1$
57
		for (int i = 0; i < config.length; i++) {
62
		for (int i = 0; i < config.length; i++) {
58
			if(id.equals(config[i].getAttribute("id"))) { //$NON-NLS-1$
63
			if(id.equals(config[i].getAttribute("id"))) { //$NON-NLS-1$
59
				return makeConnector(config[i]);
64
				return makeConnector(config[i]);
60
			}
65
			}
61
		}
66
		}
62
		return null;	
67
		return null;
63
	}
68
	}
64
	/**
69
	/**
65
	 * @return a new list of {@link ITerminalConnector} instances defined in 
70
	 * Return a list of available terminal connectors (connection types).
66
	 * the <code>org.eclipse.tm.terminal.terminalConnector</code> extension point
71
	 * 
72
	 * The terminal connectors returned are not yet instantiated to any real
73
	 * connection. Each terminal connector can connect to one remote system at a
74
	 * time.
75
	 * 
76
	 * @return a new list of {@link ITerminalConnector} instances defined in the
77
	 *         <code>org.eclipse.tm.terminal.terminalConnectors</code>
78
	 *         extension point
79
	 * @since 3.0
67
	 */
80
	 */
68
	public static ITerminalConnector[] makeTerminalConnectors() {
81
	public static ITerminalConnector[] makeTerminalConnectors() {
69
		IConfigurationElement[] config=RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnector"); //$NON-NLS-1$
82
		IConfigurationElement[] config = RegistryFactory.getRegistry().getConfigurationElementsFor("org.eclipse.tm.terminal.terminalConnectors"); //$NON-NLS-1$
70
		List result=new ArrayList();
83
		List result=new ArrayList();
71
		for (int i = 0; i < config.length; i++) {
84
		for (int i = 0; i < config.length; i++) {
72
			result.add(makeConnector(config[i]));
85
			result.add(makeConnector(config[i]));
(-)schema/terminalConnector.exsd (-98 lines)
Removed Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.tm.terminal" xmlns="http://www.w3.org/2001/XMLSchema">
4
<annotation>
5
      <appinfo>
6
         <meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnector" name="TerminalConnector"/>
7
      </appinfo>
8
      <documentation>
9
         
10
      </documentation>
11
   </annotation>
12
13
   <element name="extension">
14
      <complexType>
15
         <sequence minOccurs="1" maxOccurs="unbounded">
16
            <element ref="connector"/>
17
         </sequence>
18
         <attribute name="point" type="string" use="required">
19
            <annotation>
20
               <documentation>
21
                  
22
               </documentation>
23
            </annotation>
24
         </attribute>
25
         <attribute name="id" type="string">
26
            <annotation>
27
               <documentation>
28
                  
29
               </documentation>
30
            </annotation>
31
         </attribute>
32
         <attribute name="name" type="string">
33
            <annotation>
34
               <documentation>
35
                  
36
               </documentation>
37
               <appinfo>
38
                  <meta.attribute translatable="true"/>
39
               </appinfo>
40
            </annotation>
41
         </attribute>
42
      </complexType>
43
   </element>
44
45
   <element name="connector">
46
      <complexType>
47
         <attribute name="class" type="string" use="required">
48
            <annotation>
49
               <documentation>
50
                  A class implementing ITerminalConnector
51
               </documentation>
52
               <appinfo>
53
                  <meta.attribute kind="java" basedOn="org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorImpl:"/>
54
               </appinfo>
55
            </annotation>
56
         </attribute>
57
         <attribute name="id" type="string" use="required">
58
            <annotation>
59
               <documentation>
60
                  Uniquely identify this connector
61
               </documentation>
62
            </annotation>
63
         </attribute>
64
         <attribute name="name" type="string">
65
            <annotation>
66
               <documentation>
67
                  The name of the connection (used in the UI)
68
               </documentation>
69
               <appinfo>
70
                  <meta.attribute translatable="true"/>
71
               </appinfo>
72
            </annotation>
73
         </attribute>
74
      </complexType>
75
   </element>
76
77
78
79
80
81
   <annotation>
82
      <appinfo>
83
         <meta.section type="copyright"/>
84
      </appinfo>
85
      <documentation>
86
         Copyright (c) 2006 Wind River Systems, Inc. and others.
87
All rights reserved. This program and the accompanying materials 
88
are made available under the terms of the Eclipse Public License v1.0 
89
which accompanies this distribution, and is available at 
90
http://www.eclipse.org/legal/epl-v10.html 
91
92
Contributors: 
93
Michael Scharf (Wind River) - initial API and implementation
94
Martin Oberhuber (Wind River) - fixed copyright headers and beautified
95
      </documentation>
96
   </annotation>
97
98
</schema>
(-)schema/terminalConnectors.exsd (+98 lines)
Added Link Here
1
<?xml version='1.0' encoding='UTF-8'?>
2
<!-- Schema file written by PDE -->
3
<schema targetNamespace="org.eclipse.tm.terminal" xmlns="http://www.w3.org/2001/XMLSchema">
4
<annotation>
5
      <appinfo>
6
         <meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnectors" name="Terminal Connectors"/>
7
      </appinfo>
8
      <documentation>
9
         
10
      </documentation>
11
   </annotation>
12
13
   <element name="extension">
14
      <complexType>
15
         <sequence minOccurs="1" maxOccurs="unbounded">
16
            <element ref="connector"/>
17
         </sequence>
18
         <attribute name="point" type="string" use="required">
19
            <annotation>
20
               <documentation>
21
                  
22
               </documentation>
23
            </annotation>
24
         </attribute>
25
         <attribute name="id" type="string">
26
            <annotation>
27
               <documentation>
28
                  
29
               </documentation>
30
            </annotation>
31
         </attribute>
32
         <attribute name="name" type="string">
33
            <annotation>
34
               <documentation>
35
                  
36
               </documentation>
37
               <appinfo>
38
                  <meta.attribute translatable="true"/>
39
               </appinfo>
40
            </annotation>
41
         </attribute>
42
      </complexType>
43
   </element>
44
45
   <element name="connector">
46
      <complexType>
47
         <attribute name="class" type="string" use="required">
48
            <annotation>
49
               <documentation>
50
                  A class extending TerminalConnectorImpl
51
               </documentation>
52
               <appinfo>
53
                  <meta.attribute kind="java" basedOn="org.eclipse.tm.internal.terminal.provisional.api.TerminalConnectorImpl:"/>
54
               </appinfo>
55
            </annotation>
56
         </attribute>
57
         <attribute name="id" type="string" use="required">
58
            <annotation>
59
               <documentation>
60
                  Uniquely identify this connector for programmatic access. Clients will use this ID in order to find and instantiate it.
61
               </documentation>
62
            </annotation>
63
         </attribute>
64
         <attribute name="name" type="string">
65
            <annotation>
66
               <documentation>
67
                  The name of the connection (used in the UI)
68
               </documentation>
69
               <appinfo>
70
                  <meta.attribute translatable="true"/>
71
               </appinfo>
72
            </annotation>
73
         </attribute>
74
      </complexType>
75
   </element>
76
77
78
79
80
81
   <annotation>
82
      <appinfo>
83
         <meta.section type="copyright"/>
84
      </appinfo>
85
      <documentation>
86
         Copyright (c) 2006, 2008 Wind River Systems, Inc. and others.
87
All rights reserved. This program and the accompanying materials 
88
are made available under the terms of the Eclipse Public License v1.0 
89
which accompanies this distribution, and is available at 
90
http://www.eclipse.org/legal/epl-v10.html 
91
92
Contributors: 
93
Michael Scharf (Wind River) - initial API and implementation
94
Martin Oberhuber (Wind River) - fixed copyright headers and beautified
95
      </documentation>
96
   </annotation>
97
98
</schema>
(-)plugin.xml (-1 / +1 lines)
Lines 13-19 Link Here
13
-->
13
-->
14
<plugin>
14
<plugin>
15
   <extension
15
   <extension
16
         point="org.eclipse.tm.terminal.terminalConnector">
16
         point="org.eclipse.tm.terminal.terminalConnectors">
17
      <connector name="%serialConnection" 
17
      <connector name="%serialConnection" 
18
      id="org.eclipse.tm.internal.terminal.serial.SerialConnector"
18
      id="org.eclipse.tm.internal.terminal.serial.SerialConnector"
19
      class="org.eclipse.tm.internal.terminal.serial.SerialConnector"/>
19
      class="org.eclipse.tm.internal.terminal.serial.SerialConnector"/>

Return to bug 200541