View | Details | Raw Unified | Return to bug 188247 | Differences between
and this patch

Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/text/java/OverrideCompletionProposal.java (-1 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 182-185 Link Here
182
	public boolean isAutoInsertable() {
182
	public boolean isAutoInsertable() {
183
		return false;
183
		return false;
184
	}
184
	}
185
186
	/*
187
	 * @see org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal#getPrefixValidationString()
188
	 * @since 3.3
189
	 */
190
	protected String getPrefixValidationString() {
191
		return getDisplayString();
192
	}
193
185
}
194
}
(-)ui/org/eclipse/jdt/internal/ui/text/java/AbstractJavaCompletionProposal.java (-7 / +12 lines)
Lines 694-700 Link Here
694
	 * proposal is still valid.
694
	 * proposal is still valid.
695
	 * <p>
695
	 * <p>
696
	 * The default implementation checks if <code>prefix</code> is a prefix of the proposal's
696
	 * The default implementation checks if <code>prefix</code> is a prefix of the proposal's
697
	 * {@link #getDisplayString() display string} using the {@link #isPrefix(String, String) }
697
	 * {@link #getReplacementString() display string} using the {@link #isPrefix(String, String) }
698
	 * method.
698
	 * method.
699
	 * </p>
699
	 * </p>
700
	 * 
700
	 * 
Lines 702-713 Link Here
702
	 * @return <code>true</code> if <code>prefix</code> is a valid prefix of this proposal
702
	 * @return <code>true</code> if <code>prefix</code> is a valid prefix of this proposal
703
	 */
703
	 */
704
	protected boolean isValidPrefix(String prefix) {
704
	protected boolean isValidPrefix(String prefix) {
705
		/*
705
		return isPrefix(prefix, getPrefixValidationString());
706
		 * See http://dev.eclipse.org/bugs/show_bug.cgi?id=17667
706
	}
707
		 * why we do not use the replacement string.
707
	
708
		 * String word= fReplacementString;
708
	/**
709
		 */
709
	 * Returns the string used to do the prefix validation.
710
		return isPrefix(prefix, getDisplayString());
710
	 * 
711
	 * @return the string for the prefix validation.
712
	 * @since 3.3
713
	 */
714
	protected String getPrefixValidationString() {
715
		return getReplacementString();
711
	}
716
	}
712
717
713
	/**
718
	/**
(-)ui/org/eclipse/jdt/internal/ui/text/java/MethodDeclarationCompletionProposal.java (-1 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 192-195 Link Here
192
	public boolean isAutoInsertable() {
192
	public boolean isAutoInsertable() {
193
		return false;
193
		return false;
194
	}
194
	}
195
	
196
	/*
197
	 * @see org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal#getPrefixValidationString()
198
	 * @since 3.3
199
	 */
200
	protected String getPrefixValidationString() {
201
		return getDisplayString();
202
	}
203
195
}
204
}
(-)ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposal.java (-4 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2006 IBM Corporation and others.
2
 * Copyright (c) 2000, 2007 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 31-38 Link Here
31
	 * @param replacementOffset the offset of the text to be replaced
31
	 * @param replacementOffset the offset of the text to be replaced
32
	 * @param replacementLength the length of the text to be replaced
32
	 * @param replacementLength the length of the text to be replaced
33
	 * @param image the image to display for this proposal
33
	 * @param image the image to display for this proposal
34
	 * @param displayString the string to be displayed for the proposal If set to <code>null</code>,
34
	 * @param displayString the string to be displayed for the proposal If set to <code>null</code>, the replacement string will be taken as display string.
35
	 *        the replacement string will be taken as display string.
35
	 * @param relevance the relevance
36
	 */
36
	 */
37
	public JavaCompletionProposal(String replacementString, int replacementOffset, int replacementLength, Image image, String displayString, int relevance) {
37
	public JavaCompletionProposal(String replacementString, int replacementOffset, int replacementLength, Image image, String displayString, int relevance) {
38
		this(replacementString, replacementOffset, replacementLength, image, displayString, relevance, false);
38
		this(replacementString, replacementOffset, replacementLength, image, displayString, relevance, false);
Lines 92-98 Link Here
92
	 * @see org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal#isValidPrefix(java.lang.String)
92
	 * @see org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal#isValidPrefix(java.lang.String)
93
	 */
93
	 */
94
	protected boolean isValidPrefix(String prefix) {
94
	protected boolean isValidPrefix(String prefix) {
95
		String word= getDisplayString();
95
		String word= getPrefixValidationString();
96
		if (isInJavadoc()) {
96
		if (isInJavadoc()) {
97
			int idx = word.indexOf("{@link "); //$NON-NLS-1$
97
			int idx = word.indexOf("{@link "); //$NON-NLS-1$
98
			if (idx==0) {
98
			if (idx==0) {

Return to bug 188247