comparison dwtx/jface/text/contentassist/ContextInformationPopup.d @ 138:b6bad70d540a

Regex instanceof changes
author Frank Benoit <benoit@tionex.de>
date Sun, 24 Aug 2008 02:26:23 +0200
parents 65801ad2b265
children f70d9508c95c
comparison
equal deleted inserted replaced
137:25170b5a8951 138:b6bad70d540a
120 /* 120 /*
121 * @see java.lang.Object#equals(java.lang.Object) 121 * @see java.lang.Object#equals(java.lang.Object)
122 * @since 3.0 122 * @since 3.0
123 */ 123 */
124 public bool equals(Object obj) { 124 public bool equals(Object obj) {
125 if (obj instanceof ContextFrame) { 125 if ( cast(ContextFrame)obj ) {
126 ContextFrame frame= cast(ContextFrame) obj; 126 ContextFrame frame= cast(ContextFrame) obj;
127 return fInformation.equals(frame.fInformation) && fBeginOffset is frame.fBeginOffset; 127 return fInformation.equals(frame.fInformation) && fBeginOffset is frame.fBeginOffset;
128 } 128 }
129 return super.equals(obj); 129 return super.equals(obj);
130 } 130 }
327 */ 327 */
328 private ContextFrame createContextFrame(IContextInformation information, int offset) { 328 private ContextFrame createContextFrame(IContextInformation information, int offset) {
329 IContextInformationValidator validator= fContentAssistSubjectControlAdapter.getContextInformationValidator(fContentAssistant, offset); 329 IContextInformationValidator validator= fContentAssistSubjectControlAdapter.getContextInformationValidator(fContentAssistant, offset);
330 330
331 if (validator !is null) { 331 if (validator !is null) {
332 int beginOffset= (information instanceof IContextInformationExtension) ? (cast(IContextInformationExtension) information).getContextInformationPosition() : offset; 332 int beginOffset= ( cast(IContextInformationExtension)information ) ? (cast(IContextInformationExtension) information).getContextInformationPosition() : offset;
333 if (beginOffset is -1) beginOffset= offset; 333 if (beginOffset is -1) beginOffset= offset;
334 int visibleOffset= fContentAssistSubjectControlAdapter.getWidgetSelectionRange().x - (offset - beginOffset); 334 int visibleOffset= fContentAssistSubjectControlAdapter.getWidgetSelectionRange().x - (offset - beginOffset);
335 IContextInformationPresenter presenter = fContentAssistSubjectControlAdapter.getContextInformationPresenter(fContentAssistant, offset); 335 IContextInformationPresenter presenter = fContentAssistSubjectControlAdapter.getContextInformationPresenter(fContentAssistant, offset);
336 return new ContextFrame(information, beginOffset, offset, visibleOffset, validator, presenter); 336 return new ContextFrame(information, beginOffset, offset, visibleOffset, validator, presenter);
337 } 337 }