diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java index 94c470bb766..4926360298a 100644 --- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java +++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java @@ -787,14 +787,19 @@ private String getValue(String s) { } } - protected boolean isExistingProject(File element) { + + private IProject findExistingProject(File element) { for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) { IPath location = project.getLocation(); if (location != null && element.equals(location.toFile())) { - return true; + return project; } } - return false; + return null; + } + + protected boolean isExistingProject(File element) { + return findExistingProject(element) != null; } protected boolean isExistingProjectName(File element) {