View | Details | Raw Unified | Return to bug 188876
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/CompletionTests.java (-1 / +1 lines)
Lines 3738-3744 Link Here
3738
    
3738
    
3739
	assertResults(
3739
	assertResults(
3740
			"pack1.pack3[PACKAGE_REF]{pack1.pack3.*;, pack1.pack3, null, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED)+"}\n"+
3740
			"pack1.pack3[PACKAGE_REF]{pack1.pack3.*;, pack1.pack3, null, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED)+"}\n"+
3741
			"PX[TYPE_REF]{pack1.PX;, pack1, Lpack1.PX;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}",
3741
			"PX[TYPE_REF]{PX;, pack1, Lpack1.PX;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}",
3742
			requestor.getResults());
3742
			requestor.getResults());
3743
}
3743
}
3744
3744
(-)src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java (-33 / +24 lines)
Lines 1973-1979 Link Here
1973
	            result.context);
1973
	            result.context);
1974
	
1974
	
1975
		assertResults(
1975
		assertResults(
1976
				"ImportedClass[TYPE_REF]{test0071.p.ImportedClass., test0071.p, Ltest0071.p.ImportedClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
1976
				"ImportedClass[TYPE_REF]{ImportedClass., test0071.p, Ltest0071.p.ImportedClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
1977
				result.proposals);
1977
				result.proposals);
