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

Collapse All | Expand All

(-)codeassist/org/eclipse/jdt/internal/codeassist/RelevanceConstants.java (+1 lines)
Lines 43-46 Link Here
43
	int R_NO_PROBLEMS = 1;
43
	int R_NO_PROBLEMS = 1;
44
	int R_RESOLVED = 1;
44
	int R_RESOLVED = 1;
45
	int R_TARGET = 5;
45
	int R_TARGET = 5;
46
	int R_CONSTRUCTOR = 5;
46
}
47
}
(-)codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java (-44 / +325 lines)
Lines 438-444 Link Here
438
		acceptedTypes.add(new AcceptedType(packageName, simpleTypeName, enclosingTypeNames, modifiers, accessibility));
438
		acceptedTypes.add(new AcceptedType(packageName, simpleTypeName, enclosingTypeNames, modifiers, accessibility));
439
	}
439
	}
440
	
440
	
441
	private void acceptTypes(Scope scope) {
441
	private void acceptTypes(boolean proposeConstructor, InvocationSite invocationSite, Scope scope) {
442
		if(this.acceptedTypes == null) return;
442
		if(this.acceptedTypes == null) return;
443
		
443
		
444
		int length = this.acceptedTypes.size();
444
		int length = this.acceptedTypes.size();
Lines 515-520 Link Here
515
								typeName,
515
								typeName,
516
								fullyQualifiedName,
516
								fullyQualifiedName,
517
								!CharOperation.equals(fullyQualifiedName, importName[1]),
517
								!CharOperation.equals(fullyQualifiedName, importName[1]),
518
								proposeConstructor,
519
								invocationSite,
518
								scope);
520
								scope);
519
						continue next;
521
						continue next;
520
					}
522
					}
Lines 530-535 Link Here
530
							typeName,
532
							typeName,
531
							fullyQualifiedName,
533
							fullyQualifiedName,
532
							false,
534
							false,
535
							proposeConstructor,
536
							invocationSite,
533
							scope);
537
							scope);
534
					continue next;
538
					continue next;
535
				} else {
539
				} else {
Lines 615-620 Link Here
615
							typeName,
619
							typeName,
616
							fullyQualifiedName,
620
							fullyQualifiedName,
617
							true,
621
							true,
622
							proposeConstructor,
623
							invocationSite,
618
							scope);
624
							scope);
619
				}
625
				}
620
			}
626
			}
Lines 634-639 Link Here
634
							value.qualifiedTypeName,
640
							value.qualifiedTypeName,
635
							value.fullyQualifiedName,
641
							value.fullyQualifiedName,
636
							value.mustBeQualified,
642
							value.mustBeQualified,
643
							proposeConstructor,
644
							invocationSite,
637
							scope);
645
							scope);
638
				}
646
				}
639
			}
647
			}
Lines 697-703 Link Here
697
		return true;
705
		return true;
698
	}
706
	}
699
	
707
	
700
	private void proposeType(char[] packageName, char[] simpleTypeName, int modifiers, int accessibility, char[] typeName, char[] fullyQualifiedName, boolean isQualified, Scope scope) {
708
	private void proposeType(
709
			char[] packageName,
710
			char[] simpleTypeName,
711
			int modifiers,
712
			int accessibility,
713
			char[] typeName,
714
			char[] fullyQualifiedName,
715
			boolean isQualified,
716
			boolean proposeConstructor,
717
			InvocationSite invocationSite,
718
			Scope scope) {
701
		char[] completionName = fullyQualifiedName;
719
		char[] completionName = fullyQualifiedName;
702
		if(isQualified) {
720
		if(isQualified) {
703
			if (packageName == null || packageName.length == 0)
721
			if (packageName == null || packageName.length == 0)
Lines 707-713 Link Here
707
			completionName = simpleTypeName;
725
			completionName = simpleTypeName;
708
		}
726
		}
709
		
727
		
710
		TypeBinding guessedType = null;
728
		TypeBinding guessedAnnotationType = null;
711
		if ((modifiers & ClassFileConstants.AccAnnotation) != 0 &&
729
		if ((modifiers & ClassFileConstants.AccAnnotation) != 0 &&
712
				this.assistNodeIsAnnotation &&
730
				this.assistNodeIsAnnotation &&
713
				(this.targetedElement & TagBits.AnnotationTargetMASK) != 0) {
731
				(this.targetedElement & TagBits.AnnotationTargetMASK) != 0) {
Lines 723-738 Link Here
723
			switch (scope.kind) {
741
			switch (scope.kind) {
724
				case Scope.METHOD_SCOPE :
742
				case Scope.METHOD_SCOPE :
725
				case Scope.BLOCK_SCOPE :
743
				case Scope.BLOCK_SCOPE :
726
					guessedType = ref.resolveType((BlockScope)scope);
744
					guessedAnnotationType = ref.resolveType((BlockScope)scope);
727
					break;
745
					break;
728
				case Scope.CLASS_SCOPE :
746
				case Scope.CLASS_SCOPE :
729
					guessedType = ref.resolveType((ClassScope)scope);
747
					guessedAnnotationType = ref.resolveType((ClassScope)scope);
730
					break;
748
					break;
731
			}
749
			}
732
			
750
			
733
			if (!guessedType.isValidBinding()) return;
751
			if (!guessedAnnotationType.isValidBinding()) return;
734
			
752
			
735
			if (!hasPossibleAnnotationTarget(guessedType, scope)) return;
753
			if (!hasPossibleAnnotationTarget(guessedAnnotationType, scope)) return;
736
		}
754
		}
737
755
738
		int relevance = computeBaseRelevance();
756
		int relevance = computeBaseRelevance();
Lines 748-754 Link Here
748
			case ClassFileConstants.AccAnnotation:
766
			case ClassFileConstants.AccAnnotation:
749
			case ClassFileConstants.AccAnnotation | ClassFileConstants.AccInterface:
767
			case ClassFileConstants.AccAnnotation | ClassFileConstants.AccInterface:
750
				relevance += computeRelevanceForAnnotation();
768
				relevance += computeRelevanceForAnnotation();
751
				if (guessedType != null) relevance += computeRelevanceForAnnotationTarget(guessedType);
769
				if (guessedAnnotationType != null) relevance += computeRelevanceForAnnotationTarget(guessedAnnotationType);
752
				relevance += computeRelevanceForInterface();
770
				relevance += computeRelevanceForInterface();
753
				break;
771
				break;
754
			case ClassFileConstants.AccEnum:
772
			case ClassFileConstants.AccEnum:
Lines 767-772 Link Here
767
		if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
785
		if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
768
			createTypeProposal(packageName, typeName, modifiers, accessibility, completionName, relevance);
786
			createTypeProposal(packageName, typeName, modifiers, accessibility, completionName, relevance);
769
		}
787
		}
788
		
789
		if (proposeConstructor && CharOperation.equals(this.completionToken, simpleTypeName)) {
790
			char[][] compoundName = CharOperation.splitOn('.', fullyQualifiedName);
791
			TypeReference convertedType;
792
			if (compoundName.length == 1) {
793
				convertedType = new SingleTypeReference(compoundName[0], 0);
794
			} else {
795
				convertedType = new QualifiedTypeReference(compoundName, new long[compoundName.length]);
796
			}
797
			
798
			this.problemFactory.startCheckingProblems();
799
			TypeBinding guessedType = null;
800
			switch (scope.kind) {
801
				case Scope.METHOD_SCOPE :
802
				case Scope.BLOCK_SCOPE :
803
					guessedType = convertedType.resolveType((BlockScope)scope);
804
					break;
805
				case Scope.CLASS_SCOPE :
806
					guessedType = convertedType.resolveType((ClassScope)scope);
807
					break;
808
			}
809
			this.problemFactory.stopCheckingProblems();
810
			if (!this.problemFactory.hasForbiddenProblems &&
811
					guessedType != null &&
812
					guessedType instanceof ReferenceBinding &&
813
					!guessedType.isTypeVariable()) {
814
				
815
				TypeBinding erasure = guessedType.erasure();
816
817
				findConstructors(
818
					(ReferenceBinding)erasure,
819
					null,
820
					scope,
821
					invocationSite,
822
					false,
823
					true,
824
					isQualified);
825
			}
826
		}
770
	}
827
	}
771
828
772
	/**
829
	/**
Lines 900-906 Link Here
900
			this.completionToken = type.token;
957
			this.completionToken = type.token;
901
			setSourceRange(type.sourceStart, type.sourceEnd);
958
			setSourceRange(type.sourceStart, type.sourceEnd);
902
			
959
			
903
			findTypesAndPackages(this.completionToken, scope, new ObjectVector());
960
			findTypesAndPackages(this.completionToken, scope, null, new ObjectVector());
904
			if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
961
			if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
905
				findKeywordsForMember(this.completionToken, field.modifiers);
962
				findKeywordsForMember(this.completionToken, field.modifiers);
906
			}
963
			}
Lines 922-928 Link Here
922
			SingleTypeReference type = (CompletionOnSingleTypeReference) method.returnType;
979
			SingleTypeReference type = (CompletionOnSingleTypeReference) method.returnType;
923
			this.completionToken = type.token;
980
			this.completionToken = type.token;
924
			setSourceRange(type.sourceStart, type.sourceEnd);
981
			setSourceRange(type.sourceStart, type.sourceEnd);
925
			findTypesAndPackages(this.completionToken, scope.parent, new ObjectVector());
982
			findTypesAndPackages(this.completionToken, scope.parent, null, new ObjectVector());
926
			if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
983
			if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
927
				findKeywordsForMember(this.completionToken, method.modifiers);
984
				findKeywordsForMember(this.completionToken, method.modifiers);
928
			}
985
			}
Lines 951-957 Link Here
951
					this.findEnumConstant(this.completionToken, (SwitchStatement) astNodeParent);
1008
					this.findEnumConstant(this.completionToken, (SwitchStatement) astNodeParent);
952
				}
1009
				}
953
			} else if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) {
1010
			} else if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) {
954
				findTypesAndPackages(this.completionToken, scope, new ObjectVector());
1011
				findTypesAndPackages(this.completionToken, scope, null, new ObjectVector());
955
			} else {
1012
			} else {
956
				if (scope instanceof BlockScope && !this.requestor.isIgnored(CompletionProposal.LOCAL_VARIABLE_REF)) {
1013
				if (scope instanceof BlockScope && !this.requestor.isIgnored(CompletionProposal.LOCAL_VARIABLE_REF)) {
957
					char[][] alreadyDefinedName = computeAlreadyDefinedName((BlockScope)scope, singleNameReference);
1014
					char[][] alreadyDefinedName = computeAlreadyDefinedName((BlockScope)scope, singleNameReference);
Lines 970-976 Link Here
970
					insideTypeAnnotation,
1027
					insideTypeAnnotation,
971
					singleNameReference.isInsideAnnotationAttribute);
1028
					singleNameReference.isInsideAnnotationAttribute);
972
				// can be the start of a qualified type name
1029
				// can be the start of a qualified type name
973
				findTypesAndPackages(this.completionToken, scope, new ObjectVector());
1030
				findTypesAndPackages(this.completionToken, scope, null, new ObjectVector());
974
				if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
1031
				if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
975
					if (this.completionToken != null && this.completionToken.length != 0) {
1032
					if (this.completionToken != null && this.completionToken.length != 0) {
976
						findKeywords(this.completionToken, singleNameReference.possibleKeywords, false, false);
1033
						findKeywords(this.completionToken, singleNameReference.possibleKeywords, false, false);
Lines 1019-1025 Link Here
1019
								(BlockScope)scope,
1076
								(BlockScope)scope,
1020
								typesFound);
1077
								typesFound);
1021
					}
1078
					}
1022
					findTypesAndPackages(this.completionToken, scope, typesFound);
1079
					findTypesAndPackages(
1080
							this.completionToken,
1081
							scope,
1082
							this.assistNodeIsConstructor ? FakeInvocationSite : null,
1083
							typesFound);
1023
				}
1084
				}
1024
			} else if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
1085
			} else if (!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
1025
				findMemberTypes(
1086
				findMemberTypes(
Lines 1032-1037 Link Here
1032
					false,
1093
					false,
1033
					false,
1094
					false,
1034
					!this.assistNodeIsConstructor,
1095
					!this.assistNodeIsConstructor,
1096
					false,
1097
					null,
1035
					null,
1098
					null,
1036
					new ObjectVector());
1099
					new ObjectVector());
1037
			}
1100
			}
Lines 1322-1327 Link Here
1322
					argTypes,
1385
					argTypes,
1323
					scope,
1386
					scope,
1324
					constructorCall,
1387
					constructorCall,
1388
					false,
1389
					false,
1325
					false);
1390
					false);
1326
									}
1391
									}
1327
		} else if (astNode instanceof CompletionOnQualifiedAllocationExpression) {
1392
		} else if (astNode instanceof CompletionOnQualifiedAllocationExpression) {
Lines 1340-1345 Link Here
1340
						argTypes,
1405
						argTypes,
1341
						scope,
1406
						scope,
1342
						allocExpression,
1407
						allocExpression,
1408
						false,
1409
						false,
1343
						false);
1410
						false);
1344
			}
1411
			}
1345
			if (!this.requestor.isIgnored(CompletionProposal.ANONYMOUS_CLASS_DECLARATION)
1412
			if (!this.requestor.isIgnored(CompletionProposal.ANONYMOUS_CLASS_DECLARATION)
Lines 1479-1485 Link Here
1479
				this.completionToken = type.token;
1546
				this.completionToken = type.token;
1480
				setSourceRange(type.sourceStart, type.sourceEnd);
1547
				setSourceRange(type.sourceStart, type.sourceEnd);
1481
				
1548
				
1482
				findTypesAndPackages(this.completionToken, scope, new ObjectVector());
1549
				findTypesAndPackages(this.completionToken, scope, null, new ObjectVector());
1483
			} else if (annot.type instanceof CompletionOnQualifiedTypeReference) {
1550
			} else if (annot.type instanceof CompletionOnQualifiedTypeReference) {
1484
				this.insideQualifiedReference = true;
1551
				this.insideQualifiedReference = true;
1485
				
1552
				
Lines 1518-1524 Link Here
1518
				}
1585
				}
1519
				if (this.assistNodeCanBeSingleMemberAnnotation) {
1586
				if (this.assistNodeCanBeSingleMemberAnnotation) {
1520
					if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) {
1587
					if (this.expectedTypesPtr > -1 && this.expectedTypes[0].isAnnotationType()) {
1521
						findTypesAndPackages(this.completionToken, scope, new ObjectVector());
1588
						findTypesAndPackages(this.completionToken, scope, null, new ObjectVector());
1522
					} else {
1589
					} else {
1523
						if (scope instanceof BlockScope && !this.requestor.isIgnored(CompletionProposal.LOCAL_VARIABLE_REF)) {
1590
						if (scope instanceof BlockScope && !this.requestor.isIgnored(CompletionProposal.LOCAL_VARIABLE_REF)) {
1524
							char[][] alreadyDefinedName = computeAlreadyDefinedName((BlockScope)scope, FakeInvocationSite);
1591
							char[][] alreadyDefinedName = computeAlreadyDefinedName((BlockScope)scope, FakeInvocationSite);
Lines 1537-1543 Link Here
1537
							insideTypeAnnotation,
1604
							insideTypeAnnotation,
1538
							true);
1605
							true);
1539
						// can be the start of a qualified type name
1606
						// can be the start of a qualified type name
1540
						findTypesAndPackages(this.completionToken, scope, new ObjectVector());
1607
						findTypesAndPackages(this.completionToken, scope, null, new ObjectVector());
1541
					}
1608
					}
1542
				}
1609
				}
1543
			}
1610
			}
Lines 1598-1604 Link Here
1598
				this.completionToken = typeRef.token;
1665
				this.completionToken = typeRef.token;
1599
				this.javadocTagPosition = typeRef.tagSourceStart;
1666
				this.javadocTagPosition = typeRef.tagSourceStart;
1600
				setSourceRange(typeRef.sourceStart, typeRef.sourceEnd);
1667
				setSourceRange(typeRef.sourceStart, typeRef.sourceEnd);
1601
				findTypesAndPackages(this.completionToken, scope, new ObjectVector());
1668
				findTypesAndPackages(this.completionToken, scope, null, new ObjectVector());
1602
1669
1603
			} else if (astNode instanceof CompletionOnJavadocQualifiedTypeReference) {
1670
			} else if (astNode instanceof CompletionOnJavadocQualifiedTypeReference) {
1604
1671
Lines 1692-1698 Link Here
1692
							if (this.completionToken == null
1759
							if (this.completionToken == null
1693
									|| CharOperation.prefixEquals(this.completionToken, refBinding.sourceName)
1760
									|| CharOperation.prefixEquals(this.completionToken, refBinding.sourceName)
1694
									|| (this.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionToken, refBinding.sourceName))) {
1761
									|| (this.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionToken, refBinding.sourceName))) {
1695
								findConstructors(refBinding, null, scope, fieldRef, false);
1762
								findConstructors(refBinding, null, scope, fieldRef, false, false, false);
1696
							}
1763
							}
1697
						}
1764
						}
1698
					}
1765
					}
Lines 1758-1764 Link Here
1758
1825
1759
				ReferenceBinding ref = (ReferenceBinding) qualifiedBinding;
1826
				ReferenceBinding ref = (ReferenceBinding) qualifiedBinding;
1760
				if (!this.requestor.isIgnored(CompletionProposal.METHOD_REF) && ref.isClass()) {
1827
				if (!this.requestor.isIgnored(CompletionProposal.METHOD_REF) && ref.isClass()) {
1761
					findConstructors(ref, argTypes, scope, allocExpression, false);
1828
					findConstructors(ref, argTypes, scope, allocExpression, false, false, false);
1762
				}
1829
				}
1763
			} else if (astNode instanceof CompletionOnJavadocParamNameReference) {
1830
			} else if (astNode instanceof CompletionOnJavadocParamNameReference) {
1764
				if (!this.requestor.isIgnored(CompletionProposal.JAVADOC_PARAM_REF)) {
1831
				if (!this.requestor.isIgnored(CompletionProposal.JAVADOC_PARAM_REF)) {
Lines 2289-2295 Link Here
2289
				argTypes,
2356
				argTypes,
2290
				scope,
2357
				scope,
2291
				invocationSite,
2358
				invocationSite,
2292
				true);
2359
				true,
2360
				false,
2361
				false);
2293
		}
2362
		}
2294
	}
2363
	}
2295
2364
Lines 2691-2697 Link Here
2691
		TypeBinding[] argTypes,
2760
		TypeBinding[] argTypes,
2692
		Scope scope,
2761
		Scope scope,
2693
		InvocationSite invocationSite,
2762
		InvocationSite invocationSite,
2694
		boolean forAnonymousType) {
2763
		boolean forAnonymousType,
2764
		boolean forExactConstructors,
2765
		boolean isQualified) {
2766
		
2767
		if (forExactConstructors) {
2768
			if (currentType.isEnum() || currentType.isInterface() || currentType.isAnnotationType()) return;
2769
			
2770
			if (isQualified && isIgnored(CompletionProposal.METHOD_REF, CompletionProposal.TYPE_IMPORT)) return;
2771
		}
2772
		
2773
		boolean hasConstructors = false;
2695
2774
2696
		// No visibility checks can be performed without the scope & invocationSite
2775
		// No visibility checks can be performed without the scope & invocationSite
2697
		MethodBinding[] methods = currentType.availableMethods();
2776
		MethodBinding[] methods = currentType.availableMethods();
Lines 2702-2708 Link Here
2702
				if (constructor.isConstructor()) {
2781
				if (constructor.isConstructor()) {
2703
					
2782
					
2704
					if (constructor.isSynthetic()) continue next;
2783
					if (constructor.isSynthetic()) continue next;
2705
						
2784
					
2785
					hasConstructors = true;
2786
					
2706
					if (this.options.checkDeprecation &&
2787
					if (this.options.checkDeprecation &&
2707
							constructor.isViewedAsDeprecated() &&
2788
							constructor.isViewedAsDeprecated() &&
2708
							!scope.isDefinedInSameUnit(constructor.declaringClass))
2789
							!scope.isDefinedInSameUnit(constructor.declaringClass))
Lines 2767-2772 Link Here
2767
								this.printDebug(proposal);
2848
								this.printDebug(proposal);
2768
							}
2849
							}
2769
						}
2850
						}
2851
					} else if (forExactConstructors) {
2852
						char[] signature = getSignature(constructor);
2853
						char[] originalSignature = null;
2854
						MethodBinding original = constructor.original();
2855
						if(original != constructor) {
2856
							originalSignature = getSignature(original);
2857
						}
2858
							
2859
						proposeExactConstructor(
2860
								currentType,
2861
								signature,
2862
								originalSignature,
2863
								constructor.modifiers,
2864
								parameterPackageNames,
2865
								parameterTypeNames,
2866
								parameterNames,
2867
								isQualified);
2770
					} else {
2868
					} else {
2771
						int relevance = computeBaseRelevance();
2869
						int relevance = computeBaseRelevance();
2772
						relevance += computeRelevanceForResolution();
2870
						relevance += computeRelevanceForResolution();
Lines 2888-2893 Link Here
2888
				}
2986
				}
2889
			}
2987
			}
2890
		}
2988
		}
2989
		
2990
		if (forExactConstructors && !hasConstructors) {
2991
			char[] signature =
2992
				createMethodSignature(
2993
						CharOperation.NO_CHAR_CHAR,
2994
						CharOperation.NO_CHAR_CHAR,
2995
						null,
2996
						VOID);
2997
				
2998
			proposeExactConstructor(
2999
					currentType,
3000
					signature,
3001
					null,
3002
					Flags.AccPublic,
3003
					CharOperation.NO_CHAR_CHAR,
3004
					CharOperation.NO_CHAR_CHAR,
3005
					null,
3006
					isQualified);
3007
		}
2891
	}
3008
	}
2892
	
3009
	
2893
	private char[][] findEnclosingTypeNames(Scope scope){
3010
	private char[][] findEnclosingTypeNames(Scope scope){
Lines 3857-3863 Link Here
3857
					this.options.camelCaseMatch,
3974
					this.options.camelCaseMatch,
3858
					IJavaSearchConstants.TYPE,
3975
					IJavaSearchConstants.TYPE,
3859
					this);
3976
					this);
3860
			acceptTypes(null);
3977
			acceptTypes(false, null, null);
3861
		}
3978
		}
3862
	}
3979
	}
3863
	
3980
	
Lines 4295-4301 Link Here
4295
		boolean staticFieldsAndMethodOnly,
4412
		boolean staticFieldsAndMethodOnly,
4296
		boolean fromStaticImport,
4413
		boolean fromStaticImport,
4297
		boolean checkQualification,
4414
		boolean checkQualification,
4298
		Scope scope) {
4415
		boolean proposeConstrutor,
4416
		Scope scope,
4417
		InvocationSite invocationSite) {
4299
4418
4300
		// Inherited member types which are hidden by subclasses are filtered out
4419
		// Inherited member types which are hidden by subclasses are filtered out
4301
		// No visibility checks can be performed without the scope & invocationSite
4420
		// No visibility checks can be performed without the scope & invocationSite
Lines 4412-4417 Link Here
4412
				
4531
				
4413
			this.noProposal = false;
4532
			this.noProposal = false;
4414
			createTypeProposal(memberType, memberType.qualifiedSourceName(), IAccessRule.K_ACCESSIBLE, completionName, relevance);
4533
			createTypeProposal(memberType, memberType.qualifiedSourceName(), IAccessRule.K_ACCESSIBLE, completionName, relevance);
4534
			if (proposeConstrutor && CharOperation.equals(typeName, memberType.sourceName)) {
4535
				findConstructors(
4536
					memberType,
4537
					null,
4538
					scope,
4539
					invocationSite,
4540
					false,
4541
					true,
4542
					isQualified);
4543
			}
4415
		}
4544
		}
4416
	}
4545
	}
4417
4546
Lines 4433-4438 Link Here
4433
				false,
4562
				false,
4434
				false,
4563
				false,
4435
				false,
4564
				false,
4565
				false,
4566
				null,
4436
				null,
4567
				null,
4437
				typesFound);
4568
				typesFound);
4438
	}
4569
	}
Lines 4446-4451 Link Here
4446
		boolean fromStaticImport,
4577
		boolean fromStaticImport,
4447
		boolean checkQualification,
4578
		boolean checkQualification,
4448
		boolean proposeAllMemberTypes,
4579
		boolean proposeAllMemberTypes,
4580
		boolean proposeConstrutor,
4581
		InvocationSite invocationSite,
4449
		SourceTypeBinding typeToIgnore,
4582
		SourceTypeBinding typeToIgnore,
4450
		ObjectVector typesFound) {
4583
		ObjectVector typesFound) {
4451
4584
Lines 4470-4476 Link Here
4470
				staticFieldsAndMethodOnly,
4603
				staticFieldsAndMethodOnly,
4471
				fromStaticImport,
4604
				fromStaticImport,
4472
				checkQualification,
4605
				checkQualification,
4473
				scope);
4606
				proposeConstrutor,
4607
				scope,
4608
				invocationSite);
4474
			return;
4609
			return;
4475
		}
4610
		}
4476
4611
Lines 4506-4512 Link Here
4506
				staticFieldsAndMethodOnly,
4641
				staticFieldsAndMethodOnly,
4507
				fromStaticImport,
4642
				fromStaticImport,
4508
				checkQualification,
4643
				checkQualification,
4509
				scope);
4644
				proposeConstrutor,
4645
				scope,
4646
				invocationSite);
4510
			
4647
			
4511
			currentType = currentType.superclass();
4648
			currentType = currentType.superclass();
4512
		} while (currentType != null);
4649
		} while (currentType != null);
Lines 4541-4547 Link Here
4541
					staticFieldsAndMethodOnly,
4678
					staticFieldsAndMethodOnly,
4542
					fromStaticImport,
4679
					fromStaticImport,
4543
					checkQualification,
4680
					checkQualification,
4544
					scope);
4681
					proposeConstrutor,
4682
					scope,
4683
					invocationSite);
4545
						
4684
						
4546
				ReferenceBinding[] itsInterfaces = anInterface.superInterfaces();
4685
				ReferenceBinding[] itsInterfaces = anInterface.superInterfaces();
4547
				if (itsInterfaces != Binding.NO_SUPERINTERFACES) {
4686
				if (itsInterfaces != Binding.NO_SUPERINTERFACES) {
Lines 4624-4630 Link Here
4624
				staticFieldsAndMethodOnly,
4763
				staticFieldsAndMethodOnly,
4625
				fromStaticImport,
4764
				fromStaticImport,
4626
				true,
4765
				true,
4627
				scope);
4766
				false,
4767
				scope,
4768
				null);
4628
		
4769
		
4629
		ReferenceBinding[] memberTypes = receiverType.memberTypes();
4770
		ReferenceBinding[] memberTypes = receiverType.memberTypes();
4630
		next : for (int i = 0; i < memberTypes.length; i++) {
4771
		next : for (int i = 0; i < memberTypes.length; i++) {
Lines 6290-6295 Link Here
6290
		SourceTypeBinding currentType,
6431
		SourceTypeBinding currentType,
6291
		Scope scope,
6432
		Scope scope,
6292
		boolean proposeAllMemberTypes,
6433
		boolean proposeAllMemberTypes,
6434
		boolean proposeConstrutor,
6435
		InvocationSite invocationSite,
6293
		ObjectVector typesFound) {
6436
		ObjectVector typesFound) {
6294
		if (typeName == null)
6437
		if (typeName == null)
6295
			return;
6438
			return;
Lines 6351-6356 Link Here
6351
								if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
6494
								if(!this.requestor.isIgnored(CompletionProposal.TYPE_REF)) {
6352
									createTypeProposal(localType, localType.sourceName, IAccessRule.K_ACCESSIBLE, localType.sourceName, relevance);
6495
									createTypeProposal(localType, localType.sourceName, IAccessRule.K_ACCESSIBLE, localType.sourceName, relevance);
6353
								}
6496
								}
6497
								
6498
								if (proposeConstrutor && CharOperation.equals(typeName, localType.sourceName)) {
6499
									findConstructors(
6500
										localType,
6501
										null,
6502
										scope,
6503
										invocationSite,
6504
										false,
6505
										true,
6506
										false);
6507
								}
6354
							}
6508
							}
6355
						}
6509
						}
6356
					}
6510
					}
Lines 6358-6364 Link Here
6358
6512
6359
				case Scope.CLASS_SCOPE :
6513
				case Scope.CLASS_SCOPE :
6360
					SourceTypeBinding enclosingSourceType = scope.enclosingSourceType();
6514
					SourceTypeBinding enclosingSourceType = scope.enclosingSourceType();
6361
					findMemberTypes(typeName, enclosingSourceType, scope, currentType, false, false, false, false, proposeAllMemberTypes, nextTypeToIgnore, typesFound);
6515
					findMemberTypes(
6516
							typeName,
6517
							enclosingSourceType,
6518
							scope,
6519
							currentType,
6520
							false,
6521
							false,
6522
							false,
6523
							false,
6524
							proposeAllMemberTypes,
6525
							proposeConstrutor,
6526
							invocationSite, 
6527
							nextTypeToIgnore,
6528
							typesFound);
6362
					nextTypeToIgnore = enclosingSourceType;
6529
					nextTypeToIgnore = enclosingSourceType;
6363
					if (typeLength == 0)
6530
					if (typeLength == 0)
6364
						return; // do not search outside the class scope if no prefix was provided
6531
						return; // do not search outside the class scope if no prefix was provided
Lines 6477-6483 Link Here
6477
			scope = scope.parent;
6644
			scope = scope.parent;
6478
		}
6645
		}
6479
	}
6646
	}
6480
	private void findTypesAndPackages(char[] token, Scope scope, ObjectVector typesFound) {
6647
	private void findTypesAndPackages(char[] token, Scope scope, InvocationSite invocationSite, ObjectVector typesFound) {
6481
6648
6482
		if (token == null)
6649
		if (token == null)
6483
			return;
6650
			return;
Lines 6497-6504 Link Here
6497
		
6664
		
6498
		boolean proposeAllMemberTypes = !this.assistNodeIsConstructor;
6665
		boolean proposeAllMemberTypes = !this.assistNodeIsConstructor;
6499
		
6666
		
6500
		if (!skip && proposeType && scope.enclosingSourceType() != null) {
6667
		boolean proposeConstructor =//false;
6501
			findNestedTypes(token, scope.enclosingSourceType(), scope, proposeAllMemberTypes, typesFound);
6668
			assistNodeIsConstructor &&
6669
			!this.requestor.isIgnored(CompletionProposal.METHOD_REF);
6670
		
6671
		if (!skip && (proposeType || proposeConstructor) && scope.enclosingSourceType() != null) {
6672
			findNestedTypes(
6673
					token,
6674
					scope.enclosingSourceType(),
6675
					scope,
6676
					proposeAllMemberTypes,
6677
					proposeConstructor,
6678
					invocationSite,
6679
					typesFound);
6502
			if(!assistNodeIsConstructor && !assistNodeIsAnnotation) {
6680
			if(!assistNodeIsConstructor && !assistNodeIsAnnotation) {
6503
				// don't propose type parameters if the completion is a constructor ('new |')
6681
				// don't propose type parameters if the completion is a constructor ('new |')
6504
				findTypeParameters(token, scope);
6682
				findTypeParameters(token, scope);
Lines 6507-6513 Link Here
6507
		
6685
		
6508
		boolean isEmptyPrefix = token.length == 0;
6686
		boolean isEmptyPrefix = token.length == 0;
6509
6687
6510
		if (!skip && proposeType && this.unitScope != null) {
6688
		if (!skip && (proposeType || proposeConstructor) && this.unitScope != null) {
6511
			ReferenceBinding outerInvocationType = scope.enclosingSourceType();
6689
			ReferenceBinding outerInvocationType = scope.enclosingSourceType();
6512
			if(outerInvocationType != null) {
6690
			if(outerInvocationType != null) {
6513
				ReferenceBinding temp = outerInvocationType.enclosingType();
6691
				ReferenceBinding temp = outerInvocationType.enclosingType();
Lines 6588-6597 Link Here
6588
					relevance += computeRelevanceForException(sourceType.sourceName);
6766
					relevance += computeRelevanceForException(sourceType.sourceName);
6589
				}
6767
				}
6590
				this.noProposal = false;
6768
				this.noProposal = false;
6591
				if(proposeType) {
6769
				if (proposeType) {
6592
					char[] typeName = sourceType.sourceName();
6770
					char[] typeName = sourceType.sourceName();
6593
					createTypeProposal(sourceType, typeName, IAccessRule.K_ACCESSIBLE, typeName, relevance);
6771
					createTypeProposal(sourceType, typeName, IAccessRule.K_ACCESSIBLE, typeName, relevance);
6594
				}
6772
				}
6773
				
6774
				if (proposeConstructor && CharOperation.equals(token, sourceType.sourceName)) {
6775
					findConstructors(
6776
						sourceType,
6777
						null,
6778
						scope,
6779
						invocationSite,
6780
						false,
6781
						true,
6782
						false);
6783
				}
6595
			}
6784
			}
6596
		}
6785
		}
6597
		
6786
		
Lines 6713-6719 Link Here
6713
					findKeywords(token, BASE_TYPE_NAMES, false, false);
6902
					findKeywords(token, BASE_TYPE_NAMES, false, false);
6714
				}
6903
				}
6715
			}
6904
			}
6716
			if(proposeType) {
6905
			if(proposeType || proposeConstructor) {
6717
				int l = typesFound.size();
6906
				int l = typesFound.size();
6718
				for (int i = 0; i < l; i++) {
6907
				for (int i = 0; i < l; i++) {
6719
					ReferenceBinding typeFound = (ReferenceBinding) typesFound.elementAt(i);
6908
					ReferenceBinding typeFound = (ReferenceBinding) typesFound.elementAt(i);
Lines 6734-6746 Link Here
6734
				} else if(this.assistNodeIsAnnotation) {
6923
				} else if(this.assistNodeIsAnnotation) {
6735
					searchFor = IJavaSearchConstants.ANNOTATION_TYPE;
6924
					searchFor = IJavaSearchConstants.ANNOTATION_TYPE;
6736
				}
6925
				}
6737
				this.nameEnvironment.findTypes(
6926
				if (proposeType) {
6738
						token,
6927
					this.nameEnvironment.findTypes(
6739
						proposeAllMemberTypes,
6928
							token,
6740
						this.options.camelCaseMatch,
6929
							proposeAllMemberTypes,
6741
						searchFor,
6930
							this.options.camelCaseMatch,
6742
						this);
6931
							searchFor,
6743
				acceptTypes(scope);
6932
							this);
6933
				} else {
6934
					this.nameEnvironment.findExactTypes(
6935
							token,
6936
							proposeAllMemberTypes,
6937
							searchFor,
6938
							this);
6939
				}
6940
				acceptTypes(proposeConstructor, invocationSite, scope);
6744
			}
6941
			}
6745
			if(!isEmptyPrefix && !this.requestor.isIgnored(CompletionProposal.PACKAGE_REF)) {
6942
			if(!isEmptyPrefix && !this.requestor.isIgnored(CompletionProposal.PACKAGE_REF)) {
6746
				this.nameEnvironment.findPackages(token, this);
6943
				this.nameEnvironment.findPackages(token, this);
Lines 6859-6865 Link Here
6859
					this.options.camelCaseMatch,
7056
					this.options.camelCaseMatch,
6860
					searchFor,
7057
					searchFor,
6861
					this);
7058
					this);
6862
			acceptTypes(scope);
7059
			acceptTypes(false, null, null);
6863
		}
7060
		}
6864
		if(!this.requestor.isIgnored(CompletionProposal.PACKAGE_REF)) {
7061
		if(!this.requestor.isIgnored(CompletionProposal.PACKAGE_REF)) {
6865
			this.nameEnvironment.findPackages(qualifiedName, this);
7062
			this.nameEnvironment.findPackages(qualifiedName, this);
Lines 6885-6890 Link Here
6885
									true,
7082
									true,
6886
									true,
7083
									true,
6887
									proposeAllMemberTypes,
7084
									proposeAllMemberTypes,
7085
									false,
7086
									null,
6888
									null,
7087
									null,
6889
									typesFound);
7088
									typesFound);
6890
						}
7089
						}
Lines 8357-8363 Link Here
8357
		
8556
		
8358
		return completion.toString().toCharArray();
8557
		return completion.toString().toCharArray();
8359
	}
8558
	}
8360
	
8559
	private void proposeExactConstructor(
8560
			ReferenceBinding currentType,
8561
			char[] signature,
8562
			char[] originalSignature,
8563
			int modifiers,
8564
			char[][] parameterPackageNames,
8565
			char[][] parameterTypeNames,
8566
			char[][] parameterNames,
8567
			boolean isQualified) {
8568
		
8569
		char[] simpleTypename = currentType.sourceName;
8570
		
8571
		char[] completion;
8572
		if (this.source != null
8573
			&& this.source.length > this.endPosition
8574
			&& this.source[this.endPosition] == '(') {
8575
			completion = simpleTypename;
8576
		} else {
8577
			completion = CharOperation.concat(simpleTypename, new char[] { '(', ')' });
8578
		}
8579
		
8580
		int relevance = computeBaseRelevance();
8581
		relevance += computeRelevanceForResolution();
8582
		relevance += computeRelevanceForInterestingProposal();
8583
		relevance += computeRelevanceForCaseMatching(simpleTypename, simpleTypename);
8584
		relevance += computeRelevanceForExpectingType(currentType);
8585
		relevance += computeRelevanceForQualification(isQualified);
8586
		relevance += computeRelevanceForRestrictions(IAccessRule.K_ACCESSIBLE); // no access restriction for type in the current unit
8587
		relevance += R_CONSTRUCTOR;
8588
		
8589
		// Create standard proposal
8590
		this.noProposal = false;
8591
		if(!this.requestor.isIgnored(CompletionProposal.METHOD_REF) && (this.assistNodeInJavadoc & CompletionOnJavadoc.ONLY_INLINE_TAG) == 0) {
8592
			CompletionProposal proposal = this.createProposal(CompletionProposal.METHOD_REF, this.actualCompletionPosition);
8593
			proposal.setDeclarationSignature(getSignature(currentType));
8594
			proposal.setSignature(signature);
8595
			if(originalSignature != null) {
8596
				proposal.setOriginalSignature(originalSignature);
8597
			}
8598
			proposal.setDeclarationPackageName(currentType.qualifiedPackageName());
8599
			proposal.setDeclarationTypeName(currentType.qualifiedSourceName());
8600
			proposal.setParameterPackageNames(parameterPackageNames);
8601
			proposal.setParameterTypeNames(parameterTypeNames);
8602
			proposal.setName(currentType.sourceName());
8603
			proposal.setIsContructor(true);
8604
			proposal.setCompletion(completion);
8605
			proposal.setFlags(modifiers);
8606
			proposal.setReplaceRange(this.startPosition - this.offset, this.endPosition - this.offset);
8607
			proposal.setRelevance(relevance);
8608
			if(parameterNames != null) proposal.setParameterNames(parameterNames);
8609
			if (isQualified) {
8610
				char[] typeName = CharOperation.concatWith(currentType.compoundName, '.');
8611
				
8612
				CompilationUnitDeclaration cu = this.unitScope.referenceContext;
8613
				int importStart = cu.types[0].declarationSourceStart;
8614
				int importEnd = importStart;
8615
8616
				char[] typeImportCompletion = createImportCharArray(typeName, false, false);
8617
				
8618
				CompletionProposal typeImportProposal = this.createProposal(CompletionProposal.TYPE_IMPORT, this.actualCompletionPosition);
8619
				typeImportProposal.nameLookup = this.nameEnvironment.nameLookup;
8620
				typeImportProposal.completionEngine = this;
8621
				char[] packageName = currentType.qualifiedPackageName();
8622
				typeImportProposal.setDeclarationSignature(packageName);
8623
				typeImportProposal.setSignature(getSignature(currentType));
8624
				typeImportProposal.setPackageName(packageName);
8625
				typeImportProposal.setTypeName(currentType.qualifiedSourceName());
8626
				typeImportProposal.setCompletion(typeImportCompletion);
8627
				typeImportProposal.setFlags(currentType.modifiers);
8628
				typeImportProposal.setAdditionalFlags(CompletionFlags.Default);
8629
				typeImportProposal.setReplaceRange(importStart - this.offset, importEnd - this.offset);
8630
				typeImportProposal.setRelevance(relevance);
8631
				
8632
				proposal.setRequiredProposals(new CompletionProposal[]{typeImportProposal});
8633
			}
8634
			
8635
			this.requestor.accept(proposal);
8636
			if(DEBUG) {
8637
				this.printDebug(proposal);
8638
			}
8639
		}
8640
					
8641
	}
8361
	private void proposeNewMethod(char[] token, ReferenceBinding reference) {
8642
	private void proposeNewMethod(char[] token, ReferenceBinding reference) {
8362
		if(!this.requestor.isIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION)) {
8643
		if(!this.requestor.isIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION)) {
8363
			int relevance = computeBaseRelevance();
8644
			int relevance = computeBaseRelevance();
(-)src/org/eclipse/jdt/core/tests/model/CompletionWithMissingTypesTests2.java (-2 / +2 lines)
Lines 134-140 Link Here
134
		waitUntilIndexesReady();
134
		waitUntilIndexesReady();
135
		
135
		
136
		// do completion
136
		// do completion
137
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
137
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
138
		requestor.allowAllRequiredProposals();
138
		requestor.allowAllRequiredProposals();
139
		ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
139
		ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
140
		
140
		
Lines 228-234 Link Here
228
		waitUntilIndexesReady();
228
		waitUntilIndexesReady();
229
		
229
		
230
		// do completion
230
		// do completion
231
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
231
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
232
		requestor.allowAllRequiredProposals();
232
		requestor.allowAllRequiredProposals();
233
		ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
233
		ICompilationUnit cu= getCompilationUnit("P2", "src", "", "YY.java");
234
		
234
		
(-)src/org/eclipse/jdt/core/tests/model/CompletionWithMissingTypesTests.java (-33 / +33 lines)
Lines 59-65 Link Here
59
		"  public void bar() {}\n" + 
59
		"  public void bar() {}\n" + 
60
		"}\n");
60
		"}\n");
61
61
62
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
62
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
63
	requestor.allowAllRequiredProposals();
63
	requestor.allowAllRequiredProposals();
64
	String str = this.workingCopies[0].getSource();
64
	String str = this.workingCopies[0].getSource();
65
	String completeBehind = "m.b";
65
	String completeBehind = "m.b";
Lines 96-102 Link Here
96
		"  public int bar;\n" + 
96
		"  public int bar;\n" + 
97
		"}\n");
97
		"}\n");
98
98
99
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
99
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
100
	requestor.allowAllRequiredProposals();
100
	requestor.allowAllRequiredProposals();
101
	String str = this.workingCopies[0].getSource();
101
	String str = this.workingCopies[0].getSource();
102
	String completeBehind = "m.b";
102
	String completeBehind = "m.b";
Lines 139-145 Link Here
139
		"  public int bar;\n" + 
139
		"  public int bar;\n" + 
140
		"}\n");
140
		"}\n");
141
141
142
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
142
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
143
	requestor.allowAllRequiredProposals();
143
	requestor.allowAllRequiredProposals();
144
	String str = this.workingCopies[0].getSource();
144
	String str = this.workingCopies[0].getSource();
145
	String completeBehind = "m.b";
145
	String completeBehind = "m.b";
Lines 176-182 Link Here
176
		"  public void bar() {};\n" + 
176
		"  public void bar() {};\n" + 
177
		"}\n");
177
		"}\n");
178
178
179
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
179
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
180
	requestor.allowAllRequiredProposals();
180
	requestor.allowAllRequiredProposals();
181
	String str = this.workingCopies[0].getSource();
181
	String str = this.workingCopies[0].getSource();
182
	String completeBehind = "m.";
182
	String completeBehind = "m.";
Lines 236-242 Link Here
236
		"  public void bar() {}\n" + 
236
		"  public void bar() {}\n" + 
237
		"}\n");
237
		"}\n");
238
238
239
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
239
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
240
	requestor.allowAllRequiredProposals();
240
	requestor.allowAllRequiredProposals();
241
	String str = this.workingCopies[0].getSource();
241
	String str = this.workingCopies[0].getSource();
242
	String completeBehind = "m.b";
242
	String completeBehind = "m.b";
Lines 275-281 Link Here
275
		"  public void bar() {}\n" + 
275
		"  public void bar() {}\n" + 
276
		"}\n");
276
		"}\n");
277
277
278
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
278
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
279
	requestor.allowAllRequiredProposals();
279
	requestor.allowAllRequiredProposals();
280
	String str = this.workingCopies[0].getSource();
280
	String str = this.workingCopies[0].getSource();
281
	String completeBehind = "m.b";
281
	String completeBehind = "m.b";
Lines 321-327 Link Here
321
		"  public Object m;\n" + 
321
		"  public Object m;\n" + 
322
		"}\n");
322
		"}\n");
323
323
324
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
324
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
325
	requestor.allowAllRequiredProposals();
325
	requestor.allowAllRequiredProposals();
326
	String str = this.workingCopies[0].getSource();
326
	String str = this.workingCopies[0].getSource();
327
	String completeBehind = "m.e";
327
	String completeBehind = "m.e";
Lines 364-370 Link Here
364
		"  public Object m;\n" + 
364
		"  public Object m;\n" + 
365
		"}\n");
365
		"}\n");
366
366
367
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
367
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
368
	requestor.allowAllRequiredProposals();
368
	requestor.allowAllRequiredProposals();
369
	String str = this.workingCopies[0].getSource();
369
	String str = this.workingCopies[0].getSource();
370
	String completeBehind = "m.b";
370
	String completeBehind = "m.b";
Lines 402-408 Link Here
402
		"  public void bar() {}\n" + 
402
		"  public void bar() {}\n" + 
403
		"}\n");
403
		"}\n");
404
404
405
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
405
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
406
	requestor.allowAllRequiredProposals();
406
	requestor.allowAllRequiredProposals();
407
	String str = this.workingCopies[0].getSource();
407
	String str = this.workingCopies[0].getSource();
408
	String completeBehind = "m.b";
408
	String completeBehind = "m.b";
Lines 443-449 Link Here
443
		"  }\n" + 
443
		"  }\n" + 
444
		"}\n");
444
		"}\n");
445
445
446
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
446
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
447
	requestor.allowAllRequiredProposals();
447
	requestor.allowAllRequiredProposals();
448
	String str = this.workingCopies[0].getSource();
448
	String str = this.workingCopies[0].getSource();
449
	String completeBehind = "m.b";
449
	String completeBehind = "m.b";
Lines 480-486 Link Here
480
		"  public void bar() {}\n" + 
480
		"  public void bar() {}\n" + 
481
		"}\n");
481
		"}\n");
482
482
483
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
483
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
484
	requestor.allowAllRequiredProposals();
484
	requestor.allowAllRequiredProposals();
485
	String str = this.workingCopies[0].getSource();
485
	String str = this.workingCopies[0].getSource();
486
	String completeBehind = "m().b";
486
	String completeBehind = "m().b";
Lines 517-523 Link Here
517
		"  public void bar() {}\n" + 
517
		"  public void bar() {}\n" + 
518
		"}\n");
518
		"}\n");
519
519
520
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
520
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
521
	requestor.allowAllRequiredProposals();
521
	requestor.allowAllRequiredProposals();
522
	String str = this.workingCopies[0].getSource();
522
	String str = this.workingCopies[0].getSource();
523
	String completeBehind = ".b";
523
	String completeBehind = ".b";
Lines 563-569 Link Here
563
		"  public Object m() {return null;}\n" + 
563
		"  public Object m() {return null;}\n" + 
564
		"}\n");
564
		"}\n");
565
565
566
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
566
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
567
	requestor.allowAllRequiredProposals();
567
	requestor.allowAllRequiredProposals();
568
	String str = this.workingCopies[0].getSource();
568
	String str = this.workingCopies[0].getSource();
569
	String completeBehind = "m().e";
569
	String completeBehind = "m().e";
Lines 606-612 Link Here
606
		"  public Object m() {return null;}\n" + 
606
		"  public Object m() {return null;}\n" + 
607
		"}\n");
607
		"}\n");
608
608
609
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
609
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
610
	requestor.allowAllRequiredProposals();
610
	requestor.allowAllRequiredProposals();
611
	String str = this.workingCopies[0].getSource();
611
	String str = this.workingCopies[0].getSource();
612
	String completeBehind = "m().b";
612
	String completeBehind = "m().b";
Lines 646-652 Link Here
646
		"  public Object m(int i) {return null;}\n" + 
646
		"  public Object m(int i) {return null;}\n" + 
647
		"}\n");
647
		"}\n");
648
648
649
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
649
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
650
	requestor.allowAllRequiredProposals();
650
	requestor.allowAllRequiredProposals();
651
	String str = this.workingCopies[0].getSource();
651
	String str = this.workingCopies[0].getSource();
652
	String completeBehind = "m().b";
652
	String completeBehind = "m().b";
Lines 685-691 Link Here
685
		"  }\n" + 
685
		"  }\n" + 
686
		"}\n");
686
		"}\n");
687
687
688
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
688
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
689
	requestor.allowAllRequiredProposals();
689
	requestor.allowAllRequiredProposals();
690
	String str = this.workingCopies[0].getSource();
690
	String str = this.workingCopies[0].getSource();
691
	String completeBehind = "m.b";
691
	String completeBehind = "m.b";
Lines 724-730 Link Here
724
		"  }\n" + 
724
		"  }\n" + 
725
		"}\n");
725
		"}\n");
726
726
727
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
727
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
728
	requestor.allowAllRequiredProposals();
728
	requestor.allowAllRequiredProposals();
729
	String str = this.workingCopies[0].getSource();
729
	String str = this.workingCopies[0].getSource();
730
	String completeBehind = "m.b";
730
	String completeBehind = "m.b";
Lines 757-763 Link Here
757
		"  }\n" + 
757
		"  }\n" + 
758
		"}\n");
758
		"}\n");
759
759
760
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
760
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
761
	requestor.allowAllRequiredProposals();
761
	requestor.allowAllRequiredProposals();
762
	String str = this.workingCopies[0].getSource();
762
	String str = this.workingCopies[0].getSource();
763
	String completeBehind = "m.b";
763
	String completeBehind = "m.b";
Lines 790-796 Link Here
790
		"  }\n" + 
790
		"  }\n" + 
791
		"}\n");
791
		"}\n");
792
792
793
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
793
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
794
	requestor.allowAllRequiredProposals();
794
	requestor.allowAllRequiredProposals();
795
	String str = this.workingCopies[0].getSource();
795
	String str = this.workingCopies[0].getSource();
796
	String completeBehind = "m.e";
796
	String completeBehind = "m.e";
Lines 837-843 Link Here
837
			"  }\n" + 
837
			"  }\n" + 
838
			"}\n");
838
			"}\n");
839
		
839
		
840
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
840
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
841
		requestor.allowAllRequiredProposals();
841
		requestor.allowAllRequiredProposals();
842
		String str = this.workingCopies[0].getSource();
842
		String str = this.workingCopies[0].getSource();
843
		String completeBehind = "m.b";
843
		String completeBehind = "m.b";
Lines 887-893 Link Here
887
			"  }\n" + 
887
			"  }\n" + 
888
			"}\n");
888
			"}\n");
889
		
889
		
890
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
890
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
891
		requestor.allowAllRequiredProposals();
891
		requestor.allowAllRequiredProposals();
892
		String str = this.workingCopies[0].getSource();
892
		String str = this.workingCopies[0].getSource();
893
		String completeBehind = "m.b";
893
		String completeBehind = "m.b";
Lines 933-939 Link Here
933
			"  }\n" + 
933
			"  }\n" + 
934
			"}\n");
934
			"}\n");
935
		
935
		
936
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
936
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
937
		requestor.allowAllRequiredProposals();
937
		requestor.allowAllRequiredProposals();
938
		String str = this.workingCopies[0].getSource();
938
		String str = this.workingCopies[0].getSource();
939
		String completeBehind = "m.b";
939
		String completeBehind = "m.b";
Lines 985-991 Link Here
985
			"  }\n" + 
985
			"  }\n" + 
986
			"}\n");
986
			"}\n");
987
		
987
		
988
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
988
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
989
		requestor.allowAllRequiredProposals();
989
		requestor.allowAllRequiredProposals();
990
		String str = this.workingCopies[0].getSource();
990
		String str = this.workingCopies[0].getSource();
991
		String completeBehind = "m.b";
991
		String completeBehind = "m.b";
Lines 1028-1034 Link Here
1028
			"  }\n" + 
1028
			"  }\n" + 
1029
			"}\n");
1029
			"}\n");
1030
		
1030
		
1031
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1031
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1032
		requestor.allowAllRequiredProposals();
1032
		requestor.allowAllRequiredProposals();
1033
		String str = this.workingCopies[0].getSource();
1033
		String str = this.workingCopies[0].getSource();
1034
		String completeBehind = "m.b";
1034
		String completeBehind = "m.b";
Lines 1077-1083 Link Here
1077
			"  }\n" + 
1077
			"  }\n" + 
1078
			"}\n");
1078
			"}\n");
1079
		
1079
		
1080
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1080
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1081
		requestor.allowAllRequiredProposals();
1081
		requestor.allowAllRequiredProposals();
1082
		String str = this.workingCopies[0].getSource();
1082
		String str = this.workingCopies[0].getSource();
1083
		String completeBehind = "m.b";
1083
		String completeBehind = "m.b";
Lines 1122-1128 Link Here
1122
			"  }\n" + 
1122
			"  }\n" + 
1123
			"}\n");
1123
			"}\n");
1124
		
1124
		
1125
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1125
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1126
		requestor.allowAllRequiredProposals();
1126
		requestor.allowAllRequiredProposals();
1127
		String str = this.workingCopies[0].getSource();
1127
		String str = this.workingCopies[0].getSource();
1128
		String completeBehind = "m.b";
1128
		String completeBehind = "m.b";
Lines 1173-1179 Link Here
1173
			"  }\n" + 
1173
			"  }\n" + 
1174
			"}\n");
1174
			"}\n");
1175
		
1175
		
1176
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1176
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1177
		requestor.allowAllRequiredProposals();
1177
		requestor.allowAllRequiredProposals();
1178
		String str = this.workingCopies[0].getSource();
1178
		String str = this.workingCopies[0].getSource();
1179
		String completeBehind = "m.b";
1179
		String completeBehind = "m.b";
Lines 1215-1221 Link Here
1215
		"  public void bar() {}\n" + 
1215
		"  public void bar() {}\n" + 
1216
		"}\n");
1216
		"}\n");
1217
1217
1218
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1218
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1219
	requestor.allowAllRequiredProposals();
1219
	requestor.allowAllRequiredProposals();
1220
	String str = this.workingCopies[0].getSource();
1220
	String str = this.workingCopies[0].getSource();
1221
	String completeBehind = "m.field.b";
1221
	String completeBehind = "m.field.b";
Lines 1254-1260 Link Here
1254
		"  public void bar() {}\n" + 
1254
		"  public void bar() {}\n" + 
1255
		"}\n");
1255
		"}\n");
1256
1256
1257
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1257
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1258
	requestor.allowAllRequiredProposals();
1258
	requestor.allowAllRequiredProposals();
1259
	String str = this.workingCopies[0].getSource();
1259
	String str = this.workingCopies[0].getSource();
1260
	String completeBehind = "m.field.b";
1260
	String completeBehind = "m.field.b";
Lines 1293-1299 Link Here
1293
		"  public void bar() {}\n" + 
1293
		"  public void bar() {}\n" + 
1294
		"}\n");
1294
		"}\n");
1295
1295
1296
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1296
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1297
	requestor.allowAllRequiredProposals();
1297
	requestor.allowAllRequiredProposals();
1298
	String str = this.workingCopies[0].getSource();
1298
	String str = this.workingCopies[0].getSource();
1299
	String completeBehind = "m().field.b";
1299
	String completeBehind = "m().field.b";
Lines 1332-1338 Link Here
1332
		"  public void bar() {}\n" + 
1332
		"  public void bar() {}\n" + 
1333
		"}\n");
1333
		"}\n");
1334
1334
1335
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1335
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1336
	requestor.allowAllRequiredProposals();
1336
	requestor.allowAllRequiredProposals();
1337
	String str = this.workingCopies[0].getSource();
1337
	String str = this.workingCopies[0].getSource();
1338
	String completeBehind = "m.method().b";
1338
	String completeBehind = "m.method().b";
Lines 1371-1377 Link Here
1371
		"  public void bar() {}\n" + 
1371
		"  public void bar() {}\n" + 
1372
		"}\n");
1372
		"}\n");
1373
1373
1374
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1374
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1375
	requestor.allowAllRequiredProposals();
1375
	requestor.allowAllRequiredProposals();
1376
	String str = this.workingCopies[0].getSource();
1376
	String str = this.workingCopies[0].getSource();
1377
	String completeBehind = "m().method().b";
1377
	String completeBehind = "m().method().b";
Lines 1401-1407 Link Here
1401
		"  public void bar()\n" + 
1401
		"  public void bar()\n" + 
1402
		"}\n");
1402
		"}\n");
1403
1403
1404
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
1404
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
1405
	requestor.allowAllRequiredProposals();
1405
	requestor.allowAllRequiredProposals();
1406
	String str = this.workingCopies[0].getSource();
1406
	String str = this.workingCopies[0].getSource();
1407
	String completeBehind = "MissingType#b";
1407
	String completeBehind = "MissingType#b";
(-)src/org/eclipse/jdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java (-12 / +12 lines)
Lines 57-63 Link Here
57
		"  public void bar() {};\n" + 
57
		"  public void bar() {};\n" + 
58
		"}\n");
58
		"}\n");
59
59
60
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
60
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
61
	requestor.allowAllRequiredProposals();
61
	requestor.allowAllRequiredProposals();
62
	String str = this.workingCopies[0].getSource();
62
	String str = this.workingCopies[0].getSource();
63
	String completeBehind = "m.b";
63
	String completeBehind = "m.b";
Lines 101-107 Link Here
101
		"public class MissingType2 {\n" + 
101
		"public class MissingType2 {\n" + 
102
		"}\n");
102
		"}\n");
103
103
104
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
104
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
105
	requestor.allowAllRequiredProposals();
105
	requestor.allowAllRequiredProposals();
106
	String str = this.workingCopies[0].getSource();
106
	String str = this.workingCopies[0].getSource();
107
	String completeBehind = "m.b";
107
	String completeBehind = "m.b";
Lines 152-158 Link Here
152
		"public class MissingType2 {\n" + 
152
		"public class MissingType2 {\n" + 
153
		"}\n");
153
		"}\n");
154
154
155
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
155
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
156
	requestor.allowAllRequiredProposals();
156
	requestor.allowAllRequiredProposals();
157
	String str = this.workingCopies[0].getSource();
157
	String str = this.workingCopies[0].getSource();
158
	String completeBehind = "m.b";
158
	String completeBehind = "m.b";
Lines 199-205 Link Here
199
		"public class MissingType2 {\n" + 
199
		"public class MissingType2 {\n" + 
200
		"}\n");
200
		"}\n");
201
201
202
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
202
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
203
	requestor.allowAllRequiredProposals();
203
	requestor.allowAllRequiredProposals();
204
	String str = this.workingCopies[0].getSource();
204
	String str = this.workingCopies[0].getSource();
205
	String completeBehind = "m.b";
205
	String completeBehind = "m.b";
Lines 262-268 Link Here
262
		"public class MissingType2 {\n" + 
262
		"public class MissingType2 {\n" + 
263
		"}\n");
263
		"}\n");
264
264
265
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
265
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
266
	requestor.allowAllRequiredProposals();
266
	requestor.allowAllRequiredProposals();
267
	String str = this.workingCopies[0].getSource();
267
	String str = this.workingCopies[0].getSource();
268
	String completeBehind = "m.b";
268
	String completeBehind = "m.b";
Lines 317-323 Link Here
317
		"  public void bar() {}\n" + 
317
		"  public void bar() {}\n" + 
318
		"}\n");
318
		"}\n");
319
319
320
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
320
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
321
	requestor.allowAllRequiredProposals();
321
	requestor.allowAllRequiredProposals();
322
	String str = this.workingCopies[0].getSource();
322
	String str = this.workingCopies[0].getSource();
323
	String completeBehind = ".b";
323
	String completeBehind = ".b";
Lines 360-366 Link Here
360
		"public class MissingType {\n" + 
360
		"public class MissingType {\n" + 
361
		"}\n");
361
		"}\n");
362
	
362
	
363
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
363
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
364
	requestor.allowAllRequiredProposals();
364
	requestor.allowAllRequiredProposals();
365
	String str = this.workingCopies[0].getSource();
365
	String str = this.workingCopies[0].getSource();
366
	String completeBehind = "m.b";
366
	String completeBehind = "m.b";
Lines 399-405 Link Here
399
		"  }\n" + 
399
		"  }\n" + 
400
		"}\n");
400
		"}\n");
401
401
402
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
402
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
403
	requestor.allowAllRequiredProposals();
403
	requestor.allowAllRequiredProposals();
404
	String str = this.workingCopies[0].getSource();
404
	String str = this.workingCopies[0].getSource();
405
	String completeBehind = "m.b";
405
	String completeBehind = "m.b";
Lines 436-442 Link Here
436
		"  public void bar() {};\n" + 
436
		"  public void bar() {};\n" + 
437
		"}\n");
437
		"}\n");
438
438
439
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
439
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
440
	requestor.allowAllRequiredProposals();
440
	requestor.allowAllRequiredProposals();
441
	String str = this.workingCopies[0].getSource();
441
	String str = this.workingCopies[0].getSource();
442
	String completeBehind = "m.b";
442
	String completeBehind = "m.b";
Lines 469-475 Link Here
469
		"  }\n" + 
469
		"  }\n" + 
470
		"}\n");
470
		"}\n");
471
471
472
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
472
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
473
	requestor.allowAllRequiredProposals();
473
	requestor.allowAllRequiredProposals();
474
	String str = this.workingCopies[0].getSource();
474
	String str = this.workingCopies[0].getSource();
475
	String completeBehind = "m.b";
475
	String completeBehind = "m.b";
Lines 508-514 Link Here
508
		"  }\n" + 
508
		"  }\n" + 
509
		"}\n");
509
		"}\n");
510
510
511
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
511
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
512
	requestor.allowAllRequiredProposals();
512
	requestor.allowAllRequiredProposals();
513
	String str = this.workingCopies[0].getSource();
513
	String str = this.workingCopies[0].getSource();
514
	String completeBehind = "m.b";
514
	String completeBehind = "m.b";
Lines 546-552 Link Here
546
		"  public void bar() {};\n" + 
546
		"  public void bar() {};\n" + 
547
		"}\n");
547
		"}\n");
548
548
549
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
549
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
550
	requestor.allowAllRequiredProposals();
550
	requestor.allowAllRequiredProposals();
551
	String str = this.workingCopies[0].getSource();
551
	String str = this.workingCopies[0].getSource();
552
	String completeBehind = "m.b";
552
	String completeBehind = "m.b";
(-)src/org/eclipse/jdt/core/tests/model/CompletionTestsRequestor2.java (-16 / +10 lines)
Lines 32-38 Link Here
32
	private boolean showUniqueKeys;
32
	private boolean showUniqueKeys;
33
	private boolean showPositions;
33
	private boolean showPositions;
34
	private boolean shortContext;
34
	private boolean shortContext;
35
	private boolean showMissingTypes;
36
	
35
	
37
	public boolean fDebug = false;
36
	public boolean fDebug = false;
38
37
Lines 46-63 Link Here
46
		this(showParamNames, showUniqueKeys, false);
45
		this(showParamNames, showUniqueKeys, false);
47
	}
46
	}
48
	public CompletionTestsRequestor2(boolean showParamNames, boolean showUniqueKeys, boolean showPositions) {
47
	public CompletionTestsRequestor2(boolean showParamNames, boolean showUniqueKeys, boolean showPositions) {
49
		this(showParamNames, showUniqueKeys, showPositions, true, false);
48
		this(showParamNames, showUniqueKeys, showPositions, true);
50
	}
49
	}
51
	
50
	
52
	public CompletionTestsRequestor2(boolean showParamNames, boolean showUniqueKeys, boolean showPositions, boolean shortContext) {
51
	public CompletionTestsRequestor2(boolean showParamNames, boolean showUniqueKeys, boolean showPositions, boolean shortContext) {
53
		this(showParamNames, showUniqueKeys, showPositions, shortContext, false);
54
	}
55
	public CompletionTestsRequestor2(boolean showParamNames, boolean showUniqueKeys, boolean showPositions, boolean shortContext, boolean showMissingTypes) {
56
		this.showParameterNames = showParamNames;
52
		this.showParameterNames = showParamNames;
57
		this.showUniqueKeys = showUniqueKeys;
53
		this.showUniqueKeys = showUniqueKeys;
58
		this.showPositions = showPositions;
54
		this.showPositions = showPositions;
59
		this.shortContext = shortContext;
55
		this.shortContext = shortContext;
60
		this.showMissingTypes = showMissingTypes;
56
		this.allowAllRequiredProposals();
61
	}
57
	}
62
	public void acceptContext(CompletionContext cc) {
58
	public void acceptContext(CompletionContext cc) {
63
		this.context = cc;
59
		this.context = cc;
Lines 341-356 Link Here
341
		buffer.append(", ");
337
		buffer.append(", ");
342
		buffer.append(proposal.getRelevance());
338
		buffer.append(proposal.getRelevance());
343
		buffer.append('}');
339
		buffer.append('}');
344
		if(this.showMissingTypes) {
340
		CompletionProposal[] requiredProposals = proposal.getRequiredProposals();
345
			CompletionProposal[] requiredProposals = proposal.getRequiredProposals();
341
		if (requiredProposals != null) {
346
			if (requiredProposals != null) {
342
			int length = requiredProposals.length;
347
				int length = requiredProposals.length;
343
			System.arraycopy(requiredProposals, 0, requiredProposals = new CompletionProposal[length], 0, length);
348
				System.arraycopy(requiredProposals, 0, requiredProposals = new CompletionProposal[length], 0, length);
344
			quickSort(requiredProposals, 0, length - 1);
349
				quickSort(requiredProposals, 0, length - 1);
345
			for (int i = 0; i < length; i++) {
350
				for (int i = 0; i < length; i++) {
346
				buffer.append('\n');
351
					buffer.append('\n');
347
				printProposal(requiredProposals[i], tab + 1, buffer);
352
					printProposal(requiredProposals[i], tab + 1, buffer);
353
				}
354
			}
348
			}
355
		}
349
		}
356
		return buffer;
350
		return buffer;
(-)src/org/eclipse/jdt/core/tests/model/CompletionTests.java (-26 / +301 lines)
Lines 3251-3257 Link Here
3251
    		"ABC[TYPE_REF]{p1.ABC, p1, Lp1.ABC;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}\n" +
3251
    		"ABC[TYPE_REF]{p1.ABC, p1, Lp1.ABC;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}\n" +
3252
    		"ABC[TYPE_REF]{p2.ABC, p2, Lp2.ABC;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}\n" +
3252
    		"ABC[TYPE_REF]{p2.ABC, p2, Lp2.ABC;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}\n" +
3253
			"A3[TYPE_REF]{A3, , LA3;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED)+"}\n" +
3253
			"A3[TYPE_REF]{A3, , LA3;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED)+"}\n" +
3254
			"A[TYPE_REF]{A, , LA;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED)+"}",
3254
			"A[TYPE_REF]{A, , LA;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED)+"}\n" +
3255
			"A[METHOD_REF<CONSTRUCTOR>]{A(), LA;, ()V, A, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED)+"}",
3255
            requestor.getResults());
3256
            requestor.getResults());
3256
}
3257
}
3257
3258
Lines 3448-3454 Link Here
3448
			"Constructor5[METHOD_REF<CONSTRUCTOR>]{, Lzconstructors.Constructor5;, (I)V, Constructor5, (i), " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}",
3449
			"Constructor5[METHOD_REF<CONSTRUCTOR>]{, Lzconstructors.Constructor5;, (I)V, Constructor5, (i), " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_NON_RESTRICTED) + "}",
3449
			requestor.getResults());
3450
			requestor.getResults());
3450
}
3451
}
3452
public void testCompletionFindConstructor6() throws JavaModelException {
3453
	this.workingCopies = new ICompilationUnit[2];
3454
	this.workingCopies[0] = getWorkingCopy(
3455
		"/Completion/src/test/Test.java",
3456
		"package test;"+
3457
		"public class Test {\n" + 
3458
		"  void foo() {\n" + 
3459
 		"    new TestCons\n" + 
3460
		"  }\n" + 
3461
		"}\n");
3462
	
3463
	this.workingCopies[1] = getWorkingCopy(
3464
		"/Completion/src/test/TestConstructor.java",
3465
		"package test;"+
3466
		"public class TestConstructor {\n" + 
3467
		"  public TestConstructor(int a) {}\n" + 
3468
		"}\n");
3469
3470
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
3471
	String str = this.workingCopies[0].getSource();
3472
	String completeBehind = "TestCons";
3473
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3474
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3475
3476
	assertResults(
3477
			"TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
3478
			requestor.getResults());
3479
}
3480
public void testCompletionFindConstructor7() throws JavaModelException {
3481
	this.workingCopies = new ICompilationUnit[2];
3482
	this.workingCopies[0] = getWorkingCopy(
3483
		"/Completion/src/test/Test.java",
3484
		"package test;"+
3485
		"public class Test {\n" + 
3486
		"  void foo() {\n" + 
3487
 		"    new TestConstructor\n" + 
3488
		"  }\n" + 
3489
		"}\n");
3490
	
3491
	this.workingCopies[1] = getWorkingCopy(
3492
		"/Completion/src/test/TestConstructor.java",
3493
		"package test;"+
3494
		"public class TestConstructor {\n" + 
3495
		"  public TestConstructor(int a) {}\n" + 
3496
		"}\n");
3497
3498
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
3499
	String str = this.workingCopies[0].getSource();
3500
	String completeBehind = "TestConstructor";
3501
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3502
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3503
3504
	assertResults(
3505
			"TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
3506
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), Ltest.TestConstructor;, (I)V, TestConstructor, (a), " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
3507
			requestor.getResults());
3508
}
3509
public void testCompletionFindConstructor8() throws JavaModelException {
3510
	this.workingCopies = new ICompilationUnit[2];
3511
	this.workingCopies[0] = getWorkingCopy(
3512
		"/Completion/src/test/Test.java",
3513
		"package test;"+
3514
		"public class Test {\n" + 
3515
		"  void foo() {\n" + 
3516
 		"    new TestConstructor\n" + 
3517
		"  }\n" + 
3518
		"}\n");
3519
	
3520
	this.workingCopies[1] = getWorkingCopy(
3521
		"/Completion/src/test/TestConstructor.java",
3522
		"package test;"+
3523
		"public class TestConstructor {\n" + 
3524
		"}\n");
3525
3526
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
3527
	String str = this.workingCopies[0].getSource();
3528
	String completeBehind = "TestConstructor";
3529
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3530
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3531
3532
	assertResults(
3533
			"TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
3534
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), Ltest.TestConstructor;, ()V, TestConstructor, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
3535
			requestor.getResults());
3536
}
3537
public void testCompletionFindConstructor9() throws JavaModelException {
3538
	this.workingCopies = new ICompilationUnit[1];
3539
	this.workingCopies[0] = getWorkingCopy(
3540
		"/Completion/src/test/Test.java",
3541
		"package test;"+
3542
		"public class Test {\n" + 
3543
		"  public class TestConstructor {\n" + 
3544
		"  }\n" + 
3545
		"  void foo() {\n" + 
3546
 		"    new TestConstructor\n" + 
3547
		"  }\n" + 
3548
		"}\n");
3549
3550
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
3551
	String str = this.workingCopies[0].getSource();
3552
	String completeBehind = "TestConstructor";
3553
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3554
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3451
3555
3556
	assertResults(
3557
			"Test.TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.Test$TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
3558
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), Ltest.Test$TestConstructor;, ()V, TestConstructor, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
3559
			requestor.getResults());
3560
}
3561
public void testCompletionFindConstructor10() throws JavaModelException {
3562
	this.workingCopies = new ICompilationUnit[1];
3563
	this.workingCopies[0] = getWorkingCopy(
3564
		"/Completion/src/test/Test.java",
3565
		"package test;"+
3566
		"public class Test {\n" + 
3567
		"  void foo() {\n" + 
3568
		"    class TestConstructor {\n" + 
3569
		"    }\n" + 
3570
 		"    new TestConstructor\n" + 
3571
		"  }\n" + 
3572
		"}\n");
3573
3574
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
3575
	String str = this.workingCopies[0].getSource();
3576
	String completeBehind = "TestConstructor";
3577
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3578
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3579
3580
	assertResults(
3581
			"TestConstructor[TYPE_REF]{TestConstructor, test, LTestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
3582
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), LTestConstructor;, ()V, TestConstructor, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
3583
			requestor.getResults());
3584
}
3585
public void testCompletionFindConstructor11() throws JavaModelException {
3586
	this.workingCopies = new ICompilationUnit[2];
3587
	this.workingCopies[0] = getWorkingCopy(
3588
		"/Completion/src/test/Test.java",
3589
		"package test;"+
3590
		"public class Test {\n" + 
3591
		"  void foo() {\n" + 
3592
 		"    new TestConstructor2\n" + 
3593
		"  }\n" + 
3594
		"}\n");
3595
	
3596
	this.workingCopies[1] = getWorkingCopy(
3597
		"/Completion/src/test/TestConstructor.java",
3598
		"package test;"+
3599
		"public class TestConstructor {\n" + 
3600
		"  public class TestConstructor2 {\n" + 
3601
		"  }\n" + 
3602
		"}\n");
3603
3604
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
3605
	String str = this.workingCopies[0].getSource();
3606
	String completeBehind = "TestConstructor2";
3607
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3608
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3609
3610
	assertResults(
3611
			"",
3612
			requestor.getResults());
3613
}
3614
public void testCompletionFindConstructor12() throws JavaModelException {
3615
	this.workingCopies = new ICompilationUnit[1];
3616
	this.workingCopies[0] = getWorkingCopy(
3617
		"/Completion/src/test/Test.java",
3618
		"package test;"+
3619
		"public class Test {\n" + 
3620
		"  public class TestConstructor {\n" + 
3621
		"    public class TestConstructor2 {\n" + 
3622
		"    }\n" + 
3623
		"  }\n" + 
3624
		"  void foo() {\n" + 
3625
 		"    new TestConstructor2\n" + 
3626
		"  }\n" + 
3627
		"}\n");
3628
3629
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
3630
	String str = this.workingCopies[0].getSource();
3631
	String completeBehind = "TestConstructor2";
3632
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3633
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3634
3635
	assertResults(
3636
			"",
3637
			requestor.getResults());
3638
}
3639
public void testCompletionFindConstructor13() throws JavaModelException {
3640
	this.workingCopies = new ICompilationUnit[2];
3641
	this.workingCopies[0] = getWorkingCopy(
3642
		"/Completion/src/test/Test.java",
3643
		"package test;"+
3644
		"public class Test {\n" + 
3645
		"  void foo() {\n" + 
3646
 		"    new TestConstructor\n" + 
3647
		"  }\n" + 
3648
		"}\n");
3649
	
3650
	this.workingCopies[1] = getWorkingCopy(
3651
		"/Completion/src/test2/TestConstructor.java",
3652
		"package test2;"+
3653
		"public class TestConstructor {\n" + 
3654
		"}\n");
3655
3656
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true);
3657
	requestor.allowAllRequiredProposals();
3658
	
3659
	String str = this.workingCopies[0].getSource();
3660
	String completeBehind = "TestConstructor";
3661
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3662
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3663
3664
	assertResults(
3665
			"TestConstructor[TYPE_REF]{test2.TestConstructor, test2, Ltest2.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_RESTRICTED) + "}\n"+
3666
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), Ltest2.TestConstructor;, ()V, TestConstructor, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}\n"+
3667
			"   TestConstructor[TYPE_IMPORT]{import test2.TestConstructor;\n, test2, Ltest2.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
3668
			requestor.getResults());
3669
}
3670
public void testCompletionFindConstructor14() throws JavaModelException {
3671
	this.workingCopies = new ICompilationUnit[2];
3672
	this.workingCopies[0] = getWorkingCopy(
3673
		"/Completion/src/test/Test.java",
3674
		"package test;"+
3675
		"public class Test {\n" + 
3676
		"  void foo() {\n" + 
3677
 		"    new TestConstructor\n" + 
3678
		"  }\n" + 
3679
		"}\n");
3680
	
3681
	this.workingCopies[1] = getWorkingCopy(
3682
		"/Completion/src/test2/TestConstructor.java",
3683
		"package test2;"+
3684
		"public interface TestConstructor {\n" + 
3685
		"}\n");
3686
3687
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true);
3688
	requestor.allowAllRequiredProposals();
3689
	
3690
	String str = this.workingCopies[0].getSource();
3691
	String completeBehind = "TestConstructor";
3692
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3693
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3694
3695
	assertResults(
3696
			"TestConstructor[TYPE_REF]{test2.TestConstructor, test2, Ltest2.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_RESTRICTED) + "}",
3697
			requestor.getResults());
3698
}
3699
public void testCompletionFindConstructor15() throws JavaModelException {
3700
	this.workingCopies = new ICompilationUnit[1];
3701
	this.workingCopies[0] = getWorkingCopy(
3702
		"/Completion/src/test/Test.java",
3703
		"package test;"+
3704
		"public class Test {\n" + 
3705
		"  void foo() {\n" + 
3706
		"    class TestConstructor {\n" + 
3707
		"      public TestConstructor(int i) {}\n" + 
3708
		"    }\n" + 
3709
 		"    new TestConstructor\n" + 
3710
		"  }\n" + 
3711
		"}\n");
3712
3713
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true);
3714
	requestor.allowAllRequiredProposals();
3715
	
3716
	String str = this.workingCopies[0].getSource();
3717
	String completeBehind = "TestConstructor";
3718
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
3719
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
3720
3721
	assertResults(
3722
			"TestConstructor[TYPE_REF]{TestConstructor, test, LTestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
3723
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), LTestConstructor;, (I)V, TestConstructor, (i), " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
3724
			requestor.getResults());
3725
}
3452
/**
3726
/**
3453
 * Complete the exception "Exception" in a catch clause.
3727
 * Complete the exception "Exception" in a catch clause.
3454
 */
