Mercurial > projects > dwt2
comparison org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/IContextInformationPresenter.d @ 12:bc29606a740c
Added dwt-addons in original directory structure of eclipse.org
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 14 Mar 2009 18:23:29 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
11:43904fec5dca | 12:bc29606a740c |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2000, 2005 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 org.eclipse.jface.text.contentassist.IContextInformationPresenter; | |
14 | |
15 import org.eclipse.jface.text.contentassist.ContentAssistEvent; // packageimport | |
16 import org.eclipse.jface.text.contentassist.Helper; // packageimport | |
17 import org.eclipse.jface.text.contentassist.PopupCloser; // packageimport | |
18 import org.eclipse.jface.text.contentassist.IContentAssistant; // packageimport | |
19 import org.eclipse.jface.text.contentassist.CompletionProposal; // packageimport | |
20 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension5; // packageimport | |
21 import org.eclipse.jface.text.contentassist.IContextInformationValidator; // packageimport | |
22 import org.eclipse.jface.text.contentassist.IContentAssistListener; // packageimport | |
23 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension6; // packageimport | |
24 import org.eclipse.jface.text.contentassist.ICompletionListener; // packageimport | |
25 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2; // packageimport | |
26 import org.eclipse.jface.text.contentassist.IContentAssistantExtension4; // packageimport | |
27 import org.eclipse.jface.text.contentassist.ContextInformation; // packageimport | |
28 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3; // packageimport | |
29 import org.eclipse.jface.text.contentassist.ContextInformationValidator; // packageimport | |
30 import org.eclipse.jface.text.contentassist.ICompletionProposal; // packageimport | |
31 import org.eclipse.jface.text.contentassist.IContentAssistProcessor; // packageimport | |
32 import org.eclipse.jface.text.contentassist.AdditionalInfoController; // packageimport | |
33 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4; // packageimport | |
34 import org.eclipse.jface.text.contentassist.ICompletionListenerExtension; // packageimport | |
35 import org.eclipse.jface.text.contentassist.ContextInformationPopup; // packageimport | |
36 import org.eclipse.jface.text.contentassist.IContextInformationExtension; // packageimport | |
37 import org.eclipse.jface.text.contentassist.IContentAssistantExtension2; // packageimport | |
38 import org.eclipse.jface.text.contentassist.ContentAssistSubjectControlAdapter; // packageimport | |
39 import org.eclipse.jface.text.contentassist.CompletionProposalPopup; // packageimport | |
40 import org.eclipse.jface.text.contentassist.ICompletionProposalExtension; // packageimport | |
41 import org.eclipse.jface.text.contentassist.IContextInformation; // packageimport | |
42 import org.eclipse.jface.text.contentassist.IContentAssistantExtension3; // packageimport | |
43 import org.eclipse.jface.text.contentassist.ContentAssistant; // packageimport | |
44 import org.eclipse.jface.text.contentassist.IContentAssistantExtension; // packageimport | |
45 import org.eclipse.jface.text.contentassist.JFaceTextMessages; // packageimport | |
46 | |
47 | |
48 import java.lang.all; | |
49 import java.util.Set; | |
50 | |
51 import org.eclipse.jface.text.ITextViewer; | |
52 import org.eclipse.jface.text.TextPresentation; | |
53 | |
54 | |
55 /** | |
56 * A context information presenter determines the presentation | |
57 * of context information depending on a given document position. | |
58 * <p> | |
59 * The interface can be implemented by clients. | |
60 * </p> | |
61 * | |
62 * @since 2.0 | |
63 */ | |
64 public interface IContextInformationPresenter { | |
65 | |
66 /** | |
67 * Installs this presenter for the given context information. | |
68 * | |
69 * @param info the context information which this presenter should style | |
70 * @param viewer the text viewer on which the information is presented | |
71 * @param offset the document offset for which the information has been computed | |
72 */ | |
73 void install(IContextInformation info, ITextViewer viewer, int offset); | |
74 | |
75 /** | |
76 * Updates the given presentation of the given context information | |
77 * at the given document position. Returns whether update changed the | |
78 * presentation. | |
79 * | |
80 * @param offset the current offset within the document | |
81 * @param presentation the presentation to be updated | |
82 * @return <code>true</code> if the given presentation has been changed | |
83 */ | |
84 bool updatePresentation(int offset, TextPresentation presentation); | |
85 } |