diff --git a/j2me.cdc.platform/nbproject/project.xml b/j2me.cdc.platform/nbproject/project.xml --- a/j2me.cdc.platform/nbproject/project.xml +++ b/j2me.cdc.platform/nbproject/project.xml @@ -88,7 +88,7 @@ 1 - 1.7 + 1.14 diff --git a/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/Bundle.properties b/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/Bundle.properties --- a/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/Bundle.properties +++ b/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/Bundle.properties @@ -52,3 +52,4 @@ #CDCInstallImpl TXT_CDCPlatform=Java ME CDC Platform Emulator +cdc=Java ME Connected Devices diff --git a/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/CDCPlatform.java b/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/CDCPlatform.java --- a/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/CDCPlatform.java +++ b/j2me.cdc.platform/src/org/netbeans/modules/j2me/cdc/platform/CDCPlatform.java @@ -62,10 +62,9 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileStateInvalidException; import org.openide.filesystems.FileUtil; -import org.openide.filesystems.Repository; import org.openide.filesystems.URLMapper; import org.openide.modules.SpecificationVersion; -import org.openide.util.Lookup; +import org.openide.util.NbBundle; /** @@ -461,7 +460,8 @@ public Specification getSpecification() { if (spec == null) { - spec = new Specification (PLATFORM_CDC, new SpecificationVersion(getClassVersion())); //NOI18N + String name = NbBundle.getMessage(CDCPlatform.class, PLATFORM_CDC); + spec = new Specification (name, PLATFORM_CDC, new SpecificationVersion(getClassVersion())); //NOI18N } return spec; } diff --git a/java.j2seplatform/nbproject/project.xml b/java.j2seplatform/nbproject/project.xml --- a/java.j2seplatform/nbproject/project.xml +++ b/java.j2seplatform/nbproject/project.xml @@ -87,6 +87,7 @@ 1 + 1.14 diff --git a/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/Bundle.properties b/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/Bundle.properties --- a/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/Bundle.properties +++ b/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/Bundle.properties @@ -67,3 +67,5 @@ #Util MSG_BrokenExtension=A nonexistent Java extension {0} on {1} +#J2SEPlatformImpl +j2se=Java SE diff --git a/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java b/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java --- a/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java +++ b/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java @@ -58,6 +58,7 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.URLMapper; import org.openide.ErrorManager; +import org.openide.util.NbBundle; /** * Implementation of the JavaPlatform API class, which serves proper @@ -313,7 +314,8 @@ public Specification getSpecification() { if (spec == null) { - spec = new Specification (PLATFORM_J2SE, Util.getSpecificationVersion(this)); //NOI18N + String name = NbBundle.getMessage (J2SEPlatformImpl.class, PLATFORM_J2SE); + spec = new Specification (name, PLATFORM_J2SE, Util.getSpecificationVersion(this)); //NOI18N } return spec; } diff --git a/java.platform/apichanges.xml b/java.platform/apichanges.xml --- a/java.platform/apichanges.xml +++ b/java.platform/apichanges.xml @@ -104,6 +104,21 @@ + + + + + + + + +

+ Added Specification.getDisplayName() and constructors + for Specification which take a display name argument. +

