Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2008-12-17 22:31:20 +0000
committerAndrew Niefer2008-12-17 22:31:20 +0000
commit672a3c836fb1401ebf7e50f2d99ae6faf1c7e139 (patch)
treebf79f05659d7c5212a627e26daeaaf0e1ae61bab
parent65cdc91bbfd082a3a6d7ff5c0a2aa76c06a3ec47 (diff)
downloadrt.equinox.p2-672a3c836fb1401ebf7e50f2d99ae6faf1c7e139.tar.gz
rt.equinox.p2-672a3c836fb1401ebf7e50f2d99ae6faf1c7e139.tar.xz
rt.equinox.p2-672a3c836fb1401ebf7e50f2d99ae6faf1c7e139.zip
bug 240254 - category generation
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
index 571c1a594..35d67da0d 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src_ant/org/eclipse/equinox/internal/p2/metadata/generator/ant/GeneratorTask.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.metadata.generator.ant;
+import java.net.MalformedURLException;
+import java.net.URL;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication;
@@ -197,4 +199,16 @@ public class GeneratorTask extends Task {
provider = new EclipseInstallGeneratorInfoProvider();
provider.setVersionAdvice(advice);
}
+
+ public void setSite(String site) {
+ if (site == null || site.startsWith("${")) //$NON-NLS-1$
+ return;
+ if (provider == null)
+ provider = new EclipseInstallGeneratorInfoProvider();
+ try {
+ provider.setSiteLocation(new URL(site));
+ } catch (MalformedURLException e) {
+ throw new IllegalArgumentException("The specified location (" + site + ") is not a valid URL."); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
}

Back to the top