1978
	} finally {
1978
	} finally {
1979
		if(importedClass != null) {
1979
		if(importedClass != null) {
Lines 2005-2020 Link Here
2005
		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
2005
		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
2006
		cu.codeComplete(cursorLocation, requestor, this.wcOwner);
2006
		cu.codeComplete(cursorLocation, requestor, this.wcOwner);
2007
	
2007
	
2008
		int end1 = cursorLocation;
2008
		int end = cursorLocation;
2009
		int start1 = end1 - "ZZ".length();
2009
		int start = end - "ZZ".length();
2010
		
2011
		int end2 = cursorLocation;
2012
		int start2 = end2 - "test0072.p.ImportedClass.ZZ".length();
2013
		
2010
		
2014
		assertResults(
2011
		assertResults(
2015
				"ZZZ1[FIELD_REF]{ZZZ1;, Ltest0072.p.ImportedClass;, I, ZZZ1, null, ["+start1+", "+end1+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2012
				"ZZZ1[FIELD_REF]{ZZZ1;, Ltest0072.p.ImportedClass;, I, ZZZ1, null, ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2016
				"ZZZ2[METHOD_IMPORT]{test0072.p.ImportedClass.ZZZ2;, Ltest0072.p.ImportedClass;, ()V, ZZZ2, null, ["+start2+", "+end2+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2013
				"ZZZ2[METHOD_IMPORT]{ZZZ2;, Ltest0072.p.ImportedClass;, ()V, ZZZ2, null, ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2017
				"ZZZ2[METHOD_IMPORT]{test0072.p.ImportedClass.ZZZ2;, Ltest0072.p.ImportedClass;, (I)V, ZZZ2, (i), ["+start2+", "+end2+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
2014
				"ZZZ2[METHOD_IMPORT]{ZZZ2;, Ltest0072.p.ImportedClass;, (I)V, ZZZ2, (i), ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
2018
				requestor.getResults());
2015
				requestor.getResults());
2019
	} finally {
2016
	} finally {
2020
		if(importedClass != null) {
2017
		if(importedClass != null) {
Lines 2048-2063 Link Here
2048
		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
2045
		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
2049
		cu.codeComplete(cursorLocation, requestor, this.wcOwner);
2046
		cu.codeComplete(cursorLocation, requestor, this.wcOwner);
2050
	
2047
	
2051
		int end1 = cursorLocation;
2048
		int end = cursorLocation;
2052
		int start1 = end1 - "ZZ".length();
2049
		int start = end - "ZZ".length();
2053
		
2054
		int end2 = cursorLocation;
2055
		int start2 = end2 - "test0073.p.ImportedClass.Inner.ZZ".length();
2056
		
2050
		
2057
		assertResults(
2051
		assertResults(
2058
				"ZZZ1[FIELD_REF]{ZZZ1;, Ltest0073.p.ImportedClass$Inner;, I, ZZZ1, null, ["+start1+", "+end1+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2052
				"ZZZ1[FIELD_REF]{ZZZ1;, Ltest0073.p.ImportedClass$Inner;, I, ZZZ1, null, ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2059
				"ZZZ2[METHOD_IMPORT]{test0073.p.ImportedClass.Inner.ZZZ2;, Ltest0073.p.ImportedClass$Inner;, ()V, ZZZ2, null, ["+start2+", "+end2+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2053
				"ZZZ2[METHOD_IMPORT]{ZZZ2;, Ltest0073.p.ImportedClass$Inner;, ()V, ZZZ2, null, ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2060
				"ZZZ2[METHOD_IMPORT]{test0073.p.ImportedClass.Inner.ZZZ2;, Ltest0073.p.ImportedClass$Inner;, (I)V, ZZZ2, (i), ["+start2+", "+end2+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
2054
				"ZZZ2[METHOD_IMPORT]{ZZZ2;, Ltest0073.p.ImportedClass$Inner;, (I)V, ZZZ2, (i), ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
2061
				requestor.getResults());
2055
				requestor.getResults());
2062
	} finally {
2056
	} finally {
2063
		if(importedClass != null) {
2057
		if(importedClass != null) {
Lines 2091-2106 Link Here
2091
		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
2085
		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
2092
		cu.codeComplete(cursorLocation, requestor, this.wcOwner);
2086
		cu.codeComplete(cursorLocation, requestor, this.wcOwner);
2093
	
2087
	
2094
		int end1 = cursorLocation;
2088
		int end = cursorLocation;
2095
		int start1 = end1 - "ZZ".length();
2089
		int start = end - "ZZ".length();
2096
		
2097
		int end2 = cursorLocation;
2098
		int start2 = end2 - "test0074.p.ImportedClass.Inner.ZZ".length();
2099
		
2090
		
2100
		assertResults(
2091
		assertResults(
2101
				"ZZZ1[FIELD_REF]{ZZZ1;, Ltest0074.p.ImportedClass$Inner;, I, ZZZ1, null, ["+start1+", "+end1+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2092
				"ZZZ1[FIELD_REF]{ZZZ1;, Ltest0074.p.ImportedClass$Inner;, I, ZZZ1, null, ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2102
				"ZZZ2[METHOD_IMPORT]{test0074.p.ImportedClass.Inner.ZZZ2;, Ltest0074.p.ImportedClass$Inner;, ()V, ZZZ2, null, ["+start2+", "+end2+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2093
				"ZZZ2[METHOD_IMPORT]{ZZZ2;, Ltest0074.p.ImportedClass$Inner;, ()V, ZZZ2, null, ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
2103
				"ZZZ2[METHOD_IMPORT]{test0074.p.ImportedClass.Inner.ZZZ2;, Ltest0074.p.ImportedClass$Inner;, (I)V, ZZZ2, (i), ["+start2+", "+end2+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
2094
				"ZZZ2[METHOD_IMPORT]{ZZZ2;, Ltest0074.p.ImportedClass$Inner;, (I)V, ZZZ2, (i), ["+start+", "+end+"], " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
2104
				requestor.getResults());
2095
				requestor.getResults());
2105
	} finally {
2096
	} finally {
2106
		if(importedClass != null) {
2097
		if(importedClass != null) {
Lines 6847-6853 Link Here
6847
	            result.context);
6838
	            result.context);
6848
	
6839
	
6849
		assertResults(
6840
		assertResults(
6850
				"ImportedClass.ImportedMember[TYPE_REF]{test0211.p.ImportedClass.ImportedMember;, test0211.p, Ltest0211.p.ImportedClass$ImportedMember;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
6841
				"ImportedClass.ImportedMember[TYPE_REF]{ImportedMember;, test0211.p, Ltest0211.p.ImportedClass$ImportedMember;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
6851
				result.proposals);
6842
				result.proposals);
6852
	} finally {
6843
	} finally {
6853
		if(importedClass != null) {
6844
		if(importedClass != null) {
Lines 6888-6894 Link Here
6888
	            result.context);
6879
	            result.context);
6889
	
6880
	
6890
		assertResults(
6881
		assertResults(
6891
				"ImportedClass[TYPE_REF]{test0212.p.ImportedClass;, test0212.p, Ltest0212.p.ImportedClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
6882
				"ImportedClass[TYPE_REF]{ImportedClass;, test0212.p, Ltest0212.p.ImportedClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
6892
				result.proposals);
6883
				result.proposals);
6893
	} finally {
6884
	} finally {
6894
		if(importedClass != null) {
6885
		if(importedClass != null) {
Lines 6927-6933 Link Here
6927
	            result.context);
6918
	            result.context);
6928
	
6919
	
6929
		assertResults(
6920
		assertResults(
6930
				"ImportedClass[TYPE_REF]{test0213.p.ImportedClass;, test0213.p, Ltest0213.p.ImportedClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
6921
				"ImportedClass[TYPE_REF]{ImportedClass;, test0213.p, Ltest0213.p.ImportedClass;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
6931
				result.proposals);
6922
				result.proposals);
6932
	} finally {
6923
	} finally {
6933
		if(importedClass != null) {
6924
		if(importedClass != null) {
Lines 8044-8051 Link Here
8044
		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
8035
		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
8045
	
8036
	
8046
		assertResults(
8037
		assertResults(
8047
				"oneTwoThree[METHOD_IMPORT]{camelcase.ImportedType.oneTwoThree;, Lcamelcase.ImportedType;, ()V, oneTwoThree, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CAMEL_CASE + R_NON_RESTRICTED) + "}\n" +
8038
				"oneTwoThree[METHOD_IMPORT]{oneTwoThree;, Lcamelcase.ImportedType;, ()V, oneTwoThree, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CAMEL_CASE + R_NON_RESTRICTED) + "}\n" +
8048
				"oTTMethod[METHOD_IMPORT]{camelcase.ImportedType.oTTMethod;, Lcamelcase.ImportedType;, ()V, oTTMethod, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
8039
				"oTTMethod[METHOD_IMPORT]{oTTMethod;, Lcamelcase.ImportedType;, ()V, oTTMethod, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
8049
				requestor.getResults());
8040
				requestor.getResults());
8050
	} finally {
8041
	} finally {
8051
		JavaCore.setOptions(oldOptions);
8042
		JavaCore.setOptions(oldOptions);
Lines 10655-10662 Link Here
10655
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10646
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10656
10647
10657
	assertResults(
10648
	assertResults(
10658
			"foo1[METHOD_IMPORT]{test0330.q.Y.foo1;, Ltest0330.q.Y;, ()Ltest0330.p.X;, foo1, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
10649
			"foo1[METHOD_IMPORT]{foo1;, Ltest0330.q.Y;, ()Ltest0330.p.X;, foo1, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}\n" +
10659
			"foo2[METHOD_IMPORT]{test0330.q.Y.foo2;, Ltest0330.q.Y;, ()V, foo2, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
10650
			"foo2[METHOD_IMPORT]{foo2;, Ltest0330.q.Y;, ()V, foo2, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
10660
			requestor.getResults());
10651
			requestor.getResults());
10661
}
10652
}
10662
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=185318
10653
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=185318
Lines 10676-10682 Link Here
10676
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10667
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10677
10668
10678
	assertResults(
10669
	assertResults(
10679
			"foo2[METHOD_IMPORT]{test0331.q.Y.foo2;, Ltest0331.q.Y;, ()V, foo2, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
10670
			"foo2[METHOD_IMPORT]{foo2;, Ltest0331.q.Y;, ()V, foo2, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED) + "}",
10680
			requestor.getResults());
10671
			requestor.getResults());
10681
}
10672
}
10682
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=185318
10673
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=185318
(-)codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java (-31 / +23 lines)
Lines 480-508 Link Here
480
					continue next; // import of default package is forbidden when compliance is 1.4 or higher
480
					continue next; // import of default package is forbidden when compliance is 1.4 or higher
481
				}
481
				}
