void write(ObjectOutput dos) throws IOException { dos.writeUTF(codeName); dos.writeUTF(codeNameBase); dos.writeInt(codeNameRelease); writeStrings(dos, coveredPackages); dos.writeObject(dependencies); dos.writeUTF(implVersion); dos.writeUTF(buildVersion); writeStrings(dos, provides); writeStrings(dos, friendNames); dos.writeUTF(specVers != null ? specVers.toString() : "0"); Module.PackageExport.write(dos, publicPackages); }
J2MEProfile(String name, SpecificationVersion version, String displayName, String type, String dependencies, String classPath, boolean def) { super(name, version); assert name != null; assert version != null; this.displayName = displayName == null ? name : displayName; //this is an ugly workaround for IMP-NG profile where the NG is the version number so no other version number should be appended if ("IMP-NG".equalsIgnoreCase(getName())) this.displayNameWithVersion = getDisplayName(); //NOI18N else this.displayNameWithVersion = DISPLAY_NAME_WITH_VERSION_FORMAT.format(new Object[] {getDisplayName(), getVersion().toString()}, new StringBuffer(), null).toString(); assert type != null; this.type = type; this.dependencies = dependencies != null ? dependencies : ""; //NOI18N this.classPath = classPath == null ? "" : classPath; // NOI18N this.def = def; }
@Override public String getDisplayName() { String displayName = super.getDisplayName(); if (displayName == null) { displayName = NbBundle.getMessage(DefaultPlatformImpl.class, "TXT_DefaultPlatform", getSpecification().getVersion().toString()); this.internalSetDisplayName(displayName); } return displayName; }
public String getSourceLevel(final FileObject javaFile) { assert javaFile != null : "javaFile has to be non null"; //NOI18N String ext = javaFile.getExt(); if (JAVA_EXT.equalsIgnoreCase (ext)) { ScalaPlatform jp = ScalaPlatformManager.getDefault().getDefaultPlatform(); assert jp != null : "JavaPlatformManager.getDefaultPlatform returned null"; //NOI18N String s = jp.getSpecification().getVersion().toString(); if (s.equals("1.6") || s.equals("1.7")) { // #89131: these levels are not actually distinct from 1.5. return "1.5"; } else { return s; } } return null; }
private void setExplicitJavaPlatform(final AntProjectHelper helper, final ProjectImportModel model) { Element pcd = helper.getPrimaryConfigurationData(true); NodeList sourceRootNodes = pcd.getElementsByTagNameNS(J2SEProject.PROJECT_CONFIGURATION_NAMESPACE, "source-roots"); //NOI18N assert sourceRootNodes.getLength() == 1 : "Broken project.xml file"; // NOI18N Element el = pcd.getOwnerDocument().createElementNS(J2SEProject.PROJECT_CONFIGURATION_NAMESPACE, "explicit-platform"); // NOI18N el.setAttribute("explicit-source-supported", "true"); // NOI18N pcd.insertBefore(el, sourceRootNodes.item(0)); helper.putPrimaryConfigurationData(pcd, true); EditableProperties prop = helper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH); String ver = model.getJavaPlatform().getSpecification().getVersion().toString(); String normalizedName = model.getJavaPlatform().getProperties().get("platform.ant.name"); // NOI18N prop.setProperty(ProjectProperties.PLATFORM_ACTIVE, normalizedName); helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, prop); }
oos.writeObject(v.toString()); } else { oos.writeObject(null);
@Override public String toString() { return isNameIsJarFileName() || "IMP-NG".equalsIgnoreCase(getName()) ? getName() : getName() + '-' + getVersion().toString(); //NOI18N }
private void logModules(Report report) { for (ModuleInfo m : Lookup.getDefault().lookupAll(ModuleInfo.class)) { String moduleStr = ""; SpecificationVersion specVersion = m.getSpecificationVersion(); if (specVersion != null) { moduleStr = m.getCodeName() + " [" + specVersion.toString() + "]"; } else { moduleStr = m.getCodeName(); } if (m.isEnabled()) { report.addEnabledModule(moduleStr); } else { report.addDisabledModule(moduleStr); } } }
private static boolean updateSourceLevel(EditableProperties ep) { ScalaPlatform platform = ScalaPlatformManager.getDefault().getDefaultPlatform(); String ver = platform.getSpecification().getVersion().toString(); if (!ver.equals(ep.getProperty("default.javac.source"))) { //NOI18N ep.setProperty("default.javac.source", ver); //NOI18N ep.setProperty("default.javac.target", ver); //NOI18N return true; } else { return false; } }
classpath.append(profs[i].getClassPath()); final String version = profs[i].getVersion() == null ? null : profs[i].getVersion().toString(); final String ability = toValidAbility(profs[i].getName()); if (ability != null) {
public String getSourceLevel(org.openide.filesystems.FileObject javaFile) { try { } catch (Exception e) {} ScalaPlatform[] platforms = ScalaPlatformManager.getDefault().getInstalledPlatforms (); for (int i=0; i< platforms.length; i++) { if (J2SEPlatformImpl.PLATFORM_J2SE.equalsIgnoreCase(platforms[i].getSpecification().getName()) && platforms[i].getSourceFolders().contains(javaFile)) { //NOI18N return platforms[i].getSpecification().getVersion().toString(); } } return null; }
public String getSourceLevel(org.openide.filesystems.FileObject javaFile) { try { } catch (Exception e) {} JavaPlatform[] platforms = JavaPlatformManager.getDefault().getInstalledPlatforms (); for (JavaPlatform platform : platforms ) { if (CDCPlatform.PLATFORM_CDC.equalsIgnoreCase(platform.getSpecification().getName()) && platform.getSourceFolders().contains(javaFile)) { //NOI18N return platform.getSpecification().getVersion().toString(); } } return null; }
private String getSourceLevel(WizardDescriptor d, String serverInstanceId, Profile j2ee) { String sourceLevel = JavaPlatform.getDefault().getSpecification().getVersion().toString(); if (warningPanel != null && warningPlaceHolderPanel.isVisible()) { Specification spec = warningPanel.getSuggestedJavaPlatformSpecification(); if (spec != null) { sourceLevel = spec.getVersion().toString();
pw.print(" <" + p.getType() //NOI18N + " name=\"" + XMLUtil.toAttributeValue(p.getName()) //NOI18N + "\" version=\"" + XMLUtil.toAttributeValue(p.getVersion().toString()) //NOI18N + "\" displayname=\"" + XMLUtil.toAttributeValue(p.getDisplayName()) //NOI18N + "\" classpath=\"" + XMLUtil.toAttributeValue(p.getClassPath())); //NOI18N
}, false); SpecificationVersion sourceLevel = getDefaultSourceLevel(); ep.setProperty("javac.source", sourceLevel.toString()); // NOI18N ep.setProperty("javac.target", sourceLevel.toString()); // NOI18N ep.setProperty("javac.deprecation", "false"); // NOI18N ep.setProperty("scalac.deprecation", "no"); // NOI18N
String jdkVersion = platform.getSpecification().getVersion().toString();
}, false); SpecificationVersion sourceLevel = getPlatformSourceLevel(platformName); ep.setProperty("javac.source", sourceLevel.toString()); // NOI18N ep.setProperty("javac.target", sourceLevel.toString()); // NOI18N ep.setProperty("javac.deprecation", "false"); // NOI18N ep.setProperty(ProjectProperties.JAVAC_TEST_CLASSPATH, new String[]{ // NOI18N
String sourceLevel = v.toString();
String sourceLevel = v.toString();
public static String findWarningType(Profile j2eeProfile, Set acceptableSourceLevels) { JavaPlatform defaultPlatform = JavaPlatformManager.getDefault().getDefaultPlatform(); SpecificationVersion version = defaultPlatform.getSpecification().getVersion(); String sourceLevel = version.toString();