Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2011-12-23 09:44:53 +0000
committerTomasz Zarna2011-12-23 09:44:53 +0000
commit618e0c9e25740294600cbfeb5275d43229a53e44 (patch)
treed9e829597d5459f77e3cee14a33ac74ddff2f044 /bundles/org.eclipse.team.core/src
parent04c5abb7c7701ed7b46062ec100f7bca77b5a863 (diff)
downloadeclipse.platform.team-618e0c9e25740294600cbfeb5275d43229a53e44.tar.gz
eclipse.platform.team-618e0c9e25740294600cbfeb5275d43229a53e44.tar.xz
eclipse.platform.team-618e0c9e25740294600cbfeb5275d43229a53e44.zip
bug 366790: Allow to specify values from BundleImporterDelegatev20111223-0944
declaratively, in plugin.xml
Diffstat (limited to 'bundles/org.eclipse.team.core/src')
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java26
1 files changed, 22 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java
index eb27bb5fc..f0201a961 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/importing/BundleImporterExtension.java
@@ -10,13 +10,13 @@
*******************************************************************************/
package org.eclipse.team.internal.core.importing;
-import java.util.Map;
+import java.util.*;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.*;
+import org.eclipse.team.core.RepositoryProviderType;
import org.eclipse.team.core.ScmUrlImportDescription;
-import org.eclipse.team.core.importing.provisional.IBundleImporter;
-import org.eclipse.team.core.importing.provisional.IBundleImporterDelegate;
+import org.eclipse.team.core.importing.provisional.*;
import org.eclipse.team.internal.core.TeamPlugin;
/**
@@ -58,7 +58,25 @@ public class BundleImporterExtension implements IBundleImporter {
*/
private synchronized IBundleImporterDelegate getDelegate() throws CoreException {
if (delegate == null) {
- delegate = (IBundleImporterDelegate) element.createExecutableExtension("class"); //$NON-NLS-1$
+ delegate = new BundleImporterDelegate() {
+ private Set supportedValues;
+ private RepositoryProviderType providerType;
+ protected Set getSupportedValues() {
+ if (supportedValues == null) {
+ IConfigurationElement[] supported = element.getChildren("supported"); //$NON-NLS-1$
+ supportedValues = new HashSet(supported.length);
+ for (int i = 0; i < supported.length; i++) {
+ supportedValues.add(supported[i].getAttribute("value")); //$NON-NLS-1$
+ }
+ }
+ return supportedValues;
+ }
+ protected RepositoryProviderType getProviderType() {
+ if (providerType == null)
+ providerType = RepositoryProviderType.getProviderType(element.getAttribute("repository")); //$NON-NLS-1$
+ return providerType;
+ }
+ };
}
return delegate;
}

Back to the top