Mercurial > projects > dwt-addons
comparison dwtx/jface/text/projection/ProjectionDocument.d @ 138:b6bad70d540a
Regex instanceof changes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:26:23 +0200 |
parents | 6dcb0baaa031 |
children | 26688fec6d23 |
comparison
equal
deleted
inserted
replaced
137:25170b5a8951 | 138:b6bad70d540a |
---|---|
126 */ | 126 */ |
127 public this(IDocument masterDocument) { | 127 public this(IDocument masterDocument) { |
128 super(); | 128 super(); |
129 | 129 |
130 fMasterDocument= masterDocument; | 130 fMasterDocument= masterDocument; |
131 if (fMasterDocument instanceof IDocumentExtension) | 131 if ( cast(IDocumentExtension)fMasterDocument ) |
132 fMasterDocumentExtension= cast(IDocumentExtension) fMasterDocument; | 132 fMasterDocumentExtension= cast(IDocumentExtension) fMasterDocument; |
133 | 133 |
134 fSegmentsCategory= SEGMENTS_CATEGORY; | 134 fSegmentsCategory= SEGMENTS_CATEGORY; |
135 fFragmentsCategory= FRAGMENTS_CATEGORY_PREFIX + hashCode(); | 135 fFragmentsCategory= FRAGMENTS_CATEGORY_PREFIX + hashCode(); |
136 fMasterDocument.addPositionCategory(fFragmentsCategory); | 136 fMasterDocument.addPositionCategory(fFragmentsCategory); |
805 ensureWellFormedSegmentation(computeAnchor(event)); | 805 ensureWellFormedSegmentation(computeAnchor(event)); |
806 fMapping.projectionChanged(); | 806 fMapping.projectionChanged(); |
807 } | 807 } |
808 | 808 |
809 private int computeAnchor(DocumentEvent event) { | 809 private int computeAnchor(DocumentEvent event) { |
810 if (event instanceof ProjectionDocumentEvent) { | 810 if ( cast(ProjectionDocumentEvent)event ) { |
811 ProjectionDocumentEvent slave= cast(ProjectionDocumentEvent) event; | 811 ProjectionDocumentEvent slave= cast(ProjectionDocumentEvent) event; |
812 Object changeType= slave.getChangeType(); | 812 Object changeType= slave.getChangeType(); |
813 if (ProjectionDocumentEvent.CONTENT_CHANGE is changeType) { | 813 if (ProjectionDocumentEvent.CONTENT_CHANGE is changeType) { |
814 DocumentEvent master= slave.getMasterEvent(); | 814 DocumentEvent master= slave.getMasterEvent(); |
815 if (master !is null) | 815 if (master !is null) |