Bug 189976 - [package explorer] Should Collapse MT Parent Packages in Hierarchy Presentation
Summary: [package explorer] Should Collapse MT Parent Packages in Hierarchy Presentation
Status: RESOLVED FIXED
Alias: None
Product: Subversive
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Alexander Gurov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 13:28 EDT by Adam Cabler CLA
Modified: 2007-08-02 06:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Cabler CLA 2007-05-30 13:28:04 EDT
If I have Package Presentation set to Hierarchical and Hide Empty Packages checked, empty parent packages shouldn't be shown.  Currently, if I have com.foo.bar.stuff and only stuff has packages, it is shown as:
com
    -foo
       -bar
          -stuff
             +things<non_empty package>
             c1.java
             c2.java

I expected and wanted it to be like this to save wasted space and clicks when expanding:
com.foo.bar.stuff
               +things
               c1.java
               c2.java
I don't see any reason to have to expand all the empty parents
Comment 1 Martin Aeschlimann CLA 2007-05-31 09:22:39 EDT
Do you have 'Fold empty packages in hierarchical Paclage Explorer layout' enabled?
That's on the Java > Appearance preference page.
Comment 2 Adam Cabler CLA 2007-05-31 14:01:27 EDT
Hi Martin,
   Yes, I have this selected.  Changing it on or off doesn't seem to have any effect.

adam

(In reply to comment #1)
> Do you have 'Fold empty packages in hierarchical Paclage Explorer layout'
> enabled?
> That's on the Java > Appearance preference page.
> 

Comment 3 Martin Aeschlimann CLA 2007-06-01 06:42:12 EDT
Can you construct and attach an example project where this happens? 

If 'foo' contains any files but they are filtered, then we don't collapse. It's because filtering is sitting above the content provider. 
Comment 4 Adam Cabler CLA 2007-06-01 12:30:49 EDT
(In reply to comment #3)
> Can you construct and attach an example project where this happens? 
> 
> If 'foo' contains any files but they are filtered, then we don't collapse. It's
> because filtering is sitting above the content provider. 
> 

Could this be because of my .svn files?  They are in every directory.
Comment 5 Martin Aeschlimann CLA 2007-06-04 04:04:12 EDT
Yes, that's seems to be the reason. It would be better if Subversion filters these files from the workspace, like it seems to be done in CVS (the CVS directories are not part of the workspace).

Maybe you want to file this request against your Subversion plug-in provider.
From our side there's no plan to connect collapsing to filtering, unless we get more requests in that direction.
Comment 6 Michael Valenta CLA 2007-06-05 08:51:50 EDT
Technically, CVS folders are part of the workspace but they are marked team-private so JDT doesn't see them. I would be surprised if your subversion plug-in doesn't do this as well. What Subversion plug-in are you using?
Comment 7 Adam Cabler CLA 2007-06-05 12:15:14 EDT
(In reply to comment #6)
> Technically, CVS folders are part of the workspace but they are marked
> team-private so JDT doesn't see them. I would be surprised if your subversion
> plug-in doesn't do this as well. What Subversion plug-in are you using?
> 

I'm using the latest subversive.  I'll also reply to your comment on the ng.
Comment 8 Michael Valenta CLA 2007-06-06 09:19:32 EDT
Reopening to move to Subversive
Comment 9 Michael Valenta CLA 2007-06-06 09:21:15 EDT
In the newsgroup, Adam said that the .svn folders are apeparing in the view when the .* filter is turned off. These folders should be marked as team-private to prevent them from appearing. Moving to Subversive for comment.
Comment 10 Alexander Gurov CLA 2007-06-06 11:00:28 EDT
(In reply to comment #9)

The Subversive code listen for adding folders, then marks each '.svn' folder as team-private from the listener. It looks like no additional actions required, is it right?
Comment 11 Alexander Gurov CLA 2007-06-06 11:07:47 EDT
One more comment...

I posted question about this behaviour at the Eclipse Platform bugzilla time ago. Really it looks like after folder marked as team-private its content is hidden from user, but the folder appear in the Navigator View (Package Explorer) until IDE is restarted. More over no actions could be performed over this folder. I.e. it looks like GUI node is not updated (removed) after corresponding resource is marked as team-private.
Comment 12 Michael Valenta CLA 2007-06-06 13:16:10 EDT
The main issue is that there is no delta fired when a resource is set as team-private. Therefore, when you mark a folder as team-private in a delta listener, other listeners have an opportunity to detect the addition and show the resource but will not receive a later event stating that it should be removed.

There are a few possible ways to handle this:

1) Subversive could provide the underlying EFS implementation for SVN projects and hide the .svn folder entirely.

2) Instead of refreshing to detect new .svn folders, Subversive could handle new folders by calling IFolder#create with the force and team-private flags for each new .svn folder.
Comment 13 Alexander Gurov CLA 2007-08-02 06:25:45 EDT
In order to use EFS features for the Subversion-connected projects file system schemes for these projects should be changed to something proprietary, like "svn", for example, because no other ways to activate alternative file system exists. Changing file system scheme can cause unpredictable behaviour of some external tools used by users in order to work with their projects. So, because it is not possible to create transparent file system filter in Eclipse Platform, the workaround is used: now marking as "team private" is performed in the same context as refresh operation. This means, that the problem will disappear in all cases except refreshing of workspace tree after folder additions performed outside Eclipse IDE.

Since Subversive 1.1.6.