Index: CommitWorkingCopyOperation.java =================================================================== retrieving revision 1.44 diff -u -r1.44 CommitWorkingCopyOperation.java --- CommitWorkingCopyOperation.java 23 Jan 2004 14:24:35 -0000 1.44 +++ CommitWorkingCopyOperation.java 18 Feb 2004 13:49:30 -0000 @@ -73,9 +73,8 @@ boolean isPrimary = workingCopy.isPrimary(); JavaElementDeltaBuilder deltaBuilder = null; - - PackageFragmentRoot root = (PackageFragmentRoot)workingCopy.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT); - if (isPrimary || (root.isOnClasspath() && resource.isAccessible() && Util.isValidCompilationUnitName(workingCopy.getElementName()))) { + boolean isIncluded = !Util.isExcluded(workingCopy) ; + if (isPrimary || (isIncluded && resource.isAccessible() && Util.isValidCompilationUnitName(workingCopy.getElementName()))) { // force opening so that the delta builder can get the old info if (!isPrimary && !primary.isOpen()) { @@ -85,7 +84,7 @@ // creates the delta builder (this remembers the content of the cu) if: // - it is not excluded // - and it is not a primary or it is a non-consistent primary - if (!Util.isExcluded(workingCopy) && (!isPrimary || !workingCopy.isConsistent())) { + if (isIncluded && (!isPrimary || !workingCopy.isConsistent())) { deltaBuilder = new JavaElementDeltaBuilder(primary); }