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

(-)model/org/eclipse/jdt/internal/core/PackageFragmentRoot.java (-1 / +21 lines)
Lines 405-411 Link Here
405
public char[][] fullExclusionPatternChars() {
405
public char[][] fullExclusionPatternChars() {
406
	try {
406
	try {
407
		if (this.isOpen() && this.getKind() != IPackageFragmentRoot.K_SOURCE) return null;
407
		if (this.isOpen() && this.getKind() != IPackageFragmentRoot.K_SOURCE) return null;
408
		ClasspathEntry entry = (ClasspathEntry)getRawClasspathEntry();
408
		ClasspathEntry entry = (ClasspathEntry) getRawClasspathEntry();
409
		if (entry == null) {
409
		if (entry == null) {
410
			return null;
410
			return null;
411
		} else {
411
		} else {
Lines 507-512 Link Here
507
	return ((PackageFragmentRootInfo)getElementInfo()).getRootKind();
507
	return ((PackageFragmentRootInfo)getElementInfo()).getRootKind();
508
}
508
}
509
509
510
/*
511
 * A version of getKind() that doesn't update the timestamp of the info in the Java model cache
512
 * to speed things up
513
 */
514
int internalKind() throws JavaModelException {
515
	JavaModelManager manager = JavaModelManager.getJavaModelManager();
516
	PackageFragmentRootInfo info = (PackageFragmentRootInfo) manager.peekAtInfo(this);
517
	if (info == null) {
518
		// default to regular getKind()
519
		return getKind();
520
	}
521
	return info.getRootKind();
522
}
523
510
/**
524
/**
511
 * Returns an array of non-java resources contained in the receiver.
525
 * Returns an array of non-java resources contained in the receiver.
512
 */
526
 */
Lines 572-577 Link Here
572
	return rawEntry;
586
	return rawEntry;
573
}
587
}
574
588
589
590
public IResource resource() {
591
	if (this.resource instanceof IResource) // perf improvement to avoid message send in resource()
592
		return (IResource) this.resource;
593
	return super.resource();
594
}
575
/*
595
/*
576
 * @see IJavaElement
596
 * @see IJavaElement
577
 */
597
 */
(-)model/org/eclipse/jdt/internal/core/NameLookup.java (-2 / +2 lines)
Lines 950-962 Link Here
950
			findAllTypes(matchName, partialMatch, acceptFlags, requestor);
950
			findAllTypes(matchName, partialMatch, acceptFlags, requestor);
951
			return;
951
			return;
952
		}
952
		}
953
		IPackageFragmentRoot root= (IPackageFragmentRoot) pkg.getParent();
953
		PackageFragmentRoot root= (PackageFragmentRoot) pkg.getParent();
954
		try {
954
		try {
955
955
956
			// look in working copies first
956
			// look in working copies first
957
			int firstDot = -1;
957
			int firstDot = -1;
958
			String topLevelTypeName = null;
958
			String topLevelTypeName = null;
959
			int packageFlavor= root.getKind();
959
			int packageFlavor= root.internalKind();
960
			if (this.typesInWorkingCopies != null || packageFlavor == IPackageFragmentRoot.K_SOURCE) {
960
			if (this.typesInWorkingCopies != null || packageFlavor == IPackageFragmentRoot.K_SOURCE) {
961
				firstDot = matchName.indexOf('.');
961
				firstDot = matchName.indexOf('.');
962
				if (!partialMatch)
962
				if (!partialMatch)

Return to bug 222399