Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2008-11-07 20:30:40 +0000
committerJohn Arthorne2008-11-07 20:30:40 +0000
commit439356b40487f691fc68c0c90eedce5d73d65c0f (patch)
tree850de2bb2b3de669a0563206c6b900296882c2d5
parentc27781f153c992436565fa3a66a65593703c8bb5 (diff)
downloadrt.equinox.p2-439356b40487f691fc68c0c90eedce5d73d65c0f.tar.gz
rt.equinox.p2-439356b40487f691fc68c0c90eedce5d73d65c0f.tar.xz
rt.equinox.p2-439356b40487f691fc68c0c90eedce5d73d65c0f.zip
Delete unused code in generator
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java86
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DigestParser.java110
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java13
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java55
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java205
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java117
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties4
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties7
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java57
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch45
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java7
20 files changed, 42 insertions, 803 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java
index 555d7eac2..8663c54ed 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/Messages.java
@@ -14,14 +14,11 @@ public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.equinox.internal.p2.metadata.generator.messages";//$NON-NLS-1$
public static String exception_errorConverting;
- public static String exception_outputStream;
public static String exception_errorParsingUpdateSite;
public static String exception_stateAddition;
public static String exception_sourceDirectoryInvalid;
- public static String exception_artifactRepoLocationURL;
public static String exception_artifactRepoNotWritable;
public static String exception_artifactRepoNotSpecified;
- public static String exception_metadataRepoLocationURL;
public static String exception_metadataRepoNotWritable;
public static String exception_metadataRepoNotSpecified;
public static String exception_baseLocationNotSpecified;
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java
index 8a7d137d7..6552f5629 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DefaultSiteParser.java
@@ -10,7 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.metadata.generator.features;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.*;
import javax.xml.parsers.*;
import org.eclipse.core.runtime.*;
@@ -598,9 +599,6 @@ public class DefaultSiteParser extends DefaultHandler {
feature.setURLString(urlInfo);
- String type = attributes.getValue("type"); //$NON-NLS-1$
- feature.setType(type);
-
// if one is null, and not the other
if (noId ^ noVersion) {
String[] values = new String[] {id, ver, getState(currentState)};
@@ -610,43 +608,13 @@ public class DefaultSiteParser extends DefaultHandler {
feature.setFeatureVersion(ver);
}
- // get label if it exists
- String label = attributes.getValue("label"); //$NON-NLS-1$
- if (label != null) {
- if ("".equals(label.trim())) //$NON-NLS-1$
- label = null;
- checkTranslated(label);
- }
- feature.setLabel(label);
-
- // OS
- String os = attributes.getValue("os"); //$NON-NLS-1$
- feature.setOS(os);
-
- // WS
- String ws = attributes.getValue("ws"); //$NON-NLS-1$
- feature.setWS(ws);
-
- // NL
- String nl = attributes.getValue("nl"); //$NON-NLS-1$
- feature.setNL(nl);
-
- // arch
- String arch = attributes.getValue("arch"); //$NON-NLS-1$
- feature.setArch(arch);
-
- //patch
- String patch = attributes.getValue("patch"); //$NON-NLS-1$
- feature.setPatch(patch);
-
SiteModel site = (SiteModel) objectStack.peek();
site.addFeature(feature);
- feature.setSiteModel(site);
objectStack.push(feature);
if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End Processing DefaultFeature Tag: url:" + urlInfo + " type:" + type); //$NON-NLS-1$ //$NON-NLS-2$
+ debug("End Processing DefaultFeature Tag: url:" + urlInfo); //$NON-NLS-1$
}
@@ -671,70 +639,22 @@ public class DefaultSiteParser extends DefaultHandler {
// create site map
SiteModel site = new SiteModel();
- // if URL is specified, it replaces the URL of the site
- // used to calculate the location of features and archives
- String siteURL = attributes.getValue("url"); //$NON-NLS-1$
- if (siteURL != null && !("".equals(siteURL.trim()))) { //$NON-NLS-1$
- if (!siteURL.endsWith("/") && !siteURL.endsWith(File.separator)) { //$NON-NLS-1$
- siteURL += "/"; //$NON-NLS-1$
- }
- site.setLocationURLString(siteURL);
- }
-
// provide default description URL
// If <description> is specified, for the site, it takes precedence
URLEntry description = new URLEntry();
description.setURL(DEFAULT_INFO_URL);
site.setDescription(description);
- // verify we can parse the site ...if the site has
- // a different type throw an exception to force reparsing
- // with the matching parser
- String type = attributes.getValue("type"); //$NON-NLS-1$
- site.setType(type);
-
// get mirrors, if any
String mirrorsURL = attributes.getValue("mirrorsURL"); //$NON-NLS-1$
if (mirrorsURL != null && mirrorsURL.trim().length() > 0) {
- // URLEntry[] mirrors = getMirrors(mirrorsURL);
- // if (mirrors != null)
- // site.setMirrors(mirrors);
- // else
-
- //Since we are parsing the site at p2 generation time and the
- //mirrors may change, there is no point doing the mirror expansion now
site.setMirrorsURLString(mirrorsURL);
}
- String pack200 = attributes.getValue("pack200"); //$NON-NLS-1$
- if (pack200 != null && new Boolean(pack200).booleanValue()) {
- site.setSupportsPack200(true);
- }
-
- String digestURL = attributes.getValue("digestURL"); //$NON-NLS-1$
- if (digestURL != null)
- site.setDigestURLString(digestURL);
-
- // TODO: Digest locales
- // if ((attributes.getValue("availableLocales") != null) && (!attributes.getValue("availableLocales").trim().equals(""))) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
- // StringTokenizer locals = new StringTokenizer(attributes.getValue("availableLocales"), ","); //$NON-NLS-1$//$NON-NLS-2$
- // String[] availableLocals = new String[locals.countTokens()];
- // int i = 0;
- // while (locals.hasMoreTokens()) {
- // availableLocals[i++] = locals.nextToken();
- // }
- // extendedSite.setAvailableLocals(availableLocals);
- // }
- // }
- //
if (attributes.getValue(ASSOCIATE_SITES_URL) != null)
site.setAssociateSites(getAssociateSites(attributes.getValue(ASSOCIATE_SITES_URL)));
objectStack.push(site);
-
- if (Tracing.DEBUG_GENERATOR_PARSING)
- debug("End process Site tag: siteURL:" + siteURL + " type:" + type);//$NON-NLS-1$ //$NON-NLS-2$
-
}
/**
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DigestParser.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DigestParser.java
deleted file mode 100644
index 26df487b5..000000000
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/DigestParser.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.internal.p2.metadata.generator.features;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import javax.xml.parsers.*;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.equinox.internal.p2.core.helpers.LogHelper;
-import org.eclipse.equinox.internal.p2.metadata.generator.Activator;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.Feature;
-import org.eclipse.osgi.util.NLS;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Default feature parser.
- * Parses the feature manifest file as defined by the platform.
- *
- * @since 3.0
- */
-public class DigestParser extends DefaultHandler {
-
- private final static SAXParserFactory parserFactory = SAXParserFactory.newInstance();
- private SAXParser parser;
- private final List features = new ArrayList();
- private final FeatureParser featureHandler = new FeatureParser(false);
-
- public DigestParser() {
- super();
- try {
- parserFactory.setNamespaceAware(true);
- this.parser = parserFactory.newSAXParser();
- } catch (ParserConfigurationException e) {
- System.out.println(e);
- } catch (SAXException e) {
- System.out.println(e);
- }
- }
-
- public void characters(char[] ch, int start, int length) throws SAXException {
- featureHandler.characters(ch, start, length);
- }
-
- public void endElement(String uri, String localName, String qName) throws SAXException {
- if ("digest".equals(localName)) { //$NON-NLS-1$
- return;
- }
- if ("feature".equals(localName)) { //$NON-NLS-1$
- Feature feature = featureHandler.getResult();
- features.add(feature);
- } else
- featureHandler.endElement(uri, localName, qName);
- }
-
- public Feature[] parse(File location) {
- if (!location.exists())
- return null;
-
- JarFile jar = null;
- InputStream is = null;
- try {
- jar = new JarFile(location);
- JarEntry entry = jar.getJarEntry("digest.xml"); //$NON-NLS-1$
- if (entry == null)
- return null;
- is = new BufferedInputStream(jar.getInputStream(entry));
- parser.parse(new InputSource(is), this);
- return (Feature[]) features.toArray(new Feature[features.size()]);
- } catch (IOException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.DefaultSiteParser_ErrorReadingDigest, location), e));
- } catch (SAXException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.DefaultSiteParser_ErrorReadingDigest, location), e));
- } finally {
- try {
- if (is != null)
- is.close();
- } catch (IOException e1) {
- //
- }
- try {
- if (jar != null)
- jar.close();
- } catch (IOException e) {
- //
- }
- }
- return null;
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- if ("digest".equals(localName)) { //$NON-NLS-1$
- return;
- }
- featureHandler.startElement(uri, localName, qName, attributes);
- }
-
-}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java
index 40107bfc7..c6a06273e 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/FeatureParser.java
@@ -85,10 +85,6 @@ public class FeatureParser extends DefaultHandler {
characters = null;
}
- public Feature getResult() {
- return result;
- }
-
private void loadProperties(File directory, Properties properties) {
//skip directories that don't contain a feature.properties file
File file = new File(directory, "feature.properties"); //$NON-NLS-1$
@@ -244,18 +240,10 @@ public class FeatureParser extends DefaultHandler {
// System.out.println(NLS.bind(Messages.FeatureParser_IdOrVersionInvalid, (new String[] { id, ver})));
} else {
result = createFeature(id, ver);
-
- String os = attributes.getValue("os"); //$NON-NLS-1$
- String ws = attributes.getValue("ws"); //$NON-NLS-1$
- String nl = attributes.getValue("nl"); //$NON-NLS-1$
- String arch = attributes.getValue("arch"); //$NON-NLS-1$
- result.setEnvironment(os, ws, arch, nl);
-
result.setApplication(attributes.getValue("application")); //$NON-NLS-1$
result.setPlugin(attributes.getValue("plugin")); //$NON-NLS-1$
result.setExclusive(Boolean.valueOf(attributes.getValue("exclusive")).booleanValue()); //$NON-NLS-1$
result.setPrimary(Boolean.valueOf(attributes.getValue("primary")).booleanValue()); //$NON-NLS-1$
- result.setColocationAffinity(attributes.getValue("colocation-affinity")); //$NON-NLS-1$
//TODO rootURLs
if (url != null && "file".equals(url.getProtocol())) { //$NON-NLS-1$
@@ -268,7 +256,6 @@ public class FeatureParser extends DefaultHandler {
result.setProviderName(localize(attributes.getValue("provider-name"))); //$NON-NLS-1$
result.setLabel(localize(attributes.getValue("label"))); //$NON-NLS-1$
- result.setImage(attributes.getValue("image")); //$NON-NLS-1$
// Utils.debug("End process DefaultFeature tag: id:" +id + " ver:" +ver + " url:" + feature.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java
index ac76a3cea..dce8bba54 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/Messages.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 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
@@ -24,7 +24,6 @@ public final class Messages extends NLS {
public static String DefaultSiteParser_Missing;
public static String DefaultSiteParser_ParsingStackBackToInitialState;
public static String DefaultSiteParser_ElementAlreadySet;
- public static String DefaultSiteParser_CategoryAlreadySet;
public static String DefaultSiteParser_UnknownEndState;
public static String DefaultSiteParser_ErrorParsing;
public static String DefaultSiteParser_ErrorlineColumnMessage;
@@ -32,8 +31,6 @@ public final class Messages extends NLS {
public static String DefaultSiteParser_UnknownState;
public static String DefaultSiteParser_InvalidXMLStream;
public static String DefaultSiteParser_mirrors;
- public static String DefaultSiteParser_ErrorReadingDigest;
-
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java
index 2eacb1597..e29d5dfca 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/ProductFile.java
@@ -60,7 +60,6 @@ public class ProductFile extends DefaultHandler {
private static final String LAUNCHER_ARGS = "launcherArgs"; //$NON-NLS-1$
private static final String PLUGINS = "plugins"; //$NON-NLS-1$
private static final String FEATURES = "features"; //$NON-NLS-1$
- private static final String SPLASH = "splash"; //$NON-NLS-1$
private static final String P_USE_ICO = "useIco"; //$NON-NLS-1$
//These constants form a small state machine to parse the .product file
@@ -88,9 +87,6 @@ public class ProductFile extends DefaultHandler {
private String currentOS = null;
private boolean useIco = false;
private final ArrayList result = new ArrayList(6);
- private String launcherName = null;
- private String icons[] = null;
- private String configPath = null;
private final Map platformSpecificConfigPaths = new HashMap();
private String configPlatform = null;
private String platformConfigPath = null;
@@ -99,9 +95,7 @@ public class ProductFile extends DefaultHandler {
private List plugins = null;
private List fragments = null;
private List features = null;
- private String splashLocation = null;
private String productName = null;
- private String application = null;
private String version = null;
private Properties launcherArgs = new Properties();
@@ -136,10 +130,6 @@ public class ProductFile extends DefaultHandler {
// }
}
- public String getLauncherName() {
- return launcherName;
- }
-
public List getPlugins() {
return getPlugins(true);
}
@@ -160,65 +150,20 @@ public class ProductFile extends DefaultHandler {
return both;
}
- public List getFragments() {
- if (fragments == null)
- return Collections.EMPTY_LIST;
- return fragments;
- }
-
public List getFeatures() {
if (features == null)
return Collections.EMPTY_LIST;
return features;
}
- public boolean containsPlugin(String plugin) {
- return (plugins != null && plugins.contains(plugin)) || (fragments != null && fragments.contains(plugin));
- }
-
- /**
- * Parses the specified url and constructs a feature
- */
- public String[] getIcons() {
- if (icons != null)
- return icons;
- String[] temp = new String[result.size()];
- int i = 0;
- for (Iterator iter = result.iterator(); iter.hasNext();) {
- String element = (String) iter.next();
- if (element != null)
- temp[i++] = element;
- }
- icons = new String[i];
- System.arraycopy(temp, 0, icons, 0, i);
- return icons;
- }
-
- public String getConfigIniPath() {
- return configPath;
- }
-
- public String getConfigIniPath(String os) {
- String specific = (String) platformSpecificConfigPaths.get(os);
- return specific == null ? configPath : specific;
- }
-
public String getId() {
return id;
}
- public String getSplashLocation() {
- return splashLocation;
- }
-
public String getProductName() {
return productName;
}
- public String getApplication() {
- return application;
- }
-
public boolean useFeatures() {
return useFeatures;
}
@@ -295,8 +240,6 @@ public class ProductFile extends DefaultHandler {
state = STATE_FEATURES;
} else if (LAUNCHER_ARGS.equals(localName)) {
state = STATE_LAUNCHER_ARGS;
- } else if (SPLASH.equals(localName)) {
- splashLocation = attributes.getValue("location"); //$NON-NLS-1$
}
break;
@@ -472,7 +415,6 @@ public class ProductFile extends DefaultHandler {
private void processProduct(Attributes attributes) {
id = attributes.getValue("id"); //$NON-NLS-1$
productName = attributes.getValue("name"); //$NON-NLS-1$
- application = attributes.getValue("application"); //$NON-NLS-1$
String use = attributes.getValue("useFeatures"); //$NON-NLS-1$
if (use != null)
useFeatures = Boolean.valueOf(use).booleanValue();
@@ -490,7 +432,7 @@ public class ProductFile extends DefaultHandler {
if (path != null)
platformSpecificConfigPaths.put(os, path);
} else if (path != null) {
- configPath = path;
+ // configPath = path;
}
}
@@ -505,7 +447,7 @@ public class ProductFile extends DefaultHandler {
}
private void processLauncher(Attributes attributes) {
- launcherName = attributes.getValue("name"); //$NON-NLS-1$
+ //
}
private boolean osMatch(String os) {
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java
index 4bf8acaeb..8acf12360 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteCategory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 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,9 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.metadata.generator.features;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Comparator;
import java.util.Map;
/**
@@ -22,42 +19,12 @@ import java.util.Map;
*/
public class SiteCategory {
- private static Comparator comp;
private String description;
private String label;
private String name;
private Map localizations;
/**
- * Returns a comparator for category models.
- *
- * @return comparator
- * @since 2.0
- */
- public static Comparator getComparator() {
- if (comp == null) {
- comp = new Comparator() {
- /*
- * @see Comparator#compare(Object,Object)
- * Returns 0 if versions are equal.
- * Returns -1 if object1 is after than object2.
- * Returns +1 if object1 is before than object2.
- */
- public int compare(Object o1, Object o2) {
-
- SiteCategory cat1 = (SiteCategory) o1;
- SiteCategory cat2 = (SiteCategory) o2;
-
- if (cat1.equals(cat2))
- return 0;
- return cat1.getName().compareTo(cat2.getName());
- }
- };
- }
- return comp;
- }
-
- /**
* Creates an uninitialized model object.
*
* @since 2.0
@@ -133,26 +100,6 @@ public class SiteCategory {
}
/**
- * Resolve the model object.
- * Any URL strings in the model are resolved relative to the
- * base URL argument. Any translatable strings in the model that are
- * specified as translation keys are localized using the supplied
- * resource bundle.
- *
- * @param base URL
- * @param bundleURL resource bundle URL
- * @exception MalformedURLException
- * @since 2.0
- */
- public void resolve(URL base, URL bundleURL) throws MalformedURLException {
- // resolve local elements
- // localizedLabel = resolveNLString(bundleURL, label);
-
- // delegate to references
- // resolveReference(getDescriptionModel(), base, bundleURL);
- }
-
- /**
* Sets the category description.
* Throws a runtime exception if this object is marked read-only.
*
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
index 2b022092f..611781d31 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteFeature.java
@@ -14,7 +14,8 @@ package org.eclipse.equinox.internal.p2.metadata.generator.features;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
/**
* A reference to a feature in an update site.xml file.
@@ -23,23 +24,15 @@ import java.util.*;
*/
public class SiteFeature {
- private String arch;
// performance
private URL base;
private List /* of String*/categoryNames;
private String featureId;
private String featureVersion;
- private String label;
- private String nl;
- private String os;
- private String patch;
private final boolean resolved = false;
- private SiteModel site;
- private String type;
private URL url;
private String urlString;
- private String ws;
/*
* Compares two URL for equality
@@ -159,79 +152,6 @@ public class SiteFeature {
}
/**
- * Retrieve the displayable label for the feature reference. If the model
- * object has been resolved, the label is localized.
- *
- * @return displayable label, or <code>null</code>.
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Retrieve the non-localized displayable label for the feature reference.
- *
- * @return non-localized displayable label, or <code>null</code>.
- */
- public String getLabelNonLocalized() {
- return label;
- }
-
- /**
- * Get optional locale specification as a comma-separated string.
- *
- * @return the locale specification string, or <code>null</code>.
- */
- public String getNL() {
- return nl;
- }
-
- /**
- * Get optional operating system specification as a comma-separated string.
- *
- * @return the operating system specification string, or <code>null</code>.
- */
- public String getOS() {
- return os;
- }
-
- /**
- * Get optional system architecture specification as a comma-separated string.
- *
- * @return the system architecture specification string, or <code>null</code>.
- */
- public String getOSArch() {
- return arch;
- }
-
- /**
- * Returns the patch mode.
- */
- public String getPatch() {
- return patch;
- }
-
- /**
- * Returns the site model for the reference.
- *
- * @return site model
- * @since 2.0
- */
- public SiteModel getSiteModel() {
- return site;
- }
-
- /**
- * Returns the referenced feature type.
- *
- * @return feature type, or <code>null</code> representing the default
- * feature type for the site
- */
- public String getType() {
- return type;
- }
-
- /**
* Returns the resolved URL for the feature reference.
*
* @return url string
@@ -242,62 +162,6 @@ public class SiteFeature {
}
/**
- * Returns the unresolved URL string for the reference.
- *
- * @return url string
- */
- public String getURLString() {
- return urlString;
- }
-
- /**
- * Get optional windowing system specification as a comma-separated string.
- *
- * @return the windowing system specification string, or <code>null</code>.
- */
- public String getWS() {
- return ws;
- }
-
- /**
- * Resolve the model object.
- * Any URL strings in the model are resolved relative to the
- * base URL argument. Any translatable strings in the model that are
- * specified as translation keys are localized using the supplied
- * resource bundle.
- *
- * @param resolveBase URL
- * @param bundleURL resource bundle URL
- * @exception MalformedURLException
- */
- public void resolve(URL resolveBase, URL bundleURL) throws MalformedURLException {
- this.base = resolveBase;
- }
-
- /**
- * Sets the system architecture specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param arch system architecture specification as a comma-separated list
- */
- public void setArch(String arch) {
- this.arch = arch;
- }
-
- /**
- * Sets the names of categories this feature belongs to.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param categoryNames an array of category names
- */
- public void setCategoryNames(String[] categoryNames) {
- if (categoryNames == null)
- this.categoryNames = null;
- else
- this.categoryNames = new ArrayList(Arrays.asList(categoryNames));
- }
-
- /**
* Sets the feature identifier.
* Throws a runtime exception if this object is marked read-only.
*
@@ -318,61 +182,6 @@ public class SiteFeature {
}
/**
- * Sets the label.
- * @param label The label to set
- */
- public void setLabel(String label) {
- this.label = label;
- }
-
- /**
- * Sets the locale specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param nl locale specification as a comma-separated list
- */
- public void setNL(String nl) {
- this.nl = nl;
- }
-
- /**
- * Sets the operating system specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param os operating system specification as a comma-separated list
- */
- public void setOS(String os) {
- this.os = os;
- }
-
- /**
- * Sets the patch mode.
- */
- public void setPatch(String patch) {
- this.patch = patch;
- }
-
- /**
- * Sets the site for the referenced.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param site site for the reference
- */
- public void setSiteModel(SiteModel site) {
- this.site = site;
- }
-
- /**
- * Sets the referenced feature type.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param type referenced feature type
- */
- public void setType(String type) {
- this.type = type;
- }
-
- /**
* Sets the unresolved URL for the feature reference.
* Throws a runtime exception if this object is marked read-only.
*
@@ -384,16 +193,6 @@ public class SiteFeature {
}
/**
- * Sets the windowing system specification.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param ws windowing system specification as a comma-separated list
- */
- public void setWS(String ws) {
- this.ws = ws;
- }
-
- /**
* @see Object#toString()
*/
public String toString() {
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java
index eec015858..8b784ea3b 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/SiteModel.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.metadata.generator.features;
-import java.net.MalformedURLException;
-import java.net.URL;
import java.util.*;
import org.eclipse.equinox.internal.provisional.p2.metadata.generator.URLEntry;
@@ -32,13 +30,8 @@ public class SiteModel {
* Map of String (feature id) -> SiteFeature
*/
private List features;
- private URL locationURL;
- private String locationURLString;
private String mirrorsURLString;
- private boolean supportsPack200;
- private String type;
private URLEntry[] associateSites;
- private String digestURLString;
private List messageKeys;
private Map localizations;
@@ -91,38 +84,11 @@ public class SiteModel {
this.features.add(featureReference);
}
- /**
- * Returns an array of plug-in and non-plug-in archive reference models
- * on this site
- *
- * @return an array of archive reference models, or an empty array if there are
- * no archives known to this site.
- * @since 2.0
- */
- public URLEntry[] getArchives() {
- if (archiveReferences == null || archiveReferences.size() == 0)
- return new URLEntry[0];
-
- return (URLEntry[]) archiveReferences.toArray(new URLEntry[0]);
- }
-
public URLEntry[] getAssociatedSites() {
return associateSites;
}
/**
- * Returns an array of category models for this site.
- *
- * @return array of site category models, or an empty array.
- * @since 2.0
- */
- public SiteCategory[] getCategories() {
- if (categories == null || categories.size() == 0)
- return new SiteCategory[0];
- return (SiteCategory[]) categories.values().toArray(new SiteCategory[0]);
- }
-
- /**
* Returns the category with the given name.
* @return the category with the given name, or <code>null</code>
*/
@@ -151,42 +117,6 @@ public class SiteModel {
}
/**
- * Gets the localizations for the site as a map from locale
- * to the set of translated properties for that locale.
- *
- * @return a map from locale to property set
- * @since 3.4
- */
- public Map getLocalizations() {
- return this.localizations;
- }
-
- /**
- * Returns the resolved URL for the site.
- *
- * @return url, or <code>null</code>
- */
- public URL getLocationURL() {
- if (locationURL == null && locationURLString != null) {
- try {
- locationURL = new URL(locationURLString);
- } catch (MalformedURLException e) {
- //ignore and return null
- }
- }
- return locationURL;
- }
-
- /**
- * Returns the unresolved URL string for the site.
- *
- * @return url string, or <code>null</code>
- */
- public String getLocationURLString() {
- return locationURLString;
- }
-
- /**
* Return the keys for translatable strings
*
* @return the list of keys for translatable strings; may be null
@@ -205,20 +135,6 @@ public class SiteModel {
return mirrorsURLString;
}
- /**
- * Returns the site type.
- *
- * @return site type, or <code>null</code>.
- * @since 2.0
- */
- public String getType() {
- return type;
- }
-
- public boolean isPack200Supported() {
- return supportsPack200;
- }
-
/**
* Sets the site description.
*
@@ -249,16 +165,6 @@ public class SiteModel {
}
/**
- * Sets the unresolved URL for the site.
- *
- * @param locationURLString url for the site (as a string)
- * @since 2.0
- */
- public void setLocationURLString(String locationURLString) {
- this.locationURLString = locationURLString;
- }
-
- /**
* Sets keys for translatable strings
*
* @param keys for translatable strings
@@ -280,21 +186,6 @@ public class SiteModel {
this.mirrorsURLString = mirrorsURL;
}
- public void setSupportsPack200(boolean value) {
- this.supportsPack200 = value;
- }
-
- /**
- * Sets the site type.
- * Throws a runtime exception if this object is marked read-only.
- *
- * @param type site type
- * @since 2.0
- */
- public void setType(String type) {
- this.type = type;
- }
-
/**
* Sets the associated sites for this update site.
*
@@ -303,12 +194,4 @@ public class SiteModel {
public void setAssociateSites(URLEntry[] associateSites) {
this.associateSites = associateSites;
}
-
- public void setDigestURLString(String digestURLString) {
- this.digestURLString = digestURLString;
- }
-
- public String getDigestURLString() {
- return digestURLString;
- }
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties
index 7f7ffa5e3..78bd8ff21 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/features/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2000, 2007 IBM Corporation and others.
+# Copyright (c) 2000, 2008 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
@@ -19,7 +19,6 @@ DefaultSiteParser_UnknownStartState= Internal Error parsing site stream. Unknown
DefaultSiteParser_Missing= Error parsing site stream. The \"{0}\" tag of the element \"{1}\" is null or empty. Value is required.
DefaultSiteParser_ParsingStackBackToInitialState= Internal Error parsing site stream. Parsing stack back to Initial State.
DefaultSiteParser_ElementAlreadySet= Error parsing site stream. Element: \"{0}\" already set for the Site.
-DefaultSiteParser_CategoryAlreadySet= Error parsing site stream. Element: \"{0}\": \"{1}\" already set for the Site.
DefaultSiteParser_UnknownEndState= Internal Error parsing site stream. Unknown end state \"{0}\".
DefaultSiteParser_ErrorParsing= Error Parsing site stream. Error: \"{0}\"
DefaultSiteParser_ErrorlineColumnMessage= Error Parsing site stream. Element \"{0}\" line: \"{1}\" column:\"{2}\". Error: \"{3}\".
@@ -27,4 +26,3 @@ DefaultSiteParser_ErrorParsingSite= Error Parsing site stream.
DefaultSiteParser_UnknownState= Unknown State \"{0}\".
DefaultSiteParser_InvalidXMLStream= The XML stream is not a valid default \"site.xml\" file. The root tag is not site.
DefaultSiteParser_mirrors = Error processing update site mirror.
-DefaultSiteParser_ErrorReadingDigest=Error reading site digest {0}.
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties
index c0650b68c..348bc1ed8 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/p2/metadata/generator/messages.properties
@@ -4,22 +4,19 @@
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
-#
+#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
exception_errorConverting = An error occurred while generating manifest for {0}.
-exception_outputStream = Unable to open output stream for {0}.
exception_errorParsingUpdateSite = Error parsing update site: {0}.
exception_stateAddition = An error has occurred while adding the bundle {0}.
exception_sourceDirectoryInvalid = Source directory is invalid: {0}.
-exception_artifactRepoLocationURL = Artifact repository location is not a valid URL: {0}.
exception_artifactRepoNotWritable = Artifact repository is not writable: {0}.
exception_artifactRepoNotSpecified = An artifact repository was not specified.
-exception_metadataRepoLocationURL = Metadata repository location is not a valid URL: {0}.
exception_metadataRepoNotWritable = Metadata repository not writable: {0}.
exception_metadataRepoNotSpecified = A metadata repository location was not specified.
exception_baseLocationNotSpecified = Eclipse base location not specified.
exception_artifactRepoNoAppendDestroysInput = Not appending to artifact repository ({0}) will destroy input files.
message_generatingMetadata = Generating metadata for {0}.
-message_generationCompleted = Generation completed with success [{0} seconds]. \ No newline at end of file
+message_generationCompleted = Generation completed with success [{0} seconds].
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
index c8aec2705..661e0f65f 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/EclipseInstallGeneratorInfoProvider.java
@@ -50,13 +50,6 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
private static final String PARAMETER_BASEURL = "org.eclipse.equinox.simpleconfigurator.baseUrl"; //$NON-NLS-1$
- /*
- * TODO: Temporary for determining whether eclipse installs
- * in a profile should support backward compatibility
- * with update manager.
- */
- private static final String UPDATE_COMPATIBILITY = "eclipse.p2.update.compatibility"; //$NON-NLS-1$
-
private String os;
/**
@@ -92,11 +85,9 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
private String flavor;
private ServiceTracker frameworkAdminTracker;
private Manipulator manipulator;
- private String[][] mappingRules;
private IMetadataRepository metadataRepository;
private boolean publishArtifactRepo = false;
private boolean publishArtifacts = false;
- private boolean updateCompatibility = Boolean.valueOf(System.getProperty(UPDATE_COMPATIBILITY, "false")).booleanValue(); //$NON-NLS-1$
private String rootId;
private String rootVersion;
private String productFile = null;
@@ -370,10 +361,6 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
return (BundleInfo[]) bundles.toArray(new BundleInfo[bundles.size()]);
}
- public File getConfigurationLocation() {
- return configLocation;
- }
-
/**
* @deprecated logic moved to EclipseInstallAction (and related actions)
*/
@@ -447,10 +434,6 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
return admin;
}
- public boolean getIsUpdateCompatible() {
- return updateCompatibility;
- }
-
private Collection getIUs(Set ius, String prefix) {
Set result = new HashSet();
for (Iterator iterator = ius.iterator(); iterator.hasNext();) {
@@ -476,10 +459,6 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
return manipulator == null ? null : manipulator.getLauncherData();
}
- public String[][] getMappingRules() {
- return mappingRules;
- }
-
public IMetadataRepository getMetadataRepository() {
return metadataRepository;
}
@@ -587,16 +566,11 @@ public class EclipseInstallGeneratorInfoProvider implements IGeneratorInfo {
flavor = value;
}
- public void setIsUpdateCompatible(boolean isCompatible) {
- this.updateCompatibility = isCompatible;
- }
-
public void setLauncherConfig(String value) {
launcherConfig = value;
}
public void setMappingRules(String[][] value) {
- mappingRules = value;
}
public void setMetadataRepository(IMetadataRepository value) {
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java
index fb6a12fcd..54c7adc90 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Feature.java
@@ -20,14 +20,12 @@ import java.util.Map;
public class Feature {
private final String id;
- private String version;
+ private final String version;
private String label;
- private String image;
private String pluginId;
private boolean primary = false;
private boolean exclusive = false;
private String application;
- private String colocationAffinity;
private URLEntry description;
private URLEntry license;
@@ -42,10 +40,6 @@ public class Feature {
private ArrayList entries;
private String providerName;
- private String os;
- private String ws;
- private String arch;
- private String nl;
private String location;
@@ -79,14 +73,6 @@ public class Feature {
return application;
}
- public String getArch() {
- return arch;
- }
-
- public String getColocationAffinity() {
- return colocationAffinity;
- }
-
public String getCopyright() {
if (copyright != null)
return copyright.getAnnotation();
@@ -127,10 +113,6 @@ public class Feature {
return id;
}
- public String getImage() {
- return image;
- }
-
public String getInstallHandler() {
return installHandler;
}
@@ -167,14 +149,6 @@ public class Feature {
return this.location;
}
- public String getNL() {
- return nl;
- }
-
- public String getOS() {
- return os;
- }
-
public String getPlugin() {
return pluginId;
}
@@ -183,12 +157,6 @@ public class Feature {
return providerName;
}
- public String getUpdateSiteLabel() {
- if (updateSite != null)
- return updateSite.getAnnotation();
- return null;
- }
-
public String getUpdateSiteURL() {
if (updateSite != null)
return updateSite.getURL();
@@ -199,10 +167,6 @@ public class Feature {
return version;
}
- public String getWS() {
- return ws;
- }
-
public boolean isExclusive() {
return exclusive;
}
@@ -215,10 +179,6 @@ public class Feature {
this.application = application;
}
- public void setColocationAffinity(String colocationAffinity) {
- this.colocationAffinity = colocationAffinity;
- }
-
public void setCopyright(String copyright) {
if (this.copyright == null)
this.copyright = new URLEntry();
@@ -243,21 +203,10 @@ public class Feature {
this.description.setURL(descriptionURL);
}
- public void setEnvironment(String os, String ws, String arch, String nl) {
- this.os = os;
- this.ws = ws;
- this.arch = arch;
- this.nl = nl;
- }
-
public void setExclusive(boolean exclusive) {
this.exclusive = exclusive;
}
- public void setImage(String image) {
- this.image = image;
- }
-
public void setInstallHandler(String installHandler) {
this.installHandler = installHandler;
}
@@ -322,10 +271,6 @@ public class Feature {
//
}
- public void setVersion(String version) {
- this.version = version;
- }
-
/**
* For debugging purposes only.
*/
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
index 5a82ea976..ee1c8576e 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/FeatureEntry.java
@@ -16,8 +16,7 @@ import org.osgi.framework.Version;
*/
public class FeatureEntry {
private final String id;
- private String version;
- private String url;
+ private final String version;
private String os;
private String ws;
private String arch;
@@ -98,10 +97,6 @@ public class FeatureEntry {
return os;
}
- public String getURL() {
- return url;
- }
-
public String getVersion() {
return version;
}
@@ -165,14 +160,6 @@ public class FeatureEntry {
unpack = value;
}
- public void setURL(String value) {
- url = value;
- }
-
- public void setVersion(String value) {
- version = Version.parseVersion(value).toString();
- }
-
public String toString() {
StringBuffer result = new StringBuffer();
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
index 92f11b5ad..4f21e74fb 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/Generator.java
@@ -8,8 +8,6 @@
******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.metadata.generator;
-import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
-
import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
@@ -19,6 +17,7 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
import org.eclipse.equinox.internal.p2.core.helpers.*;
import org.eclipse.equinox.internal.p2.core.helpers.FileUtils.IPathComputer;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.p2.metadata.generator.*;
import org.eclipse.equinox.internal.p2.metadata.generator.Messages;
import org.eclipse.equinox.internal.p2.metadata.generator.features.*;
@@ -108,8 +107,6 @@ public class Generator {
private static final String PRODUCT_LAUCHER_SUFFIX = ".launcher"; //$NON-NLS-1$
private static final String CONFIG_ANY = "ANY"; //$NON-NLS-1$
- static final String DEFAULT_BUNDLE_LOCALIZATION = "plugin"; //$NON-NLS-1$
-
private static final String PROTOCOL_FILE = "file"; //$NON-NLS-1$
protected final IGeneratorInfo info;
@@ -1272,10 +1269,6 @@ public class Generator {
return mappings;
}
- protected IGeneratorInfo getGeneratorInfo() {
- return info;
- }
-
/**
* @TODO This method is a temporary hack to rename the launcher.exe files
* to eclipse.exe (or "launcher" to "eclipse"). Eventually we will either hand-craft
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
index 8e750b834..cf812eafe 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/IGeneratorInfo.java
@@ -56,8 +56,6 @@ public interface IGeneratorInfo {
*/
public ConfigData getConfigData();
- public File getConfigurationLocation();
-
public ArrayList getDefaultIUs(Set ius);
public File getExecutableLocation();
@@ -66,8 +64,6 @@ public interface IGeneratorInfo {
public String getFlavor();
- public boolean getIsUpdateCompatible();
-
public File getJRELocation();
/**
@@ -78,8 +74,6 @@ public interface IGeneratorInfo {
public LauncherData getLauncherData();
- public String[][] getMappingRules();
-
public IMetadataRepository getMetadataRepository();
public String getRootId();
@@ -109,8 +103,6 @@ public interface IGeneratorInfo {
public void setFlavor(String value);
- public void setIsUpdateCompatible(boolean isCompatible);
-
public void setMetadataRepository(IMetadataRepository value);
public void setPublishArtifacts(boolean value);
diff --git a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
index 62b3a7f4e..8d00e83e5 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.generator/src/org/eclipse/equinox/internal/provisional/p2/metadata/generator/MetadataGeneratorHelper.java
@@ -729,14 +729,7 @@ public class MetadataGeneratorHelper {
* @deprecated moved to FeaturesAction
*/
public static IInstallableUnit createGroupIU(Feature feature, IInstallableUnit featureIU) {
- return createGroupIU(feature, featureIU, null);
- }
-
- /**
- * @deprecated moved to FeaturesAction
- */
- public static IInstallableUnit createGroupIU(Feature feature, IInstallableUnit featureIU, Properties extraProperties) {
- return createGroupIU(feature, featureIU, extraProperties, true);
+ return createGroupIU(feature, featureIU, null, true);
}
public static IInstallableUnit createGroupIU(Feature feature, IInstallableUnit featureIU, Properties extraProperties, boolean transformIds) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch b/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
index d7fd5be7c..c0a32d7ba 100644
--- a/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
+++ b/bundles/org.eclipse.equinox.p2.tests/All p2 Tests.launch
@@ -1,42 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?><launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
<booleanAttribute key="com.mountainminds.eclemma.core.INPLACE_INSTRUMENTATION" value="true"/>
<listAttribute key="com.mountainminds.eclemma.core.INSTRUMENTATION_PATHS">
-<listEntry value="/org.eclipse.equinox.p2.exemplarysetup/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.metadata.repository/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.publisher/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.directorywatcher/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.metadata/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.touchpoint.natives/bin"/>
-<listEntry value="/org.eclipse.equinox.simpleconfigurator/bin"/>
<listEntry value="/org.eclipse.equinox.p2.artifact.repository/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.touchpoint.eclipse/bin"/>
<listEntry value="/org.eclipse.equinox.p2.metadata.generator/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.updatechecker/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.exemplarysetup/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.director.app/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.updatesite/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.ui.sdk/bin"/>
<listEntry value="/org.eclipse.equinox.p2.jarprocessor/bin"/>
+<listEntry value="/org.eclipse.equinox.frameworkadmin.equinox/bin"/>
<listEntry value="/org.eclipse.equinox.p2.reconciler.dropins/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.ui.sdk/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.updatesite/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.garbagecollector/bin"/>
<listEntry value="/org.eclipse.equinox.p2.director/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.touchpoint.eclipse/bin"/>
-<listEntry value="/org.eclipse.equinox.frameworkadmin.equinox/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.core/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.extensionlocation/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.ui/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.installer/bin"/>
-<listEntry value="/org.eclipse.equinox.p2.director.app/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.updatechecker/bin"/>
<listEntry value="/org.eclipse.equinox.simpleconfigurator.manipulator/bin"/>
<listEntry value="/org.eclipse.equinox.p2.engine/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.ui/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.core/bin"/>
<listEntry value="/org.eclipse.equinox.frameworkadmin/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.garbagecollector/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.directorywatcher/bin"/>
+<listEntry value="/org.eclipse.equinox.simpleconfigurator/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.installer/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.touchpoint.natives/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.metadata.repository/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.extensionlocation/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.publisher/bin"/>
+<listEntry value="/org.eclipse.equinox.p2.metadata/bin"/>
</listAttribute>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="true"/>
@@ -52,12 +52,11 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/ibm60"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.equinox.p2.tests.AutomatedTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consolelog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.equinox.p2.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/builds/eclipse-platform-I20081007-1600-win32.zip"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dorg.eclipse.equinox.p2.reconciler.tests.platform.archive=c:/builds/eclipse-platform-I20081029-0800-win32.zip"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
@@ -66,4 +65,4 @@
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration> \ No newline at end of file
+</launchConfiguration>
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java
index c4066ce6b..994173658 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/generator/PatchIUGeneration.java
@@ -24,7 +24,7 @@ public class PatchIUGeneration extends AbstractProvisioningTest {
if (feature == null)
fail();
IInstallableUnit featureIU = MetadataGeneratorHelper.createFeatureJarIU(feature, true, null);
- IInstallableUnitPatch patchIU = (IInstallableUnitPatch) MetadataGeneratorHelper.createGroupIU(feature, featureIU, null);
+ IInstallableUnitPatch patchIU = (IInstallableUnitPatch) MetadataGeneratorHelper.createGroupIU(feature, featureIU, null, true);
//Check id
assertEquals(patchIU.getId(), "org.eclipse.jdt.3.2.1.patch.feature.group");
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java
index 7f8737511..2f2b0957e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/MD5GenerationTest.java
@@ -2,7 +2,6 @@ package org.eclipse.equinox.p2.tests.publisher.actions;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactDescriptor;
-import org.eclipse.equinox.internal.provisional.p2.metadata.generator.MetadataGeneratorHelper;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
import org.osgi.framework.Version;
@@ -14,7 +13,7 @@ public class MD5GenerationTest extends AbstractProvisioningTest {
}
public void testGenerationFile2() {
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(new ArtifactKey("classifierTest", "idTest", new Version(1, 0, 0)), getTestData("Artifact to generate from", "testData/artifactRepo/simpleWithMD5/plugins/aaPlugin_1.0.0.jar"), true, false);
+ IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(new ArtifactKey("classifierTest", "idTest", new Version(1, 0, 0)), getTestData("Artifact to generate from", "testData/artifactRepo/simpleWithMD5/plugins/aaPlugin_1.0.0.jar"));
assertEquals("50d4ea58b02706ab373a908338877e02", ad.getProperty(IArtifactDescriptor.DOWNLOAD_MD5));
}
@@ -24,7 +23,7 @@ public class MD5GenerationTest extends AbstractProvisioningTest {
}
public void testGenerationFolder2() {
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(new ArtifactKey("classifierTest", "idTest", new Version(1, 0, 0)), getTestData("Artifact to generate from", "testData/artifactRepo/simpleWithMD5/plugins/"), true, false);
+ IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(new ArtifactKey("classifierTest", "idTest", new Version(1, 0, 0)), getTestData("Artifact to generate from", "testData/artifactRepo/simpleWithMD5/plugins/"));
assertNull(ad.getProperty(IArtifactDescriptor.DOWNLOAD_MD5));
}
@@ -34,7 +33,7 @@ public class MD5GenerationTest extends AbstractProvisioningTest {
}
public void testGenerationNoFolder2() {
- IArtifactDescriptor ad = MetadataGeneratorHelper.createArtifactDescriptor(new ArtifactKey("classifierTest", "idTest", new Version(1, 0, 0)), null, true, false);
+ IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(new ArtifactKey("classifierTest", "idTest", new Version(1, 0, 0)), null);
assertNull(ad.getProperty(IArtifactDescriptor.DOWNLOAD_MD5));
}
}

Back to the top