-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate project names handling in SmartImport wizard is broken #1294
Comments
Instead of checking only the project name for clashes one should really compare the project location (i.e. full path). @mickaelistria Since you once fixed 4d20901 how was this ever supposed to work? |
The issues seems to be the additional check in https://github.com/eclipse-platform/eclipse.platform.ui/blob/f4f59cebf2d6e22201284f6722eeefa4d1929115/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java#L225C15-L225C36 added with 45b2826. |
@kwin sounds like you already analysed that in detail. Please provide a PR to improve this. We are currently in feature freeze for 2023-12 but once master opens for 2024-03 (in a few weeks) a valid patch could be applied. |
If there are already some .project in the folders; then we cannot decide of another project name at import and wizard sticks to the project name defined in .project. Is some project with same name already exists, then the import cannot work automatically. |
@mickaelistria The check is really only about the name, there is no .project in those folders anywhere: Line 721 in f4f59ce
I posted the wrong screenshot above initially, it is now fixed. It indeed says "Project with same name already imported" which is true but should not prevent importing that. |
No sorry.
The expectation is that if a project with same name as the folder already exists and there is no .project to force the name, then the importer attempts to set then name to parentFolder_currentFolder , recursively, until the name is free. |
Is this not more a bug than a feature? |
Only block if new project's description's name is set and already taken. Otherwise the smart import will come up with a new project name prepending the parent folder name followed by "_" (recursively). Fixes eclipse-platform#1294
Any chance this can be included as bug fix for 2023-12? |
None, sorry. |
Only block if new project's description's name is set and already taken. Otherwise the smart import will come up with a new project name prepending the parent folder name followed by "_" (recursively). Fixes eclipse-platform#1294
Only block if new project's description's name is set and already taken. Otherwise the smart import will come up with a new project name prepending the parent folder name followed by "_" (recursively). Fixes eclipse-platform#1294
Only block if new project's description's name is set and already taken. Otherwise the smart import will come up with a new project name prepending the parent folder name followed by "_" (recursively). Fixes eclipse-platform#1294
According to https://github.com/eclipse-platform/eclipse.platform.ui/blob/f4f59cebf2d6e22201284f6722eeefa4d1929115/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportJob.java#L608C1-L608C1 there should be a graceful project name handling in case of duplicates. Unfortunately the wizard using https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java already blocks triggering the SmartImportJob due to the conflicting project names (although coming from another root folder):
The validation probably needs to be relaxed as at least for Maven projects duplicate folder names are quite common (in separate repositories).
The text was updated successfully, but these errors were encountered: