Index: org/openide/text/PositionRef.java =================================================================== RCS file: /cvs/openide/src/org/openide/text/PositionRef.java,v retrieving revision 1.40 diff -u -r1.40 PositionRef.java --- org/openide/text/PositionRef.java 13 Nov 2001 10:44:26 -0000 1.40 +++ org/openide/text/PositionRef.java 27 Nov 2001 08:18:58 -0000 @@ -132,7 +132,8 @@ public Position getPosition() throws IOException { if (manager.getCloneableEditorSupport ().getDocument() == null) manager.getCloneableEditorSupport ().openDocument (); - synchronized (manager.getCloneableEditorSupport ().getLock ()) { + //synchronized (manager.getCloneableEditorSupport ().getLock ()) { + synchronized(manager) { Manager.PositionKind p = (Manager.PositionKind)kind; return p.pos; } @@ -232,7 +233,7 @@ /** Converts all positions into document one. */ - void documentOpened (StyledDocument doc) { + synchronized void documentOpened (StyledDocument doc) { this.doc = doc; ListIterator it = positions.listIterator(); @@ -250,7 +251,7 @@ /** Closes the document and switch all positionRefs to the offset (int) * holding status (Position objects willbe forgotten. */ - void documentClosed () { + synchronized void documentClosed () { Iterator it = ((Collection)positions.clone ()).iterator(); while (it.hasNext()) { WeakReference ref = (WeakReference) it.next(); @@ -266,8 +267,8 @@ } /** Adds the position to this manager. */ - Kind addPosition(PositionRef pos) { - synchronized (getCloneableEditorSupport ().getLock ()) { + synchronized Kind addPosition(PositionRef pos) { + //synchronized (getCloneableEditorSupport ().getLock ()) { positions.add(new WeakReference(pos)); if (doc != null) { @@ -276,7 +277,7 @@ return pos.kind; } - } + //} } //