View | Details | Raw Unified | Return to bug 220306
Collapse All | Expand All

(-)feature.xml (-4 / +1 lines)
Lines 2-8 Link Here
2
<feature
2
<feature
3
      id="org.eclipse.tm.terminal.serial"
3
      id="org.eclipse.tm.terminal.serial"
4
      label="%featureName"
4
      label="%featureName"
5
      version="2.0.0.qualifier"
5
      version="2.0.1.qualifier"
6
      provider-name="%providerName">
6
      provider-name="%providerName">
7
7
8
   <description>
8
   <description>
Lines 20-28 Link Here
20
   <url>
20
   <url>
21
      <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
21
      <update label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
22
      <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
22
      <discovery label="%tmUpdateSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
23
      <!-- TODO reference the RXTX discovery site once it exists
24
      <discovery label="%tmRXTXSiteName" url="http://download.eclipse.org/dsdp/tm/updates/3.0"/>
25
      -->
26
   </url>
23
   </url>
27
24
28
   <requires>
25
   <requires>
(-)src/org/eclipse/tm/internal/terminal/provisional/api/Logger.java (-29 / +30 lines)
Lines 1-14 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 Wind River Systems, Inc. and others.
2
 * Copyright (c) 2005, 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
 * Fran Litterio (Wind River) - initial API and implementation
9
 * Fran Litterio (Wind River) - initial API and implementation
10
 * Ted Williams (Wind River) - refactored into org.eclipse namespace
10
 * Ted Williams (Wind River) - refactored into org.eclipse namespace
11
 * Michael Scharf (Wind River) - split into core, view and connector plugins 
11
 * Michael Scharf (Wind River) - split into core, view and connector plugins
12
 * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
12
 * Martin Oberhuber (Wind River) - fixed copyright headers and beautified
13
 *******************************************************************************/
13
 *******************************************************************************/
14
package org.eclipse.tm.internal.terminal.provisional.api;
14
package org.eclipse.tm.internal.terminal.provisional.api;
Lines 26-37 Link Here
26
 * called from both class and instance methods. To use this class, write code
26
 * called from both class and instance methods. To use this class, write code
27
 * like this:
27
 * like this:
28
 * <p>
28
 * <p>
29
 * 
29
 *
30
 * <pre>
30
 * <pre>
31
 * Logger.log(&quot;something has happened&quot;);
31
 * Logger.log(&quot;something has happened&quot;);
32
 * Logger.log(&quot;counter is &quot; + counter);
32
 * Logger.log(&quot;counter is &quot; + counter);
33
 * </pre>
33
 * </pre>
34
 * 
34
 *
35
 * @author Fran Litterio <francis.litterio@windriver.com>
35
 * @author Fran Litterio <francis.litterio@windriver.com>
36
 * <p>
36
 * <p>
37
 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
37
 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
Lines 72-81 Link Here
72
			}
72
			}
73
		}
73
		}
74
	}
74
	}
75
	
75
76
	/**
76
	/**
77
	 * Encodes a String such that non-printable control characters are
77
	 * Encodes a String such that non-printable control characters are
78
	 * converted into user-readable escape sequences for logging. 
78
	 * converted into user-readable escape sequences for logging.
79
	 * @param message String to encode
79
	 * @param message String to encode
80
	 * @return encoded String
80
	 * @return encoded String
81
	 */
81
	 */
Lines 86-123 Link Here
86
			char c=message.charAt(i);
86
			char c=message.charAt(i);
