1 11 package org.eclipse.jdt.internal.core.util; 12 13 import org.eclipse.jface.text.IDocument; 14 import org.eclipse.jface.text.IDocumentListener; 15 import org.eclipse.jface.text.IDocumentPartitioner; 16 import org.eclipse.jface.text.IDocumentPartitioningListener; 17 import org.eclipse.jface.text.IPositionUpdater; 18 import org.eclipse.jface.text.IRegion; 19 import org.eclipse.jface.text.ITypedRegion; 20 import org.eclipse.jface.text.Position; 21 22 25 public class SimpleDocument implements IDocument { 26 27 private StringBuffer buffer; 28 29 30 public SimpleDocument(String source) { 31 this.buffer = new StringBuffer (source); 32 } 33 34 37 public char getChar(int offset) { 38 return 0; 39 } 40 41 44 public int getLength() { 45 return this.buffer.length(); 46 } 47 48 51 public String get() { 52 return this.buffer.toString(); 53 } 54 55 58 public String get(int offset, int length) { 59 return this.buffer.substring(offset, offset + length); 60 } 61 62 65 public void set(String text) { 66 } 68 69 72 public void replace(int offset, int length, String text) { 73 74 this.buffer.replace(offset, offset + length, text); 75 } 76 77 80 public void addDocumentListener(IDocumentListener listener) { 81 } 83 84 87 public void removeDocumentListener(IDocumentListener listener) { 88 } 90 91 94 public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) { 95 } 97 98 101 public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) { 102 } 104 105 108 public void addPositionCategory(String category) { 109 } 111 112 115 public void removePositionCategory(String category) { 116 } 118 119 122 public String [] getPositionCategories() { 123 return null; 125 } 126 127 130 public boolean containsPositionCategory(String category) { 131 return false; 133 } 134 135 138 public void addPosition(Position position) { 139 } 141 142 145 public void removePosition(Position position) { 146 } 148 149 152 public void addPosition(String category, Position position) { 153 } 155 156 159 public void removePosition(String category, Position position) { 160 } 162 163 166 public Position[] getPositions(String category) { 167 return null; 169 } 170 171 174 public boolean containsPosition(String category, int offset, int length) { 175 return false; 177 } 178 179 182 public int computeIndexInCategory(String category, int offset) { 183 return 0; 185 } 186 187 190 public void addPositionUpdater(IPositionUpdater updater) { 191 } 193 194 197 public void removePositionUpdater(IPositionUpdater updater) { 198 } 200 201 204 public void insertPositionUpdater(IPositionUpdater updater, int index) { 205 } 207 208 211 public IPositionUpdater[] getPositionUpdaters() { 212 return null; 214 } 215 216 219 public String [] getLegalContentTypes() { 220 return null; 222 } 223 224 227 public String getContentType(int offset) { 228 return null; 230 } 231 232 235 public ITypedRegion getPartition(int offset) { 236 return null; 238 } 239 240 243 public ITypedRegion[] computePartitioning(int offset, int length) { 244 return null; 246 } 247 248 251 public void addDocumentPartitioningListener(IDocumentPartitioningListener listener) { 252 } 254 255 258 public void removeDocumentPartitioningListener(IDocumentPartitioningListener listener) { 259 } 261 262 265 public void setDocumentPartitioner(IDocumentPartitioner partitioner) { 266 } 268 269 272 public IDocumentPartitioner getDocumentPartitioner() { 273 return null; 275 } 276 277 280 public int getLineLength(int line) { 281 return 0; 283 } 284 285 288 public int getLineOfOffset(int offset) { 289 return 0; 291 } 292 293 296 public int getLineOffset(int line) { 297 return 0; 299 } 300 301 304 public IRegion getLineInformation(int line) { 305 return null; 307 } 308 309 312 public IRegion getLineInformationOfOffset(int offset) { 313 return null; 315 } 316 317 320 public int getNumberOfLines() { 321 return 0; 323 } 324 325 328 public int getNumberOfLines(int offset, int length) { 329 return 0; 331 } 332 333 336 public int computeNumberOfLines(String text) { 337 return 0; 339 } 340 341 344 public String [] getLegalLineDelimiters() { 345 return null; 347 } 348 349 352 public String getLineDelimiter(int line) { 353 return null; 355 } 356 357 361 public int search( 362 int startOffset, 363 String findString, 364 boolean forwardSearch, 365 boolean caseSensitive, 366 boolean wholeWord) { 367 return 0; 369 } 370 371 } 372 | Popular Tags |