Mercurial > projects > dwt-addons
annotate dwtx/jface/text/source/projection/IProjectionPosition.d @ 139:93a6ec48fd28
Regexp throws removal in interfaces
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:31:41 +0200 |
parents | c4fb132a086c |
children |
rev | line source |
---|---|
129 | 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 dwtx.jface.text.source.projection.IProjectionPosition; | |
14 | |
131 | 15 import dwtx.jface.text.source.projection.ProjectionViewer; // packageimport |
16 import dwtx.jface.text.source.projection.ProjectionSupport; // packageimport | |
17 import dwtx.jface.text.source.projection.AnnotationBag; // packageimport | |
18 import dwtx.jface.text.source.projection.ProjectionSummary; // packageimport | |
19 import dwtx.jface.text.source.projection.ProjectionAnnotationHover; // packageimport | |
20 import dwtx.jface.text.source.projection.ProjectionRulerColumn; // packageimport | |
21 import dwtx.jface.text.source.projection.ProjectionAnnotationModel; // packageimport | |
22 import dwtx.jface.text.source.projection.SourceViewerInformationControl; // packageimport | |
23 import dwtx.jface.text.source.projection.IProjectionListener; // packageimport | |
24 import dwtx.jface.text.source.projection.ProjectionAnnotation; // packageimport | |
25 | |
26 | |
129 | 27 import dwt.dwthelper.utils; |
28 | |
29 import dwtx.jface.text.BadLocationException; | |
30 import dwtx.jface.text.IDocument; | |
31 import dwtx.jface.text.IRegion; | |
32 | |
33 | |
34 /** | |
35 * An <code>IProjectionPosition</code> is a position that is associated with a | |
36 * <code>ProjectionAnnotation</code> and that is able to compute its collapsed | |
37 * regions. That is, if a <code>Position</code> implements this interface, | |
38 * <code>ProjectionViewer</code> will delegate to the | |
39 * {@link #computeProjectionRegions(IDocument) computeProjectionRegions} method | |
40 * when determining the document regions that should be collapsed for a certain | |
41 * <code>ProjectionAnnotation</code>. | |
42 * | |
43 * @since 3.1 | |
44 */ | |
45 public interface IProjectionPosition { | |
46 | |
47 /** | |
48 * Returns an array of regions that should be collapsed when the annotation | |
49 * belonging to this position is collapsed. May return null instead of | |
50 * an empty array. | |
51 * | |
52 * @param document the document that this position is attached to | |
53 * @return the foldable regions for this position | |
54 * @throws BadLocationException if accessing the document fails | |
55 */ | |
139
93a6ec48fd28
Regexp throws removal in interfaces
Frank Benoit <benoit@tionex.de>
parents:
131
diff
changeset
|
56 IRegion[] computeProjectionRegions(IDocument document) ; |
129 | 57 |
58 /** | |
59 * Returns the offset of the caption (the anchor region) of this projection | |
60 * position. The returned offset is relative to the receivers offset into | |
61 * the document. | |
62 * | |
63 * @param document the document that this position is attached to | |
64 * @return the caption offset relative to the position's offset | |
65 * @throws BadLocationException if accessing the document fails | |
66 */ | |
139
93a6ec48fd28
Regexp throws removal in interfaces
Frank Benoit <benoit@tionex.de>
parents:
131
diff
changeset
|
67 int computeCaptionOffset(IDocument document) ; |
129 | 68 |
69 } |