Mercurial > projects > dwt-addons
diff dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d @ 158:25f1f92fa3df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 26 Aug 2008 02:46:34 +0200 |
parents | f70d9508c95c |
children | 1a5b8f8129df |
line wrap: on
line diff
--- a/dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d Mon Aug 25 19:06:44 2008 +0200 +++ b/dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d Tue Aug 26 02:46:34 2008 +0200 @@ -118,36 +118,33 @@ * @param autoActivated <code>true</code> if auto activated * @return a potential error message or <code>null</code> in case of no error */ - public String showContextProposals(final bool autoActivated) { + public String showContextProposals(bool autoActivated) { final StyledText styledText= fViewer.getTextWidget(); - BusyIndicator.showWhile(styledText.getDisplay(), new class() Runnable { - public void run() { - - int position= fViewer.getSelectedRange().x; + BusyIndicator.showWhile(styledText.getDisplay(), dgRunnable( (bool autoActivated_, StyledText styledText_ ) { + int position= fViewer.getSelectedRange().x; - IContextInformation[] contexts= computeContextInformation(position); - int count = (contexts is null ? 0 : contexts.length); - if (count is 1) { + IContextInformation[] contexts= computeContextInformation(position); + int count = (contexts is null ? 0 : contexts.length); + if (count is 1) { - // Show context information directly - internalShowContextInfo(contexts[0], position); + // Show context information directly + internalShowContextInfo(contexts[0], position); - } else if (count > 0) { - // Precise context must be selected + } else if (count > 0) { + // Precise context must be selected - if (fLineDelimiter is null) - fLineDelimiter= styledText.getLineDelimiter(); + if (fLineDelimiter is null) + fLineDelimiter= styledText_.getLineDelimiter(); - createContextSelector(); - setContexts(contexts); - displayContextSelector(); - hideContextInfoPopup(); + createContextSelector(); + setContexts(contexts); + displayContextSelector(); + hideContextInfoPopup(); - } else if (!autoActivated) { - styledText.getDisplay().beep(); - } + } else if (!autoActivated_) { + styledText_.getDisplay().beep(); } - }); + }, autoActivated, styledText )); return getErrorMessage(); } @@ -159,14 +156,12 @@ * @param position the offset * @since 2.0 */ - public void showContextInformation(final IContextInformation info, final int position) { + public void showContextInformation(IContextInformation info, int position) { Control control= fViewer.getTextWidget(); - BusyIndicator.showWhile(control.getDisplay(), new class() Runnable { - public void run() { - internalShowContextInfo(info, position); - hideContextSelector(); - } - }); + BusyIndicator.showWhile(control.getDisplay(), dgRunnable( (IContextInformation info_, int position_) { + internalShowContextInfo(info_, position_); + hideContextSelector(); + }, info, position)); } /**