Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 176947
Collapse All | Expand All

(-)src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java (-2 / +6 lines)
Lines 962-969 Link Here
962
		}
962
		}
963
963
964
		Properties properties = getBuildProperties();
964
		Properties properties = getBuildProperties();
965
		int significantDigits = getIntProperty((String) properties.get(PROPERTY_SIGNIFICANT_VERSION_DIGITS), Integer.MAX_VALUE);
965
		int significantDigits = getIntProperty((String) properties.get(PROPERTY_SIGNIFICANT_VERSION_DIGITS), -1);
966
		int maxGeneratedLength = getIntProperty((String) properties.get(PROPERTY_GENERATED_VERSION_LENGTH), 28);
966
		if (significantDigits == -1)
967
			significantDigits = getIntProperty(getAntProperty(PROPERTY_SIGNIFICANT_VERSION_DIGITS), Integer.MAX_VALUE);
968
		int maxGeneratedLength = getIntProperty((String) properties.get(PROPERTY_GENERATED_VERSION_LENGTH), -1);
969
		if (maxGeneratedLength == -1)
970
			maxGeneratedLength = getIntProperty(getAntProperty(PROPERTY_GENERATED_VERSION_LENGTH), 28);
967
971
968
		long majorSum = 0L;
972
		long majorSum = 0L;
969
		long minorSum = 0L;
973
		long minorSum = 0L;
(-)src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java (+4 lines)
Lines 11-16 Link Here
11
package org.eclipse.pde.internal.build.tasks;
11
package org.eclipse.pde.internal.build.tasks;
12
12
13
import java.io.File;
13
import java.io.File;
14
import java.util.*;
14
import org.apache.tools.ant.BuildException;
15
import org.apache.tools.ant.BuildException;
15
import org.apache.tools.ant.Task;
16
import org.apache.tools.ant.Task;
16
import org.eclipse.core.runtime.CoreException;
17
import org.eclipse.core.runtime.CoreException;
Lines 78-84 Link Here
78
	public void run() throws CoreException {
79
	public void run() throws CoreException {
79
		generator.setReportResolutionErrors(true);
80
		generator.setReportResolutionErrors(true);
80
		BundleHelper.getDefault().setLog(this);
81
		BundleHelper.getDefault().setLog(this);
82
		Map properties = new Hashtable(getProject().getProperties());
83
		AbstractScriptGenerator.setAntProperties(properties);
81
		generator.generate();
84
		generator.generate();
85
		AbstractScriptGenerator.setAntProperties(null);
82
		BundleHelper.getDefault().setLog(null);
86
		BundleHelper.getDefault().setLog(null);
83
	}
87
	}
84
88
(-)src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java (+16 lines)
Lines 25-30 Link Here
25
 * It contains basic informations like the script, the configurations, and a location 
25
 * It contains basic informations like the script, the configurations, and a location 
26
 */
26
 */
27
public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuildConstants, IBuildPropertiesConstants {
27
public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuildConstants, IBuildPropertiesConstants {
28
	private static Map antProperties = null;
28
	protected static boolean embeddedSource = false;
29
	protected static boolean embeddedSource = false;
29
	protected static boolean forceUpdateJarFormat = false;
30
	protected static boolean forceUpdateJarFormat = false;
30
	private static List configInfos;
31
	private static List configInfos;
Lines 67-72 Link Here
67
	 */
68
	 */
68
	public abstract void generate() throws CoreException;
69
	public abstract void generate() throws CoreException;
69
70
71
	public static void setAntProperties(Map properties) {
72
		antProperties = properties;
73
	}
74
75
	public static String getAntProperty(String key) {
76
		return getAntProperty(key, null);
77
	}
78
79
	public static String getAntProperty(String key, String defaultValue) {
80
		if (antProperties == null || !antProperties.containsKey(key))
81
			return defaultValue;
82
		Object obj = antProperties.get(key);
83
		return (obj instanceof String) ? (String) obj : null;
84
	}
85
	
70
	public static void setConfigInfo(String spec) throws CoreException {
86
	public static void setConfigInfo(String spec) throws CoreException {
71
		configInfos.clear();
87
		configInfos.clear();
72
		String[] configs = Utils.getArrayFromStringWithBlank(spec, "&"); //$NON-NLS-1$
88
		String[] configs = Utils.getArrayFromStringWithBlank(spec, "&"); //$NON-NLS-1$

Return to bug 176947