Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java')
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java138
1 files changed, 69 insertions, 69 deletions
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
index 17105ace2f3..97312b0a2b3 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/source/AnnotationMap.java
@@ -31,103 +31,103 @@ import org.eclipse.jface.text.Position;
*/
class AnnotationMap implements IAnnotationMap {
- /**
- * The lock object used to synchronize the operations explicitly defined by
- * <code>IAnnotationMap</code>
- */
- private Object fLockObject;
- /**
- * The internal lock object used if <code>fLockObject</code> is <code>null</code>.
+ /**
+ * The lock object used to synchronize the operations explicitly defined by
+ * <code>IAnnotationMap</code>
+ */
+ private Object fLockObject;
+ /**
+ * The internal lock object used if <code>fLockObject</code> is <code>null</code>.
* @since 3.2
*/
- private final Object fInternalLockObject= new Object();
+ private final Object fInternalLockObject= new Object();
- /** The map holding the annotations */
- private Map<Annotation, Position> fInternalMap;
+ /** The map holding the annotations */
+ private Map<Annotation, Position> fInternalMap;
- /**
- * Creates a new annotation map with the given capacity.
- *
- * @param capacity the capacity
- */
- public AnnotationMap(int capacity) {
- fInternalMap= new HashMap<>(capacity);
- }
+ /**
+ * Creates a new annotation map with the given capacity.
+ *
+ * @param capacity the capacity
+ */
+ public AnnotationMap(int capacity) {
+ fInternalMap= new HashMap<>(capacity);
+ }
- @Override
+ @Override
public synchronized void setLockObject(Object lockObject) {
- fLockObject= lockObject;
- }
+ fLockObject= lockObject;
+ }
- @Override
+ @Override
public synchronized Object getLockObject() {
- if (fLockObject == null)
- return fInternalLockObject;
- return fLockObject;
- }
+ if (fLockObject == null)
+ return fInternalLockObject;
+ return fLockObject;
+ }
- @Override
+ @Override
public Iterator<Position> valuesIterator() {
- synchronized (getLockObject()) {
- return new ArrayList<>(fInternalMap.values()).iterator();
- }
- }
+ synchronized (getLockObject()) {
+ return new ArrayList<>(fInternalMap.values()).iterator();
+ }
+ }
- @Override
+ @Override
public Iterator<Annotation> keySetIterator() {
- synchronized (getLockObject()) {
- return new ArrayList<>(fInternalMap.keySet()).iterator();
- }
- }
+ synchronized (getLockObject()) {
+ return new ArrayList<>(fInternalMap.keySet()).iterator();
+ }
+ }
- @Override
+ @Override
public boolean containsKey(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.containsKey(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.containsKey(annotation);
+ }
+ }
- @Override
+ @Override
public Position put(Annotation annotation, Position position) {
- synchronized (getLockObject()) {
- return fInternalMap.put(annotation, position);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.put(annotation, position);
+ }
+ }
- @Override
+ @Override
public Position get(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.get(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.get(annotation);
+ }
+ }
- @Override
+ @Override
public void clear() {
- synchronized (getLockObject()) {
- fInternalMap.clear();
- }
- }
+ synchronized (getLockObject()) {
+ fInternalMap.clear();
+ }
+ }
- @Override
+ @Override
public Position remove(Object annotation) {
- synchronized (getLockObject()) {
- return fInternalMap.remove(annotation);
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.remove(annotation);
+ }
+ }
- @Override
+ @Override
public int size() {
- synchronized (getLockObject()) {
- return fInternalMap.size();
- }
- }
+ synchronized (getLockObject()) {
+ return fInternalMap.size();
+ }
+ }
- @Override
+ @Override
public boolean isEmpty() {
- synchronized (getLockObject()) {
+ synchronized (getLockObject()) {
return fInternalMap.isEmpty();
}
- }
+ }
@Override
public boolean containsValue(Object value) {

Back to the top