87
			switch(c) {
87
			switch(c) {
88
				case '\\':
88
				case '\\':
89
				case '\'': 
89
				case '\'':
90
					buf.append('\\'); buf.append(c); encoded=true;
90
					buf.append('\\'); buf.append(c); encoded=true;
91
					break;
91
					break;
92
				case '\r':
92
				case '\r':
93
					buf.append('\\'); buf.append('r'); encoded=true; 
93
					buf.append('\\'); buf.append('r'); encoded=true;
94
					break;
94
					break;
95
				case '\n':
95
				case '\n':
96
					buf.append('\\'); buf.append('n'); encoded=true; 
96
					buf.append('\\'); buf.append('n'); encoded=true;
97
					break;
97
					break;
98
				case '\t':
98
				case '\t':
99
					buf.append('\\'); buf.append('t'); encoded=true; 
99
					buf.append('\\'); buf.append('t'); encoded=true;
100
					break;
100
					break;
101
				case '\f':
101
				case '\f':
102
					buf.append('\\'); buf.append('f'); encoded=true; 
102
					buf.append('\\'); buf.append('f'); encoded=true;
103
					break;
103
					break;
104
				case '\b':
104
				case '\b':
105
					buf.append('\\'); buf.append('b'); encoded=true; 
105
					buf.append('\\'); buf.append('b'); encoded=true;
106
					break;
106
					break;
107
				default:
107
				default:
108
					if (c <= '\u000f') {
108
					if (c <= '\u000f') {
109
						buf.append('\\'); buf.append('x'); buf.append('0'); 
109
						buf.append('\\'); buf.append('x'); buf.append('0');
110
						buf.append(Integer.toHexString(c)); 
110
						buf.append(Integer.toHexString(c));
111
						encoded=true;
111
						encoded=true;
112
					} else if (c>=' ' && c<'\u007f') {
112
					} else if (c>=' ' && c<'\u007f') {
113
						buf.append(c);
113
						buf.append(c);
114
					} else if (c <= '\u00ff') {
114
					} else if (c <= '\u00ff') {
115
							buf.append('\\'); buf.append('x'); 
115
							buf.append('\\'); buf.append('x');
116
							buf.append(Integer.toHexString(c)); 
116
							buf.append(Integer.toHexString(c));
117
							encoded=true;
117
							encoded=true;
118
					} else {
118
					} else {
119
						buf.append('\\'); buf.append('u');
119
						buf.append('\\'); buf.append('u');
120
						if (c<='\u0fff') { 
120
						if (c<='\u0fff') {
121
							buf.append('0');
121
							buf.append('0');
122
						}
122
						}
123
						buf.append(Integer.toHexString(c));
123
						buf.append(Integer.toHexString(c));
Lines 130-136 Link Here
130
		}
130
		}
131
		return message;
131
		return message;
132
	}
132
	}
133
	
133
134
	/**
134
	/**
135
	 * Checks if logging is enabled.
135
	 * Checks if logging is enabled.
136
	 * @return true if logging is enabled.
136
	 * @return true if logging is enabled.
Lines 142-148 Link Here
142
	/**
142
	/**
143
	 * Logs the specified message. Do not append a newline to parameter
143
	 * Logs the specified message. Do not append a newline to parameter
144
	 * <i>message</i>. This method does that for you.
144
	 * <i>message</i>. This method does that for you.
145
	 * 
145
	 *
146
     * @param message           A String containing the message to log.
146
     * @param message           A String containing the message to log.
147
	 */
147
	 */
148
	public static final void log(String message) {
148
	public static final void log(String message) {
Lines 168-178 Link Here
168
	 */
168
	 */
169
	public static final void logException(Exception ex) {
169
	public static final void logException(Exception ex) {
170
		// log in eclipse error log
170
		// log in eclipse error log
171
		if(TerminalPlugin.getDefault()!=null)
171
		if (TerminalPlugin.getDefault() != null) {
172
			TerminalPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TerminalPlugin.PLUGIN_ID, IStatus.OK, ex.getMessage(), ex));
172
			TerminalPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TerminalPlugin.PLUGIN_ID, IStatus.OK, ex.getMessage(), ex));
173
		} else {
174
			ex.printStackTrace();
175
		}
176
		// Additional Tracing for debug purposes:
173
		// Read my own stack to get the class name, method name, and line number
177
		// Read my own stack to get the class name, method name, and line number
