mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 10:46:02 +02:00
[206884] Update Terminal Ownership ID to "org.eclipse.tm.terminal.serial"
This commit is contained in:
parent
dc038f7d6c
commit
493f9cc6fc
1 changed files with 25 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2007 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2003, 2008 Wind River Systems, Inc. and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -15,6 +15,7 @@
|
|||
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified
|
||||
* Martin Oberhuber (Wind River) - [207158] improve error message when port not available
|
||||
* Martin Oberhuber (Wind River) - [208029] COM port not released after quick disconnect/reconnect
|
||||
* Martin Oberhuber (Wind River) - [206884] Update Terminal Ownership ID to "org.eclipse.tm.terminal.serial"
|
||||
*******************************************************************************/
|
||||
package org.eclipse.tm.internal.terminal.serial;
|
||||
|
||||
|
@ -96,12 +97,24 @@ public class SerialConnectWorker extends Thread {
|
|||
CommPortIdentifier.getPortIdentifiers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ID that this connector uses for RXTX Comm Ownership Handling.
|
||||
*
|
||||
* Note that this was changed in Terminal 2.0 as per
|
||||
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=206884 - previous versions
|
||||
* of the serial terminal connector used a different string,
|
||||
* "org.eclipse.tm.internal.terminal.serial".
|
||||
*
|
||||
* @since org.eclipse.tm.terminal.serial 2.0
|
||||
* @return ownership ID, "org.eclipse.tm.terminal.serial"
|
||||
*/
|
||||
public static final String getOwnershipId() {
|
||||
return "org.eclipse.tm.terminal.serial"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public void run() {
|
||||
String portName=null;
|
||||
//Ownership identifier:
|
||||
//TODO [206884] This is part of API and should be changed for the next release
|
||||
final String strID = getClass().getPackage().getName();
|
||||
//final String strID = "org.eclipse.tm.terminal.serial"; //$NON-NLS-1$
|
||||
final String strID = getOwnershipId();
|
||||
SerialPort serialPort = null;
|
||||
try {
|
||||
fControl.setState(TerminalState.OPENED);
|
||||
|
|
Loading…
Add table
Reference in a new issue