Mercurial > projects > dwt-addons
comparison dwtx/jface/text/TextViewer.d @ 160:3678e4f1a766
toHash, toString
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 02:07:22 +0200 |
parents | 7926b636c282 |
children | f8d52b926852 |
comparison
equal
deleted
inserted
replaced
159:7926b636c282 | 160:3678e4f1a766 |
---|---|
1224 } | 1224 } |
1225 | 1225 |
1226 /* | 1226 /* |
1227 * @see java.lang.Object#hashCode() | 1227 * @see java.lang.Object#hashCode() |
1228 */ | 1228 */ |
1229 public int hashCode() { | 1229 public override hash_t toHash() { |
1230 return fStateMask << 16 | fContentType.hashCode(); | 1230 return fStateMask << 16 | fContentType.toHash(); |
1231 } | 1231 } |
1232 | 1232 |
1233 /** | 1233 /** |
1234 * Sets the state mask of this text hover key. | 1234 * Sets the state mask of this text hover key. |
1235 * | 1235 * |
1361 private void connect(IDocument document) { | 1361 private void connect(IDocument document) { |
1362 Assert.isLegal(document !is null); | 1362 Assert.isLegal(document !is null); |
1363 Assert.isLegal(!isConnected()); | 1363 Assert.isLegal(!isConnected()); |
1364 fUpdaterDocument= document; | 1364 fUpdaterDocument= document; |
1365 try { | 1365 try { |
1366 fUpdaterCategory= SELECTION_POSITION_CATEGORY + hashCode(); | 1366 fUpdaterCategory= SELECTION_POSITION_CATEGORY + toHash(); |
1367 fUpdater= new NonDeletingPositionUpdater(fUpdaterCategory); | 1367 fUpdater= new NonDeletingPositionUpdater(fUpdaterCategory); |
1368 fUpdaterDocument.addPositionCategory(fUpdaterCategory); | 1368 fUpdaterDocument.addPositionCategory(fUpdaterCategory); |
1369 fUpdaterDocument.addPositionUpdater(fUpdater); | 1369 fUpdaterDocument.addPositionUpdater(fUpdater); |
1370 | 1370 |
1371 Point selectionRange= getSelectedRange(); | 1371 Point selectionRange= getSelectedRange(); |
1790 fWidgetCommand= new WidgetCommand(); | 1790 fWidgetCommand= new WidgetCommand(); |
1791 fVisibleDocumentListener= new VisibleDocumentListener(); | 1791 fVisibleDocumentListener= new VisibleDocumentListener(); |
1792 fVerifyListener= new TextVerifyListener(); | 1792 fVerifyListener= new TextVerifyListener(); |
1793 fDocumentCommand= new DocumentCommand(); | 1793 fDocumentCommand= new DocumentCommand(); |
1794 fVerifyKeyListenersManager= new VerifyKeyListenersManager(); | 1794 fVerifyKeyListenersManager= new VerifyKeyListenersManager(); |
1795 MARK_POSITION_CATEGORY=Format("__mark_category_{}", hashCode()); //$NON-NLS-1$ | 1795 MARK_POSITION_CATEGORY=Format("__mark_category_{}", toHash()); //$NON-NLS-1$ |
1796 fMarkPositionUpdater= new DefaultPositionUpdater(MARK_POSITION_CATEGORY); | 1796 fMarkPositionUpdater= new DefaultPositionUpdater(MARK_POSITION_CATEGORY); |
1797 fDocumentRewriteSessionListener= new DocumentRewriteSessionListener(); | 1797 fDocumentRewriteSessionListener= new DocumentRewriteSessionListener(); |
1798 } | 1798 } |
1799 /** | 1799 /** |
1800 * Internal use only | 1800 * Internal use only |