Community
Participate
Working Groups
RC2 1. Follow the 'getting started' example 'Overlapping products in a common source tree': Project has external folder as source folder that contains com xyz product1 product2 where com/xyz/product2/ is excluded. -> The package explorer renders a package 'com.xyz' and a package 'com.xyz.product1' ( as seen in the documents screenshot) 2. In the Windows explorer first move the whole 'com' tree to a temporary location. Local Refresh: Package explorer shows src to be empty. Ok! 3. Move the 'com' tree back again, local refresh. A new package 'com.xyz.product2' is shown The delta issued on the second refresh is: Java Model[*]: {CHILDREN} Product1[*]: {CHILDREN} src[*]: {CHILDREN} com[+]: {} com.xyz[+]: {} com.xyz.product1[+]: {} com.xyz.product2[+]: {}
Created attachment 12481 [details] Proposed patch Changed DeltaProcessor#elementAdded(...) and #elementRemoved(...) to not add/removed subpackages if they are excluded.
Created attachment 12482 [details] Regression tests Added regression tests ExclusionFilterTests#testCreateExcludedAndIncludedPackages() and #testRemoveExcludedAndIncludedPackages()
Patch doesn't work if deeper child folders are included again. Check for inclusion should only apply to local folder, and should recurse in children in case an inclusion filter is specified. Need to be reworked, won't be ready for RC3.
Verified that the same problem exists in 2.1.3. So this is not a regression comparing to 2.1.3.
Created attachment 12558 [details] Better patch Continue the recursion for packages.
Incorrect patch was attached in comment #5. Changed DeltaProcessor.elementAdded(...) and elementRemoved(...) to not consider subpackages. And changed updateCurrentDeltaAndIndex(...) to continue the recursion in the case of a package fragment. Added regression tests ExclusionPatternTest.testCreateExcludedAndIncludedPackages() and testRemoveExceludedAndIncludedPackages().
Please backport to 3.0.1
Targeting 3.0.1
Backported fix and tests to R3_0_maintenance.
Verified for 3.0.1 RC1