3728
 */
Lines 9870-9876 Link Here
9870
    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
10144
    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
9871
10145
9872
    assertResults(
10146
    assertResults(
9873
		"CompletionMemberType.Y[TYPE_REF]{Y, , LCompletionMemberType$Y;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_EXPECTED_TYPE + R_EXACT_NAME+ R_UNQUALIFIED + R_NON_RESTRICTED)+"}",
10147
		"CompletionMemberType.Y[TYPE_REF]{Y, , LCompletionMemberType$Y;, null, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_EXPECTED_TYPE + R_EXACT_NAME+ R_UNQUALIFIED + R_NON_RESTRICTED)+"}\n"+
10148
		"Y[METHOD_REF<CONSTRUCTOR>]{Y(), LCompletionMemberType$Y;, ()V, Y, null, "+(R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_EXPECTED_TYPE + R_EXACT_NAME+ R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED)+"}",
9874
		requestor.getResults());
10149
		requestor.getResults());
9875
}
10150
}
9876
public void testCompletionMemberType2() throws JavaModelException {
10151
public void testCompletionMemberType2() throws JavaModelException {
Lines 14142-14148 Link Here
14142
			"    public static int foo;\n" +
14417
			"    public static int foo;\n" +
14143
			"}");
14418
			"}");
