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 197398 - Problem renaming a folder in a managed project
Summary: Problem renaming a folder in a managed project
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: All All
: P4 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 14:38 UTC by Vladimir Kvashin
Modified: 2014-04-14 14:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2011-04-04 14:38:01 UTC
When renaming a folder in a managed full remote project, it is renamed, but
- Project View does not reflect that
- User still can try opening files in this folder from project view, editor shows these files empty
Comment 1 Leonid Lenyashin 2011-04-04 14:47:46 UTC
So, is there a workaround? What is user supposed to do if he faces such an issue?
Comment 2 Alexander Pepin 2011-04-04 16:21:06 UTC
This happens with a local managed projects as well and it's also reproducible in NB 6.9.1.
Comment 3 Alexander Pepin 2011-04-04 16:30:43 UTC
The workaround is to create a new folder with a new name and move all the files from the old folder to the new one then delete the old folder.
Comment 4 soldatov 2011-04-04 16:48:00 UTC
What is a "folder" in a managed project?
Comment 5 Alexander Pepin 2011-04-04 16:53:16 UTC
Why a managed project can not have any infrastructure? For some reason a user can create a physical folder in Files tab and move some sources into it.
Comment 6 Thomas Preisler 2011-06-15 14:57:02 UTC
Managed projects in general don't track changes to the physical file structures. If you delete a file outside the IDE, the file is not removed from the IDE but instead it is shown as 'invalid' by a badge. This is by design and has been like this since projects were intruduced many years ago. Try the Lex/Yac example to understand how this works.

It is not clear what renaming/moving a folder outside the IDE should do. I guess the result should be all files in the project that are not invalid should be marked as such. This does however not happen and I think that is the bug.

I looked at fixing this but it turns out the CND items doesn't get notifications when a parent folder is renamed. The solutions may be to listen to changes to all parent folders of all files or the file system but it is not practical to do. Not sure how to fix it.

I have removed fix_in_701 as I don't think the bug is very important and there is also a reasonable work-around.
Comment 7 Vladimir Kvashin 2011-07-01 12:01:41 UTC
(In reply to comment #6)
> Managed projects in general don't track changes to the physical file
> structures. If you delete a file outside the IDE...

As a user, I can't agree with that: I rename file via IDE (via Files pane context menu), not outside.