This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have a project that has a source directory under the directory where the project file is located. Also, there are files that are part of the project that are in sub-folders above the project directory.
C:\Product\Project\.project file
C:\Product\Project\Source\.c & .h files These seem to unlinked in sort of live folder view
C:\Product\Project\Common\.c & .h files that used by multiple projects. I have been calling these linked
When I right-click on a linked file in the Project Explorer and select Delete, it removes it from the project.
When I right-click on a non-linked file in the Project Explorer and select Delete, it deletes the file from the hard drive. All I really want is to get it out of the Project. I don't want it deleted from the hard drive.
Am I misunderstanding something? This inconsistent behaviour does not make sense to me.
Regards,
Jim
Jim,
The Project Explorer is (mostly) a representation of the actual project folder filesystem. Adding (instead of linking) a file to a project in Eclipse means you are physically copying the file and dropping it into the project folder. Likewise, deleting a non-linked file from the project means you are removing the physical file from the project folder.
The reason why it works differently for linked files is because the file does not actually reside in the project folder. All the project has is a reference (link) to the file. It is the "link" that is part of the project and what you see in the project explorer. So when you delete the linked file in the project explorer, you are deleting the link, not the file (though you have the option to do so if you wish).
Hope this clear it up
Thanks
ki
Hi Ki,
Thanks for the reply.
These behavior seems just arbitrary and quirky does it not? I mean a project file is just a list of files, attributes, etc that are needed to build successfully. A source file is no more or less special just because it resides in a directory at or below the directory where the project file is. Why should those be "live file representations" of anything in the folder? While other files, say a Common Source Code base for a product, located elsewhere has a completely different representation and presentation rules & management?
I am not sure if this is an Eclipse behavior or the TI plugin\additions but it is what it is. Personally, I think the behavior should be redesigned for a future release. But, that's just my 2 cents worth ;-)
Regards,
Jim