129
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2008 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.ICompletionProposalExtension3;
|
|
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.ContextInformationValidator; // packageimport
|
|
29 import dwtx.jface.text.contentassist.ICompletionProposal; // packageimport
|
|
30 import dwtx.jface.text.contentassist.IContentAssistProcessor; // packageimport
|
|
31 import dwtx.jface.text.contentassist.AdditionalInfoController; // packageimport
|
|
32 import dwtx.jface.text.contentassist.IContextInformationPresenter; // packageimport
|
|
33 import dwtx.jface.text.contentassist.ICompletionProposalExtension4; // packageimport
|
|
34 import dwtx.jface.text.contentassist.ICompletionListenerExtension; // packageimport
|
|
35 import dwtx.jface.text.contentassist.ContextInformationPopup; // packageimport
|
|
36 import dwtx.jface.text.contentassist.IContextInformationExtension; // packageimport
|
|
37 import dwtx.jface.text.contentassist.IContentAssistantExtension2; // 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 import dwtx.jface.text.IDocument;
|
|
51 import dwtx.jface.text.IInformationControlCreator;
|
|
52
|
|
53
|
|
54 /**
|
|
55 * Extends {@link dwtx.jface.text.contentassist.ICompletionProposal}
|
|
56 * with the following functions:
|
|
57 * <ul>
|
|
58 * <li>provision of a custom information control creator</li>
|
|
59 * <li>provide a custom completion text and offset for prefix completion</li>
|
|
60 * </ul>
|
|
61 *
|
|
62 * @since 3.0
|
|
63 */
|
|
64 public interface ICompletionProposalExtension3 {
|
|
65 /**
|
|
66 * Returns the information control creator of this completion proposal.
|
|
67 *
|
|
68 * @return the information control creator, or <code>null</code> if no custom control creator is available
|
|
69 */
|
|
70 IInformationControlCreator getInformationControlCreator();
|
|
71
|
|
72 /**
|
|
73 * Returns the string that would be inserted at the position returned from
|
|
74 * {@link #getPrefixCompletionStart(IDocument, int)} if this proposal was
|
|
75 * applied. If the replacement string cannot be determined,
|
|
76 * <code>null</code> may be returned.
|
|
77 *
|
|
78 * @param document the document that the receiver applies to
|
|
79 * @param completionOffset the offset into <code>document</code> where the
|
|
80 * completion takes place
|
|
81 * @return the replacement string or <code>null</code> if it cannot be
|
|
82 * determined
|
|
83 */
|
|
84 CharSequence getPrefixCompletionText(IDocument document, int completionOffset);
|
|
85
|
|
86 /**
|
|
87 * Returns the document offset at which the receiver would insert its
|
|
88 * proposal.
|
|
89 *
|
|
90 * @param document the document that the receiver applies to
|
|
91 * @param completionOffset the offset into <code>document</code> where the
|
|
92 * completion takes place
|
|
93 * @return the offset at which the proposal would insert its proposal
|
|
94 */
|
|
95 int getPrefixCompletionStart(IDocument document, int completionOffset);
|
|
96
|
|
97 }
|