482
				
482
				
483
				char[] completionName;
483
				char[] completionName = this.insideQualifiedReference ? simpleTypeName : fullyQualifiedName;
484
				
484
				
485
				if(this.resolvingStaticImports) {
485
				if(this.resolvingStaticImports) {
486
					if(enclosingTypeNames == null || enclosingTypeNames.length == 0) {
486
					if(enclosingTypeNames == null || enclosingTypeNames.length == 0) {
487
						completionName = CharOperation.concat(fullyQualifiedName, new char[] { '.' });
487
						completionName = CharOperation.concat(completionName, new char[] { '.' });
488
					} else if ((modifiers & ClassFileConstants.AccStatic) == 0) {
488
					} else if ((modifiers & ClassFileConstants.AccStatic) == 0) {
489
						continue next;
489
						continue next;
490
					} else {
490
					} else {
491
						completionName = CharOperation.concat(fullyQualifiedName, new char[] { ';' });
491
						completionName = CharOperation.concat(completionName, new char[] { ';' });
492
					}
492
					}
493
				} else {
493
				} else {
494
					completionName = CharOperation.concat(fullyQualifiedName, new char[] { ';' });
494
					completionName = CharOperation.concat(completionName, new char[] { ';' });
495
				}
495
				}
496
				
496
				
