Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 65401 Details for
Bug 176947
Top level property for generatedVersionLength and significantVersionDigits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed patch
176947.txt (text/plain), 4.31 KB, created by
Andrew Niefer
on 2007-04-30 13:21:23 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Andrew Niefer
Created:
2007-04-30 13:21:23 EDT
Size:
4.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.build >Index: src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java,v >retrieving revision 1.106 >diff -u -r1.106 FeatureBuildScriptGenerator.java >--- src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java 30 Apr 2007 10:33:54 -0000 1.106 >+++ src/org/eclipse/pde/internal/build/builder/FeatureBuildScriptGenerator.java 30 Apr 2007 17:22:06 -0000 >@@ -962,8 +962,12 @@ > } > > Properties properties = getBuildProperties(); >- int significantDigits = getIntProperty((String) properties.get(PROPERTY_SIGNIFICANT_VERSION_DIGITS), Integer.MAX_VALUE); >- int maxGeneratedLength = getIntProperty((String) properties.get(PROPERTY_GENERATED_VERSION_LENGTH), 28); >+ int significantDigits = getIntProperty((String) properties.get(PROPERTY_SIGNIFICANT_VERSION_DIGITS), -1); >+ if (significantDigits == -1) >+ significantDigits = getIntProperty(getAntProperty(PROPERTY_SIGNIFICANT_VERSION_DIGITS), Integer.MAX_VALUE); >+ int maxGeneratedLength = getIntProperty((String) properties.get(PROPERTY_GENERATED_VERSION_LENGTH), -1); >+ if (maxGeneratedLength == -1) >+ maxGeneratedLength = getIntProperty(getAntProperty(PROPERTY_GENERATED_VERSION_LENGTH), 28); > > long majorSum = 0L; > long minorSum = 0L; >Index: src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java,v >retrieving revision 1.39 >diff -u -r1.39 BuildScriptGeneratorTask.java >--- src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java 17 Apr 2007 17:21:38 -0000 1.39 >+++ src_ant/org/eclipse/pde/internal/build/tasks/BuildScriptGeneratorTask.java 30 Apr 2007 17:22:06 -0000 >@@ -11,6 +11,7 @@ > package org.eclipse.pde.internal.build.tasks; > > import java.io.File; >+import java.util.*; > import org.apache.tools.ant.BuildException; > import org.apache.tools.ant.Task; > import org.eclipse.core.runtime.CoreException; >@@ -78,7 +79,10 @@ > public void run() throws CoreException { > generator.setReportResolutionErrors(true); > BundleHelper.getDefault().setLog(this); >+ Map properties = new Hashtable(getProject().getProperties()); >+ AbstractScriptGenerator.setAntProperties(properties); > generator.generate(); >+ AbstractScriptGenerator.setAntProperties(null); > BundleHelper.getDefault().setLog(null); > } > >Index: src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java,v >retrieving revision 1.54 >diff -u -r1.54 AbstractScriptGenerator.java >--- src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java 17 Apr 2007 17:21:38 -0000 1.54 >+++ src/org/eclipse/pde/internal/build/AbstractScriptGenerator.java 30 Apr 2007 17:22:06 -0000 >@@ -25,6 +25,7 @@ > * It contains basic informations like the script, the configurations, and a location > */ > public abstract class AbstractScriptGenerator implements IXMLConstants, IPDEBuildConstants, IBuildPropertiesConstants { >+ private static Map antProperties = null; > protected static boolean embeddedSource = false; > protected static boolean forceUpdateJarFormat = false; > private static List configInfos; >@@ -67,6 +68,21 @@ > */ > public abstract void generate() throws CoreException; > >+ public static void setAntProperties(Map properties) { >+ antProperties = properties; >+ } >+ >+ public static String getAntProperty(String key) { >+ return getAntProperty(key, null); >+ } >+ >+ public static String getAntProperty(String key, String defaultValue) { >+ if (antProperties == null || !antProperties.containsKey(key)) >+ return defaultValue; >+ Object obj = antProperties.get(key); >+ return (obj instanceof String) ? (String) obj : null; >+ } >+ > public static void setConfigInfo(String spec) throws CoreException { > configInfos.clear(); > String[] configs = Utils.getArrayFromStringWithBlank(spec, "&"); //$NON-NLS-1$
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
aniefer
:
review?
Actions:
View
|
Diff
Attachments on
bug 176947
: 65401