diff -r 91111c86b013 editor.lib/src/org/netbeans/editor/GuardedDocument.java --- a/editor.lib/src/org/netbeans/editor/GuardedDocument.java Thu Sep 24 20:15:20 2009 +0200 +++ b/editor.lib/src/org/netbeans/editor/GuardedDocument.java Fri Sep 25 12:38:21 2009 +0200 @@ -383,12 +383,7 @@ Style style = styles.addStyle(styleName, parent); if (findLayer(layerName) == null) { // not created by default - try { - extWriteLock(); - addStyledLayer(layerName, style); - } finally { - extWriteUnlock(); - } + addStyledLayer(layerName, style); } return style; } @@ -438,7 +433,6 @@ */ public void setLogicalStyle(int pos, Style s) { try { - extWriteLock(); pos = Utilities.getRowStart(this, pos); String layerName = (String)stylesToLayers.get(s.getName()); // remove all applied styles @@ -458,8 +452,6 @@ pos, 0, DocumentEvent.EventType.CHANGE, null)); // enough to say length 0 } catch (BadLocationException e) { // do nothing for invalid positions - } finally { - extWriteUnlock(); } }