eclipse-platform / .github

Common contribution content for eclipse-platform repositories
https://www.eclipse.org/eclipse/
5 stars 10 forks source link

Importing a project doesn't support package explicite path as a package #89

Closed BeyeSellem closed 1 year ago

BeyeSellem commented 1 year ago

Description:

When I import a project which includes a package defined as following eclipse_package_issue

In a way, it accepts only the package name, (i.e "package phare" is ok) but not its explicit name even, intellij for example accepts both format.

mickaelistria commented 1 year ago

In this case of a Maven project, src/main/java is a root source folder and the package is actually meant to be the relative folder under this source folder. So content of src/main/java/phare is actually package phare and thus the file should only say package phare. If you want to make it eg package tp3.phare, you'll need to place it in src/main/java/tp3/phare

BeyeSellem commented 1 year ago

Thanks for your feedback ! Sure, you know it comes annoying when you import a project which has many classes, that you may create in another ide so you have this kind of syntax , then when you import it in eclipse, you will have to change it in each class … so I think it might be nice to support this syntax also :)

mickaelistria commented 1 year ago

OK, so the suggestion is a quick-fix to fix all package declaration at once (changing package tp3.src.main..java.phare to package phare il all files under the file folder)? I think it's an interesting suggestion, the best place to suggest it is by opening an enhancement suggestion to the Java Development Tools plugin, https://github.com/eclipse-jdt/eclipse.jdt.ui/issues .