1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

[cleanup] fix terminal copyright headers and beautify

This commit is contained in:
Martin Oberhuber 2006-12-07 10:04:34 +00:00
parent f8dc09d4f8
commit 0c39b8153e
33 changed files with 324 additions and 208 deletions

View file

@ -1,28 +1,27 @@
################################################################################ ###############################################################################
# Copyright (c) 2006 Wind River Systems, Inc. and others. # Copyright (c) 2003, 2006 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
# http://www.eclipse.org/legal/epl-v10.html # http://www.eclipse.org/legal/epl-v10.html
# #
# Initial Contributors:
# The following Wind River employees contributed to the Terminal component
# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
# Helmut Haigermoser and Ted Williams.
#
# Contributors: # Contributors:
# Wind River Systems, Inc. - initial API and implementation # Michael Scharf (Wind River) - split into core, view and connector plugins
# Ted Williams (Wind River) - refactored into org.eclipse.tm.terminal # Martin Oberhuber (Wind River) - fixed copyright headers and beautified
# Michael Scharf (Wind River) - separated into core, serial and view plugins ###############################################################################
# Martin Oberhuber (Wind River) - fix copyrights, legal docs, missing files
################################################################################
bin.includes = .,\ bin.includes = .,\
src/,\
META-INF/,\ META-INF/,\
plugin.xml,\ plugin.xml,\
.classpath,\
.project,\
build.properties,\
plugin.properties,\ plugin.properties,\
schema/,\
.settings/,\
.options .options
source.. = src/ source.. = src/
output.. = bin/ output.. = bin/
src.includes = schema/,\
src/

View file

@ -1,6 +1,18 @@
########################################################################## ###############################################################################
# Copyright 2004 Wind River Systems, Inc. All rights reserved. # Copyright (c) 2003, 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
#
# Initial Contributors:
# The following Wind River employees contributed to the Terminal component
# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
# Helmut Haigermoser and Ted Williams.
#
# Contributors:
# Michael Scharf (Wind River) - split into core, view and connector plugins
# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
###############################################################################
pluginName = Terminal pluginName = Terminal
providerName = Eclipse.org providerName = Eclipse.org

View file

@ -1,5 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?> <?eclipse version="3.0"?>
<!--
# Copyright (c) 2003, 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
#
# Initial Contributors:
# The following Wind River employees contributed to the Terminal component
# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
# Helmut Haigermoser and Ted Williams.
#
# Contributors:
# Michael Scharf (Wind River) - split into core, view and connector plugins
# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
-->
<plugin> <plugin>
<extension-point id="terminalConnector" name="Terminal Connector" schema="schema/terminalConnector.exsd"/> <extension-point id="terminalConnector" name="Terminal Connector" schema="schema/terminalConnector.exsd"/>
<extension <extension

View file

@ -6,7 +6,7 @@
<meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnector" name="TerminalConnector"/> <meta.schema plugin="org.eclipse.tm.terminal" id="terminalConnector" name="TerminalConnector"/>
</appInfo> </appInfo>
<documentation> <documentation>
[Enter description of this extension point.]
</documentation> </documentation>
</annotation> </annotation>
@ -62,7 +62,7 @@
<meta.section type="since"/> <meta.section type="since"/>
</appInfo> </appInfo>
<documentation> <documentation>
[Enter the first release in which this extension point appears.]
</documentation> </documentation>
</annotation> </annotation>
@ -71,7 +71,7 @@
<meta.section type="examples"/> <meta.section type="examples"/>
</appInfo> </appInfo>
<documentation> <documentation>
[Enter extension point usage example here.]
</documentation> </documentation>
</annotation> </annotation>
@ -80,7 +80,7 @@
<meta.section type="apiInfo"/> <meta.section type="apiInfo"/>
</appInfo> </appInfo>
<documentation> <documentation>
[Enter API information here.]
</documentation> </documentation>
</annotation> </annotation>
@ -89,7 +89,7 @@
<meta.section type="implementation"/> <meta.section type="implementation"/>
</appInfo> </appInfo>
<documentation> <documentation>
[Enter information about supplied implementation of this extension point.]
</documentation> </documentation>
</annotation> </annotation>
@ -98,6 +98,15 @@
<meta.section type="copyright"/> <meta.section type="copyright"/>
</appInfo> </appInfo>
<documentation> <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> </documentation>
</annotation> </annotation>

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal; package org.eclipse.tm.terminal;
@ -26,18 +26,22 @@ public interface ISettingsPage {
* @param parent * @param parent
*/ */
void createControl(Composite parent); void createControl(Composite parent);
/** /**
* Called before the page is shown. Loads the state from the {@link ITerminalConnector}. * Called before the page is shown. Loads the state from the {@link ITerminalConnector}.
*/ */
void loadSettings(); void loadSettings();
/** /**
* Called when the OK button is pressed. * Called when the OK button is pressed.
*/ */
void saveSettings(); void saveSettings();
/** /**
* @return true if the * @return true if the
*/ */
boolean validateSettings(); boolean validateSettings();
/** /**
* @return a name of the connection type. Used in a tab page title or drop * @return a name of the connection type. Used in a tab page title or drop
* down to select the connection. * down to select the connection.

View file

@ -6,18 +6,16 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal; package org.eclipse.tm.terminal;
/** /**
* A simple interface to a store to persist the state of a connection. * A simple interface to a store to persist the state of a connection.
* *
* * <p>TODO Not to be implemented.
* <p>Not to be implemented.
* @author Michael Scharf * @author Michael Scharf
*
*/ */
public interface ISettingsStore { public interface ISettingsStore {
/** /**
@ -25,12 +23,14 @@ public interface ISettingsStore {
* @return value * @return value
*/ */
String get(String key); String get(String key);
/** /**
* @param key * @param key
* @param defaultValue * @param defaultValue
* @return the value or the fecaault * @return the value or the fecaault
*/ */
String get(String key, String defaultValue); String get(String key, String defaultValue);
/** /**
* Save a string value * Save a string value
* @param key * @param key

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal; package org.eclipse.tm.terminal;
@ -20,24 +20,26 @@ import java.io.OutputStream;
* via <code>org.eclipse.tm.terminal.terminalConnector</code> extension point. * via <code>org.eclipse.tm.terminal.terminalConnector</code> extension point.
* *
* @author Michael Scharf * @author Michael Scharf
*
*/ */
public interface ITerminalConnector { public interface ITerminalConnector {
/** /**
* @return an ID of this connector. Typically <code>getClass().getName()</code> * @return an ID of this connector. Typically <code>getClass().getName()</code>
*/ */
String getId(); String getId();
/** /**
* @return true if the contribution is functioning (e.g. all external libraries are * @return true if the contribution is functioning (e.g. all external libraries are
* installed). This was added for the serial support, because it requires the java comm * installed). This was added for the serial support, because it requires the java comm
* library, which is installed in the lib/ext directory of the * library, which is installed in the lib/ext directory of the
*/ */
boolean isInstalled(); boolean isInstalled();
/** /**
* Connect using the current state of the settings. * Connect using the current state of the settings.
* @param control Used to inform the UI about state changes and messages from the connection. * @param control Used to inform the UI about state changes and messages from the connection.
*/ */
void connect(ITerminalControl control); void connect(ITerminalControl control);
/** /**
* Disconnect if connected. Else do nothing. * Disconnect if connected. Else do nothing.
*/ */
@ -60,6 +62,7 @@ public interface ITerminalConnector {
* @return a stream with data coming from the remote site. * @return a stream with data coming from the remote site.
*/ */
OutputStream getOutputStream(); OutputStream getOutputStream();
/** /**
* @return a stream to write to the remote site. * @return a stream to write to the remote site.
*/ */

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal; package org.eclipse.tm.terminal;
@ -18,7 +18,6 @@ import org.eclipse.swt.widgets.Shell;
* *
* <p> Not to be implemented by clients. * <p> Not to be implemented by clients.
* @author Michael Scharf * @author Michael Scharf
*
*/ */
public interface ITerminalControl { public interface ITerminalControl {
@ -26,6 +25,7 @@ public interface ITerminalControl {
* @return the current state of the connection * @return the current state of the connection
*/ */
TerminalState getState(); TerminalState getState();
/** /**
* @param state * @param state
*/ */
@ -44,11 +44,13 @@ public interface ITerminalControl {
* TODO: Michael Scharf: Is this really needed? (use {@link #displayTextInTerminal(String)} * TODO: Michael Scharf: Is this really needed? (use {@link #displayTextInTerminal(String)}
*/ */
void displayTextInTerminal(String text); void displayTextInTerminal(String text);
/** /**
* Write a string directly to the terminal. * Write a string directly to the terminal.
* @param txt * @param txt
*/ */
void writeToTerminal(String txt); void writeToTerminal(String txt);
/** /**
* Set the title of the terminal view. * Set the title of the terminal view.
* @param title * @param title

View file

@ -1,15 +1,16 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2005, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Fran Litterio (Wind River) - initial API and implementation
* * Ted Williams (Wind River) - refactored into org.eclipse namespace
* Michael Scharf (Wind River) - split into core, view and connector plugins
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal; package org.eclipse.tm.terminal;
import java.io.File; import java.io.File;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal; package org.eclipse.tm.terminal;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal; package org.eclipse.tm.terminal;
@ -22,23 +22,28 @@ public class TerminalState {
* The terminal is not connected. * The terminal is not connected.
*/ */
public final static TerminalState CLOSED=new TerminalState("CLOSED"); //$NON-NLS-1$ public final static TerminalState CLOSED=new TerminalState("CLOSED"); //$NON-NLS-1$
/** /**
* TODO: Michael Scharf: it's not clear to me what the meaning of the open state is * TODO: Michael Scharf: it's not clear to me what the meaning of the open state is
*/ */
public final static TerminalState OPENED=new TerminalState("OPENED"); //$NON-NLS-1$ public final static TerminalState OPENED=new TerminalState("OPENED"); //$NON-NLS-1$
/** /**
* The terminal is about to connect. * The terminal is about to connect.
*/ */
public final static TerminalState CONNECTING=new TerminalState("CONNECTING..."); //$NON-NLS-1$ public final static TerminalState CONNECTING=new TerminalState("CONNECTING..."); //$NON-NLS-1$
/** /**
* The terminal is connected. * The terminal is connected.
*/ */
public final static TerminalState CONNECTED=new TerminalState("CONNECTED"); //$NON-NLS-1$ public final static TerminalState CONNECTED=new TerminalState("CONNECTED"); //$NON-NLS-1$
private final String fState; private final String fState;
public TerminalState(String state) { public TerminalState(String state) {
fState = state; fState = state;
} }
public String toString() { public String toString() {
return fState; return fState;
} }

View file

@ -6,14 +6,13 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.control; package org.eclipse.tm.terminal.control;
import org.eclipse.tm.terminal.TerminalState; import org.eclipse.tm.terminal.TerminalState;
/** /**
* Provided by a view implementation. * Provided by a view implementation.
* @author Michael Scharf * @author Michael Scharf
@ -25,6 +24,7 @@ public interface ITerminalListener {
* @param state * @param state
*/ */
void setState(TerminalState state); void setState(TerminalState state);
/** /**
* Set the title of the terminal. * Set the title of the terminal.
* @param title * @param title

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.control; package org.eclipse.tm.terminal.control;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.control; package org.eclipse.tm.terminal.control;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.control; package org.eclipse.tm.terminal.internal.control;

View file

@ -1,15 +1,19 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2003, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Initial Contributors:
* Wind River Systems, Inc. - initial implementation * The following Wind River employees contributed to the Terminal component
* that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
* Helmut Haigermoser and Ted Williams.
* *
* Contributors:
* Michael Scharf (Wind River) - split into core, view and connector plugins
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.control; package org.eclipse.tm.terminal.internal.control;
import java.io.IOException; import java.io.IOException;
@ -102,6 +106,7 @@ public class TerminalControl implements ITerminalControlForText, ITerminalContro
public ITerminalConnector[] getConnectors() { public ITerminalConnector[] getConnectors() {
return fConnectors; return fConnectors;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.tm.terminal.ITerminalControl#copy() * @see org.eclipse.tm.terminal.ITerminalControl#copy()
*/ */
@ -241,6 +246,7 @@ public class TerminalControl implements ITerminalControlForText, ITerminalContro
// fConnector=null; // fConnector=null;
} }
} }
// TODO // TODO
private void waitForConnect() { private void waitForConnect() {
Logger.log("entered."); //$NON-NLS-1$ Logger.log("entered."); //$NON-NLS-1$

View file

@ -6,12 +6,13 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.control; package org.eclipse.tm.terminal.internal.control;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
public class TerminalMessages extends NLS { public class TerminalMessages extends NLS {
static { static {
NLS.initializeMessages(TerminalMessages.class.getName(), TerminalMessages.class); NLS.initializeMessages(TerminalMessages.class.getName(), TerminalMessages.class);

View file

@ -1,13 +1,18 @@
############################################################################### ###############################################################################
# Copyright (c) 2006 Wind River Systems, Inc. and others. # Copyright (c) 2003, 2006 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
# http://www.eclipse.org/legal/epl-v10.html # http://www.eclipse.org/legal/epl-v10.html
# #
# Contributors: # Initial Contributors:
# Wind River Systems, Inc. - initial implementation # The following Wind River employees contributed to the Terminal component
# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
# Helmut Haigermoser and Ted Williams.
# #
# Contributors:
# Michael Scharf (Wind River) - split into core, view and connector plugins
# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
############################################################################### ###############################################################################
TerminalError = Terminal Error TerminalError = Terminal Error
SocketError = Socket Error SocketError = Socket Error

View file

@ -1,15 +1,19 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2003, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Initial Contributors:
* Wind River Systems, Inc. - initial implementation * The following Wind River employees contributed to the Terminal component
* that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
* Helmut Haigermoser and Ted Williams.
* *
* Contributors:
* Michael Scharf (Wind River) - split into core, view and connector plugins
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.control; package org.eclipse.tm.terminal.internal.control;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;

View file

@ -1,15 +1,19 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2003, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Initial Contributors:
* Wind River Systems, Inc. - initial implementation * The following Wind River employees contributed to the Terminal component
* that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
* Helmut Haigermoser and Ted Williams.
* *
* Contributors:
* Michael Scharf (Wind River) - split into core, view and connector plugins
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.control; package org.eclipse.tm.terminal.internal.control;
import java.io.IOException; import java.io.IOException;

View file

@ -1,3 +1,14 @@
/*******************************************************************************
* 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
*******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import org.eclipse.tm.terminal.ISettingsStore; import org.eclipse.tm.terminal.ISettingsStore;

View file

@ -6,29 +6,31 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class NetworkPortMap { public class NetworkPortMap {
public static final String PROP_NAMETGTCONST = "tgtcons"; //$NON-NLS-1$ public static final String PROP_NAMETGTCONS = "tgtcons"; //$NON-NLS-1$
public static final String PROP_NAMETELNET = "telnet"; //$NON-NLS-1$ public static final String PROP_NAMETELNET = "telnet"; //$NON-NLS-1$
public static final String PROP_VALUENET = "1233"; //$NON-NLS-1$ public static final String PROP_VALUENET = "1233"; //$NON-NLS-1$
public static final String PROP_VALUETGTCONST = "1232"; //$NON-NLS-1$ public static final String PROP_VALUETGTCONS = "1232"; //$NON-NLS-1$
public static final String PROP_VALUETELNET = "23"; //$NON-NLS-1$ public static final String PROP_VALUETELNET = "23"; //$NON-NLS-1$
String[][] fPortMap=new String[][] { String[][] fPortMap=new String[][] {
// portName, port // portName, port
{PROP_NAMETGTCONST, PROP_VALUETGTCONST}, {PROP_NAMETGTCONS, PROP_VALUETGTCONS},
{PROP_NAMETELNET, PROP_VALUETELNET} {PROP_NAMETELNET, PROP_VALUETELNET}
}; };
public String getDefaultNetworkPort() { public String getDefaultNetworkPort() {
return PROP_VALUETELNET; return PROP_VALUETELNET;
} }
public String findPortName(String strPort) { public String findPortName(String strPort) {
for (int i = 0; i < fPortMap.length; i++) { for (int i = 0; i < fPortMap.length; i++) {
if(fPortMap[i][1].equals(strPort)) if(fPortMap[i][1].equals(strPort))
@ -36,6 +38,7 @@ public class NetworkPortMap {
} }
return null; return null;
} }
public String findPort(String strPortName) { public String findPort(String strPortName) {
for (int i = 0; i < fPortMap.length; i++) { for (int i = 0; i < fPortMap.length; i++) {
if(fPortMap[i][0].equals(strPortName)) if(fPortMap[i][0].equals(strPortName))
@ -43,6 +46,7 @@ public class NetworkPortMap {
} }
return null; return null;
} }
public List getNameTable() { public List getNameTable() {
List names=new ArrayList(); List names=new ArrayList();
for (int i = 0; i < fPortMap.length; i++) { for (int i = 0; i < fPortMap.length; i++) {

View file

@ -1,15 +1,17 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2005, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Fran Litterio (Wind River) - initial API and implementation
* * Helmut Haigermoser (Wind River) - repackaged
* Ted Williams (Wind River) - repackaged into org.eclipse namespace
* Michael Scharf (Wind River) - split into core, view and connector plugins
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
/** /**

View file

@ -1,3 +1,19 @@
/*******************************************************************************
* Copyright (c) 2005, 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
*
* Initial Contributors:
* The following Wind River employees contributed to the Terminal component
* that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
* Helmut Haigermoser and Ted Williams.
*
* Contributors:
* Michael Scharf (Wind River) - extracted from TerminalControl
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import java.net.ConnectException; import java.net.ConnectException;

View file

@ -1,15 +1,17 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2005, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Fran Litterio (Wind River) - initial API and implementation
* * Helmut Haigermoser (Wind River) - repackaged
* Ted Williams (Wind River) - repackaged into org.eclipse namespace
* Michael Scharf (Wind River) - split into core, view and connector plugins
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import java.io.IOException; import java.io.IOException;

View file

@ -1,6 +1,14 @@
/** /*******************************************************************************
* 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
*******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import java.io.IOException; import java.io.IOException;

View file

@ -6,10 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;

View file

@ -1,13 +1,18 @@
############################################################################### ###############################################################################
# Copyright (c) 2006 Wind River Systems, Inc. and others. # Copyright (c) 2005, 2006 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
# http://www.eclipse.org/legal/epl-v10.html # http://www.eclipse.org/legal/epl-v10.html
# #
# Contributors: # Initial Contributors:
# Wind River Systems, Inc. - initial implementation # The following Wind River employees contributed to the Terminal component
# that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
# Helmut Haigermoser and Ted Williams.
# #
# Contributors:
# Michael Scharf (Wind River) - split into core, view and connector plugins
# Martin Oberhuber (Wind River) - fixed copyright headers and beautified
############################################################################### ###############################################################################
CONNTYPE_NETWORK = Network CONNTYPE_NETWORK = Network
PORT = Port PORT = Port

View file

@ -1,16 +1,17 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2005, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Fran Litterio (Wind River) - initial API and implementation
* * Helmut Haigermoser (Wind River) - repackaged
* Ted Williams (Wind River) - repackaged into org.eclipse namespace
* Michael Scharf (Wind River) - split into core, view and connector plugins
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import java.io.IOException; import java.io.IOException;

View file

@ -6,14 +6,11 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
public class TelnetProperties { public class TelnetProperties {
private final NetworkPortMap fNetworkPortMap; private final NetworkPortMap fNetworkPortMap;
private final String fDefaultHost; private final String fDefaultHost;
@ -23,7 +20,6 @@ public class TelnetProperties {
fNetworkPortMap = new NetworkPortMap(); fNetworkPortMap = new NetworkPortMap();
fDefaultNetworkPort = fNetworkPortMap.getDefaultNetworkPort(); fDefaultNetworkPort = fNetworkPortMap.getDefaultNetworkPort();
fDefaultHost = ""; //$NON-NLS-1$ fDefaultHost = ""; //$NON-NLS-1$
} }
public String getDefaultHost() { public String getDefaultHost() {

View file

@ -6,10 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Wind River Systems, Inc. - initial implementation * Michael Scharf (Wind River) - initial API and implementation
* * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import org.eclipse.tm.terminal.ISettingsStore; import org.eclipse.tm.terminal.ISettingsStore;
@ -56,14 +55,12 @@ public class TelnetSettings implements ITelnetSettings {
fTimeout = store.get("Timeout","10");//$NON-NLS-1$ //$NON-NLS-2$ fTimeout = store.get("Timeout","10");//$NON-NLS-1$ //$NON-NLS-2$
} }
public void save(ISettingsStore store) { public void save(ISettingsStore store) {
store.put("Host", fHost);//$NON-NLS-1$ store.put("Host", fHost);//$NON-NLS-1$
store.put("NetworkPort", fNetworkPort);//$NON-NLS-1$ store.put("NetworkPort", fNetworkPort);//$NON-NLS-1$
store.put("Timeout", fTimeout);//$NON-NLS-1$ store.put("Timeout", fTimeout);//$NON-NLS-1$
} }
public TelnetProperties getProperties() { public TelnetProperties getProperties() {
return fProperties; return fProperties;
} }

View file

@ -1,15 +1,19 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006 Wind River Systems, Inc. and others. * Copyright (c) 2005, 2006 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
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Initial Contributors:
* Wind River Systems, Inc. - initial implementation * The following Wind River employees contributed to the Terminal component
* that contains this file: Chris Thew, Fran Litterio, Stephen Lamb,
* Helmut Haigermoser and Ted Williams.
* *
* Contributors:
* Michael Scharf (Wind River) - refactored out of TerminalSettingsDlg
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
*******************************************************************************/ *******************************************************************************/
package org.eclipse.tm.terminal.internal.telnet; package org.eclipse.tm.terminal.internal.telnet;
import java.util.Collections; import java.util.Collections;