1 11 package org.eclipse.text.edits; 12 13 import org.eclipse.jface.text.BadLocationException; 14 import org.eclipse.jface.text.BadPositionCategoryException; 15 import org.eclipse.jface.text.IDocument; 16 import org.eclipse.jface.text.IDocumentListener; 17 import org.eclipse.jface.text.IDocumentPartitioner; 18 import org.eclipse.jface.text.IDocumentPartitioningListener; 19 import org.eclipse.jface.text.IPositionUpdater; 20 import org.eclipse.jface.text.IRegion; 21 import org.eclipse.jface.text.ITypedRegion; 22 import org.eclipse.jface.text.Position; 23 24 class EditDocument implements IDocument { 25 26 private StringBuffer fBuffer; 27 28 public EditDocument(String content) { 29 fBuffer= new StringBuffer (content); 30 } 31 32 public void addDocumentListener(IDocumentListener listener) { 33 throw new UnsupportedOperationException (); 34 } 35 36 public void addDocumentPartitioningListener(IDocumentPartitioningListener listener) { 37 throw new UnsupportedOperationException (); 38 } 39 40 public void addPosition(Position position) throws BadLocationException { 41 throw new UnsupportedOperationException (); 42 } 43 44 public void addPosition(String category, Position position) throws BadLocationException, BadPositionCategoryException { 45 throw new UnsupportedOperationException (); 46 } 47 48 public void addPositionCategory(String category) { 49 throw new UnsupportedOperationException (); 50 } 51 52 public void addPositionUpdater(IPositionUpdater updater) { 53 throw new UnsupportedOperationException (); 54 } 55 56 public void addPrenotifiedDocumentListener(IDocumentListener documentAdapter) { 57 throw new UnsupportedOperationException (); 58 } 59 60 public int computeIndexInCategory(String category, int offset) throws BadLocationException, BadPositionCategoryException { 61 throw new UnsupportedOperationException (); 62 } 63 64 public int computeNumberOfLines(String text) { 65 throw new UnsupportedOperationException (); 66 } 67 68 public ITypedRegion[] computePartitioning(int offset, int length) throws BadLocationException { 69 throw new UnsupportedOperationException (); 70 } 71 72 public boolean containsPosition(String category, int offset, int length) { 73 throw new UnsupportedOperationException (); 74 } 75 76 public boolean containsPositionCategory(String category) { 77 throw new UnsupportedOperationException (); 78 } 79 80 public String get() { 81 return fBuffer.toString(); 82 } 83 84 public String get(int offset, int length) throws BadLocationException { 85 return fBuffer.substring(offset, offset + length); 86 } 87 88 public char getChar(int offset) throws BadLocationException { 89 throw new UnsupportedOperationException (); 90 } 91 92 public String getContentType(int offset) throws BadLocationException { 93 throw new UnsupportedOperationException (); 94 } 95 96 public IDocumentPartitioner getDocumentPartitioner() { 97 throw new UnsupportedOperationException (); 98 } 99 100 public String [] getLegalContentTypes() { 101 throw new UnsupportedOperationException (); 102 } 103 104 public String [] getLegalLineDelimiters() { 105 throw new UnsupportedOperationException (); 106 } 107 108 public int getLength() { 109 return fBuffer.length(); 110 } 111 112 public String getLineDelimiter(int line) throws BadLocationException { 113 throw new UnsupportedOperationException (); 114 } 115 116 public IRegion getLineInformation(int line) throws BadLocationException { 117 throw new UnsupportedOperationException (); 118 } 119 120 public IRegion getLineInformationOfOffset(int offset) throws BadLocationException { 121 throw new UnsupportedOperationException (); 122 } 123 124 public int getLineLength(int line) throws BadLocationException { 125 throw new UnsupportedOperationException (); 126 } 127 128 public int getLineOffset(int line) throws BadLocationException { 129 throw new UnsupportedOperationException (); 130 } 131 132 public int getLineOfOffset(int offset) throws BadLocationException { 133 throw new UnsupportedOperationException (); 134 } 135 136 public int getNumberOfLines() { 137 throw new UnsupportedOperationException (); 138 } 139 140 public int getNumberOfLines(int offset, int length) throws BadLocationException { 141 throw new UnsupportedOperationException (); 142 } 143 144 public ITypedRegion getPartition(int offset) throws BadLocationException { 145 throw new UnsupportedOperationException (); 146 } 147 148 public String [] getPositionCategories() { 149 throw new UnsupportedOperationException (); 150 } 151 152 public Position[] getPositions(String category) throws BadPositionCategoryException { 153 throw new UnsupportedOperationException (); 154 } 155 156 public IPositionUpdater[] getPositionUpdaters() { 157 throw new UnsupportedOperationException (); 158 } 159 160 public void insertPositionUpdater(IPositionUpdater updater, int index) { 161 throw new UnsupportedOperationException (); 162 } 163 164 public void removeDocumentListener(IDocumentListener listener) { 165 throw new UnsupportedOperationException (); 166 } 167 168 public void removeDocumentPartitioningListener(IDocumentPartitioningListener listener) { 169 throw new UnsupportedOperationException (); 170 } 171 172 public void removePosition(Position position) { 173 throw new UnsupportedOperationException (); 174 } 175 176 public void removePosition(String category, Position position) throws BadPositionCategoryException { 177 throw new UnsupportedOperationException (); 178 } 179 180 public void removePositionCategory(String category) throws BadPositionCategoryException { 181 throw new UnsupportedOperationException (); 182 } 183 184 public void removePositionUpdater(IPositionUpdater updater) { 185 throw new UnsupportedOperationException (); 186 } 187 188 public void removePrenotifiedDocumentListener(IDocumentListener documentAdapter) { 189 throw new UnsupportedOperationException (); 190 } 191 192 public void replace(int offset, int length, String text) throws BadLocationException { 193 fBuffer.replace(offset, offset + length, text); 194 } 195 196 public int search(int startOffset, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord) throws BadLocationException { 197 throw new UnsupportedOperationException (); 198 } 199 200 public void set(String text) { 201 throw new UnsupportedOperationException (); 202 } 203 204 public void setDocumentPartitioner(IDocumentPartitioner partitioner) { 205 throw new UnsupportedOperationException (); 206 } 207 } 208 | Popular Tags |