debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ATFLaunchSupport.java
changeset 94 d74b720418db
equal deleted inserted replaced
92:cfa799aaafa1 94:d74b720418db
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 package com.nokia.cdt.internal.debug.launch;
       
    18 
       
    19 import org.eclipse.debug.core.model.IDebugTarget;
       
    20 
       
    21 public class ATFLaunchSupport {
       
    22 	// Pass to IDebugTarget the outside world (e.g. test framework), it is dropped by Eclipse core debugger
       
    23 	private static IDebugTarget debugTargetFromLaunchDelegate = null;
       
    24 	
       
    25 	/**
       
    26 	 * Pass debug target from LaunchDelegate to outside world (e.g. test framework)
       
    27 	 * We read and clear to save us the hassle of clearing before each usage.
       
    28 	 */
       
    29 	public static IDebugTarget getAndClearDebugTargetFromLaunchDelegate() {
       
    30 		IDebugTarget result = debugTargetFromLaunchDelegate;
       
    31 		debugTargetFromLaunchDelegate = null;
       
    32 		return result;
       
    33 	}
       
    34 
       
    35 	/**
       
    36 	 * Saves debug target from LaunchDelegate to outside world (e.g. test framework)
       
    37 	 */
       
    38 	public static void saveDebugTargetFromLaunchDelegate(IDebugTarget debugTarget) {
       
    39 		debugTargetFromLaunchDelegate = debugTarget;
       
    40 	}
       
    41 
       
    42 }