Mercurial > projects > dwt2
comparison org.eclipse.text/src/org/eclipse/text/edits/EditDocument.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, 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.text.edits.EditDocument; | |
14 | |
15 import org.eclipse.text.edits.MultiTextEdit; // packageimport | |
16 import org.eclipse.text.edits.CopySourceEdit; // packageimport | |
17 import org.eclipse.text.edits.MoveSourceEdit; // packageimport | |
18 import org.eclipse.text.edits.CopyingRangeMarker; // packageimport | |
19 import org.eclipse.text.edits.ReplaceEdit; // packageimport | |
20 import org.eclipse.text.edits.UndoCollector; // packageimport | |
21 import org.eclipse.text.edits.DeleteEdit; // packageimport | |
22 import org.eclipse.text.edits.MoveTargetEdit; // packageimport | |
23 import org.eclipse.text.edits.CopyTargetEdit; // packageimport | |
24 import org.eclipse.text.edits.TextEditCopier; // packageimport | |
25 import org.eclipse.text.edits.ISourceModifier; // packageimport | |
26 import org.eclipse.text.edits.TextEditMessages; // packageimport | |
27 import org.eclipse.text.edits.TextEditProcessor; // packageimport | |
28 import org.eclipse.text.edits.MalformedTreeException; // packageimport | |
29 import org.eclipse.text.edits.TreeIterationInfo; // packageimport | |
30 import org.eclipse.text.edits.TextEditVisitor; // packageimport | |
31 import org.eclipse.text.edits.TextEditGroup; // packageimport | |
32 import org.eclipse.text.edits.TextEdit; // packageimport | |
33 import org.eclipse.text.edits.RangeMarker; // packageimport | |
34 import org.eclipse.text.edits.UndoEdit; // packageimport | |
35 import org.eclipse.text.edits.InsertEdit; // packageimport | |
36 | |
37 | |
38 import java.lang.all; | |
39 import java.util.Set; | |
40 | |
41 import org.eclipse.jface.text.BadLocationException; | |
42 import org.eclipse.jface.text.BadPositionCategoryException; | |
43 import org.eclipse.jface.text.IDocument; | |
44 import org.eclipse.jface.text.IDocumentListener; | |
45 import org.eclipse.jface.text.IDocumentPartitioner; | |
46 import org.eclipse.jface.text.IDocumentPartitioningListener; | |
47 import org.eclipse.jface.text.IPositionUpdater; | |
48 import org.eclipse.jface.text.IRegion; | |
49 import org.eclipse.jface.text.ITypedRegion; | |
50 import org.eclipse.jface.text.Position; | |
51 | |
52 class EditDocument : IDocument { | |
53 | |
54 private StringBuffer fBuffer; | |
55 | |
56 public this(String content) { | |
57 fBuffer= new StringBuffer(content); | |
58 } | |
59 | |
60 public void addDocumentListener(IDocumentListener listener) { | |
61 throw new UnsupportedOperationException(); | |
62 } | |
63 | |
64 public void addDocumentPartitioningListener(IDocumentPartitioningListener listener) { | |
65 throw new UnsupportedOperationException(); | |
66 } | |
67 | |
68 public void addPosition(Position position) { | |
69 throw new UnsupportedOperationException(); | |
70 } | |
71 | |
72 public void addPosition(String category, Position position) { | |
73 throw new UnsupportedOperationException(); | |
74 } | |
75 | |
76 public void addPositionCategory(String category) { | |
77 throw new UnsupportedOperationException(); | |
78 } | |
79 | |
80 public void addPositionUpdater(IPositionUpdater updater) { | |
81 throw new UnsupportedOperationException(); | |
82 } | |
83 | |
84 public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) { | |
85 throw new UnsupportedOperationException(); | |
86 } | |
87 | |
88 public int computeIndexInCategory(String category, int offset) { | |
89 throw new UnsupportedOperationException(); | |
90 } | |
91 | |
92 public int computeNumberOfLines(String text) { | |
93 throw new UnsupportedOperationException(); | |
94 } | |
95 | |
96 public ITypedRegion[] computePartitioning(int offset, int length) { | |
97 throw new UnsupportedOperationException(); | |
98 } | |
99 | |
100 public bool containsPosition(String category, int offset, int length) { | |
101 throw new UnsupportedOperationException(); | |
102 } | |
103 | |
104 public bool containsPositionCategory(String category) { | |
105 throw new UnsupportedOperationException(); | |
106 } | |
107 | |
108 public String get() { | |
109 return fBuffer.toString(); | |
110 } | |
111 | |
112 public String get(int offset, int length_) { | |
113 return fBuffer.slice()[offset .. offset + length_ ]; | |
114 } | |
115 | |
116 public char getChar(int offset) { | |
117 throw new UnsupportedOperationException(); | |
118 } | |
119 | |
120 public String getContentType(int offset) { | |
121 throw new UnsupportedOperationException(); | |
122 } | |
123 | |
124 public IDocumentPartitioner getDocumentPartitioner() { | |
125 throw new UnsupportedOperationException(); | |
126 } | |
127 | |
128 public String[] getLegalContentTypes() { | |
129 throw new UnsupportedOperationException(); | |
130 } | |
131 | |
132 public String[] getLegalLineDelimiters() { | |
133 throw new UnsupportedOperationException(); | |
134 } | |
135 | |
136 public int getLength() { | |
137 return fBuffer.length(); | |
138 } | |
139 | |
140 public String getLineDelimiter(int line) { | |
141 throw new UnsupportedOperationException(); | |
142 } | |
143 | |
144 public IRegion getLineInformation(int line) { | |
145 throw new UnsupportedOperationException(); | |
146 } | |
147 | |
148 public IRegion getLineInformationOfOffset(int offset) { | |
149 throw new UnsupportedOperationException(); | |
150 } | |
151 | |
152 public int getLineLength(int line) { | |
153 throw new UnsupportedOperationException(); | |
154 } | |
155 | |
156 public int getLineOffset(int line) { | |
157 throw new UnsupportedOperationException(); | |
158 } | |
159 | |
160 public int getLineOfOffset(int offset) { | |
161 throw new UnsupportedOperationException(); | |
162 } | |
163 | |
164 public int getNumberOfLines() { | |
165 throw new UnsupportedOperationException(); | |
166 } | |
167 | |
168 public int getNumberOfLines(int offset, int length) { | |
169 throw new UnsupportedOperationException(); | |
170 } | |
171 | |
172 public ITypedRegion getPartition(int offset) { | |
173 throw new UnsupportedOperationException(); | |
174 } | |
175 | |
176 public String[] getPositionCategories() { | |
177 throw new UnsupportedOperationException(); | |
178 } | |
179 | |
180 public Position[] getPositions(String category) { | |
181 throw new UnsupportedOperationException(); | |
182 } | |
183 | |
184 public IPositionUpdater[] getPositionUpdaters() { | |
185 throw new UnsupportedOperationException(); | |
186 } | |
187 | |
188 public void insertPositionUpdater(IPositionUpdater updater, int index) { | |
189 throw new UnsupportedOperationException(); | |
190 } | |
191 | |
192 public void removeDocumentListener(IDocumentListener listener) { | |
193 throw new UnsupportedOperationException(); | |
194 } | |
195 | |
196 public void removeDocumentPartitioningListener(IDocumentPartitioningListener listener) { | |
197 throw new UnsupportedOperationException(); | |
198 } | |
199 | |
200 public void removePosition(Position position) { | |
201 throw new UnsupportedOperationException(); | |
202 } | |
203 | |
204 public void removePosition(String category, Position position) { | |
205 throw new UnsupportedOperationException(); | |
206 } | |
207 | |
208 public void removePositionCategory(String category) { | |
209 throw new UnsupportedOperationException(); | |
210 } | |
211 | |
212 public void removePositionUpdater(IPositionUpdater updater) { | |
213 throw new UnsupportedOperationException(); | |
214 } | |
215 | |
216 public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) { | |
217 throw new UnsupportedOperationException(); | |
218 } | |
219 | |
220 public void replace(int offset, int length, String text) { | |
221 fBuffer.select(offset, length ); | |
222 fBuffer.replace(text); | |
223 } | |
224 | |
225 public int search(int startOffset, String findString, bool forwardSearch, bool caseSensitive, bool wholeWord) { | |
226 throw new UnsupportedOperationException(); | |
227 } | |
228 | |
229 public void set(String text) { | |
230 throw new UnsupportedOperationException(); | |
231 } | |
232 | |
233 public void setDocumentPartitioner(IDocumentPartitioner partitioner) { | |
234 throw new UnsupportedOperationException(); | |
235 } | |
236 } |