Mercurial > projects > dwt2
comparison org.eclipse.text/src/org/eclipse/jface/text/source/IAnnotationModelExtension.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 | 5feec68b4556 |
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.source.IAnnotationModelExtension; | |
14 | |
15 import org.eclipse.jface.text.source.ISharedTextColors; // packageimport | |
16 import org.eclipse.jface.text.source.ILineRange; // packageimport | |
17 import org.eclipse.jface.text.source.IAnnotationPresentation; // packageimport | |
18 import org.eclipse.jface.text.source.IVerticalRulerInfoExtension; // packageimport | |
19 import org.eclipse.jface.text.source.ICharacterPairMatcher; // packageimport | |
20 import org.eclipse.jface.text.source.TextInvocationContext; // packageimport | |
21 import org.eclipse.jface.text.source.LineChangeHover; // packageimport | |
22 import org.eclipse.jface.text.source.IChangeRulerColumn; // packageimport | |
23 import org.eclipse.jface.text.source.IAnnotationMap; // packageimport | |
24 import org.eclipse.jface.text.source.IAnnotationModelListenerExtension; // packageimport | |
25 import org.eclipse.jface.text.source.ISourceViewerExtension2; // packageimport | |
26 import org.eclipse.jface.text.source.IAnnotationHover; // packageimport | |
27 import org.eclipse.jface.text.source.ContentAssistantFacade; // packageimport | |
28 import org.eclipse.jface.text.source.IAnnotationAccess; // packageimport | |
29 import org.eclipse.jface.text.source.IVerticalRulerExtension; // packageimport | |
30 import org.eclipse.jface.text.source.IVerticalRulerColumn; // packageimport | |
31 import org.eclipse.jface.text.source.LineNumberRulerColumn; // packageimport | |
32 import org.eclipse.jface.text.source.MatchingCharacterPainter; // packageimport | |
33 import org.eclipse.jface.text.source.ILineDifferExtension; // packageimport | |
34 import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; // packageimport | |
35 import org.eclipse.jface.text.source.LineNumberChangeRulerColumn; // packageimport | |
36 import org.eclipse.jface.text.source.IAnnotationAccessExtension; // packageimport | |
37 import org.eclipse.jface.text.source.ISourceViewer; // packageimport | |
38 import org.eclipse.jface.text.source.AnnotationModel; // packageimport | |
39 import org.eclipse.jface.text.source.ILineDifferExtension2; // packageimport | |
40 import org.eclipse.jface.text.source.IAnnotationModelListener; // packageimport | |
41 import org.eclipse.jface.text.source.IVerticalRuler; // packageimport | |
42 import org.eclipse.jface.text.source.DefaultAnnotationHover; // packageimport | |
43 import org.eclipse.jface.text.source.SourceViewer; // packageimport | |
44 import org.eclipse.jface.text.source.SourceViewerConfiguration; // packageimport | |
45 import org.eclipse.jface.text.source.AnnotationBarHoverManager; // packageimport | |
46 import org.eclipse.jface.text.source.CompositeRuler; // packageimport | |
47 import org.eclipse.jface.text.source.ImageUtilities; // packageimport | |
48 import org.eclipse.jface.text.source.VisualAnnotationModel; // packageimport | |
49 import org.eclipse.jface.text.source.IAnnotationModel; // packageimport | |
50 import org.eclipse.jface.text.source.ISourceViewerExtension3; // packageimport | |
51 import org.eclipse.jface.text.source.ILineDiffInfo; // packageimport | |
52 import org.eclipse.jface.text.source.VerticalRulerEvent; // packageimport | |
53 import org.eclipse.jface.text.source.ChangeRulerColumn; // packageimport | |
54 import org.eclipse.jface.text.source.ILineDiffer; // packageimport | |
55 import org.eclipse.jface.text.source.AnnotationModelEvent; // packageimport | |
56 import org.eclipse.jface.text.source.AnnotationColumn; // packageimport | |
57 import org.eclipse.jface.text.source.AnnotationRulerColumn; // packageimport | |
58 import org.eclipse.jface.text.source.IAnnotationHoverExtension; // packageimport | |
59 import org.eclipse.jface.text.source.AbstractRulerColumn; // packageimport | |
60 import org.eclipse.jface.text.source.ISourceViewerExtension; // packageimport | |
61 import org.eclipse.jface.text.source.AnnotationMap; // packageimport | |
62 import org.eclipse.jface.text.source.IVerticalRulerInfo; // packageimport | |
63 import org.eclipse.jface.text.source.IAnnotationModelExtension2; // packageimport | |
64 import org.eclipse.jface.text.source.LineRange; // packageimport | |
65 import org.eclipse.jface.text.source.IAnnotationAccessExtension2; // packageimport | |
66 import org.eclipse.jface.text.source.VerticalRuler; // packageimport | |
67 import org.eclipse.jface.text.source.JFaceTextMessages; // packageimport | |
68 import org.eclipse.jface.text.source.IOverviewRuler; // packageimport | |
69 import org.eclipse.jface.text.source.Annotation; // packageimport | |
70 import org.eclipse.jface.text.source.IVerticalRulerListener; // packageimport | |
71 import org.eclipse.jface.text.source.ISourceViewerExtension4; // packageimport | |
72 import org.eclipse.jface.text.source.AnnotationPainter; // packageimport | |
73 import org.eclipse.jface.text.source.IAnnotationHoverExtension2; // packageimport | |
74 import org.eclipse.jface.text.source.OverviewRuler; // packageimport | |
75 import org.eclipse.jface.text.source.OverviewRulerHoverManager; // packageimport | |
76 | |
77 | |
78 import java.lang.all; | |
79 import java.util.Map; | |
80 | |
81 | |
82 | |
83 import org.eclipse.jface.text.Position; | |
84 | |
85 | |
86 /** | |
87 * Extends {@link org.eclipse.jface.text.source.IAnnotationModel}with the | |
88 * ability piggyback other annotation models. It also introduces the concept of | |
89 * modification time stamps and adds methods for richer manipulation methods. | |
90 * | |
91 * @since 3.0 | |
92 */ | |
93 public interface IAnnotationModelExtension { | |
94 | |
95 /** | |
96 * Attaches <code>attachment</code> to the receiver. Connects | |
97 * <code>attachment</code> to the currently connected document. If | |
98 * <code>attachment</code> is already attached (even) under a different | |
99 * key), it is not attached again. | |
100 * | |
101 * @param key the key through which the attachment is identified. | |
102 * @param attachment the attached <code>IAnnotationModel</code> | |
103 */ | |
104 void addAnnotationModel(Object key, IAnnotationModel attachment); | |
105 | |
106 /** | |
107 * Returns the attached <code>IAnnotationModel</code> for <code>key</code>, | |
108 * or <code>null</code> if none is attached for <code>key</code>. | |
109 * | |
110 * @param key the key through which the attachment is identified. | |
111 * @return an <code>IAnnotationModel</code> attached under | |
112 * <code>key</code>, or <code>null</code> | |
113 */ | |
114 IAnnotationModel getAnnotationModel(Object key); | |
115 | |
116 /** | |
117 * Removes and returns the attached <code>IAnnotationModel</code> for | |
118 * <code>key</code>. | |
119 * | |
120 * @param key the key through which the attachment is identified. | |
121 * @return an <code>IAnnotationModel</code> attached under | |
122 * <code>key</code>, or <code>null</code> | |
123 */ | |
124 IAnnotationModel removeAnnotationModel(Object key); | |
125 | |
126 /** | |
127 * Adds and removes annotations to/from this annotation model in a single | |
128 * step. The annotations to remove are given in an array. The annotations to | |
129 * add are provided in a map associating the annotations with the positions | |
130 * at which they should be added. All registered annotation model listeners | |
131 * are informed about the change. If the model is connected to a document, | |
132 * the positions are automatically updated on document changes. Annotations | |
133 * that are already managed by this annotation model or are not associated | |
134 * with a valid position in the connected document have no effect. | |
135 * | |
136 * @param annotationsToRemove the annotations to be removed, may be | |
137 * <code>null</code> | |
138 * @param annotationsToAdd the annotations which will be added, may be | |
139 * <code>null</code> each map entry has an | |
140 * <code>Annotation</code> as key and a <code>Position</code> | |
141 * as value | |
142 * @throws ClassCastException if one of the map key or values has a wrong | |
143 * type | |
144 */ | |
145 void replaceAnnotations(Annotation[] annotationsToRemove, Map annotationsToAdd) ; | |
146 | |
147 /** | |
148 * Modifies the position associated with the given annotation to equal the | |
149 * given position. If the annotation is not yet managed by this annotation | |
150 * model, the annotation is added. If the given position is | |
151 * <code>null</code> the annotation is removed from the model. All | |
152 * annotation model change listeners will be informed about the change. | |
153 * | |
154 * @param annotation the annotation whose associated position should be | |
155 * modified | |
156 * @param position the position to whose values the associated position | |
157 * should be changed | |
158 */ | |
159 void modifyAnnotationPosition(Annotation annotation, Position position); | |
160 | |
161 /** | |
162 * Removes all annotations from this annotation model. | |
163 */ | |
164 void removeAllAnnotations(); | |
165 | |
166 /** | |
167 * Returns the modification stamp of this annotation model. | |
168 * | |
169 * @return the modification stamp of this annotation model | |
170 */ | |
171 Object getModificationStamp(); | |
172 } |