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

(-)search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java (-2 / +4 lines)
Lines 1914-1920 Link Here
1914
	MatchingNodeSet nodeSet = this.currentPossibleMatch.nodeSet;
1914
	MatchingNodeSet nodeSet = this.currentPossibleMatch.nodeSet;
1915
	if (BasicSearchEngine.VERBOSE) {
1915
	if (BasicSearchEngine.VERBOSE) {
1916
		System.out.println("Report matching: "); //$NON-NLS-1$
1916
		System.out.println("Report matching: "); //$NON-NLS-1$
1917
		System.out.println("	- node set:\n"+nodeSet); //$NON-NLS-1$
1917
		System.out.print("	- node set: accurate="+nodeSet.matchingNodes.elementSize); //$NON-NLS-1$
1918
		System.out.println(", possible="+nodeSet.possibleMatchingNodesSet.elementSize); //$NON-NLS-1$
1918
		System.out.println("	- must resolve: "+mustResolve); //$NON-NLS-1$
1919
		System.out.println("	- must resolve: "+mustResolve); //$NON-NLS-1$
1919
	}
1920
	}
1920
	boolean locatorMustResolve = this.patternLocator.mustResolve;
1921
	boolean locatorMustResolve = this.patternLocator.mustResolve;
Lines 1941-1947 Link Here
1941
		}
1942
		}
1942
		nodeSet.possibleMatchingNodesSet = new SimpleSet(3);
1943
		nodeSet.possibleMatchingNodesSet = new SimpleSet(3);
1943
		if (BasicSearchEngine.VERBOSE) {
1944
		if (BasicSearchEngine.VERBOSE) {
1944
			System.out.println("	- resolved node set:\n"+nodeSet); //$NON-NLS-1$
1945
			System.out.print("	- node set: accurate="+nodeSet.matchingNodes.elementSize); //$NON-NLS-1$
1946
			System.out.println(", possible="+nodeSet.possibleMatchingNodesSet.elementSize); //$NON-NLS-1$
1945
		}
1947
		}
1946
	} else {
1948
	} else {
1947
		this.unitScope = null;
1949
		this.unitScope = null;
(-)search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java (-4 / +3 lines)
Lines 651-657 Link Here
651
	int impossible = this.isErasureMatch ? ERASURE_MATCH : IMPOSSIBLE_MATCH;
651
	int impossible = this.isErasureMatch ? ERASURE_MATCH : IMPOSSIBLE_MATCH;
652
652
653
	// pattern has type parameter(s) or type argument(s)
653
	// pattern has type parameter(s) or type argument(s)
654
	boolean isRawType = type.isRawType();
655
	if (type.isGenericType()) {
654
	if (type.isGenericType()) {
656
		// Binding is generic, get its type variable(s)
655
		// Binding is generic, get its type variable(s)
657
		TypeVariableBinding[] typeVariables = null;
656
		TypeVariableBinding[] typeVariables = null;
Lines 669-682 Link Here
669
		}
668
		}
670
		// TODO (frederic) do we need to verify each parameter?
669
		// TODO (frederic) do we need to verify each parameter?
671
		return level; // we can't do better
670
		return level; // we can't do better
672
	} else if (isRawType) {
671
	} else if (type.isRawType()) {
673
		return level; // raw type always match
672
		return level; // raw type always match
674
	} else if (!type.isParameterizedType()) {
673
	} else if (!type.isParameterizedType() && !(type.isArrayType() && ((ArrayBinding)type).leafComponentType.isParameterizedType())) {
675
		// Standard types (ie. neither generic nor parameterized nor raw types)
674
		// Standard types (ie. neither generic nor parameterized nor raw types)
676
		// cannot match pattern with type parameters or arguments
675
		// cannot match pattern with type parameters or arguments
677
		return (patternTypeArguments[depth]==null || patternTypeArguments[depth].length==0) ? level : IMPOSSIBLE_MATCH;
676
		return (patternTypeArguments[depth]==null || patternTypeArguments[depth].length==0) ? level : IMPOSSIBLE_MATCH;
678
	} else {
677
	} else {
679
		ParameterizedTypeBinding paramTypeBinding = (ParameterizedTypeBinding) type;
678
		ParameterizedTypeBinding paramTypeBinding = (ParameterizedTypeBinding) (type.isArrayType() ? ((ArrayBinding)type).leafComponentType : type);
680
679
681
		// Compare arguments only if there ones on both sides
680
		// Compare arguments only if there ones on both sides
682
		if (patternTypeArguments[depth] != null && patternTypeArguments[depth].length > 0 &&
681
		if (patternTypeArguments[depth] != null && patternTypeArguments[depth].length > 0 &&

Return to bug 100695