Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 156529 - I can't delete empty package in project tab
I can't delete empty package in project tab
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Refactoring
6.x
All All
: P3 (vote)
: 7.0
Assigned To: Jan Becicka
issues@java
:
: 163747 174064 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-09 13:45 UTC by Martin Fousek
Modified: 2010-10-13 12:06 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2009-01-09 13:45:26 UTC
Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15
System: Linux version 2.6.27-9-generic running on i386; UTF-8; cs_CZ (nb)

Observed:
I have Enterprise Application and I can't delete empty packages in web and ejb modules. I must switch from project tab
into files tab and delete it there.
Comment 1 Milan Kubec 2009-01-13 14:37:51 UTC
I'm not able to reproduce described behavior. Are those packages under Source Packages node? Are they really empty? Are
you able to reproduce it in newly created projects? Thanks for more info.
Comment 2 Martin Fousek 2009-01-19 13:26:30 UTC
I'm sorry. I discover, that the project must be in some Subversion repository. 
So, steps to reproduce...
1, for example checkout some project from SVN repository
2, add empty package and commit it
3, after try to delete this package 
-> it isn't possible in project view (maybe because of .svn directory, but it should be possible to delete it)
Comment 3 Jiri Skrivanek 2009-04-09 13:47:28 UTC
Yes, the package is not deleted because .svn folder exists there. It is possible to delete the package from files view.
So, java refactoring should probably delete also hidden/ignored folders. Related code is here

refactoring.java\src\org\netbeans\modules\refactoring\java\ui\SafeDeleteUI.java#deletePackage()
Comment 4 Ondrej Vrabec 2009-04-30 09:43:21 UTC
*** Issue 163747 has been marked as a duplicate of this issue. ***
Comment 5 Ondrej Vrabec 2009-10-08 13:14:51 UTC
*** Issue 174064 has been marked as a duplicate of this issue. ***
Comment 6 fommil 2009-10-08 13:47:25 UTC
The FIX outlined here is a WORKAROUND. A proper solution is needed.
Comment 7 Martin Fousek 2009-10-08 13:54:23 UTC
Yes, I agree with fommil. Click on the "Files" tab and delete it there isn't good solutions. Many users have these
troubles with deleting and they don't know about this workaround or it's uncomfortable for common work with ide. If are
using regularly SCMs, you hit this issue really often.

Please couldn't you remove hidden folder for deleting in projects tab as well?
Comment 8 Jan Pokorsky 2009-10-08 15:59:21 UTC
OK, it sounds reasonable. I will try to fix this using VisibilityQuery. I cannot delete hidden files/folders directly as
the refactoring module cannot interpret them properly but ignoring invisible content and deleting the package's
DataObject in such a case should help. It is the DataObject owner responsibility to handle delete in the file system
layer properly.
Comment 9 Martin Fousek 2009-10-08 18:13:32 UTC
Thanks, any improvement here in the behaviour will be welcome.
Comment 10 Jan Pokorsky 2009-10-08 18:14:09 UTC
fixed as jet-main #ecfb4b23eb8f
Comment 11 Tomas Stupka 2010-05-10 15:13:05 UTC
two more similar scenarios:
1.) rename a package in the projects view -> new folder is created but the old one isn't removed
2.) multiselect a few packages and delete -> folders aren't deleted

Both cases seem to have the same reason as originally reported
Comment 12 Jan Becicka 2010-10-13 12:06:24 UTC
Changeset: http://hg.netbeans.org/jet-main/rev/bce946de3231
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2010-10-13 14:02
Message:   Issue #156529 - I can't delete empty package in project tab


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo