Mercurial > projects > dwt-addons
diff dwtx/jface/fieldassist/ContentProposalAdapter.d @ 71:4878bef4a38e
Some fixing
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 22 May 2008 04:03:58 +0200 |
parents | 46a6e0e6ccd4 |
children | 5df4896124c7 |
line wrap: on
line diff
--- a/dwtx/jface/fieldassist/ContentProposalAdapter.d Thu May 22 01:36:46 2008 +0200 +++ b/dwtx/jface/fieldassist/ContentProposalAdapter.d Thu May 22 04:03:58 2008 +0200 @@ -318,8 +318,8 @@ String contents = getControlContentAdapter() .getControlContents(getControl()); // If there are no contents, changes in cursor - // position have no effect. Note also that we do - // not affect the filter text on ARROW_LEFT as + // position have no effect. Note also that we do + // not affect the filter text on ARROW_LEFT as // we would with BS. if (contents.length > 0) { asyncRecomputeProposals(filterText); @@ -511,7 +511,7 @@ } getShell().setBounds(proposedBounds); } - + /* * (non-Javadoc) * @see dwtx.jface.dialogs.PopupDialog#getForeground() @@ -520,7 +520,7 @@ return control.getDisplay(). getSystemColor(DWT.COLOR_INFO_FOREGROUND); } - + /* * (non-Javadoc) * @see dwtx.jface.dialogs.PopupDialog#getBackground() @@ -622,7 +622,7 @@ return JFaceResources.getColorRegistry().get( JFacePreferences.CONTENT_ASSIST_FOREGROUND_COLOR); } - + /* * (non-Javadoc) * @see dwtx.jface.dialogs.PopupDialog#getBackground() @@ -1108,7 +1108,7 @@ /** * Indicates that a cumulative filter applies as keys are typed in the * popup. That is, each character typed will be added to the filter. - * + * * @deprecated As of 3.4, filtering that is sensitive to changes in the * control content should be performed by the supplied * {@link IContentProposalProvider}, such as that performed by @@ -1790,7 +1790,7 @@ } watchModify = false; // We don't autoactivate if the net change is no - // content. In other words, backspacing to empty + // content. In other words, backspacing to empty // should never cause a popup to open. if (!isControlContentEmpty()) { autoActivate(); @@ -1949,9 +1949,9 @@ // the popup opened. // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=127108 // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=139063 - if (controlContentAdapter instanceof IControlContentAdapter2 + if (null !is cast(IControlContentAdapter2)controlContentAdapter && selectionRange.x !is -1) { - ((IControlContentAdapter2) controlContentAdapter).setSelection( + (cast(IControlContentAdapter2) controlContentAdapter).setSelection( control, selectionRange); } else if (insertionPos !is -1) { controlContentAdapter.setCursorPosition(control, insertionPos); @@ -1977,8 +1977,8 @@ IControlContentAdapter adapter = getControlContentAdapter(); insertionPos = adapter.getCursorPosition(control); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=139063 - if (adapter instanceof IControlContentAdapter2) { - selectionRange = ((IControlContentAdapter2) adapter) + if (null !is cast(IControlContentAdapter2)adapter ) { + selectionRange = (cast(IControlContentAdapter2) adapter) .getSelection(control); } @@ -2095,7 +2095,7 @@ /** * Returns whether the content proposal popup has the focus. This includes * both the primary popup and any secondary info popup that may have focus. - * + * * @return <code>true</code> if the proposal popup or its secondary info * popup has the focus * @since 3.4