129
|
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 * Port to the D programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 module dwtx.jface.text.contentassist.IContentAssistantExtension2;
|
|
14
|
131
|
15 import dwtx.jface.text.contentassist.ContentAssistEvent; // packageimport
|
|
16 import dwtx.jface.text.contentassist.Helper; // packageimport
|
|
17 import dwtx.jface.text.contentassist.PopupCloser; // packageimport
|
|
18 import dwtx.jface.text.contentassist.IContentAssistant; // packageimport
|
|
19 import dwtx.jface.text.contentassist.CompletionProposal; // packageimport
|
|
20 import dwtx.jface.text.contentassist.ICompletionProposalExtension5; // packageimport
|
|
21 import dwtx.jface.text.contentassist.IContextInformationValidator; // packageimport
|
|
22 import dwtx.jface.text.contentassist.IContentAssistListener; // packageimport
|
|
23 import dwtx.jface.text.contentassist.ICompletionProposalExtension6; // packageimport
|
|
24 import dwtx.jface.text.contentassist.ICompletionListener; // packageimport
|
|
25 import dwtx.jface.text.contentassist.ICompletionProposalExtension2; // packageimport
|
|
26 import dwtx.jface.text.contentassist.IContentAssistantExtension4; // packageimport
|
|
27 import dwtx.jface.text.contentassist.ContextInformation; // packageimport
|
|
28 import dwtx.jface.text.contentassist.ICompletionProposalExtension3; // packageimport
|
|
29 import dwtx.jface.text.contentassist.ContextInformationValidator; // packageimport
|
|
30 import dwtx.jface.text.contentassist.ICompletionProposal; // packageimport
|
|
31 import dwtx.jface.text.contentassist.IContentAssistProcessor; // packageimport
|
|
32 import dwtx.jface.text.contentassist.AdditionalInfoController; // packageimport
|
|
33 import dwtx.jface.text.contentassist.IContextInformationPresenter; // packageimport
|
|
34 import dwtx.jface.text.contentassist.ICompletionProposalExtension4; // packageimport
|
|
35 import dwtx.jface.text.contentassist.ICompletionListenerExtension; // packageimport
|
|
36 import dwtx.jface.text.contentassist.ContextInformationPopup; // packageimport
|
|
37 import dwtx.jface.text.contentassist.IContextInformationExtension; // packageimport
|
|
38 import dwtx.jface.text.contentassist.ContentAssistSubjectControlAdapter; // packageimport
|
|
39 import dwtx.jface.text.contentassist.CompletionProposalPopup; // packageimport
|
|
40 import dwtx.jface.text.contentassist.ICompletionProposalExtension; // packageimport
|
|
41 import dwtx.jface.text.contentassist.IContextInformation; // packageimport
|
|
42 import dwtx.jface.text.contentassist.IContentAssistantExtension3; // packageimport
|
|
43 import dwtx.jface.text.contentassist.ContentAssistant; // packageimport
|
|
44 import dwtx.jface.text.contentassist.IContentAssistantExtension; // packageimport
|
|
45 import dwtx.jface.text.contentassist.JFaceTextMessages; // packageimport
|
|
46
|
|
47
|
129
|
48 import dwt.dwthelper.utils;
|
|
49
|
|
50 /**
|
|
51 * Extends {@link dwtx.jface.text.contentassist.IContentAssistant} with the following
|
|
52 * functions:
|
|
53 * <ul>
|
|
54 * <li>completion listeners</li>
|
|
55 * <li>repeated invocation mode</li>
|
|
56 * <li>a local status line for the completion popup</li>
|
|
57 * <li>control over the behavior when no proposals are available</li>
|
|
58 * </ul>
|
|
59 *
|
|
60 * @since 3.2
|
|
61 */
|
|
62 public interface IContentAssistantExtension2 {
|
|
63
|
|
64 /**
|
|
65 * Adds a completion listener that will be informed before proposals are computed.
|
|
66 *
|
|
67 * @param listener the listener
|
|
68 */
|
|
69 public void addCompletionListener(ICompletionListener listener);
|
|
70
|
|
71 /**
|
|
72 * Removes a completion listener.
|
|
73 *
|
|
74 * @param listener the listener to remove
|
|
75 */
|
|
76 public void removeCompletionListener(ICompletionListener listener);
|
|
77
|
|
78 /**
|
|
79 * Enables repeated invocation mode, which will trigger re-computation of the proposals when
|
|
80 * code assist is executed repeatedly. The default is no <code>false</code>.
|
|
81 *
|
|
82 * @param cycling <code>true</code> to enable repetition mode, <code>false</code> to disable
|
|
83 */
|
|
84 public void setRepeatedInvocationMode(bool cycling);
|
|
85
|
|
86 /**
|
|
87 * Enables displaying an empty completion proposal pop-up. The default is not to show an empty
|
|
88 * list.
|
|
89 *
|
|
90 * @param showEmpty <code>true</code> to show empty lists
|
|
91 */
|
|
92 public void setShowEmptyList(bool showEmpty);
|
|
93
|
|
94 /**
|
|
95 * Enables displaying a status line below the proposal popup. The default is not to show the
|
|
96 * status line. The contents of the status line may be set via {@link #setStatusMessage(String)}.
|
|
97 *
|
|
98 * @param show <code>true</code> to show a message line, <code>false</code> to not show one.
|
|
99 */
|
|
100 public void setStatusLineVisible(bool show);
|
|
101
|
|
102 /**
|
|
103 * Sets the caption message displayed at the bottom of the completion proposal popup.
|
|
104 *
|
|
105 * @param message the message
|
|
106 */
|
|
107 public void setStatusMessage(String message);
|
|
108
|
|
109 /**
|
|
110 * Sets the text to be shown if no proposals are available and
|
|
111 * {@link #setShowEmptyList(bool) empty lists} are displayed.
|
|
112 *
|
|
113 * @param message the text for the empty list
|
|
114 */
|
|
115 public void setEmptyMessage(String message);
|
|
116 }
|