Bug 1078199 - Adding a new package using the New -> Package does not refresh the Project Explorer
Summary: Adding a new package using the New -> Package does not refresh the Project Ex...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: DR2
: 6.1.0
Assignee: Alexandre Porcelli
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-19 11:39 UTC by Toni Rikkola
Modified: 2020-03-27 18:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 18:40:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Toni Rikkola 2014-03-19 11:39:47 UTC
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

Comment 2 manstis 2014-03-19 14:17:06 UTC
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.

Comment 6 Jiri Locker 2014-05-06 12:42:22 UTC
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).

Comment 7 Alexandre Porcelli 2014-06-16 23:43:52 UTC
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

Comment 8 Jiri Locker 2014-09-11 12:51:51 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.