plugins/org.symbian.tools.tmw.debug/src/org/symbian/tools/wrttools/debug/internal/session/TerminateSession.java
changeset 471 06589bf52fa7
parent 470 d4809db37847
child 472 bd9f2d7c64a6
--- a/plugins/org.symbian.tools.tmw.debug/src/org/symbian/tools/wrttools/debug/internal/session/TerminateSession.java	Thu Aug 19 17:48:04 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/**
- * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.wrttools.debug.internal.session;
-
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchManager;
-import org.symbian.tools.tmw.previewer.IPreviewerCommandHandler;
-import org.symbian.tools.wrttools.debug.internal.Activator;
-import org.symbian.tools.wrttools.debug.internal.IConstants;
-import org.symbian.tools.wrttools.debug.internal.launch.WidgetLaunchDelegate;
-
-public class TerminateSession implements IPreviewerCommandHandler {
-    @SuppressWarnings("rawtypes")
-    public void handle(String commandName, String projectName, Map parameters) {
-        ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-        for (ILaunch launch : launchManager.getLaunches()) {
-            try {
-                if (!launch.isTerminated()) {
-                    ILaunchConfiguration lc = launch.getLaunchConfiguration();
-                    if (WidgetLaunchDelegate.ID.equals(lc.getType().getIdentifier())
-                            && projectName.equals(lc.getAttribute(IConstants.PROP_PROJECT_NAME, ""))) {
-                        launch.terminate();
-                    }
-                }
-            } catch (CoreException e) {
-                Activator.log(e);
-            }
-        }
-    }
-
-}