+
+ +
diff --git a/java.platform/manifest.mf b/java.platform/manifest.mf --- a/java.platform/manifest.mf +++ b/java.platform/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.modules.java.platform/1 -OpenIDE-Module-Specification-Version: 1.13 +OpenIDE-Module-Specification-Version: 1.14 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/platform/Bundle.properties OpenIDE-Module-Layer: org/netbeans/modules/java/platform/resources/layer.xml AutoUpdate-Show-In-Client: false diff --git a/java.platform/src/org/netbeans/api/java/platform/Specification.java b/java.platform/src/org/netbeans/api/java/platform/Specification.java --- a/java.platform/src/org/netbeans/api/java/platform/Specification.java +++ b/java.platform/src/org/netbeans/api/java/platform/Specification.java @@ -47,9 +47,10 @@ */ public final class Specification { - private String name; - private SpecificationVersion version; - private Profile[] profiles; + private final String displayName; + private final String name; + private final SpecificationVersion version; + private final Profile[] profiles; /** @@ -58,19 +59,45 @@ * @param version of the specification e.g. 1.4 */ public Specification (String name, SpecificationVersion version) { - this (name, version, null); + this (name, name, version, null); } /** * Creates new SDK Specification * @param name of the specification e.g J2SE * @param version of the specification e.g. 1.4 - * @param profiles of the Java SDK + * @param profiles of the Java SDK (may be null) */ public Specification (String name, SpecificationVersion version, Profile[] profiles) { - this.name = name; + this (name, name, version, profiles); + } + + /** + * Creates a new SDK Specification + * @param displayName The display name (i.e. Java ME vs J2ME, the official + * specification name) + * @param name The programmatic, official name of the specification + * @param version The version + * @since 1.14 + */ + public Specification (String displayName, String name, SpecificationVersion version) { + this (displayName, name, version, null); + } + + /** + * Creates a new SDK Specification + * @param displayName The display name (i.e. Java ME vs J2ME, the official + * specification name) + * @param name The programmatic, official name of the specification + * @param version The version + * @param profiles profiles of the Java SDK (may be null) + * @since 1.14 + */ + public Specification (String displayName, String name, SpecificationVersion version, Profile[] profiles) { + this.name = displayName; this.version = version; this.profiles = profiles; + this.displayName = name; } /** @@ -82,6 +109,17 @@ } /** + * Get the display name of the specification (e.g. "Java ME" for + * j2me. + * + * @return + * @since 1.14 + */ + public final String getDisplayName() { + return this.displayName; + } + + /** * Returns the version of the Java specification e.g 1.4 * @return instance of SpecificationVersion */ diff --git a/java.platform/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java b/java.platform/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java --- a/java.platform/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java +++ b/java.platform/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java @@ -477,18 +477,24 @@ private static class PlatformCategoriesDescriptor implements Comparable { private final String categoryName; + private final String displayName; private final List platforms; private boolean changed = false; - public PlatformCategoriesDescriptor (String categoryName) { + private PlatformCategoriesDescriptor(String categoryName, String displayName) { assert categoryName != null; this.categoryName = categoryName; + this.displayName = displayName; this.platforms = new ArrayList(); } - + public String getName () { return this.categoryName; } + + public String getDisplayName() { + return displayName; + } public List getPlatform () { if (changed) { @@ -563,7 +569,7 @@ } public @Override String getDisplayName() { - return this.getName (); + return desc.getDisplayName (); } public @Override Image getIcon(int type) { @@ -606,7 +612,7 @@ platformType = platformType.toUpperCase(Locale.ENGLISH); PlatformCategoriesDescriptor platforms = categories.get(platformType); if (platforms == null ) { - platforms = new PlatformCategoriesDescriptor (platformType); + platforms = new PlatformCategoriesDescriptor (platformType, platform.getSpecification().getDisplayName()); categories.put (platformType, platforms); } platforms.add (node); diff --git a/javacard.project/nbproject/project.xml b/javacard.project/nbproject/project.xml --- a/javacard.project/nbproject/project.xml +++ b/javacard.project/nbproject/project.xml @@ -107,7 +107,7 @@ 1 - 1.9.1 + 1.14
@@ -208,6 +208,14 @@ + org.netbeans.modules.simple.project.templates + + + + 1.0 + + + org.netbeans.modules.spi.actions @@ -338,14 +346,6 @@ 6.20 - - org.netbeans.modules.simple.project.templates - - - - 1.0 - - diff --git a/javacard.project/src/org/netbeans/modules/javacard/platform/Bundle.properties b/javacard.project/src/org/netbeans/modules/javacard/platform/Bundle.properties --- a/javacard.project/src/org/netbeans/modules/javacard/platform/Bundle.properties +++ b/javacard.project/src/org/netbeans/modules/javacard/platform/Bundle.properties @@ -142,4 +142,4 @@ all=All ({0}) STEP_TITLE_VALIDATE_PLATFORM=Validate Platform STEP_TITLE_DEFINE_DEVICE=Define Default Device - +jcre=Java Card diff --git a/javacard.project/src/org/netbeans/modules/javacard/platform/JavacardPlatformImpl.java b/javacard.project/src/org/netbeans/modules/javacard/platform/JavacardPlatformImpl.java --- a/javacard.project/src/org/netbeans/modules/javacard/platform/JavacardPlatformImpl.java +++ b/javacard.project/src/org/netbeans/modules/javacard/platform/JavacardPlatformImpl.java @@ -170,8 +170,9 @@ String platformVersion = props.getProperty(JavacardPlatformKeyNames.PLATFORM_MAJORVERSION, "1") + "." + //NOI18N props.getProperty(JavacardPlatformKeyNames.PLATFORM_MINORVERSION, "0"); //NOI18N SpecificationVersion specVer = new SpecificationVersion (platformVersion); - Specification result = profile == null ? new Specification (JavacardPlatformKeyNames.PLATFORM_SPECIFICATION_NAME, specVer) : - new Specification (JavacardPlatformKeyNames.PLATFORM_SPECIFICATION_NAME, specVer, new Profile[] { profile }); + String name = NbBundle.getMessage (JavacardPlatformImpl.class, "jcre"); + Specification result = profile == null ? new Specification (name, JavacardPlatformKeyNames.PLATFORM_SPECIFICATION_NAME, specVer) : + new Specification (name, JavacardPlatformKeyNames.PLATFORM_SPECIFICATION_NAME, specVer, new Profile[] { profile }); return result; } diff --git a/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/Bundle.properties b/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/Bundle.properties --- a/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/Bundle.properties +++ b/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/Bundle.properties @@ -276,3 +276,5 @@ MNE_PlatformHome=F AD_PlatformName=N/A AD_PlatformHome=N/A + +j2me=Java ME diff --git a/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/J2MEPlatform.java b/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/J2MEPlatform.java --- a/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/J2MEPlatform.java +++ b/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/J2MEPlatform.java @@ -418,7 +418,10 @@ for (int j=0; j 1 - 1.3.1 + 1.14