In our Eclipse plugin are we managing some resources using navigator. For every folder in the navigator Eclipse is creating an .project file which leads to some problem in the code under resource management.

One way is to filter .project file pragmatically. But I wonder if there is a configuration or setting in Eclipse to prevent creation of .project files for the maps under navigator?

有帮助吗?

解决方案

.project files created by Eclipse IDE is essential cannot be prevented from generation.

For Further information please refer to documentation at Eclipse Documentation.

EDIT:

The workaround would be to create a project in your workspace and then create a linked folder to the resources you want to scan that are somewhere else on the file system.

其他提示

Don't try to delete the project meta data. That will lead to more trouble afterwards than simply configuring the team API to ignore the .project files during all version control operations. That .project file contains meta information from all plugins, not only from yours.

Depending on the VCS used, you should just create a default .gitignore, svn:ignore, or whatever you need.

Besides that, I would simply call it a bug in your plugin that it tries to do something with that file. It simply should not do that. Other plugins will create other files in the projects and you should not try to handle each and every file, if they don't belong to your plugin. The JDT plugin also knows which files to compile and which to ignore.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top