174
		// of
178
		// of where this method was called
175
		// where this method was called.
176
		if(logStream!=null) {
179
		if(logStream!=null) {
177
			StackTraceElement caller = new Throwable().getStackTrace()[1];
180
			StackTraceElement caller = new Throwable().getStackTrace()[1];
178
			int lineNumber = caller.getLineNumber();
181
			int lineNumber = caller.getLineNumber();
Lines 190-197 Link Here
190
					+ "." + methodName + ":" + lineNumber + ": " + //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
193
					+ "." + methodName + ":" + lineNumber + ": " + //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
191
					"Caught exception: " + ex); //$NON-NLS-1$
194
					"Caught exception: " + ex); //$NON-NLS-1$
192
			ex.printStackTrace(tmpStream);
195
			ex.printStackTrace(tmpStream);
193
		} else {
194
			ex.printStackTrace();
195
		}
196
		}
196
	}
197
	}
197
}
198
}
(-)src/org/eclipse/tm/internal/terminal/serial/SerialMessages.properties (-10 / +11 lines)
Lines 25-42 Link Here
25
FLOWCONTROL               = Flow Control
25
FLOWCONTROL               = Flow Control
26
TIMEOUT                   = Timeout (sec)
26
TIMEOUT                   = Timeout (sec)
27
ERROR_LIBRARY_NOT_INSTALLED = The RXTX library has not been installed properly! \n\
27
ERROR_LIBRARY_NOT_INSTALLED = The RXTX library has not been installed properly! \n\
28
\n\
28
Installation:\n\
29
Installation:\n\
29
-------------\n\
30
-------------\n\
30
* Get RXTX binaries from\n\
31
* Either (a) Use Help > Software Updates, Add Site and install from:\n\
31
    ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7-bins-r2.zip\n\
32
\ \ \ http://rxtx.qbang.org/eclipse/\n\
32
* Copy RXTXcomm.jar into $JRE/lib/ext\n\
33
* Or (b) Download and install RXTX for Eclipse from:\n\
33
* Copy the native libs for your Platform (*.so, *.jnilib, *.dll)\n\
34
\ \ \ http://rxtx.qbang.org/eclipse/downloads/\n\
34
    into the respective native lib folder of your RSE \n\
35
\n\
35
* More installation instructions are at\n\
36
For other Platforms, more info and help see\n\
36
    http://rxtx.qbang.org/wiki/index.php/Main_Page\n\
37
\ \ \ http://www.rxtx.org/\n\
37
* More downloads for other platforms (currently about 30)\n\
38
\ \ \ https://bugs.eclipse.org/bugs/show_bug.cgi?id=175336#c6\n\
38
  are available from the "ToyBox" link on\n\
39
\n\
39
    http://users.frii.com/jarvi/rxtx/download.html
