Using the mortgages example here. Steps to Reproduce: 1. Open Project Explorer 2. Expand package "org" 3. Click <default> 4. Select New -> Package from the menu 5. Add package org.test Actual results: the package test does not show up under org Expected results: Project Explorer should show org.mortgages and org.test
The problem is with creating sub-packages; if you create only a single-level package (e.g. "org") it works OK. Only when you try to create a sub-package (e.g. "org.test") does it fail. The package is created but Project Explorer does not refresh correctly.
After creating org.test according to reproducing steps, the 'org' package collapses instead of displaying new child package 'test'. This doesn't match the expected result and is only a little different from the state before the fix. Let me describe the expected behaviour in more detail: 1) No package should collapse after creating a new package. 2) When creating a subpackage, A) the new package path should be displayed completely, or B) visible part of the path should be displayed according to the current expanded/collapsed state of the package tree. When org/ is expanded and com* is collapsed: <default> |--org/ | `--mortgages* \--com* Adding org.test.pkg, org.mortgages.pkg, com.sample should result in: A) when new packages are automatically fully expanded: <default> |--org/ | |--mortgages/ | | `--pkg/ | `--test/ | `--pkg/ \--com/ `--sample/ B) when no expansion is performed: <default> |--org/ | |--mortgages* | `--test* \--com* I prefer B).
Fix pushed to kie-wb-common repo: (master) http://github.com/droolsjbpm/kie-wb-common/commit/73d89c514 (6.1.x) http://github.com/droolsjbpm/kie-wb-common/commit/df5d071cf
Adding multilevel packages now works as expected. The last package component is always selected (and visible), other pakcakges, that are not directly on the path to the new package, become collapsed. The only remaining minor issue with adding new packages is that packages are not ordered alphabetically. The new package always becomes first and the rest is ordered randomly. I'll file a new BZ for this.