497
				int relevance = computeBaseRelevance();
497
				int relevance = computeBaseRelevance();
498
				relevance += computeRelevanceForResolution();
498
				relevance += computeRelevanceForResolution();
499
				relevance += computeRelevanceForInterestingProposal();
499
				relevance += computeRelevanceForInterestingProposal();
500
				relevance += computeRelevanceForRestrictions(accessibility);
500
				relevance += computeRelevanceForRestrictions(accessibility);
501
				if(insideQualifiedReference) {
501
				relevance += computeRelevanceForCaseMatching(this.completionToken, simpleTypeName);
502
					relevance += computeRelevanceForCaseMatching(this.completionToken, fullyQualifiedName);
503
				} else {
504
					relevance += computeRelevanceForCaseMatching(this.completionToken, simpleTypeName);
505
				}
506
				
502
				
507
				this.noProposal = false;
503
				this.noProposal = false;
508
				if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
504
				if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
Lines 2017-2025 Link Here
2017
								contextAccepted = true;
2013
								contextAccepted = true;
2018
								this.buildContext(importReference, null, null, null);
2014
								this.buildContext(importReference, null, null, null);
2019
								
2015
								
2020
								setSourceRange(
2016
								long positions = importReference.sourcePositions[importReference.sourcePositions.length - 1];
2021
									importReference.sourceStart,
2017
								setSourceRange((int) (positions >>> 32), (int) positions);
2022
									importReference.declarationSourceEnd);
2023
								
2018
								
2024
								char[][] oldTokens = importReference.tokens;
2019
								char[][] oldTokens = importReference.tokens;
2025
								int tokenCount = oldTokens.length;
2020
								int tokenCount = oldTokens.length;
Lines 2037-2051 Link Here
2037
											findImports((CompletionOnImportReference)importReference, false);
2032
											findImports((CompletionOnImportReference)importReference, false);
2038
										} else {
2033
										} else {
2039
											ReferenceBinding ref = (ReferenceBinding) binding;
2034
											ReferenceBinding ref = (ReferenceBinding) binding;
2035
											
2040
											if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
2036
											if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
2041
												this.findImportsOfMemberTypes(lastToken, ref, importReference.isStatic());
2037
												this.findImportsOfMemberTypes(lastToken, ref, importReference.isStatic());
2042
											}
2038
											}
