Mercurial > projects > dwt-addons
diff dwtx/jface/text/contentassist/ICompletionListener.d @ 129:eb30df5ca28b
Added JFace Text sources
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 23 Aug 2008 19:10:48 +0200 |
parents | |
children | c4fb132a086c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/jface/text/contentassist/ICompletionListener.d Sat Aug 23 19:10:48 2008 +0200 @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2005, 2007 IBM Corporation 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: + * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> + *******************************************************************************/ +module dwtx.jface.text.contentassist.ICompletionListener; + +import dwt.dwthelper.utils; + + +/** + * A completion listener is informed before the content assistant computes completion proposals. + * <p> + * In order to provide backward compatibility for clients of <code>ICompletionListener</code>, extension + * interfaces are used to provide a means of evolution. The following extension interfaces exist: + * <ul> + * <li>{@link dwtx.jface.text.contentassist.ICompletionListenerExtension} since version 3.4 introducing + * the following functions: + * <ul> + * <li>additional notification about restarting the current code assist session</li> + * </ul> + * </li> + * </ul> + * </p> + * + * <p> + * Clients may implement this interface. + * </p> + * + * @since 3.2 + */ +public interface ICompletionListener { + /** + * Called when code assist is invoked when there is no current code assist session. + * + * @param event the content assist event + */ + void assistSessionStarted(ContentAssistEvent event); + + /** + * Called when a code assist session ends (for example, the proposal popup is closed). + * + * @param event the content assist event + */ + void assistSessionEnded(ContentAssistEvent event); + + /** + * Called when the selection in the proposal popup is changed or if the insert-mode changed. + * + * @param proposal the newly selected proposal, possibly <code>null</code> + * @param smartToggle <code>true</code> if the insert-mode toggle is being pressed, + * <code>false</code> otherwise + */ + void selectionChanged(ICompletionProposal proposal, bool smartToggle); +}