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