[Importer] Avoid AIOBE when root project doesn't have configurator
Change-Id: I2c40b7bb64989ee1cc727ad68db4a3bcf875c0f4
Signed-off-by: Mickael Istria <mistria@redhat.com>
diff --git a/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ImportProposalsWizardPage.java b/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ImportProposalsWizardPage.java
index 71af3ed..f04f42a 100644
--- a/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ImportProposalsWizardPage.java
+++ b/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ImportProposalsWizardPage.java
@@ -104,8 +104,11 @@
if (alreadyExistingProjects.contains(file)) {
return Messages.alreadyImportedAsProject_title;
}
- return ProjectConfiguratorExtensionManager.getLabel(
- ImportProposalsWizardPage.this.potentialProjects.get(file).get(0));
+ List<ProjectConfigurator> configurators = ImportProposalsWizardPage.this.potentialProjects.get(file);
+ if (configurators.isEmpty()) {
+ return ""; //$NON-NLS-1$
+ }
+ return ProjectConfiguratorExtensionManager.getLabel(configurators.get(0));
}
@Override