1 /******************************************************************************* 2 * Copyright (c) 2005, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.debug.internal.ui.contexts.provisional; 12 13 /** 14 * Adapter retrieved from an <code>ILaunch</code> that notifies 15 * listeners when it suspends at a context where debugging should 16 * be initiated by the user. For example, when a breakpoint is encountered. 17 * <p> 18 * It is important that the same instance of a suspend trigger adapter is 19 * returned each time it is asked for the same object, such that listeners 20 * can be added and removed from the same instance. When a listener is removed 21 * and no more listeners are registered, this trigger can be disposed or replaced 22 * with a new adapter the next time one is requested. 23 * </p> 24 * <p> 25 * Clients may implement this interface. 26 * </p> 27 * @since 3.2 28 */ 29 public interface ISuspendTriggerAdapter { 30 31 /** 32 * Registers the given listener for suspend notifications. 33 * 34 * @param listener suspend listener 35 */ 36 public void addSuspendTriggerListener(ISuspendTriggerListener listener); 37 38 /** 39 * Deregisters the given listener for suspend notifications. 40 * 41 * @param listener suspend listener 42 */ 43 public void removeSuspendTriggerListener(ISuspendTriggerListener listener); 44 45 } 46