1 11 12 package org.eclipse.ant.internal.ui.editor.text; 13 14 import org.eclipse.jface.text.BadLocationException; 15 import org.eclipse.jface.text.Document; 16 import org.eclipse.jface.text.ISynchronizable; 17 18 21 public class PartiallySynchronizedDocument extends Document implements ISynchronizable { 22 23 private final Object fInternalLockObject= new Object (); 24 private Object fLockObject; 25 26 29 synchronized public void startSequentialRewrite(boolean normalized) { 30 super.startSequentialRewrite(normalized); 31 } 32 33 36 synchronized public void stopSequentialRewrite() { 37 super.stopSequentialRewrite(); 38 } 39 40 43 synchronized public String get() { 44 return super.get(); 45 } 46 47 50 synchronized public String get(int offset, int length) throws BadLocationException { 51 return super.get(offset, length); 52 } 53 54 57 synchronized public char getChar(int offset) throws BadLocationException { 58 return super.getChar(offset); 59 } 60 61 64 synchronized public void set(String text) { 65 super.set(text); 66 } 67 68 71 public void setLockObject(Object lockObject) { 72 fLockObject= lockObject; 73 } 74 75 78 public Object getLockObject() { 79 return fLockObject == null ? fInternalLockObject : fLockObject; 80 } 81 } 82 | Popular Tags |