From 70a60895fe8f31fcbab16b14dd763084bf97dea7 Mon Sep 17 00:00:00 2001 From: Deepika Udayagiri Date: Tue, 4 Aug 2026 11:05:50 +0530 Subject: [PATCH] Extract findExistingProject from isExistingProject --- .../datatransfer/SmartImportRootWizardPage.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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) {