40
This message is also available in your Error Log for Copy & Paste.
40
41
41
# Port Ownership Handling
42
# Port Ownership Handling
42
PORT_IN_USE       = Serial port \''{0}\'' is currently in use by {1}\!\nDo you want to try and steal the port?
43
PORT_IN_USE       = Serial port \''{0}\'' is currently in use by {1}\!\nDo you want to try and steal the port?
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.tm.terminal.serial;singleton:=true
4
Bundle-SymbolicName: org.eclipse.tm.terminal.serial;singleton:=true
5
Bundle-Version: 2.0.0.qualifier
5
Bundle-Version: 2.0.1.qualifier
6
Bundle-Localization: plugin
6
Bundle-Localization: plugin
7
Import-Package: gnu.io;resolution:=optional
7
Import-Package: gnu.io;resolution:=optional
8
Require-Bundle: org.eclipse.ui,
8
Require-Bundle: org.eclipse.ui,
(-)README.txt (-7 / +17 lines)
Lines 1-9 Link Here
1
Important note:
1
Important note:
2
---------------
2
---------------
3
This README is for terminal.serial version 0.9.100 and later, corresponding
3
This README is for terminal.serial version 1.0.0 and later, corresponding
4
to RSE downloads after 2.0M4. Instructions for previous versions (using
4
to RSE downloads after 2.0M4. Instructions for previous versions (using
5
Sun javacomm / javax.comm package instead of gnu.io) are still available from
5
Sun javacomm / javax.comm package instead of gnu.io) are still available from
6
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial/README.txt?root=DSDP_Project&view=markup&pathrev=R1_0_1  
6
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tm.core/terminal/org.eclipse.tm.terminal.serial/README.txt?root=DSDP_Project&view=markup&pathrev=R1_0_1
7
7
8
8
9
Prerequisites:
9
Prerequisites:
Lines 11-26 Link Here
11
In order to compile and run this plugin, RXTX has to be installed.
11
In order to compile and run this plugin, RXTX has to be installed.
12
There are two options: Either installing RXTX as an Eclipse plugin,
12
There are two options: Either installing RXTX as an Eclipse plugin,
13
or installing RXTX as a JVM extension. For installation as plugin,
13
or installing RXTX as a JVM extension. For installation as plugin,
14
you can download a ZIP archive or use the Update Manager.
14
you can download a ZIP archive or use the Update Manager; if an
15
Eclipse plugin is not available for your Platform, you'll need
16
to install RXTX into the JVM (option B, below).
17
15
In either case, once RXTX is installed, you'll need to quit and 
18
In either case, once RXTX is installed, you'll need to quit and 
16
re-start Eclipse PDE in order to recompute the classpath.
19
re-start Eclipse PDE in order to recompute the classpath.
17
20
18
21
19
Option A.1: Installation as an Eclipse Plugin via Update Manager:
22
Option A.1: Installation as an Eclipse Plugin via Update Manager:
20
-----------------------------------------------------------------
23
-----------------------------------------------------------------
21
* In Eclipse, choose Help > Software Updates > Find and Install
24
* In Eclipse, choose Help > Software Updates...
22
  - Search for New Features to Install, Next
25
  - Add New Remote Site: 
23
  - New Remote Site: 
24
       Name = RXTX
26
       Name = RXTX
25
       URL  = http://rxtx.qbang.org/eclipse/
27
       URL  = http://rxtx.qbang.org/eclipse/
26
  - Finish, select proper version, Install All
28
  - Finish, select proper version, Install All
Lines 30-36 Link Here
30
-----------------------------------------------------------
32
-----------------------------------------------------------
31
* Download RXTX SDK or Runtime ZIP from
33
* Download RXTX SDK or Runtime ZIP from
32
     http://rxtx.qbang.org/eclipse/downloads/
34
     http://rxtx.qbang.org/eclipse/downloads/
33
  and extract it into your Eclipse installation.
35
  and extract it into your Eclipse installation. The download
36
  link mentioned also has a README with version and licensing
37
  information.
34
38
35
39
36
Option B: Installation as a JVM Extension:
40
Option B: Installation as a JVM Extension:
Lines 47-54 Link Here
47
  http://users.frii.com/jarvi/rxtx/download.html
51
  http://users.frii.com/jarvi/rxtx/download.html
48
52
49
53
54
For help, contact the RXTX mailing list available via the
55
RXTX website at http://www.rxtx.org or see the notes on
56
https://bugs.eclipse.org/bugs/show_bug.cgi?id=175336
57
58
50
Changelog:
59
Changelog:
51
----------
60
----------
61
2.0.1 - Revised Update Site text to comply with P2 in Eclipse 3.4
52
1.0.1 - Added options for installing RXTX as an Eclipse Plugin
62
1.0.1 - Added options for installing RXTX as an Eclipse Plugin
53
0.9.100 - switched from Sun javax.comm to rxtx gnu.io for serial support
63
0.9.100 - switched from Sun javax.comm to rxtx gnu.io for serial support
54
0.9.0   - first version
64
0.9.0   - first version

Return to bug 220306