KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 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  * Extends {@link org.eclipse.jface.text.contentassist.IContentAssistant} with the following
15  * functions:
16  * <ul>
17  * <li>completion listeners</li>
18  * <li>repeated invocation mode</li>
19  * <li>a local status line for the completion popup</li>
20  * <li>control over the behavior when no proposals are available</li>
21  * </ul>
22  *
23  * @since 3.2
24  */

25 public interface IContentAssistantExtension2 {
26
27     /**
28      * Adds a completion listener that will be informed before proposals are computed.
29      *
30      * @param listener the listener
31      */

32     public void addCompletionListener(ICompletionListener listener);
33
34     /**
35      * Removes a completion listener.
36      *
37      * @param listener the listener to remove
38      */

39     public void removeCompletionListener(ICompletionListener listener);
40
41     /**
42      * Enables repeated invocation mode, which will trigger re-computation of the proposals when
43      * code assist is executed repeatedly. The default is no <code>false</code>.
44      *
45      * @param cycling <code>true</code> to enable repetition mode, <code>false</code> to disable
46      */

47     public void setRepeatedInvocationMode(boolean cycling);
48
49     /**
50      * Enables displaying an empty completion proposal pop-up. The default is not to show an empty
51      * list.
52      *
53      * @param showEmpty <code>true</code> to show empty lists
54      */

55     public void setShowEmptyList(boolean showEmpty);
56
57     /**
58      * Enables displaying a status line below the proposal popup. The default is not to show the
59      * status line. The contents of the status line may be set via {@link #setStatusMessage(String)}.
60      *
61      * @param show <code>true</code> to show a message line, <code>false</code> to not show one.
62      */

63     public void setStatusLineVisible(boolean show);
64
65     /**
66      * Sets the caption message displayed at the bottom of the completion proposal popup.
67      *
68      * @param message the message
69      */

70     public void setStatusMessage(String JavaDoc message);
71
72     /**
73      * Sets the text to be shown if no proposals are available and
74      * {@link #setShowEmptyList(boolean) empty lists} are displayed.
75      *
76      * @param message the text for the empty list
77      */

78     public void setEmptyMessage(String JavaDoc message);
79 }
80
Popular Tags