Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2015-11-20 06:55:53 +0000
committerMickael Istria2015-11-20 06:55:53 +0000
commitf411df205cd17ec20020c3d7f664ee4ca6fefc4e (patch)
tree2c69cb2d2c599cc69efedbf5c18ab0961ed83d2b
parent4004895e273e11385e3a76b051f9c8e95606c8f1 (diff)
downloadorg.eclipse.e4.ui-f411df205cd17ec20020c3d7f664ee4ca6fefc4e.tar.gz
org.eclipse.e4.ui-f411df205cd17ec20020c3d7f664ee4ca6fefc4e.tar.xz
org.eclipse.e4.ui-f411df205cd17ec20020c3d7f664ee4ca6fefc4e.zip
[Importer] Fix importer label in proposals
-rw-r--r--bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ImportProposalsWizardPage.java9
-rw-r--r--bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ProjectConfiguratorExtensionManager.java2
2 files changed, 6 insertions, 5 deletions
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 bbec13ab..71af3ede 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
@@ -63,6 +63,7 @@ public class ImportProposalsWizardPage extends WizardPage implements IPageChange
private Button recurseInSelectedProjectsCheckbox;
private EasymportJob currentJob;
private Label selectionSummary;
+ protected Map<File, List<ProjectConfigurator>> potentialProjects;
private class FolderForProjectsLabelProvider extends CellLabelProvider implements IColorProvider {
public String getText(Object o) {
@@ -100,11 +101,11 @@ public class ImportProposalsWizardPage extends WizardPage implements IPageChange
private class ProjectConfiguratorLabelProvider extends CellLabelProvider implements IColorProvider {
public String getText(Object o) {
File file = (File)o;
- String label = file.getAbsolutePath();
- if (alreadyExistingProjects.contains(o)) {
+ if (alreadyExistingProjects.contains(file)) {
return Messages.alreadyImportedAsProject_title;
}
- return "todo";
+ return ProjectConfiguratorExtensionManager.getLabel(
+ ImportProposalsWizardPage.this.potentialProjects.get(file).get(0));
}
@Override
@@ -269,7 +270,7 @@ public class ImportProposalsWizardPage extends WizardPage implements IPageChange
getContainer().run(false, false, new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- final Map<File, List<ProjectConfigurator>> potentialProjects = getWizard().getImportJob().getImportProposals(monitor);
+ ImportProposalsWizardPage.this.potentialProjects = getWizard().getImportJob().getImportProposals(monitor);
if (potentialProjects.size() == 0) {
MessageDialog.openInformation(getShell(),
Messages.didntFindImportProposals_title,
diff --git a/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ProjectConfiguratorExtensionManager.java b/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ProjectConfiguratorExtensionManager.java
index afec7d4a..3f21be25 100644
--- a/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ProjectConfiguratorExtensionManager.java
+++ b/bundles/org.eclipse.e4.ui.importer/src/org/eclipse/ui/internal/wizards/datatransfer/ProjectConfiguratorExtensionManager.java
@@ -159,7 +159,7 @@ public class ProjectConfiguratorExtensionManager {
return res;
}
- public static Object getLabel(ProjectConfigurator configurator) {
+ public static String getLabel(ProjectConfigurator configurator) {
IConfigurationElement[] extensions = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_POINT_ID);
for (IConfigurationElement extension : extensions) {
if (configurator.getClass().getName().equals(extension.getAttribute("class"))) {

Back to the top