Mercurial > projects > dwt-addons
comparison dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d @ 134:51e6e63f930e
Regex fix for casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:46:20 +0200 |
parents | 7d818bd32d63 |
children | 65801ad2b265 |
comparison
equal
deleted
inserted
replaced
133:7d818bd32d63 | 134:51e6e63f930e |
---|---|
182 IContextInformationValidator validator= fContentAssistant.getContextInformationValidator(fViewer, offset); | 182 IContextInformationValidator validator= fContentAssistant.getContextInformationValidator(fViewer, offset); |
183 | 183 |
184 if (validator !is null) { | 184 if (validator !is null) { |
185 ContextFrame current= new ContextFrame(); | 185 ContextFrame current= new ContextFrame(); |
186 current.fInformation= information; | 186 current.fInformation= information; |
187 current.fBeginOffset= (information instanceof IContextInformationExtension) ? ((IContextInformationExtension) information).getContextInformationPosition() : offset; | 187 current.fBeginOffset= (information instanceof IContextInformationExtension) ? (cast(IContextInformationExtension) information).getContextInformationPosition() : offset; |
188 if (current.fBeginOffset is -1) current.fBeginOffset= offset; | 188 if (current.fBeginOffset is -1) current.fBeginOffset= offset; |
189 current.fOffset= offset; | 189 current.fOffset= offset; |
190 current.fVisibleOffset= fViewer.getTextWidget().getSelectionRange().x - (offset - current.fBeginOffset); | 190 current.fVisibleOffset= fViewer.getTextWidget().getSelectionRange().x - (offset - current.fBeginOffset); |
191 current.fValidator= validator; | 191 current.fValidator= validator; |
192 current.fPresenter= fContentAssistant.getContextInformationPresenter(fViewer, offset); | 192 current.fPresenter= fContentAssistant.getContextInformationPresenter(fViewer, offset); |
304 fContextFrameStack.pop(); | 304 fContextFrameStack.pop(); |
305 -- size; | 305 -- size; |
306 } | 306 } |
307 | 307 |
308 if (size > 0) { | 308 if (size > 0) { |
309 ContextFrame current= (ContextFrame) fContextFrameStack.peek(); | 309 ContextFrame current= cast(ContextFrame) fContextFrameStack.peek(); |
310 internalShowContextFrame(current, false); | 310 internalShowContextFrame(current, false); |
311 } else { | 311 } else { |
312 | 312 |
313 fContentAssistant.removeContentAssistListener(this, ContentAssistant2.CONTEXT_INFO_POPUP); | 313 fContentAssistant.removeContentAssistListener(this, ContentAssistant2.CONTEXT_INFO_POPUP); |
314 | 314 |
632 * Otherwise, we'd validate the context information based on the | 632 * Otherwise, we'd validate the context information based on the |
633 * pre-key-stroke state. | 633 * pre-key-stroke state. |
634 */ | 634 */ |
635 fContextInfoPopup.getDisplay().asyncExec(new Runnable() { | 635 fContextInfoPopup.getDisplay().asyncExec(new Runnable() { |
636 | 636 |
637 private ContextFrame fFrame= (ContextFrame) fContextFrameStack.peek(); | 637 private ContextFrame fFrame= cast(ContextFrame) fContextFrameStack.peek(); |
638 | 638 |
639 public void run() { | 639 public void run() { |
640 if (Helper2.okToUse(fContextInfoPopup) && fFrame is fContextFrameStack.peek()) { | 640 if (Helper2.okToUse(fContextInfoPopup) && fFrame is fContextFrameStack.peek()) { |
641 int offset= fViewer.getSelectedRange().x; | 641 int offset= fViewer.getSelectedRange().x; |
642 if (fFrame.fValidator is null || !fFrame.fValidator.isContextInformationValid(offset)) { | 642 if (fFrame.fValidator is null || !fFrame.fValidator.isContextInformationValid(offset)) { |