Hamdi
Hamdi

Reputation: 439

Why Eclipse has ignored the .project file?

I imported a java project in eclipse:

As far as I know, the name taken by eclipse should be the one stated in the '.project' file, not the project directory name. So I want to know why eclipse has ignored the .project file?

PS: '.project' file was generated by gradle eclipse task

Upvotes: 0

Views: 229

Answers (1)

greg-449
greg-449

Reputation: 111142

The name in the .project files sets the name value in the IProjectDescription for the project (see IProject.getDescription()).

The name in the project description is used as the default for the project name while creating the project but the final name is always the last part of the project path.

The code for this is in org.eclipse.core.internal.resources.Project

Upvotes: 2

Related Questions