private void initializeBundleState() { if (fStartLevels == null) fStartLevels = new HashMap(); Properties props = TargetPlatformHelper.getConfigIniProperties(); if (props != null) { String value = (String) props.get("osgi.bundles"); //$NON-NLS-1$ if (value != null) { StringTokenizer tokenizer = new StringTokenizer(value, ","); //$NON-NLS-1$ while (tokenizer.hasMoreTokens()) { String tokenValue = tokenizer.nextToken(); int index = tokenValue.indexOf("@"); //$NON-NLS-1$ if (index > 0) { String bundle = tokenValue.substring(0, index).trim(); fStartLevels.put(bundle, getStartValue(tokenValue.substring(index))); } } } } }
/** * Returns the ID for the default application * (<code>org.eclipse.core.runtime.applications</code> extension) for the current target * platform. * <p> * If none could be determined, then <code>org.eclipse.ui.ide.workbench</code> * application is returned. * </p> * @return the default application to run when launching an Eclipse application */ public static String getDefaultApplication() { Properties config = TargetPlatformHelper.getConfigIniProperties(); Set<String> set = TargetPlatformHelper.getApplicationNameSet(); if (config != null) { String application = (String) config.get(APPLICATION_PROPERTY); if (application != null && set.contains(application)) return application; } return IDE_APPLICATION; }
/** * Returns the ID for the default product * (<code>org.eclipse.core.runtime.products</code> extension) for the current target platform, * or <code>null</code> if none can be determined. * * If any of the * * @return the ID for the default product or <code>null</code> if none could be determined */ public static String getDefaultProduct() { Properties config = TargetPlatformHelper.getConfigIniProperties(); Set set = TargetPlatformHelper.getProductNameSet(); if (config != null) { String product = (String) config.get(PRODUCT_PROPERTY); if (product != null && set.contains(product)) return product; } if (set.contains(SDK_PRODUCT)) return SDK_PRODUCT; return set.contains(PLATFORM_PRODUCT) ? PLATFORM_PRODUCT : null; }
/** * Returns the ID for the default application * (<code>org.eclipse.core.runtime.applications</code> extension) for the current target * platform. * <p> * If none could be determined, then <code>org.eclipse.ui.ide.workbench</code> * application is returned. * </p> * @return the default application to run when launching an Eclipse application */ public static String getDefaultApplication() { Properties config = TargetPlatformHelper.getConfigIniProperties(); Set set = TargetPlatformHelper.getApplicationNameSet(); if (config != null) { String application = (String) config.get(APPLICATION_PROPERTY); if (application != null && set.contains(application)) return application; } return IDE_APPLICATION; }
/** * Returns the ID for the default product * (<code>org.eclipse.core.runtime.products</code> extension) for the current target platform, * or <code>null</code> if none can be determined. * * If any of the * * @return the ID for the default product or <code>null</code> if none could be determined */ public static String getDefaultProduct() { Properties config = TargetPlatformHelper.getConfigIniProperties(); Set<String> set = TargetPlatformHelper.getProductNameSet(); if (config != null) { String product = (String) config.get(PRODUCT_PROPERTY); if (product != null && set.contains(product)) return product; } if (set.contains(SDK_PRODUCT)) return SDK_PRODUCT; return set.contains(PLATFORM_PRODUCT) ? PLATFORM_PRODUCT : null; }
public static String getBundleList() { Properties properties = getConfigIniProperties(); String osgiBundles = properties == null ? null : properties.getProperty("osgi.bundles"); //$NON-NLS-1$ if (osgiBundles == null) { StringBuffer buffer = new StringBuffer(); if (getTargetVersion() > 3.1) { buffer.append("org.eclipse.equinox.common@2:start,"); //$NON-NLS-1$ buffer.append("org.eclipse.update.configurator@3:start,"); //$NON-NLS-1$ buffer.append("org.eclipse.core.runtime@start"); //$NON-NLS-1$ } else { buffer.append("org.eclipse.core.runtime@2:start,"); //$NON-NLS-1$ buffer.append("org.eclipse.update.configurator@3:start"); //$NON-NLS-1$ } osgiBundles = buffer.toString(); } else { osgiBundles = stripPathInformation(osgiBundles); } return osgiBundles; }
/** * Returns the list of bundles in the osgi.bundles property of the * platform config ini, or a set of default bundles if the property * could not be found. * @return string list of bundles */ public static String getBundleList() { Properties properties = getConfigIniProperties(); String osgiBundles = properties == null ? null : properties.getProperty("osgi.bundles"); //$NON-NLS-1$ if (osgiBundles == null) { osgiBundles = getDefaultBundleList(); } else { osgiBundles = stripPathInformation(osgiBundles); } return osgiBundles; }
private static void addSplashLocation(Properties properties, String productID, Map map) { Properties targetConfig = TargetPlatformHelper.getConfigIniProperties(); String targetProduct = targetConfig == null ? null : targetConfig.getProperty("eclipse.product"); //$NON-NLS-1$ String targetSplash = targetConfig == null ? null : targetConfig.getProperty("osgi.splashPath"); //$NON-NLS-1$ if (!productID.equals(targetProduct) || targetSplash == null) { ArrayList locations = new ArrayList(); String plugin = getContributingPlugin(productID); locations.add(plugin); IPluginModelBase model = (IPluginModelBase) map.get(plugin); if (model != null) { BundleDescription desc = model.getBundleDescription(); if (desc != null) { BundleDescription[] fragments = desc.getFragments(); for (int i = 0; i < fragments.length; i++) locations.add(fragments[i].getSymbolicName()); } } resolveLocationPath(locations, properties, map); } else resolveLocationPath(targetSplash, properties, map); }
properties = TargetPlatformHelper.getConfigIniProperties();