Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Kaegi2008-12-01 05:13:13 +0000
committerSimon Kaegi2008-12-01 05:13:13 +0000
commitf3db9c876dbe1ec501636ff673d8b9f512c92c79 (patch)
treed255cf913074643646b63db48e7031ad27706d8c /bundles/org.eclipse.equinox.simpleconfigurator.manipulator
parent253736ebacc567e3677165adf1826b4ba6e3f923 (diff)
downloadrt.equinox.p2-f3db9c876dbe1ec501636ff673d8b9f512c92c79.tar.gz
rt.equinox.p2-f3db9c876dbe1ec501636ff673d8b9f512c92c79.tar.xz
rt.equinox.p2-f3db9c876dbe1ec501636ff673d8b9f512c92c79.zip
Bug 256332 bundles.info file should have a version number
Diffstat (limited to 'bundles/org.eclipse.equinox.simpleconfigurator.manipulator')
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
index d01a33188..5e3c92850 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorUtils.java
@@ -18,6 +18,8 @@ import org.osgi.framework.Version;
public class SimpleConfiguratorManipulatorUtils {
+ private static final String VERSION_PREFIX = "#version=";
+ private static final String VERSION_1 = "1";
private static final Version OLD_VERSION = new Version("1.0.100");
public static void writeConfiguration(BundleInfo[] simpleInfos, File outputFile) throws IOException {
@@ -59,6 +61,11 @@ public class SimpleConfiguratorManipulatorUtils {
try {
writer = new BufferedWriter(new FileWriter(outputFile));
+ // version line
+ writer.write(createVersionLine());
+ writer.newLine();
+
+ // bundle info lines
for (int i = 0; i < simpleInfos.length; i++) {
writer.write(createBundleInfoLine(simpleInfos[i], oldStyle));
writer.newLine();
@@ -80,6 +87,10 @@ public class SimpleConfiguratorManipulatorUtils {
throw caughtException;
}
+ public static String createVersionLine() {
+ return VERSION_PREFIX + VERSION_1;
+ }
+
public static String createBundleInfoLine(BundleInfo bundleInfo, boolean oldStyle) throws IOException {
// symbolicName,version,location,startLevel,markedAsStarted
StringBuffer buffer = new StringBuffer();

Back to the top