14144
	
14419
	
14145
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14420
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14146
	requestor.allowAllRequiredProposals();
14421
	requestor.allowAllRequiredProposals();
14147
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14422
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14148
	
14423
	
Lines 14180-14186 Link Here
14180
			"    public static int foo(){}\n" +
14455
			"    public static int foo(){}\n" +
14181
			"}");
14456
			"}");
14182
	
14457
	
14183
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14458
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14184
	requestor.allowAllRequiredProposals();
14459
	requestor.allowAllRequiredProposals();
14185
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14460
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14186
	
14461
	
Lines 14218-14224 Link Here
14218
			"    public static int foo;\n" +
14493
			"    public static int foo;\n" +
14219
			"}");
14494
			"}");
14220
	
14495
	
14221
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14496
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14222
	requestor.allowAllRequiredProposals();
14497
	requestor.allowAllRequiredProposals();
14223
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
14498
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
14224
	
14499
	
Lines 14250-14256 Link Here
14250
			"    public static int foo(){}\n" +
14525
			"    public static int foo(){}\n" +
14251
			"}");
14526
			"}");
14252
	
14527
	
14253
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14528
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14254
	requestor.allowAllRequiredProposals();
14529
	requestor.allowAllRequiredProposals();
14255
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
14530
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
14256
	
