1 /******************************************************************************* 2 * Copyright (c) 2000, 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 12 package org.eclipse.jface.text; 13 14 /** 15 * A widget token keeper may require a widget token from an 16 * {@link org.eclipse.jface.text.IWidgetTokenOwner} and release the token to the 17 * owner after usage. A widget token owner may request the token from the token 18 * keeper. The keeper may deny the return of the token. 19 * <p> 20 * The widget token owner and keeper interplay is used by a text viewer in 21 * order to manage the appearance and disappearance of addition, on-top popup 22 * windows such as text hovers, content assist, etc. 23 * 24 * In order to provide backward compatibility for clients of 25 * <code>IWidgetTokeKeeper</code>, extension interfaces are used as a means 26 * of evolution. The following extension interfaces exist: 27 * <ul> 28 * <li>{@link org.eclipse.jface.text.IWidgetTokenKeeperExtension} since version 29 * 3.0 introducing priorities when requesting a widget token and thus replacing 30 * the non-prioritized scheme. It also allows a client to force a widget token 31 * keeper to accept focus.</li> 32 * </ul> 33 * 34 * @see org.eclipse.jface.text.IWidgetTokenKeeperExtension 35 * @since 2.0 36 */ 37 public interface IWidgetTokenKeeper { 38 39 /** 40 * The given widget token owner requests the widget token from this token 41 * keeper. Returns <code>true</code> if the token is released by this 42 * token keeper. Note, the keeper must not call 43 * <code>releaseWidgetToken(IWidgetTokenKeeper)</code> explicitly. 44 * <p> 45 * Replaced by 46 * {@link IWidgetTokenKeeperExtension#requestWidgetToken(IWidgetTokenOwner, int)}. 47 * 48 * @param owner the token owner 49 * @return <code>true</code> if token has been released <code>false</code> 50 * otherwise 51 */ 52 boolean requestWidgetToken(IWidgetTokenOwner owner); 53 } 54