This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 49776 - Renaming src directory in Java project causes problems
Summary: Renaming src directory in Java project causes problems
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on: 33162 49903
Blocks: 41537
  Show dependency tree
 
Reported: 2004-10-01 09:57 UTC by Pavel Fiala
Modified: 2009-11-02 11:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Related solution for Web projects (8.97 KB, text/plain)
2004-10-01 10:09 UTC, Pavel Fiala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Fiala 2004-10-01 09:57:07 UTC
1. Create a new project using New Project -->
Standard --> Java Application
2. In Files Window rename src directory in newly
created project
3. Cancel dialog "Refactor Code for Moved Class"
4. Build project 
Result: The build fails

The problem is already solved for Web projects
(issue #47179). Attached diff can be helpful. The
inner class FileWatch can be used for Java
projects after some modifications.
Comment 1 Pavel Fiala 2004-10-01 10:09:12 UTC
Created attachment 17963 [details]
Related solution for Web projects
Comment 2 Jesse Glick 2004-10-03 20:30:55 UTC
We have no particular plans to support changing the project source
location from the GUI, at least not at the moment. If the user wants
to do this, the user is advised to close the project, make the move on
disk with another tool, and change project.properties manually.
Comment 3 Petr Jiricka 2004-10-04 08:26:23 UTC
> no particular plans to support changing the project source
> location from the GUI

As described in steps to reproduce, changing the source location from
GUI is already supported; or appears to be supported, but does not work.

Comment 4 Pavel Fiala 2004-10-04 08:39:20 UTC
Even if we don't plan to support changing the project source location
from GUI, the renaming source directory either should not cause
exception or it should be disabled.
Comment 5 Jesse Glick 2004-10-04 17:07:37 UTC
"changing the source location from GUI is already supported; or
appears to be supported, but does not work." - it is not supported and
will not be supported for 4.0. Certainly no plans to disable renaming
of anything in the Files tab.
Comment 6 Tomas Zezula 2004-10-04 17:42:44 UTC
The problem is that if you do Rename on "src" folder the refactoring
rename is called. This is probably a bug.
Next problem is that the project.properties is not updated.
We can fix it by listening on the "src" FileObject and updating the
project.properties file. But this will need a listener on the
FileSystem, ugly.
Comment 7 Jesse Glick 2004-10-04 17:58:20 UTC
"The problem is that if you do Rename on "src" folder the refactoring
rename is called. This is probably a bug." - that is definitely a bug
in the refactoring module. I filed issue #49903.

Re. listening on the src file object - I know, it is not easy. Inside
ant/project there is a FileChangeSupport which makes this easier, but
I do not want to expose this API as it belongs in the Filesystems API.
See issue #33162.
Comment 8 Jesse Glick 2004-10-04 20:14:24 UTC
Should possibly be made dupe of issue #48484.
Comment 9 Tomas Zezula 2004-10-05 09:23:27 UTC
It would be very helpful if the issue #33162 will be fixed, the code
for listenning on subtrees is used also in ClassPath.
Comment 10 Tomas Zezula 2004-10-11 15:56:47 UTC
This issue is very marginal. User is nearly unable to do it.
It can not be solved nicely in NB 4.0. 
Will be solved in promo E.
Comment 11 David Strupl 2009-03-31 16:02:53 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 12 Quality Engineering 2009-11-02 11:00:21 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX