1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

[206884] Update Terminal Ownership ID to "org.eclipse.tm.terminal.serial"

This commit is contained in:
Martin Oberhuber 2008-04-09 21:59:37 +00:00
parent dc038f7d6c
commit 493f9cc6fc

View file

@ -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 * 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
@ -15,6 +15,7 @@
* Martin Oberhuber (Wind River) - fixed copyright headers and beautified * 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) - [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) - [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; package org.eclipse.tm.internal.terminal.serial;
@ -96,12 +97,24 @@ public class SerialConnectWorker extends Thread {
CommPortIdentifier.getPortIdentifiers(); 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() { public void run() {
String portName=null; String portName=null;
//Ownership identifier: final String strID = getOwnershipId();
//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$
SerialPort serialPort = null; SerialPort serialPort = null;
try { try {
fControl.setState(TerminalState.OPENED); fControl.setState(TerminalState.OPENED);