14531
	
Lines 14282-14288 Link Here
14282
			"    public static int foo;\n" +
14557
			"    public static int foo;\n" +
14283
			"}");
14558
			"}");
14284
	
14559
	
14285
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14560
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14286
	requestor.allowAllRequiredProposals();
14561
	requestor.allowAllRequiredProposals();
14287
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14562
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14288
	
14563
	
Lines 14320-14326 Link Here
14320
			"    public static int foo(){}\n" +
14595
			"    public static int foo(){}\n" +
14321
			"}");
14596
			"}");
14322
	
14597
	
14323
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14598
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14324
	requestor.allowAllRequiredProposals();
14599
	requestor.allowAllRequiredProposals();
14325
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14600
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14326
	
14601
	
Lines 14359-14365 Link Here
14359
			"    public static int foo(){}\n" +
14634
			"    public static int foo(){}\n" +
14360
			"}");
14635
			"}");
14361
	
14636
	
14362
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14637
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14363
	requestor.allowAllRequiredProposals();
14638
	requestor.allowAllRequiredProposals();
14364
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14639
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14365
	
14640
	
Lines 14398-14404 Link Here
14398
			"    public static int foo(){}\n" +
14673
			"    public static int foo(){}\n" +
14399
			"}");
14674
			"}");
14400
	
