Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2008-04-26 15:04:21 +0000
committerPascal Rapicault2008-04-26 15:04:21 +0000
commitbec8afc0c39feae131f1c7c56d18e2d4bc176a8f (patch)
tree2751f8946a4dcafa29f4a577a25e3fff6c976efb /bundles/org.eclipse.equinox.simpleconfigurator.manipulator
parentaa3f646c23041fa134ca5de1eb73adc4cf9d4c0f (diff)
downloadrt.equinox.p2-bec8afc0c39feae131f1c7c56d18e2d4bc176a8f.tar.gz
rt.equinox.p2-bec8afc0c39feae131f1c7c56d18e2d4bc176a8f.tar.xz
rt.equinox.p2-bec8afc0c39feae131f1c7c56d18e2d4bc176a8f.zip
fix bogus computation of osgi.install.area
Diffstat (limited to 'bundles/org.eclipse.equinox.simpleconfigurator.manipulator')
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java22
2 files changed, 5 insertions, 20 deletions
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
index d007f2dcf..9eafe6c93 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@ Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.equinox.internal.simpleconfigurator.manipulator.Activator
Eclipse-LazyStart: true
-Import-Package: org.eclipse.equinox.internal.frameworkadmin.utils,
+Import-Package: org.eclipse.equinox.internal.frameworkadmin.equinox,
+ org.eclipse.equinox.internal.frameworkadmin.utils,
org.eclipse.equinox.internal.provisional.configuratormanipulator,
org.eclipse.equinox.internal.provisional.frameworkadmin,
org.osgi.framework;version="1.3.0",
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
index 72f4a2b50..3e3698793 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
@@ -16,6 +16,7 @@ import java.net.URL;
import java.util.*;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser;
import org.eclipse.equinox.internal.frameworkadmin.utils.Utils;
import org.eclipse.equinox.internal.provisional.configuratormanipulator.ConfiguratorManipulator;
import org.eclipse.equinox.internal.provisional.frameworkadmin.*;
@@ -426,28 +427,11 @@ public class SimpleConfiguratorManipulatorImpl implements ConfiguratorManipulato
if (!configuratorConfigUrl.getProtocol().equals("file"))
new IllegalStateException("configuratorConfigUrl should start with \"file\".\nconfiguratorConfigUrl=" + configuratorConfigUrl);
File outputFile = new File(configuratorConfigUrl.getFile());
- saveConfiguration(setToSimpleConfig, outputFile, getOSGiInstallArea(manipulator.getLauncherData()), backup);
+ saveConfiguration(setToSimpleConfig, outputFile, EquinoxFwConfigFileParser.getOSGiInstallArea(manipulator.getLauncherData()), backup);
configData.setFwIndependentProp(SimpleConfiguratorConstants.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm());
return orderingInitialConfig(setToInitialConfig);
}
- public static File getOSGiInstallArea(LauncherData launcherData) {
- if (launcherData == null)
- return null;
- String[] args = launcherData.getProgramArgs();
- if (args == null)
- return null;
- for (int i = 0; i < args.length; i++) {
- if (args[i].equals("-startup") && i + 1 < args.length && args[i + 1].charAt(1) != '-') {
- IPath parentFolder = new Path(args[i + 1]).removeLastSegments(1);
- if (parentFolder.lastSegment().equals("plugins"))
- return parentFolder.removeLastSegments(1).toFile();
- return parentFolder.toFile();
- }
- }
- return launcherData.getLauncher().getParentFile();
- }
-
public static void saveConfiguration(List bundleInfoList, File outputFile, File base, boolean backup) throws IOException {
if (DEBUG) {
System.out.println("saveConfiguration(List bundleInfoList, File outputFile, boolean backup): outFile=" + outputFile.getAbsolutePath());
@@ -648,7 +632,7 @@ public class SimpleConfiguratorManipulatorImpl implements ConfiguratorManipulato
boolean exclusiveInstallation = Boolean.valueOf(properties.getProperty(SimpleConfiguratorConstants.PROP_KEY_EXCLUSIVE_INSTALLATION)).booleanValue();
URL configuratorConfigUrl = getConfigLocation(manipulator);
- BundleInfo[] toInstall = this.loadConfiguration(configuratorConfigUrl, getOSGiInstallArea(manipulator.getLauncherData()));
+ BundleInfo[] toInstall = this.loadConfiguration(configuratorConfigUrl, EquinoxFwConfigFileParser.getOSGiInstallArea(manipulator.getLauncherData()));
List toUninstall = new LinkedList();
if (exclusiveInstallation)

Back to the top