Mercurial > projects > dwt2
comparison org.eclipse.jface.text/src/org/eclipse/jface/text/source/IOverviewRuler.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.source.IOverviewRuler; | |
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.IAnnotationModelExtension; // packageimport | |
34 import org.eclipse.jface.text.source.ILineDifferExtension; // packageimport | |
35 import org.eclipse.jface.text.source.DefaultCharacterPairMatcher; // packageimport | |
36 import org.eclipse.jface.text.source.LineNumberChangeRulerColumn; // packageimport | |
37 import org.eclipse.jface.text.source.IAnnotationAccessExtension; // packageimport | |
38 import org.eclipse.jface.text.source.ISourceViewer; // packageimport | |
39 import org.eclipse.jface.text.source.AnnotationModel; // packageimport | |
40 import org.eclipse.jface.text.source.ILineDifferExtension2; // packageimport | |
41 import org.eclipse.jface.text.source.IAnnotationModelListener; // packageimport | |
42 import org.eclipse.jface.text.source.IVerticalRuler; // packageimport | |
43 import org.eclipse.jface.text.source.DefaultAnnotationHover; // packageimport | |
44 import org.eclipse.jface.text.source.SourceViewer; // packageimport | |
45 import org.eclipse.jface.text.source.SourceViewerConfiguration; // packageimport | |
46 import org.eclipse.jface.text.source.AnnotationBarHoverManager; // packageimport | |
47 import org.eclipse.jface.text.source.CompositeRuler; // packageimport | |
48 import org.eclipse.jface.text.source.ImageUtilities; // packageimport | |
49 import org.eclipse.jface.text.source.VisualAnnotationModel; // packageimport | |
50 import org.eclipse.jface.text.source.IAnnotationModel; // packageimport | |
51 import org.eclipse.jface.text.source.ISourceViewerExtension3; // packageimport | |
52 import org.eclipse.jface.text.source.ILineDiffInfo; // packageimport | |
53 import org.eclipse.jface.text.source.VerticalRulerEvent; // packageimport | |
54 import org.eclipse.jface.text.source.ChangeRulerColumn; // packageimport | |
55 import org.eclipse.jface.text.source.ILineDiffer; // packageimport | |
56 import org.eclipse.jface.text.source.AnnotationModelEvent; // packageimport | |
57 import org.eclipse.jface.text.source.AnnotationColumn; // packageimport | |
58 import org.eclipse.jface.text.source.AnnotationRulerColumn; // packageimport | |
59 import org.eclipse.jface.text.source.IAnnotationHoverExtension; // packageimport | |
60 import org.eclipse.jface.text.source.AbstractRulerColumn; // packageimport | |
61 import org.eclipse.jface.text.source.ISourceViewerExtension; // packageimport | |
62 import org.eclipse.jface.text.source.AnnotationMap; // packageimport | |
63 import org.eclipse.jface.text.source.IVerticalRulerInfo; // packageimport | |
64 import org.eclipse.jface.text.source.IAnnotationModelExtension2; // packageimport | |
65 import org.eclipse.jface.text.source.LineRange; // packageimport | |
66 import org.eclipse.jface.text.source.IAnnotationAccessExtension2; // packageimport | |
67 import org.eclipse.jface.text.source.VerticalRuler; // packageimport | |
68 import org.eclipse.jface.text.source.JFaceTextMessages; // 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.Set; | |
80 | |
81 import org.eclipse.swt.graphics.Color; | |
82 import org.eclipse.swt.widgets.Control; | |
83 | |
84 /** | |
85 * This interface defines a visual component which may serve | |
86 * text viewers as an overview annotation presentation area. This means, | |
87 * presentation of annotations is independent from the actual view port of | |
88 * the text viewer. The annotations of the viewer's whole document are | |
89 * visible in the overview ruler. | |
90 * <p> | |
91 * This interfaces embodies three contracts: | |
92 * <ul> | |
93 * <li> The overview ruler retrieves the annotations it presents from an annotation model. | |
94 * <li> The ruler is a visual component which must be integrated in a hierarchy of SWT controls. | |
95 * <li> The ruler provides interested clients with mapping and | |
96 * interaction information. This covers the mapping between | |
97 * coordinates of the ruler's control and line numbers based | |
98 * on the connected text viewer's document (<code>IVerticalRulerInfo</code>). | |
99 * </ul></p> | |
100 * <p> | |
101 * Clients may implement this interface or use the default implementation provided | |
102 * by <code>OverviewlRuler</code>.</p> | |
103 * | |
104 * @see org.eclipse.jface.text.ITextViewer | |
105 * @since 2.1 | |
106 */ | |
107 public interface IOverviewRuler : IVerticalRuler { | |
108 | |
109 /** | |
110 * Returns whether there is an annotation an the given vertical coordinate. This | |
111 * method takes the compression factor of the overview ruler into account. | |
112 * | |
113 * @param y the y-coordinate | |
114 * @return <code>true</code> if there is an annotation, <code>false</code> otherwise | |
115 */ | |
116 bool hasAnnotation(int y); | |
117 | |
118 /** | |
119 * Returns the height of the visual presentation of an annotation in this | |
120 * overview ruler. Assumes that all annotations are represented using the | |
121 * same height. | |
122 * | |
123 * @return int the visual height of an annotation | |
124 */ | |
125 int getAnnotationHeight(); | |
126 | |
127 /** | |
128 * Sets the color for the given annotation type in this overview ruler. | |
129 * | |
130 * @param annotationType the annotation type | |
131 * @param color the color | |
132 */ | |
133 void setAnnotationTypeColor(Object annotationType, Color color); | |
134 | |
135 /** | |
136 * Sets the drawing layer for the given annotation type in this overview ruler. | |
137 * | |
138 * @param annotationType the annotation type | |
139 * @param layer the drawing layer | |
140 */ | |
141 void setAnnotationTypeLayer(Object annotationType, int layer); | |
142 | |
143 /** | |
144 * Adds the given annotation type to this overview ruler. Starting with this | |
145 * call, annotations of the given type are shown in the overview ruler. | |
146 * | |
147 * @param annotationType the annotation type | |
148 */ | |
149 void addAnnotationType(Object annotationType); | |
150 | |
151 /** | |
152 * Removes the given annotation type from this overview ruler. Annotations | |
153 * of the given type are no longer shown in the overview ruler. | |
154 * | |
155 * @param annotationType the annotation type | |
156 */ | |
157 void removeAnnotationType(Object annotationType); | |
158 | |
159 /** | |
160 * Adds the given annotation type to the header of this ruler. Starting with | |
161 * this call, the presence of annotations is tracked and the header is drawn | |
162 * in the configured color. | |
163 * | |
164 * @param annotationType the annotation type to be tracked | |
165 */ | |
166 void addHeaderAnnotationType(Object annotationType); | |
167 | |
168 /** | |
169 * Removes the given annotation type from the header of this ruler. The | |
170 * presence of annotations of the given type is no longer tracked and the | |
171 * header is drawn in the default color, depending on the other configured | |
172 * configured annotation types. | |
173 * | |
174 * @param annotationType the annotation type to be removed | |
175 */ | |
176 void removeHeaderAnnotationType(Object annotationType); | |
177 | |
178 /** | |
179 * Returns this rulers header control. This is the little area between the | |
180 * top of the text widget and the top of this overview ruler. | |
181 * | |
182 * @return the header control of this overview ruler. | |
183 */ | |
184 Control getHeaderControl(); | |
185 } |