14675
	
14401
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14676
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14402
	requestor.allowAllRequiredProposals();
14677
	requestor.allowAllRequiredProposals();
14403
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14678
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14404
	
14679
	
Lines 14437-14443 Link Here
14437
			"    public static int foo(){}\n" +
14712
			"    public static int foo(){}\n" +
14438
			"}");
14713
			"}");
14439
	
14714
	
14440
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14715
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14441
	requestor.allowAllRequiredProposals();
14716
	requestor.allowAllRequiredProposals();
14442
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14717
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14443
	
14718
	
Lines 14476-14482 Link Here
14476
			"    public static int foo(){}\n" +
14751
			"    public static int foo(){}\n" +
14477
			"}");
14752
			"}");
14478
	
14753
	
14479
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14754
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14480
	requestor.allowAllRequiredProposals();
14755
	requestor.allowAllRequiredProposals();
14481
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14756
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14482
	
14757
	
Lines 14516-14522 Link Here
14516
			"    public static int foo(){}\n" +
14791
			"    public static int foo(){}\n" +
14517
			"}");
14792
			"}");
14518
	
14793
	
14519
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14794
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14520
	requestor.allowAllRequiredProposals();
14795
	requestor.allowAllRequiredProposals();
14521
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14796
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14522
	
14797
	
