From 792bdef0f88e7b6fb4d0b672f396c31bd9a7cd95 Mon Sep 17 00:00:00 2001 From: Pawel Piech Date: Tue, 12 Dec 2006 07:02:45 +0000 Subject: [PATCH] Added initial implementation of Process IO support (bug# 160040). Refactored service for sending/receiving MI commands to debugger. --- .../launch/StandardLaunchRootLayoutNode.java | 1 + .../register/RegisterLayoutNode.java | 1 + .../dd/dsf/debug/service/IBackEndProcess.java | 47 ------------------- 3 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBackEndProcess.java diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StandardLaunchRootLayoutNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StandardLaunchRootLayoutNode.java index e45c8623912..bd1c1ba75b8 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StandardLaunchRootLayoutNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/launch/StandardLaunchRootLayoutNode.java @@ -81,6 +81,7 @@ public class StandardLaunchRootLayoutNode extends AbstractVMRootLayoutNode childNodeDeltas, rootDelta, event, new Done() { public void run() { + if (isDisposed()) return; if (propagateError(getExecutor(), done, "Failed to create delta.")); //$NON-NLS-1$ done.setData(viewRootDelta); getExecutor().execute(done); diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java index dfdf80b19fd..4da4a40cd89 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java @@ -52,6 +52,7 @@ public class RegisterLayoutNode extends AbstractDMVMLayoutNode public void run() { if (!getStatus().isOK()) { handleFailedUpdate(update); + return; } fillUpdateWithVMCs(update, getData()); update.done(); diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBackEndProcess.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBackEndProcess.java deleted file mode 100644 index f8a5cfa159e..00000000000 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBackEndProcess.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006 Wind River Systems 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: - * Wind River Systems - initial API and implementation - *******************************************************************************/ -package org.eclipse.dd.dsf.debug.service; - -import org.eclipse.dd.dsf.service.IDsfService; - - -/** - * Service representing an external process that is part of the debugger back - * end implementation. Having this service allows UI and other clients - * access to the java.lang.Process object for monitoring. E.g. for displaying - * in Debug view and channeling I/O to the console view. - */ -public interface IBackEndProcess extends IDsfService { - /** - * Optional property identifying the process among other services. - * Since there could be multiple instances of this service running at the - * same time, a service property is needed to allow clients to distinguish - * between them. - */ - static final String PROCESS_ID = "org.eclipse.dsdp.DSF.debug.BackendProcess.PROCESS_ID"; //$NON-NLS-1$ - - /** - * Event indicating that the back end process has terminated. - */ - public interface IExitedEvent {} - - /** - * Returns the instance of the java process object representing the back - * end process. - * @return - */ - Process getProcess(); - - /** - * Returns true if back-end process has exited. - */ - boolean isExited(); -}