Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2012-01-19 19:50:20 +0000
committerDJ Houghton2012-01-19 19:50:20 +0000
commitaf2c8688a2635099205314a5f881bd0e3c32882b (patch)
tree21202d1ecbbbc3ee20b2340422d341c942294d8b
parent67b2ea6074c2a2bc6701e678c843b3adf688fc24 (diff)
downloadeclipse.pde.build-af2c8688a2635099205314a5f881bd0e3c32882b.tar.gz
eclipse.pde.build-af2c8688a2635099205314a5f881bd0e3c32882b.tar.xz
eclipse.pde.build-af2c8688a2635099205314a5f881bd0e3c32882b.zip
Revert "Bug 367982 - Test failures in nightly build"v20120119-1950N20120417-1633N20120417-1307N20120416-1918I20120430-1500I20120430-1300I20120429-2000I20120429-1800I20120429-1245I20120429-1000I20120428-1230I20120428-0800I20120428-0140I20120427-1000I20120427-0800I20120426-1030I20120426-1000I20120426-0800I20120425-1600I20120425-1200I20120425-0800I20120424-1700I20120424-1600I20120424-0800I20120419-1434I20120418-0248I20120417-1000I20120417-0800I20120417-0334I20120417-0255I20120417-0235I20120417-0211I20120417-0142I20120416-2327I20120416-1738I20120416-1719I20120416-1643I20120416-1623I20120416-1600I20120416-1508I20120411-2034I20120411-1737I20120411-0906I20120411-0258I20120410-2330I20120410-2037I20120410-1710I20120410-0633I20120410-0320I20120410-0304I20120410-0252I20120410-0238I20120410-0216I20120410-0152I20120410-0136I20120410-0122I20120410-0102I20120410-0049I20120410-0027I20120409-2358I20120409-2119I20120409-2018I20120409-1957I20120409-1911I20120409-1708I20120409-1622I20120409-1353I20120409-0926I20120409-0904I20120409-0315I20120409-0131I20120408-2304I20120408-2000I20120408-1521I20120408-1324I20120408-1214I20120408-1110I20120408-0330I20120408-0246I20120408-0231I20120408-0216I20120408-0152I20120408-0036I20120408-0012I20120407-2339I20120407-2245I20120407-2106I20120407-1941I20120407-1904I20120407-1840I20120407-1826I20120407-1732I20120407-1717I20120407-1631I20120407-0358I20120407-0346I20120407-0329I20120407-0305I20120407-0217I20120407-0205I20120407-0138I20120407-0103I20120407-0040I20120407-0024I20120406-2327I20120406-0935I20120406-0915I20120406-0250I20120406-0231I20120406-0006I20120405-2131I20120405-1735I20120405-1114I20120405-0114I20120404-2228I20120404-2006I20120404-1351I20120404-0051I20120403-2231I20120328-2028I20120328-2020I20120328-2007I20120328-1956
-rw-r--r--org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java6
-rw-r--r--org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java6
-rw-r--r--org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java65
-rw-r--r--org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java4
4 files changed, 9 insertions, 72 deletions
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java
index f366ce4e..37dfea98 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/P2InfUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009 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
@@ -92,7 +92,7 @@ public class P2InfUtils {
}
public static void printRequires(StringBuffer buffer, String prefix, int i, String namespace, String name, VersionRange range, String filter, boolean greedy) {
- printRequires(buffer, prefix, i, namespace, name, Utils.toString(range), filter, greedy);
+ printRequires(buffer, prefix, i, namespace, name, range.toString(), filter, greedy);
}
public static void printRequires(StringBuffer buffer, String prefix, int i, String namespace, String name, String range, String filter, boolean greedy) {
@@ -118,7 +118,7 @@ public class P2InfUtils {
prefix = ""; //$NON-NLS-1$
buffer.append(prefix + "hostRequirements." + i + ".namespace=" + namespace + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
buffer.append(prefix + "hostRequirements." + i + ".name=" + name + '\n'); //$NON-NLS-1$ //$NON-NLS-2$
- buffer.append(prefix + "hostRequirements." + i + ".range=" + Utils.toString(range) + '\n'); //$NON-NLS-1$ //$NON-NLS-2$
+ buffer.append(prefix + "hostRequirements." + i + ".range=" + range.toString() + '\n'); //$NON-NLS-1$ //$NON-NLS-2$
buffer.append(prefix + "hostRequirements." + i + ".greedy=" + Boolean.toString(greedy) + '\n'); //$NON-NLS-1$ //$NON-NLS-2$
}
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
index aed86da5..fc89d736 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductGenerator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -199,7 +199,7 @@ public class ProductGenerator extends AbstractScriptGenerator {
productVersionString = productVersion.getMajor() + "." + productVersion.getMinor() + "." + productVersion.getMicro() + ".$qualifier$"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
productRangeString = "[" + productVersionString + "," + productVersionString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- productRangeString = Utils.toString(new VersionRange(new Version(productVersionString), true, new Version(productVersionString), true));
+ productRangeString = new VersionRange(new Version(productVersionString), true, new Version(productVersionString), true).toString();
}
if (cus) {
@@ -256,7 +256,7 @@ public class ProductGenerator extends AbstractScriptGenerator {
//in case of no version on the product, the branding defaults to the version of the launcher provider
if (executableFeature != null && productVersionString.equals(Version.emptyVersion.toString())) {
String brandedVersion = executableFeature.getVersion();
- brandedRange = Utils.toString(new VersionRange(new Version(brandedVersion), true, new Version(brandedVersion), true));
+ brandedRange = new VersionRange(new Version(brandedVersion), true, new Version(brandedVersion), true).toString();
}
List configs = getConfigInfos();
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
index e3bf801e..ed1bf91b 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -1050,67 +1050,4 @@ public final class Utils implements IPDEBuildConstants, IBuildPropertiesConstant
}
return result.toString();
}
-
- static public String toString(VersionRange range) {
- // never qualify for now since p2 does not support fully qualified versions with empty qualifiers
- return toString(range, false);
- }
-
- private static String toString(VersionRange range, boolean qualify) {
- // Do not use the VersionRange.toString method because it will fully qualify the versions
- Version left = range.getLeft();
- Version right = range.getRight();
- String leftVersion = left.toString();
- if (right == null) {
- return toString(left, range.getLeftType(), qualify);
- }
- String rightVerion = right.toString();
- StringBuffer result = new StringBuffer(leftVersion.length() + rightVerion.length() + 5);
- result.append(range.getLeftType());
- result.append(toString(left, range.getLeftType(), qualify));
- result.append(',');
- result.append(toString(right, range.getRightType(), qualify));
- result.append(range.getRightType());
- return result.toString();
- }
-
- private static String toString(Version version, char endPointType, boolean qualify) {
- // need to avoid fully qualifying the versions if not needed.
- if (version == null)
- return ""; //$NON-NLS-1$
- int q = version.getQualifier().length();
- if (q > 0) {
- return version.toString();
- }
- StringBuffer buffer = new StringBuffer(version.toString().length() + 1);
- buffer.append(version.getMajor());
- buffer.append('.');
- buffer.append(version.getMinor());
- buffer.append('.');
- buffer.append(version.getMicro());
- if (!qualify) // we never want to qualify in this case
- return buffer.toString();
- char separator = version.isReleaseVersion() ? '.' : '-';
- switch (endPointType) {
- case VersionRange.LEFT_CLOSED :
- if (separator == '.') // left release version [x.y.z. must fully qualify
- buffer.append(separator);
- break;
- case VersionRange.LEFT_OPEN :
- if (separator == '-') // left pre-release version [x.y.z- must fully qualify
- buffer.append(separator);
- break;
- case VersionRange.RIGHT_CLOSED :
- if (separator == '-') // right release version x.y.z.) must fully qualify
- buffer.append(separator);
- break;
- case VersionRange.RIGHT_OPEN :
- if (separator == '.') // right pre-release version x.y.z-] must fully qualify
- buffer.append(separator);
- break;
- default :
- break;
- }
- return buffer.toString();
- }
}
diff --git a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
index c5f6d20a..7c0ffdc3 100644
--- a/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
+++ b/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/site/BuildTimeSite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 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
@@ -280,7 +280,7 @@ public class BuildTimeSite /*extends Site*/implements IPDEBuildConstants, IXMLCo
VersionRange versionSpec = constraint.getVersionRange();
if (versionSpec == null)
return constraint.getName();
- return constraint.getName() + '_' + Utils.toString(versionSpec);
+ return constraint.getName() + '_' + versionSpec;
}
public BuildTimeFeature findFeature(String featureId, String versionId, boolean throwsException) throws CoreException {

Back to the top