Lines 14555-14561 Link Here
14555
			"    public static int foo(){}\n" +
14830
			"    public static int foo(){}\n" +
14556
			"}");
14831
			"}");
14557
	
14832
	
14558
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14833
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14559
	requestor.allowAllRequiredProposals();
14834
	requestor.allowAllRequiredProposals();
14560
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14835
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14561
	
14836
	
Lines 14590-14596 Link Here
14590
			"    public static int foo(){}\n" +
14865
			"    public static int foo(){}\n" +
14591
			"}");
14866
			"}");
14592
	
14867
	
14593
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14868
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14594
	requestor.allowAllRequiredProposals();
14869
	requestor.allowAllRequiredProposals();
14595
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14870
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14596
	
14871
	
Lines 14630-14636 Link Here
14630
			"    public static int foo(){}\n" +
14905
			"    public static int foo(){}\n" +
14631
			"}");
14906
			"}");
14632
	
14907
	
14633
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14908
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14634
	requestor.allowAllRequiredProposals();
14909
	requestor.allowAllRequiredProposals();
14635
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14910
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14636
	
14911
	
Lines 14670-14676 Link Here
14670
			"    public static int foo(int i){}\n" +
14945
			"    public static int foo(int i){}\n" +
14671
			"}");
14946
			"}");
14672
	
14947
	
14673
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14948
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14674
	requestor.allowAllRequiredProposals();
14949
	requestor.allowAllRequiredProposals();
14675
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14950
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14676
	
14951
	
Lines 14710-14716 Link Here
14710
			"    public static int foo(){}\n" +
14985
			"    public static int foo(){}\n" +
14711
			"}");
14986
			"}");
14712
	
14987
	
14713
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
14988
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14714
	requestor.allowAllRequiredProposals();
14989
	requestor.allowAllRequiredProposals();
14715
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14990
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14716
	
14991
	
Lines 14743-14749 Link Here
14743
			"    public static int foo;\n" +
15018
			"    public static int foo;\n" +
14744
			"}");
15019
			"}");
14745
	
15020
	
14746
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15021
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14747
	requestor.allowAllRequiredProposals();
15022
	requestor.allowAllRequiredProposals();
14748
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
15023
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14749
	
15024
	
Lines 14781-14787 Link Here
14781
			"    public int foo;\n" +
15056
			"    public int foo;\n" +
14782
			"}");
15057
			"}");
14783
	
15058
	
14784
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15059
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14785
	requestor.allowAllRequiredProposals();
15060
	requestor.allowAllRequiredProposals();
14786
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
15061
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14787
	
15062
	
Lines 14813-14819 Link Here
14813
			"    public int foo;\n" +
15088
			"    public int foo;\n" +
14814
			"}");
15089
			"}");
14815
	
15090
	
14816
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15091
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14817
	requestor.allowAllRequiredProposals();
15092
	requestor.allowAllRequiredProposals();
14818
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
15093
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14819
	
15094
	
Lines 14845-14851 Link Here
14845
			"    public int foo(){return 0;};\n" +
15120
			"    public int foo(){return 0;};\n" +
14846
			"}");
15121
			"}");
14847
	
15122
	
14848
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15123
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14849
	requestor.allowAllRequiredProposals();
15124
	requestor.allowAllRequiredProposals();
14850
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
15125
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14851
	
15126
	
Lines 14877-14883 Link Here
14877
			"    public int foo(){return 0;};\n" +
15152
			"    public int foo(){return 0;};\n" +
14878
			"}");
15153
			"}");
14879
	
15154
	
14880
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15155
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14881
	requestor.allowAllRequiredProposals();
15156
	requestor.allowAllRequiredProposals();
14882
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
15157
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14883
	
15158
	
Lines 14910-14916 Link Here
14910
			"    public static int foo(){return 0;};\n" +
15185
			"    public static int foo(){return 0;};\n" +
14911
			"}");
15186
			"}");
14912
	
15187
	
14913
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15188
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14914
	requestor.allowAllRequiredProposals();
15189
	requestor.allowAllRequiredProposals();
14915
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
15190
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
14916
	
15191
	
Lines 14951-14957 Link Here
14951
				"    public static int foo(){}\n" +
15226
				"    public static int foo(){}\n" +
14952
				"}");
15227
				"}");
14953
		
15228
		
14954
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15229
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
14955
		requestor.allowAllRequiredProposals();
15230
		requestor.allowAllRequiredProposals();
14956
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
15231
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
14957
		
15232
		
Lines 14999-15005 Link Here
14999
				"    public static int foo(){}\n" +
15274
				"    public static int foo(){}\n" +
15000
				"}");
15275
				"}");
15001
		
15276
		
15002
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
15277
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
15003
		requestor.allowAllRequiredProposals();
15278
		requestor.allowAllRequiredProposals();
15004
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
15279
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
15005
		
15280
		
(-)src/org/eclipse/jdt/core/tests/model/CompletionTests_1_5.java (-31 / +176 lines)
Lines 7621-7627 Link Here
7621
            result.context);
7621
            result.context);
7622
7622
7623
	assertResults(
7623
	assertResults(
7624
			"Test0233Z<ZT>[TYPE_REF]{Test0233Z, test0233, Ltest0233.Test0233Z<TZT;>;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME+ R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
7624
			"Test0233Z<ZT>[TYPE_REF]{Test0233Z, test0233, Ltest0233.Test0233Z<TZT;>;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME+ R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
7625
			"Test0233Z[METHOD_REF<CONSTRUCTOR>]{Test0233Z, Ltest0233.Test0233Z<TZT;>;, ()V, Test0233Z, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME+ R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
7625
			result.proposals);
7626
			result.proposals);
7626
}
7627
}
7627
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=97860
7628
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=97860
Lines 10620-10625 Link Here
10620
			"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}",
10621
			"ZZZ3[TYPE_REF]{p.ZZZ3, p, Lp.ZZZ3;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_ANNOTATION + R_TARGET + R_NON_RESTRICTED) + "}",
10621
			requestor.getResults());
10622
			requestor.getResults());
10622
}
10623
}
10624
public void test0330() throws JavaModelException {
10625
	this.workingCopies = new ICompilationUnit[2];
10626
	this.workingCopies[0] = getWorkingCopy(
10627
		"/Completion/src/test/Test.java",
10628
		"package test;"+
10629
		"public class Test {\n" + 
10630
		"	public void foo() {\n" +
10631
		"      new TestConstructor\n" +
10632
		"   }" +
10633
		"}\n");
10634
	
10635
	this.workingCopies[1] = getWorkingCopy(
10636
			"/Completion/src/test/TestConstructor.java",
10637
			"package test;"+
10638
			"public class TestConstructor<T> {\n" + 
10639
			"}\n");
10640
10641
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
10642
	String str = this.workingCopies[0].getSource();
10643
	String completeBehind = "TestConstructor";
10644
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
10645
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10646
10647
	assertResults(
10648
			"TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
10649
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), Ltest.TestConstructor<TT;>;, ()V, TestConstructor, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
10650
			requestor.getResults());
10651
}
10652
public void test0331() throws JavaModelException {
10653
	this.workingCopies = new ICompilationUnit[2];
10654
	this.workingCopies[0] = getWorkingCopy(
10655
		"/Completion/src/test/Test.java",
10656
		"package test;"+
10657
		"public class Test {\n" + 
10658
		"	public void foo() {\n" +
10659
		"      new TestConstructor\n" +
10660
		"   }" +
10661
		"}\n");
10662
	
10663
	this.workingCopies[1] = getWorkingCopy(
10664
			"/Completion/src/test/TestConstructor.java",
10665
			"package test;"+
10666
			"public class TestConstructor<T> {\n" + 
10667
			"  public <U> TestConstructor(int a) {\n" + 
10668
			"}\n");
10669
10670
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
10671
	String str = this.workingCopies[0].getSource();
10672
	String completeBehind = "TestConstructor";
10673
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
10674
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10675
10676
	assertResults(
10677
			"TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
10678
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), Ltest.TestConstructor<TT;>;, <U:Ljava.lang.Object;>(I)V, TestConstructor, (a), " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
10679
			requestor.getResults());
10680
}
10681
public void test0332() throws JavaModelException {
10682
	this.workingCopies = new ICompilationUnit[2];
10683
	this.workingCopies[0] = getWorkingCopy(
10684
		"/Completion/src/test/Test.java",
10685
		"package test;"+
10686
		"public class Test {\n" + 
10687
		"	public void foo() {\n" +
10688
		"      new <String>TestConstructor\n" +
10689
		"   }" +
10690
		"}\n");
10691
	
10692
	this.workingCopies[1] = getWorkingCopy(
10693
			"/Completion/src/test/TestConstructor.java",
10694
			"package test;"+
10695
			"public class TestConstructor<T> {\n" + 
10696
			"  public <U> TestConstructor(int a) {}\n" + 
10697
			"}\n");
10698
10699
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
10700
	String str = this.workingCopies[0].getSource();
10701
	String completeBehind = "TestConstructor";
10702
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
10703
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10704
10705
	assertResults(
10706
			"TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}\n"+
10707
			"TestConstructor[METHOD_REF<CONSTRUCTOR>]{TestConstructor(), Ltest.TestConstructor<TT;>;, <U:Ljava.lang.Object;>(I)V, TestConstructor, (a), " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_CONSTRUCTOR + R_NON_RESTRICTED) + "}",
10708
			requestor.getResults());
