Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2011-01-31 11:34:44 -0500
committerTomasz Zarna2011-01-31 11:34:44 -0500
commit3f5f2cdc2af9419620a2e0d51e30de2d0ae550cb (patch)
treeefd76549259a4d4ae069b7c9c49821840d1ffae5
parentdc994b644a3b43757b23b1853559a585d6874493 (diff)
downloadeclipse.platform.team-3f5f2cdc2af9419620a2e0d51e30de2d0ae550cb.tar.gz
eclipse.platform.team-3f5f2cdc2af9419620a2e0d51e30de2d0ae550cb.tar.xz
eclipse.platform.team-3f5f2cdc2af9419620a2e0d51e30de2d0ae550cb.zip
bug 330490: API and UI to configure SCM URLs for import -- API comments
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java23
-rw-r--r--bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd29
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/IScmUrlImportWizardPage.java33
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamUI.java19
4 files changed, 88 insertions, 16 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java
index bfe889171..1b8e797b2 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/ScmUrlImportDescription.java
@@ -14,6 +14,19 @@ import java.net.URI;
/**
+ * Describes how a bundle import will be executed. A bundle importer delegate
+ * creates bundle import descriptions when it validates bundle manifests for
+ * importing. The result, a set of bundle import descriptions is then passed to
+ * TeamUI, which basing on the info from the descriptions instantiate and
+ * initialize IScmUrlImportWizardPage pages. The pages can be used to alter the
+ * default import configuration e.g. for bundles stored in a CVS repository the
+ * user may want to check out HEAD rather than a specific version.
+ * <p>
+ * <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.
+ *
* @since 3.6
*/
public class ScmUrlImportDescription {
@@ -25,10 +38,18 @@ public class ScmUrlImportDescription {
this.project = project;
}
+ /**
+ * @return project name
+ */
public String getProject() {
return project;
}
+ /**
+ * SCM URL
+ *
+ * @return a string representation of the SCM URL
+ */
public String getUrl() {
return url;
}
@@ -43,7 +64,7 @@ public class ScmUrlImportDescription {
public Object getProperty(String plugin) {
// TODO Auto-generated method stub
- // called here: org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizardFirstPage.configureBundleImportPages(IPluginModelBase[])
+ // called by: org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizardFirstPage.configureBundleImportPages(IPluginModelBase[])
return null;
}
}
diff --git a/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd b/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd
index ca8377baa..0de841ea6 100644
--- a/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd
+++ b/bundles/org.eclipse.team.ui/schema/scmUrlImportPages.exsd
@@ -3,10 +3,12 @@
<schema targetNamespace="org.eclipse.team.ui" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appInfo>
- <meta.schema plugin="org.eclipse.team.ui" id="scmUrlImportPages" name="%ScmUrlImportPage"/>
+ <meta.schema plugin="org.eclipse.team.ui" id="scmUrlImportPages" name="SCM URLs Import Pages"/>
</appInfo>
<documentation>
- [Enter description of this extension point.]
+ This extension point is used to register a page to import a project basing on its SCM URL.
+&lt;p&gt;
+Providers may provide an extension for this extension point, and an implementation of &lt;samp&gt;org.eclipse.team.ui.IScmUrlImportWizardPage&lt;/samp&gt; which allows to set and retrive project import descriptions.
</documentation>
</annotation>
@@ -77,7 +79,7 @@
<meta.section type="since"/>
</appInfo>
<documentation>
- [Enter the first release in which this extension point appears.]
+ 3.6
</documentation>
</annotation>
@@ -86,7 +88,17 @@
<meta.section type="examples"/>
</appInfo>
<documentation>
- [Enter extension point usage example here.]
+ The following is an example of a import page CVS:
+&lt;p&gt;
+&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;
+ &lt;/scmUrlImportPage&gt;
+&lt;/extension&gt;
+&lt;/pre&gt;
+&lt;/p&gt;
</documentation>
</annotation>
@@ -108,5 +120,14 @@
</documentation>
</annotation>
+ <annotation>
+ <appInfo>
+ <meta.section type="copyright"/>
+ </appInfo>
+ <documentation>
+ Copyright (c) 2011 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>
</schema>
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 8bf70174e..bd01dec6a 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
@@ -15,7 +15,13 @@ import org.eclipse.team.core.RepositoryProviderType;
import org.eclipse.team.core.ScmUrlImportDescription;
/**
- * TODO: <strong>EXPERIMENTAL</strong>
+ * IScmUrlImportWizardPage defines the interface that users of the extension
+ * point <code>org.eclipse.team.ui.scmUrlImportPages</code> must implement.
+ *
+ * <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.
*
* @since 3.6
*/
@@ -34,22 +40,35 @@ public interface IScmUrlImportWizardPage extends IWizardPage {
public boolean finish();
/**
- * TODO:
+ * Return the import descriptions for the page. The descriptions may differ
+ * from those initially set using
+ * {@link #setSelection(ScmUrlImportDescription[])} if the user modified
+ * import configuration.
*
- * @return the SCM URLs edited or created on the page.
+ * @return the SCM URLs descriptions for the page.
*/
public ScmUrlImportDescription[] getSelection();
/**
- * TODO:
+ * Sets the import descriptions to be edited on the page.
+ * The passed descriptions can be edited and should be
+ * returned in {@link #getSelection()}.
*
- * @param scmUrls
- * the SCM URLs edited on the page.
+ * @param descriptions
+ * the SCM URLs descriptions edited on the page.
*/
- public void setSelection(ScmUrlImportDescription[] scmUrls);
+ public void setSelection(ScmUrlImportDescription[] descriptions);
+ /**
+ * TODO:
+ * @param provider
+ */
public void setProvider(RepositoryProviderType provider);
+ /**
+ * TODO:
+ * @return provider
+ */
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 f56b7bd03..20d7da6b6 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
@@ -143,10 +143,21 @@ public class TeamUI {
}
/**
- * TODO:
- * <strong>EXPERIMENTAL</strong>
- * @param descriptions
- * @throws CoreException
+ * 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.
+ *
+ * <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
+ * @throws CoreException
+ * if an error occurs while trying to create a page extension
* @since 3.6
*/
public static IScmUrlImportWizardPage[] getPages(ScmUrlImportDescription[] descriptions) throws CoreException {

Back to the top