2043
											if(importReference.isStatic()) {
2039
											if(importReference.isStatic()) {
2040
												
2044
												if(!this.requestor.isIgnored(CompletionProposal.FIELD_REF)) {
2041
												if(!this.requestor.isIgnored(CompletionProposal.FIELD_REF)) {
2045
													long positions = importReference.sourcePositions[importReference.sourcePositions.length - 1];
2046
													setSourceRange((int) (positions >>> 32), (int) positions);
2047
													this.findImportsOfStaticFields(lastToken, ref);
2042
													this.findImportsOfStaticFields(lastToken, ref);
2048
													setSourceRange(importReference.sourceStart, importReference.declarationSourceEnd);
2049
												}
2043
												}
2050
												if(!this.requestor.isIgnored(CompletionProposal.METHOD_NAME_REFERENCE)) {
2044
												if(!this.requestor.isIgnored(CompletionProposal.METHOD_NAME_REFERENCE)) {
2051
													this.findImportsOfStaticMethods(lastToken, ref);
2045
													this.findImportsOfStaticMethods(lastToken, ref);
Lines 3862-3871 Link Here
3862
		this.resolvingImports = true;
3856
		this.resolvingImports = true;
3863
		this.resolvingStaticImports = importReference.isStatic();
3857
		this.resolvingStaticImports = importReference.isStatic();
3864
			
3858
			
3865
		this.completionToken =  importName;
3859
		this.completionToken =  lastToken;
3860
		this.qualifiedCompletionToken = importName;
3861
		
3866
		// want to replace the existing .*;
3862
		// want to replace the existing .*;
3867
		if(!this.requestor.isIgnored(CompletionProposal.PACKAGE_REF)) {
3863
		if(!this.requestor.isIgnored(CompletionProposal.PACKAGE_REF)) {
3864
			int oldStart = this.startPosition;
3865
			int oldEnd = this.endPosition;
3866
			setSourceRange(
3867
				importReference.sourceStart,
3868
				importReference.declarationSourceEnd);
3868
			this.nameEnvironment.findPackages(importName, this);
3869
			this.nameEnvironment.findPackages(importName, this);
3870
			setSourceRange(
3871
				oldStart,
3872
				oldEnd - 1,
3873
				false);
3869
		}
3874
		}
3870
		if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
3875
		if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
3871
			this.nameEnvironment.findTypes(
3876
			this.nameEnvironment.findTypes(
Lines 3903-3914 Link Here
3903
				&& !memberType.canBeSeenBy(this.unitScope.fPackage))
3908
				&& !memberType.canBeSeenBy(this.unitScope.fPackage))
3904
				continue next;
3909
				continue next;
3905
			
3910
			
3906
			char[] completionName = CharOperation.concat(
3911
			char[] completionName = CharOperation.concat(memberType.sourceName, SEMICOLON);
3907
					memberType.qualifiedPackageName(),
3908
					memberType.qualifiedSourceName(),
3909
					'.');
3910
			
3911
			completionName = CharOperation.concat(completionName, SEMICOLON);
3912
			
3912
			
3913
			int relevance = computeBaseRelevance();
3913
			int relevance = computeBaseRelevance();
3914
			relevance += computeRelevanceForResolution();
3914
			relevance += computeRelevanceForResolution();
Lines 4023-4038 Link Here
4023
				parameterTypeNames[i] = type.qualifiedSourceName();
4023
				parameterTypeNames[i] = type.qualifiedSourceName();
4024
			}
4024
			}
4025
			char[][] parameterNames = findMethodParameterNames(method,parameterTypeNames);
4025
			char[][] parameterNames = findMethodParameterNames(method,parameterTypeNames);
4026
4027
			
4028
			char[] completionName = CharOperation.concat(
4029
					method.declaringClass.qualifiedPackageName(),
4030
					'.',
4031
					method.declaringClass.qualifiedSourceName(),
4032
					'.',
4033
					method.selector);
4034
			
4026
			
4035
			completionName = CharOperation.concat(completionName, SEMICOLON);
4027
			char[] completionName = CharOperation.concat(method.selector, SEMICOLON);
4036
			
4028
			
4037
			int relevance = computeBaseRelevance();
4029
			int relevance = computeBaseRelevance();
4038
			relevance += computeRelevanceForResolution();
4030
			relevance += computeRelevanceForResolution();

Return to bug 188876