Mercurial > projects > dwt2
comparison org.eclipse.jface.text/src/org/eclipse/jface/text/source/ILineDiffer.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, 2006 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.ILineDiffer; | |
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.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.Iterator; | |
80 | |
81 import org.eclipse.jface.text.BadLocationException; | |
82 | |
83 | |
84 /** | |
85 * Protocol that allows direct access to line information. Usually, implementations will also | |
86 * implement <code>IAnnotationModel</code>, which only allows <code>Iterator</code> based access | |
87 * to annotations. | |
88 * <p> | |
89 * <code>ILineDiffer</code> also allows to revert any lines to their original | |
90 * contents as defined by the quick diff reference used by the receiver. | |
91 * </p> | |
92 * <p> | |
93 * This interface may be implemented by clients. | |
94 * </p> | |
95 * <p> | |
96 * In order to provide backward compatibility for clients of <code>ILineDiffer</code>, extension | |
97 * interfaces are used to provide a means of evolution. The following extension interface | |
98 * exists: | |
99 * <ul> | |
100 * <li> {@link ILineDifferExtension} (since version 3.1): introducing the concept | |
101 * suspending and resuming an <code>ILineDiffer</code>.</li> | |
102 * <li> {@link ILineDifferExtension2} (since version 3.3): allowing to query the suspension state | |
103 * of an <code>ILineDiffer</code>.</li> | |
104 * </ul> | |
105 * </p> | |
106 * | |
107 * @since 3.0 | |
108 */ | |
109 public interface ILineDiffer { | |
110 | |
111 /** | |
112 * Determines the line state for line <code>line</code> in the targeted document. | |
113 * | |
114 * @param line the line to get diff information for | |
115 * @return the line information object for <code>line</code> or <code>null</code> if none | |
116 */ | |
117 ILineDiffInfo getLineInfo(int line); | |
118 | |
119 /** | |
120 * Reverts a single changed line to its original state, not touching any lines that | |
121 * are deleted at its borders. | |
122 * | |
123 * @param line the line number of the line to be restored. | |
124 * @throws BadLocationException if <code>line</code> is out of bounds. | |
125 */ | |
126 void revertLine(int line) ; | |
127 | |
128 /** | |
129 * Reverts a block of modified / added lines to their original state, including any deleted | |
130 * lines inside the block or at its borders. A block is considered to be a range of modified | |
131 * (e.g. changed, or added) lines. | |
132 * | |
133 * @param line any line in the block to be reverted. | |
134 * @throws BadLocationException if <code>line</code> is out of bounds. | |
135 */ | |
136 void revertBlock(int line) ; | |
137 | |
138 /** | |
139 * Reverts a range of lines to their original state, including any deleted | |
140 * lines inside the block or at its borders. | |
141 * | |
142 * @param line any line in the block to be reverted. | |
143 * @param nLines the number of lines to be reverted, must be > 0. | |
144 * @throws BadLocationException if <code>line</code> is out of bounds. | |
145 */ | |
146 void revertSelection(int line, int nLines) ; | |
147 | |
148 /** | |
149 * Restores the deleted lines after <code>line</code>. | |
150 * | |
151 * @param line the deleted lines following this line number are restored. | |
152 * @return the number of restored lines. | |
153 * @throws BadLocationException if <code>line</code> is out of bounds. | |
154 */ | |
155 int restoreAfterLine(int line) ; | |
156 } |