public String getTargetVersion() { return fTarget != null ? fTarget : TargetPlatformHelper.getTargetVersionString(); }
@Override public String getTargetVersion() { return fTarget != null ? fTarget : TargetPlatformHelper.getTargetVersionString(); }
/** * Returns the version of Eclipse the target platform is pointing to or {@link ICoreConstants#TARGET_VERSION_LATEST} * if the target platform does not contain <code>org.eclipse.osgi</code>. * * @return the target version of Eclipse or the latest version PDE knows about. */ public static double getTargetVersion() { return Double.parseDouble(getTargetVersionString()); }
public static double getTargetVersion() { return Double.parseDouble(getTargetVersionString()); }
/** * Reverse engineer the target version based on a schema version. * If <code>null</code> is* passed as the version, the current target platform's * version is used (result of getTargetVersion()). * @param schemaVersion the schema version being targeted or <code>null</code> * @return a compatible target version */ public static String getTargetVersionForSchemaVersion(String schemaVersion) { if (schemaVersion == null) { return getTargetVersionString(); } // In 3.4 the schemas changed the spelling of appInfo to appinfo to be w3c compliant, see bug 213255. if (schemaVersion.equals(ICoreConstants.TARGET30)) { // 3.0 schema version was good up to 3.1 return ICoreConstants.TARGET31; } if (schemaVersion.equals(ICoreConstants.TARGET32)) { // 3.2 schema version was good for 3.2 and 3.3 return ICoreConstants.TARGET33; } // otherwise, compatible with latest version return getTargetVersionString(); }
public static void createBundleForFramework(IProject project, HashMap newProps, IProgressMonitor monitor) throws CoreException { try { File outputFile = new File(project.getLocation().append( "META-INF/MANIFEST.MF").toOSString()); //$NON-NLS-1$ File inputFile = new File(project.getLocation().toOSString()); PluginConverter converter = PluginConverter.getDefault(); double version = TargetPlatformHelper.getTargetVersion(); String versionString = version <= 3.1 ? ICoreConstants.TARGET31 : TargetPlatformHelper.getTargetVersionString(); converter.convertManifest(inputFile, outputFile, false, versionString, true, null); Map prop = getProperties(outputFile, newProps); prop.remove(ICoreConstants.ECLIPSE_AUTOSTART); prop.remove(ICoreConstants.ECLIPSE_LAZYSTART); converter.writeManifest(outputFile, prop, false); project.refreshLocal(IResource.DEPTH_INFINITE, null); } catch (PluginConversionException e) { } catch (CoreException e) { } finally { monitor.done(); } }
fTargetCombo.setText(PDEUIMessages.NewProjectCreationPage_target_version_range_3_5); if (PDECore.getDefault().areModelsInitialized()) { String text = TargetPlatformHelper.getTargetVersionString(); if (fTargetCombo.indexOf(text) >= 0) { fTargetCombo.setText(text);
public void saveSettings(IDialogSettings settings) { if (fEclipseButton.getSelection()) { String targetName = fEclipseCombo.getText(); // Avoid initializing the PDE models in the wizard if (PDECore.getDefault().areModelsInitialized()) { if (TargetPlatformHelper.getTargetVersionString().equals(targetName)) { targetName = null; } } else { if (fEclipseCombo.getSelectionIndex() == 0) { targetName = null; } } settings.put(S_TARGET_NAME, targetName); settings.put(S_OSGI_PROJECT, false); } else { settings.put(S_TARGET_NAME, (String) null); settings.put(S_OSGI_PROJECT, true); } } }
text = TargetPlatformHelper.getTargetVersionString();
setActivationPolicy(Constants.ACTIVATION_LAZY); String latest = TargetPlatformHelper.getTargetVersionString(); IPluginModelBase model = PluginRegistry.findModel(project); if (model != null) {