Mercurial > projects > dwt-addons
diff dwtx/text/edits/TextEdit.d @ 161:f8d52b926852
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:49:30 +0200 |
parents | 3678e4f1a766 |
children |
line wrap: on
line diff
--- a/dwtx/text/edits/TextEdit.d Wed Aug 27 02:07:22 2008 +0200 +++ b/dwtx/text/edits/TextEdit.d Wed Aug 27 14:49:30 2008 +0200 @@ -130,8 +130,8 @@ } } - private static const TextEdit[] EMPTY_ARRAY= new TextEdit[0]; - private static const InsertionComparator INSERTION_COMPARATOR= new InsertionComparator(); + private static const TextEdit[] EMPTY_ARRAY; + private static /+const+/ InsertionComparator INSERTION_COMPARATOR; private static const int DELETED_VALUE= -1; @@ -151,6 +151,7 @@ * @param length the edit's length */ protected this(int offset, int length) { + if( INSERTION_COMPARATOR is null ) INSERTION_COMPARATOR= new InsertionComparator(); Assert.isTrue(offset >= 0 && length >= 0); fOffset= offset; fLength= length; @@ -163,6 +164,7 @@ * @param source the source to copy form */ protected this(TextEdit source) { + if( INSERTION_COMPARATOR is null ) INSERTION_COMPARATOR= new InsertionComparator(); fOffset= source.fOffset; fLength= source.fLength; fDelta= 0; @@ -540,7 +542,7 @@ buffer.append(" "); //$NON-NLS-1$ } buffer.append("{"); //$NON-NLS-1$ - String name= getClass().getName(); + String name= this.classinfo.name; int index= name.lastIndexOf('.'); if (index !is -1) { buffer.append(name.substring(index + 1)); @@ -880,7 +882,7 @@ result= Math.max(result, child.traverseConsistencyCheck(processor, document, sourceEdits)); } } - if (processor.considerEdit(this)) { + if (processor.considerEdit_package(this)) { performConsistencyCheck(processor, document); } return result; @@ -904,7 +906,7 @@ childDocumentUpdated(); } } - if (processor.considerEdit(this)) { + if (processor.considerEdit_package(this)) { if (delta !is 0) adjustLength(delta); int r= performDocumentUpdating(document);