KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > contentassist > ICompletionListener


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.jface.text.contentassist;
12
13 /**
14  * A completion listener is informed before the content assistant computes completion proposals.
15  * <p>
16  * Clients may implement this interface.
17  * </p>
18  *
19  * @since 3.2
20  */

21 public interface ICompletionListener {
22     /**
23      * Called when code assist is invoked when there is no current code assist session.
24      *
25      * @param event the content assist event
26      */

27     void assistSessionStarted(ContentAssistEvent event);
28
29     /**
30      * Called when a code assist session ends (for example, the proposal popup is closed).
31      *
32      * @param event the content assist event
33      */

34     void assistSessionEnded(ContentAssistEvent event);
35
36     /**
37      * Called when the selection in the proposal popup is changed or if the insert-mode changed.
38      *
39      * @param proposal the newly selected proposal, possibly <code>null</code>
40      * @param smartToggle <code>true</code> if the insert-mode toggle is being pressed,
41      * <code>false</code> otherwise
42      */

43     void selectionChanged(ICompletionProposal proposal, boolean smartToggle);
44 }
Popular Tags