Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/plugin.xml6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java13
-rw-r--r--bundles/org.eclipse.team.ui/.settings/.api_filters49
-rw-r--r--bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd12
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java21
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java77
6 files changed, 88 insertions, 90 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/plugin.xml b/bundles/org.eclipse.team.cvs.ui/plugin.xml
index f0a564db3..d12e66180 100644
--- a/bundles/org.eclipse.team.cvs.ui/plugin.xml
+++ b/bundles/org.eclipse.team.cvs.ui/plugin.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2001, 2011 IBM Corporation and others.
+ Copyright (c) 2001, 2012 IBM Corporation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
@@ -2071,8 +2071,8 @@
<extension
point="org.eclipse.team.ui.scmUrlImportPages">
<scmUrlImportPage
- page="org.eclipse.team.internal.ccvs.ui.wizards.CVSScmUrlImportWizardPage"
- repository="org.eclipse.team.cvs.core.cvsnature">
+ importer="org.eclipse.team.core.cvs.importer"
+ page="org.eclipse.team.internal.ccvs.ui.wizards.CVSScmUrlImportWizardPage">
</scmUrlImportPage>
</extension>
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java
index 593be8542..937db55e3 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSScmUrlImportWizardPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,7 +21,6 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.RepositoryProviderType;
import org.eclipse.team.core.ScmUrlImportDescription;
import org.eclipse.team.internal.ccvs.core.filesystem.CVSURI;
import org.eclipse.team.internal.ccvs.ui.CVSUIMessages;
@@ -33,7 +32,6 @@ import org.eclipse.ui.ide.IDE;
public class CVSScmUrlImportWizardPage extends WizardPage implements IScmUrlImportWizardPage {
- private RepositoryProviderType provider;
private ScmUrlImportDescription[] descriptions;
private Button useHead;
private TableViewer bundlesViewer;
@@ -244,13 +242,4 @@ public class CVSScmUrlImportWizardPage extends WizardPage implements IScmUrlImpo
private static String getServer(URI scmUri) {
return CVSURI.fromUri(scmUri).getRepository().getHost();
}
-
- public void setProvider(RepositoryProviderType provider) {
- this.provider = provider;
- }
-
- public RepositoryProviderType getProvider() {
- return provider;
- }
-
}
diff --git a/bundles/org.eclipse.team.ui/.settings/.api_filters b/bundles/org.eclipse.team.ui/.settings/.api_filters
new file mode 100644
index 000000000..f4efd870d
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/.settings/.api_filters
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?><component id="org.eclipse.team.ui" version="2">
+ <resource path="META-INF/MANIFEST.MF">
+ <filter id="924844039">
+ <message_arguments>
+ <message_argument value="3.6.200"/>
+ <message_argument value="3.6.100"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/team/ui/IScmUrlImportWizardPage.java" type="org.eclipse.team.ui.IScmUrlImportWizardPage">
+ <filter id="403767336">
+ <message_arguments>
+ <message_argument value="org.eclipse.team.ui.IScmUrlImportWizardPage"/>
+ <message_argument value="ATT_IMPORTER"/>
+ </message_arguments>
+ </filter>
+ <filter id="405864542">
+ <message_arguments>
+ <message_argument value="org.eclipse.team.ui.IScmUrlImportWizardPage"/>
+ <message_argument value="ATT_REPOSITORY"/>
+ </message_arguments>
+ </filter>
+ <filter id="405901410">
+ <message_arguments>
+ <message_argument value="org.eclipse.team.ui.IScmUrlImportWizardPage"/>
+ <message_argument value="getProvider()"/>
+ </message_arguments>
+ </filter>
+ <filter id="405901410">
+ <message_arguments>
+ <message_argument value="org.eclipse.team.ui.IScmUrlImportWizardPage"/>
+ <message_argument value="setProvider(RepositoryProviderType)"/>
+ </message_arguments>
+ </filter>
+ <filter id="1211105284">
+ <message_arguments>
+ <message_argument value="ATT_IMPORTER"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/team/ui/TeamUI.java" type="org.eclipse.team.ui.TeamUI">
+ <filter id="338792546">
+ <message_arguments>
+ <message_argument value="org.eclipse.team.ui.TeamUI"/>
+ <message_argument value="getPages(ScmUrlImportDescription[])"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component> \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd b/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd
index e36c5dde6..ebfe5abe5 100644
--- a/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd
+++ b/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd
@@ -65,13 +65,13 @@ Providers may provide an extension for this extension point, and an implementati
</appInfo>
</annotation>
</attribute>
- <attribute name="repository" type="string" use="required">
+ <attribute name="importer" type="string" use="required">
<annotation>
<documentation>
-
+ The id of the org.eclipse.team.core.bundleImporters extension which is associated with the page extension.
</documentation>
<appInfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.team.core.repository/repository/@id"/>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.team.core.bundleImporters/importer/@id"/>
</appInfo>
</annotation>
</attribute>
@@ -97,8 +97,8 @@ Providers may provide an extension for this extension point, and an implementati
&lt;pre&gt;
&lt;extension point=&quot;org.eclipse.team.ui.scmUrlImportPages&quot;&gt;
&lt;scmUrlImportPage
- page=&quot;org.eclipse.team.internal.ccvs.ui.wizards.CVSScmUrlImportWizardPage&quot;
- repository=&quot;org.eclipse.team.cvs.core.cvsnature&quot;&gt;
+ importer=&quot;org.eclipse.team.core.cvs.importer&quot;
+ page=&quot;org.eclipse.team.internal.ccvs.ui.wizards.CVSScmUrlImportWizardPage&quot;&gt;
&lt;/scmUrlImportPage&gt;
&lt;/extension&gt;
&lt;/pre&gt;
@@ -129,7 +129,7 @@ Providers may provide an extension for this extension point, and an implementati
<meta.section type="copyright"/>
</appInfo>
<documentation>
- Copyright (c) 2011 IBM Corporation and others.
+ Copyright (c) 2011, 2012 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
</documentation>
</annotation>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java
index ad8fc4cd5..733c3ce03 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
package org.eclipse.team.ui;
import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.team.core.RepositoryProviderType;
import org.eclipse.team.core.ScmUrlImportDescription;
/**
@@ -29,7 +28,7 @@ public interface IScmUrlImportWizardPage extends IWizardPage {
public static final String ATT_EXTENSION = "scmUrlImportPages"; //$NON-NLS-1$
public static final String ATT_PAGE = "page"; //$NON-NLS-1$
- public static final String ATT_REPOSITORY = "repository"; //$NON-NLS-1$
+ public static final String ATT_IMPORTER = "importer"; //$NON-NLS-1$
/**
* Called when the import wizard is closed by selecting the finish button.
@@ -60,20 +59,4 @@ public interface IScmUrlImportWizardPage extends IWizardPage {
* the SCM URLs descriptions edited on the page.
*/
public void setSelection(ScmUrlImportDescription[] descriptions);
-
- /**
- * Sets the RepositoryProviderType for the page.
- *
- * @param provider
- * to set
- */
- public void setProvider(RepositoryProviderType provider);
-
- /**
- * Return the RepositoryProviderType associated with the page.
- *
- * @return a RepositoryProviderType for the current page
- */
- public RepositoryProviderType getProvider();
-
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
index c175e9a70..f8c558b7a 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,12 +10,11 @@
*******************************************************************************/
package org.eclipse.team.ui;
-import java.net.URI;
-import java.util.*;
+import java.util.HashSet;
+import java.util.Set;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.team.core.*;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.history.GenericHistoryView;
import org.eclipse.team.internal.ui.registry.TeamContentProviderManager;
@@ -143,64 +142,42 @@ public class TeamUI {
}
/**
- * Return a set of wizard pages for the given descriptions. If no wizard
- * page is registered for a SCM URL scheme from a description then a page
- * will not be created. If an extension exits, a page will be created and
- * initialized with a set of corresponding descriptions.
+ * Return a set of wizard pages for the given importer ID. If no wizard page
+ * is registered for the importer then a page will not be created. If an
+ * extension exits, a page will be created, but it's up to the caller to
+ * initialize the page with a set of corresponding descriptions.
*
- * <strong>EXPERIMENTAL</strong>. This class has been added as part of
- * a work in progress. There is no guarantee that this API will work or that
+ * <strong>EXPERIMENTAL</strong>. This class has been added as part of a
+ * work in progress. There is no guarantee that this API will work or that
* it will remain the same. Please do not use this API without consulting
* with the Team team.
*
- * @param descriptions
- * descriptions with SCM URLs
- * @return initialized wizard pages
+ * @param importerId
+ * the importer ID
+ * @return wizard pages
* @throws CoreException
* if an error occurs while trying to create a page extension
* @since 3.6
*/
- public static IScmUrlImportWizardPage[] getPages(ScmUrlImportDescription[] descriptions) throws CoreException {
- // TODO: check scmUrls
- IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(TeamUIPlugin.PLUGIN_ID, IScmUrlImportWizardPage.ATT_EXTENSION);
+ public static IScmUrlImportWizardPage[] getPages(final String importerId)
+ throws CoreException {
+ IConfigurationElement[] elements = Platform.getExtensionRegistry()
+ .getConfigurationElementsFor(TeamUIPlugin.PLUGIN_ID,
+ IScmUrlImportWizardPage.ATT_EXTENSION);
if (elements.length > 0) {
- Set/*<IScmUrlImportWizardPage>*/ pages = new HashSet();
+ Set/* <IScmUrlImportWizardPage> */pages = new HashSet();
for (int i = 0; i < elements.length; i++) {
- String repository = elements[i].getAttribute(IScmUrlImportWizardPage.ATT_REPOSITORY);
- RepositoryProviderType providerType = RepositoryProviderType.getProviderType(repository);
- String providerScheme = providerType.getFileSystemScheme();
- Set/*<URI>*/ schemeUris = new HashSet();
- // filter out descriptions for which provider is not known
- for (int j = 0; j < descriptions.length; j++) {
- URI scmUri = descriptions[j].getUri();
- if (scmUri != null) {
- if (ProjectSetCapability.SCHEME_SCM.equals(scmUri.getScheme())) {
- if (scmUri.getSchemeSpecificPart().startsWith(providerScheme)) {
- schemeUris.add(scmUri);
- }
- }
- }
- }
- if (schemeUris.size() > 0) {
- Object ext = TeamUIPlugin.createExtension(elements[i], IScmUrlImportWizardPage.ATT_PAGE);
- if (ext instanceof IScmUrlImportWizardPage) {
- IScmUrlImportWizardPage page = (IScmUrlImportWizardPage) ext;
- page.setProvider(providerType);
- Set/*<ScmUrlImportDescription>*/ set = new HashSet();
- for (Iterator iterator = schemeUris.iterator(); iterator.hasNext();) {
- URI uri = (URI) iterator.next();
- for (int j = 0; j < descriptions.length; j++) {
- if (descriptions[j].getUri().equals(uri)) {
- set.add(descriptions[j]);
- }
- }
- }
- page.setSelection((ScmUrlImportDescription[]) set.toArray(new ScmUrlImportDescription[0]));
- pages.add(page);
- }
+ String pageImporterId = elements[i]
+ .getAttribute(IScmUrlImportWizardPage.ATT_IMPORTER);
+ if (importerId.equals(pageImporterId)) {
+ Object ext = TeamUIPlugin.createExtension(elements[i],
+ IScmUrlImportWizardPage.ATT_PAGE);
+ IScmUrlImportWizardPage page = (IScmUrlImportWizardPage) ext;
+ pages.add(page);
}
}
- return (IScmUrlImportWizardPage[]) pages.toArray(new IScmUrlImportWizardPage[0]);
+ return (IScmUrlImportWizardPage[]) pages
+ .toArray(new IScmUrlImportWizardPage[pages.size()]);
}
return null;
}

Back to the top