Mercurial > projects > dwt-addons
diff dwtx/jface/text/contentassist/CompletionProposalPopup.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 |
line wrap: on
line diff
--- a/dwtx/jface/text/contentassist/CompletionProposalPopup.d Sun Aug 24 02:22:48 2008 +0200 +++ b/dwtx/jface/text/contentassist/CompletionProposalPopup.d Sun Aug 24 02:26:23 2008 +0200 @@ -938,7 +938,7 @@ IDocument document= fContentAssistSubjectControlAdapter.getDocument(); - if (fViewer instanceof ITextViewerExtension) { + if ( cast(ITextViewerExtension)fViewer ) { ITextViewerExtension extension= cast(ITextViewerExtension) fViewer; target= extension.getRewriteTarget(); } @@ -946,7 +946,7 @@ if (target !is null) target.beginCompoundChange(); - if (fViewer instanceof IEditingSupportRegistry) { + if ( cast(IEditingSupportRegistry)fViewer ) { IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer; registry.register(helper); } @@ -955,7 +955,7 @@ if (p instanceof ICompletionProposalExtension2 && fViewer !is null) { ICompletionProposalExtension2 e= cast(ICompletionProposalExtension2) p; e.apply(fViewer, trigger, stateMask, offset); - } else if (p instanceof ICompletionProposalExtension) { + } else if ( cast(ICompletionProposalExtension)p ) { ICompletionProposalExtension e= cast(ICompletionProposalExtension) p; e.apply(document, trigger, offset); } else { @@ -972,7 +972,7 @@ if (info !is null) { int contextInformationOffset; - if (p instanceof ICompletionProposalExtension) { + if ( cast(ICompletionProposalExtension)p ) { ICompletionProposalExtension e= cast(ICompletionProposalExtension) p; contextInformationOffset= e.getContextInformationPosition(); } else { @@ -990,7 +990,7 @@ if (target !is null) target.endCompoundChange(); - if (fViewer instanceof IEditingSupportRegistry) { + if ( cast(IEditingSupportRegistry)fViewer ) { IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer; registry.unregister(helper); } @@ -1036,7 +1036,7 @@ unregister(); - if (fViewer instanceof IEditingSupportRegistry) { + if ( cast(IEditingSupportRegistry)fViewer ) { IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer; registry.unregister(fFocusHelper); } @@ -1207,7 +1207,7 @@ }; } - if (fViewer instanceof IEditingSupportRegistry) { + if ( cast(IEditingSupportRegistry)fViewer ) { IEditingSupportRegistry registry= cast(IEditingSupportRegistry) fViewer; registry.register(fFocusHelper); } @@ -1342,7 +1342,7 @@ default: ICompletionProposal p= getSelectedProposal(); - if (p instanceof ICompletionProposalExtension) { + if ( cast(ICompletionProposalExtension)p ) { ICompletionProposalExtension t= cast(ICompletionProposalExtension) p; char[] triggers= t.getTriggerCharacters(); if (contains(triggers, key)) { @@ -1530,7 +1530,7 @@ */ private bool canAutoInsert(ICompletionProposal proposal) { if (fContentAssistant.isAutoInserting()) { - if (proposal instanceof ICompletionProposalExtension4) { + if ( cast(ICompletionProposalExtension4)proposal ) { ICompletionProposalExtension4 ext= cast(ICompletionProposalExtension4) proposal; return ext.isAutoInsertable(); } @@ -1637,7 +1637,7 @@ for (int i= 0; i < fFilteredProposals.length; i++) { ICompletionProposal proposal= fFilteredProposals[i]; - if (!(proposal instanceof ICompletionProposalExtension3)) + if (!( cast(ICompletionProposalExtension3)proposal )) return false; int start= (cast(ICompletionProposalExtension3)proposal).getPrefixCompletionStart(fContentAssistSubjectControlAdapter.getDocument(), fFilterOffset);