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 192216 - copy source files doesn't copy new files created outside of IDE
Summary: copy source files doesn't copy new files created outside of IDE
Status: RESOLVED WONTFIX
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-20 16:07 UTC by nbphpuser
Modified: 2011-10-17 14:24 UTC (History)
0 users

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 nbphpuser 2010-11-20 16:07:16 UTC
Hello,

if I add files to the project via explorer, IDE shows them, but doesn't copy to the defined location. Only changing a file in IDE invokes copying.
Comment 1 Petr Pisl 2010-11-22 13:50:37 UTC
Could you please describe step by step how to reproduce it? It's not clear for me and what I have tried it works.
Comment 2 nbphpuser 2010-11-22 21:34:44 UTC
1. Close IDE
2. Add some new files via a file manager
3. Start IDE
4. After scanning sources, new files were not copied to another location (both locations are on the same machine w7 disks c and d)
5. modify one of the new files, save, copy to another location works only for edited files. Other new files were not copied
6. If you add a new file and IDE is running, everything works as expected
Comment 3 Petr Pisl 2010-12-10 13:55:18 UTC
I'm sorry, but I need to clarify more things. What exactly do you mean by copying to another location? You mean to the something like when you run a project and the sources are copied to the destination folder?
Comment 4 nbphpuser 2010-12-10 14:00:41 UTC
Click on project properties -> sources. There is checkbox "copy files from sources folder to another location". There I have specified my another folder.

Usualy, files are copied after saving them. And I think, thats a problem. Copy support should work also after initial or manually rescanning sources, not only on save event.
Comment 5 Petr Pisl 2011-01-03 13:58:17 UTC
Thanks for clarification. Now it's clear.
Comment 6 Petr Pisl 2011-01-03 16:37:20 UTC
The current copy support is based on the file events. So copy support doesn't know nothing about files that are created, when the ide doesn't run. The current implementation copies files directly (without an event) only when the option "Copy files from Source folder to another location"  is set to true. But there is a condition that the target folder has to be empty.

I would create very simple fix, that will copy all files during startup, but we probably don't want to do it. The reason is slowdown during the IDE startup / opening a project. It requires at least two more disk touches that can significantly increase the time, when a project is bigger (has many source files).

So probably the best solution would be to create a new action in context menu over the Source node (the name can be "Copy into ${location}") that will enabled only when the option "Copy files from Source folder to another location" is turned on.

The workaround is to copy such files (created when the ide was down) in to the target folder manually. 

There is one more bug, when you switch "Copy files from Source folder to another location" off, then you are not able to switch it on again for the same folder through ui. Workaround for this is go to the nbproject/private/private.properties file and set option "copy.src.files=true";
Comment 7 OndrejBrejla 2011-02-14 14:58:13 UTC
I can reproduce it.
Comment 8 Petr Pisl 2011-10-14 09:26:03 UTC
Project area. Reassigning.
Comment 9 Tomas Mysik 2011-10-17 14:24:41 UTC
(In reply to comment #2)
> 1. Close IDE
> 2. Add some new files via a file manager
> 3. Start IDE

This scenario is not supported, sorry.