private final String CURRENT_ACTIVE_IDE_PORT = "current_active_ide_port"; //$NON-NLS-1$
private static boolean recvDAReadyStatus = false;
- private final static Object recvDataEvent = new Object(); // Lock for synchronous communication
public synchronized static DAServerManager getInstance() {
if (instance == null) {
DALog.dlgErrorMessage(Labels.MESSAGE_ERROR,
Labels.MESSAGE_FAIL_TO_LAUNCH_PROJECT);
}
- synchronized (recvDataEvent) {
+ synchronized (this) {
try {
- recvDataEvent.wait(10000);
+ this.wait(10000);
} catch (InterruptedException e) {
DALog.printLog("DAServerManager - sendDAStatusMessage - getRecvDAReadyStatus().wait(10000)");
// TODO Auto-generated catch block
}
}
- private void setDAStatus(final String[] msgArray) { // DA Status
+ private synchronized void setDAStatus(final String[] msgArray) { // DA Status
if (msgArray[1].equals(IDE_DA_COMMUNICATION_TYPE_1_RECORD)) {
setRecvDAReadyStatus(false);
} else if (msgArray[1].equals(IDE_DA_COMMUNICATION_TYPE_1_STOP)) {
} else {
DALog.printLog("receive message is not valid");//$NON-NLS-1$
}
- synchronized (recvDataEvent) {
- recvDataEvent.notify();
- }
+ this.notify();
}
private void viewSouceLine(final String[] msgArray) {