10709
}
10710
public void test0333() throws JavaModelException {
10711
	this.workingCopies = new ICompilationUnit[2];
10712
	this.workingCopies[0] = getWorkingCopy(
10713
		"/Completion/src/test/Test.java",
10714
		"package test;"+
10715
		"public class Test {\n" + 
10716
		"	public void foo() {\n" +
10717
		"      new TestConstructor\n" +
10718
		"   }" +
10719
		"}\n");
10720
	
10721
	this.workingCopies[1] = getWorkingCopy(
10722
			"/Completion/src/test/TestConstructor.java",
10723
			"package test;"+
10724
			"public enum TestConstructor {\n" + 
10725
			"  TestConstructorConstant(0);\n" + 
10726
			"  TestConstructor(int a) {=\n" + 
10727
			"}\n");
10728
10729
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
10730
	String str = this.workingCopies[0].getSource();
10731
	String completeBehind = "TestConstructor";
10732
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
10733
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10734
10735
	assertResults(
10736
			"TestConstructor[TYPE_REF]{TestConstructor, test, Ltest.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_UNQUALIFIED + R_NON_RESTRICTED) + "}",
10737
			requestor.getResults());
10738
}
10739
public void test0334() throws JavaModelException {
10740
	this.workingCopies = new ICompilationUnit[2];
10741
	this.workingCopies[0] = getWorkingCopy(
10742
		"/Completion/src/test/Test.java",
10743
		"package test;"+
10744
		"public class Test {\n" + 
10745
		"  void foo() {\n" + 
10746
 		"    new TestConstructor\n" + 
10747
		"  }\n" + 
10748
		"}\n");
10749
	
10750
	this.workingCopies[1] = getWorkingCopy(
10751
		"/Completion/src/test2/TestConstructor.java",
10752
		"package test2;"+
10753
		"public @interface TestConstructor {\n" + 
10754
		"}\n");
10755
10756
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true);
10757
	requestor.allowAllRequiredProposals();
10758
	
10759
	String str = this.workingCopies[0].getSource();
10760
	String completeBehind = "TestConstructor";
10761
	int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
10762
	this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
10763
10764
	assertResults(
10765
			"TestConstructor[TYPE_REF]{test2.TestConstructor, test2, Ltest2.TestConstructor;, null, null, " + (R_DEFAULT + R_RESOLVED + R_INTERESTING + R_CASE + R_EXACT_NAME + R_NON_RESTRICTED) + "}",
10766
			requestor.getResults());
10767
}
10623
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130
10768
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=153130
10624
public void testEC001() throws JavaModelException {
10769
public void testEC001() throws JavaModelException {
10625
	this.workingCopies = new ICompilationUnit[1];
10770
	this.workingCopies = new ICompilationUnit[1];
Lines 10671-10677 Link Here
10671
			"    public static int foo;\n" +
10816
			"    public static int foo;\n" +
10672
			"}");
10817
			"}");
10673
	
10818
	
10674
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
10819
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10675
	requestor.allowAllRequiredProposals();
10820
	requestor.allowAllRequiredProposals();
10676
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
10821
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
10677
	
10822
	
Lines 10709-10715 Link Here
10709
			"    public static int foo(){}\n" +
10854
			"    public static int foo(){}\n" +
10710
			"}");
10855
			"}");
10711
	
10856
	
10712
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
10857
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10713
	requestor.allowAllRequiredProposals();
10858
	requestor.allowAllRequiredProposals();
10714
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
10859
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
10715
	
10860
	
Lines 10747-10753 Link Here
10747
			"    public static int foo;\n" +
10892
			"    public static int foo;\n" +
10748
			"}");
10893
			"}");
10749
	
10894
	
10750
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
10895
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10751
	requestor.allowAllRequiredProposals();
10896
	requestor.allowAllRequiredProposals();
10752
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
10897
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
10753
	
10898
	
Lines 10779-10785 Link Here
10779
			"    public static int foo(){}\n" +
10924
			"    public static int foo(){}\n" +
10780
			"}");
10925
			"}");
10781
	
10926
	
10782
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
10927
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10783
	requestor.allowAllRequiredProposals();
10928
	requestor.allowAllRequiredProposals();
10784
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
10929
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ"});
10785
	
10930
	
Lines 10811-10817 Link Here
10811
			"    public static int foo;\n" +
10956
			"    public static int foo;\n" +
10812
			"}");
10957
			"}");
10813
	
10958
	
10814
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
10959
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10815
	requestor.allowAllRequiredProposals();
10960
	requestor.allowAllRequiredProposals();
10816
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
10961
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
10817
	
10962
	
Lines 10849-10855 Link Here
10849
			"    public static int foo(){}\n" +
10994
			"    public static int foo(){}\n" +
10850
			"}");
10995
			"}");
10851
	
10996
	
10852
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
10997
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10853
	requestor.allowAllRequiredProposals();
10998
	requestor.allowAllRequiredProposals();
10854
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
10999
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
10855
	
11000
	
Lines 10888-10894 Link Here
10888
			"    public static int foo(){}\n" +
11033
			"    public static int foo(){}\n" +
10889
			"}");
11034
			"}");
10890
	
11035
	
10891
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11036
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10892
	requestor.allowAllRequiredProposals();
11037
	requestor.allowAllRequiredProposals();
10893
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11038
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
10894
	
11039
	
Lines 10927-10933 Link Here
10927
			"    public static int foo(){}\n" +
11072
			"    public static int foo(){}\n" +
10928
			"}");
11073
			"}");
10929
	
11074
	
10930
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11075
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10931
	requestor.allowAllRequiredProposals();
11076
	requestor.allowAllRequiredProposals();
10932
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11077
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
10933
	
11078
	
Lines 10962-10968 Link Here
10962
			"    public static int foo(){}\n" +
11107
			"    public static int foo(){}\n" +
10963
			"}");
11108
			"}");
10964
	
11109
	
10965
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11110
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
10966
	requestor.allowAllRequiredProposals();
11111
	requestor.allowAllRequiredProposals();
10967
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11112
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
10968
	
11113
	
Lines 11001-11007 Link Here
11001
			"    public static int foo(){}\n" +
11146
			"    public static int foo(){}\n" +
11002
			"}");
11147
			"}");
11003
	
11148
	
11004
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11149
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11005
	requestor.allowAllRequiredProposals();
11150
	requestor.allowAllRequiredProposals();
11006
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11151
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11007
	
11152
	
Lines 11036-11042 Link Here
11036
			"    public static int foo(){}\n" +
11181
			"    public static int foo(){}\n" +
11037
			"}");
11182
			"}");
11038
	
11183
	
11039
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11184
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11040
	requestor.allowAllRequiredProposals();
11185
	requestor.allowAllRequiredProposals();
11041
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11186
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11042
	
11187
	
Lines 11075-11081 Link Here
11075
			"    public static int foo(){}\n" +
11220
			"    public static int foo(){}\n" +
11076
			"}");
11221
			"}");
11077
	
11222
	
11078
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11223
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11079
	requestor.allowAllRequiredProposals();
11224
	requestor.allowAllRequiredProposals();
11080
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11225
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11081
	
11226
	
Lines 11110-11116 Link Here
11110
			"    public static int foo(){}\n" +
11255
			"    public static int foo(){}\n" +
11111
			"}");
11256
			"}");
11112
	
11257
	
11113
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11258
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11114
	requestor.allowAllRequiredProposals();
11259
	requestor.allowAllRequiredProposals();
11115
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11260
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11116
	
11261
	
Lines 11149-11155 Link Here
11149
			"    public static int foo(){}\n" +
11294
			"    public static int foo(){}\n" +
11150
			"}");
11295
			"}");
11151
	
11296
	
11152
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11297
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11153
	requestor.allowAllRequiredProposals();
11298
	requestor.allowAllRequiredProposals();
11154
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11299
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11155
	
11300
	
Lines 11191-11197 Link Here
11191
			"    public static int foo(){}\n" +
11336
			"    public static int foo(){}\n" +
11192
			"}");
11337
			"}");
11193
	
11338
	
11194
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11339
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11195
	requestor.allowAllRequiredProposals();
11340
	requestor.allowAllRequiredProposals();
11196
	requestor.setFavoriteReferences(new String[]{"test.q.ZZZ2.foo"});
11341
	requestor.setFavoriteReferences(new String[]{"test.q.ZZZ2.foo"});
11197
	
11342
	
Lines 11227-11233 Link Here
11227
			"    public static int foo(){}\n" +
11372
			"    public static int foo(){}\n" +
11228
			"}");
11373
			"}");
11229
	
11374
	
11230
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11375
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11231
	requestor.allowAllRequiredProposals();
11376
	requestor.allowAllRequiredProposals();
11232
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11377
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11233
	
11378
	
Lines 11266-11272 Link Here
11266
			"    public static int foo(){}\n" +
11411
			"    public static int foo(){}\n" +
11267
			"}");
11412
			"}");
11268
	
11413
	
11269
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11414
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11270
	requestor.allowAllRequiredProposals();
11415
	requestor.allowAllRequiredProposals();
11271
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11416
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11272
	
11417
	
Lines 11301-11307 Link Here
11301
			"    public static int foo(){}\n" +
11446
			"    public static int foo(){}\n" +
11302
			"}");
11447
			"}");
11303
	
11448
	
11304
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11449
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11305
	requestor.allowAllRequiredProposals();
11450
	requestor.allowAllRequiredProposals();
11306
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11451
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11307
	
11452
	
Lines 11341-11347 Link Here
11341
			"    public static int foo(){}\n" +
11486
			"    public static int foo(){}\n" +
11342
			"}");
11487
			"}");
11343
	
11488
	
11344
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11489
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11345
	requestor.allowAllRequiredProposals();
11490
	requestor.allowAllRequiredProposals();
11346
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11491
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11347
	
11492
	
Lines 11381-11387 Link Here
11381
			"    public static int foo(int i){}\n" +
11526
			"    public static int foo(int i){}\n" +
11382
			"}");
11527
			"}");
11383
	
11528
	
11384
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11529
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11385
	requestor.allowAllRequiredProposals();
11530
	requestor.allowAllRequiredProposals();
11386
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11531
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11387
	
11532
	
Lines 11421-11427 Link Here
11421
			"    public static <T> int foo(){}\n" +
11566
			"    public static <T> int foo(){}\n" +
11422
			"}");
11567
			"}");
11423
	
11568
	
11424
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11569
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11425
	requestor.allowAllRequiredProposals();
11570
	requestor.allowAllRequiredProposals();
11426
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11571
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11427
	
11572
	
Lines 11459-11465 Link Here
11459
			"    public static int foo(){}\n" +
11604
			"    public static int foo(){}\n" +
11460
			"}");
11605
			"}");
11461
	
11606
	
11462
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11607
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11463
	requestor.allowAllRequiredProposals();
11608
	requestor.allowAllRequiredProposals();
11464
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11609
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11465
	
11610
	
Lines 11492-11498 Link Here
11492
			"    public static int foo;\n" +
11637
			"    public static int foo;\n" +
11493
			"}");
11638
			"}");
11494
	
11639
	
11495
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11640
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11496
	requestor.allowAllRequiredProposals();
11641
	requestor.allowAllRequiredProposals();
11497
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11642
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11498
	
11643
	
Lines 11530-11536 Link Here
11530
			"    public int foo;\n" +
11675
			"    public int foo;\n" +
11531
			"}");
11676
			"}");
11532
	
11677
	
11533
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11678
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11534
	requestor.allowAllRequiredProposals();
11679
	requestor.allowAllRequiredProposals();
11535
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11680
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11536
	
11681
	
Lines 11562-11568 Link Here
11562
			"    public int foo;\n" +
11707
			"    public int foo;\n" +
11563
			"}");
11708
			"}");
11564
	
11709
	
11565
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11710
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11566
	requestor.allowAllRequiredProposals();
11711
	requestor.allowAllRequiredProposals();
11567
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11712
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11568
	
11713
	
Lines 11594-11600 Link Here
11594
			"    public int foo(){return 0;};\n" +
11739
			"    public int foo(){return 0;};\n" +
11595
			"}");
11740
			"}");
11596
	
11741
	
11597
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11742
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11598
	requestor.allowAllRequiredProposals();
11743
	requestor.allowAllRequiredProposals();
11599
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11744
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11600
	
11745
	
Lines 11626-11632 Link Here
11626
			"    public int foo(){return 0;};\n" +
11771
			"    public int foo(){return 0;};\n" +
11627
			"}");
11772
			"}");
11628
	
11773
	
11629
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11774
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11630
	requestor.allowAllRequiredProposals();
11775
	requestor.allowAllRequiredProposals();
11631
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11776
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11632
	
11777
	
Lines 11659-11665 Link Here
11659
			"    public static int foo(){return 0;};\n" +
11804
			"    public static int foo(){return 0;};\n" +
11660
			"}");
11805
			"}");
11661
	
11806
	
11662
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11807
	CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11663
	requestor.allowAllRequiredProposals();
11808
	requestor.allowAllRequiredProposals();
11664
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11809
	requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.foo"});
11665
	
11810
	
Lines 11704-11710 Link Here
11704
				"    public static int foo(){}\n" +
11849
				"    public static int foo(){}\n" +
11705
				"}");
11850
				"}");
11706
		
11851
		
11707
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11852
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11708
		requestor.allowAllRequiredProposals();
11853
		requestor.allowAllRequiredProposals();
11709
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11854
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11710
		
11855
		
Lines 11752-11758 Link Here
11752
				"    public static int foo(){}\n" +
11897
				"    public static int foo(){}\n" +
11753
				"}");
11898
				"}");
11754
		
11899
		
11755
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false, true);
11900
		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, true, false);
11756
		requestor.allowAllRequiredProposals();
11901
		requestor.allowAllRequiredProposals();
11757
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11902
		requestor.setFavoriteReferences(new String[]{"test.p.ZZZ.*"});
11758
		
11903
		

Return to bug 6930