Mercurial > projects > dwt-addons
comparison dwtx/jface/internal/text/link/contentassist/ContextInformationPopup2.d @ 135:65801ad2b265
Regex fix for anon classes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 01:52:31 +0200 |
parents | 51e6e63f930e |
children | b6bad70d540a |
comparison
equal
deleted
inserted
replaced
134:51e6e63f930e | 135:65801ad2b265 |
---|---|
118 * @param autoActivated <code>true</code> if auto activated | 118 * @param autoActivated <code>true</code> if auto activated |
119 * @return a potential error message or <code>null</code> in case of no error | 119 * @return a potential error message or <code>null</code> in case of no error |
120 */ | 120 */ |
121 public String showContextProposals(final bool autoActivated) { | 121 public String showContextProposals(final bool autoActivated) { |
122 final StyledText styledText= fViewer.getTextWidget(); | 122 final StyledText styledText= fViewer.getTextWidget(); |
123 BusyIndicator.showWhile(styledText.getDisplay(), new Runnable() { | 123 BusyIndicator.showWhile(styledText.getDisplay(), new class() Runnable { |
124 public void run() { | 124 public void run() { |
125 | 125 |
126 int position= fViewer.getSelectedRange().x; | 126 int position= fViewer.getSelectedRange().x; |
127 | 127 |
128 IContextInformation[] contexts= computeContextInformation(position); | 128 IContextInformation[] contexts= computeContextInformation(position); |
159 * @param position the offset | 159 * @param position the offset |
160 * @since 2.0 | 160 * @since 2.0 |
161 */ | 161 */ |
162 public void showContextInformation(final IContextInformation info, final int position) { | 162 public void showContextInformation(final IContextInformation info, final int position) { |
163 Control control= fViewer.getTextWidget(); | 163 Control control= fViewer.getTextWidget(); |
164 BusyIndicator.showWhile(control.getDisplay(), new Runnable() { | 164 BusyIndicator.showWhile(control.getDisplay(), new class() Runnable { |
165 public void run() { | 165 public void run() { |
166 internalShowContextInfo(info, position); | 166 internalShowContextInfo(info, position); |
167 hideContextSelector(); | 167 hideContextSelector(); |
168 } | 168 } |
169 }); | 169 }); |
361 c= fContentAssistant.getContextSelectorForeground(); | 361 c= fContentAssistant.getContextSelectorForeground(); |
362 if (c is null) | 362 if (c is null) |
363 c= control.getDisplay().getSystemColor(DWT.COLOR_INFO_FOREGROUND); | 363 c= control.getDisplay().getSystemColor(DWT.COLOR_INFO_FOREGROUND); |
364 fContextSelectorTable.setForeground(c); | 364 fContextSelectorTable.setForeground(c); |
365 | 365 |
366 fContextSelectorTable.addSelectionListener(new SelectionListener() { | 366 fContextSelectorTable.addSelectionListener(new class() SelectionListener { |
367 public void widgetSelected(SelectionEvent e) { | 367 public void widgetSelected(SelectionEvent e) { |
368 } | 368 } |
369 | 369 |
370 public void widgetDefaultSelected(SelectionEvent e) { | 370 public void widgetDefaultSelected(SelectionEvent e) { |
371 insertSelectedContext(); | 371 insertSelectedContext(); |
630 * Post the code in the event queue in order to ensure that the | 630 * Post the code in the event queue in order to ensure that the |
631 * action described by this verify key event has already beed executed. | 631 * action described by this verify key event has already beed executed. |
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 class() Runnable { |
636 | 636 |
637 private ContextFrame fFrame= cast(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()) { |