This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 137158 [details] New-Project Error The user wants to create a new Embedded Application Project, he clicks on File->New Project and selects the Java ME category and chooses Embedded Application as the project type. He then enters project details (like project name, location of the project etc). When he clicks Next and goes to third screen of wizard flow, he gets an error (See Attached Image New-Project Error) stating that Platform device does not support IMP-NG. The Finish button is disabled (due to the error) and the user could not complete the wizard flow of project creation. Reason : The code in NewProjectIterator.java forces the profile to be IMP-NG, if the embedded attribute is set in the configuration. This does not match the profile of the ME8 SDK device, which is MEEP. Proposed Solution : Create a new category of Jave ME application called ME Embedded Profile Application. Add an attribute (in layer.xml) called embeddedProfile that is set to MEEP for this new category of application and IMP-NG for Embedded Application category. The NewProjectIterator.java will use the value set in embeddedProfile as the profile for an embedded project. Here are the changes for this solution. mobility.project/src/org/netbeans/modules/mobility/project/ui/resources/emptyMEEPProject.html @@ -44,10 +44,10 @@ <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <BODY> - <b>Creates a new IMP-NG application</b> in a standard IDE project. + <b>Creates a new MEEP application</b> in a standard IDE project. You can also generate a IMlet in the project. This project uses <b>an IDE-generated Ant build script and special tasks</b> - to preprocess, build, obfuscate, preverify, run, debug, + to preprocess, build, obfuscate, run, debug, and deploy your application in the Java ME environment. </BODY> </HTML> mobility.project/src/org/netbeans/modules/mobility/project/ui/resources/layer.xml @@ -263,6 +263,19 @@ <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/netbeans/modules/mobility/project/ui/resources/emptyIMPNGProject.html"/> <attr boolvalue="true" name="application"/> <attr boolvalue="true" name="embedded"/> + <attr name="embeddedProfile" stringvalue="IMP-NG"/> + </file> + + <file name="MEEmbeddedProfileApplication"> + <attr name="position" intvalue="160"/> + <attr name="template" boolvalue="true"/> + <attr name="instantiatingIterator" newvalue="org.netbeans.modules.mobility.project.ui.wizard.NewProjectIterator"/> + <attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.mobility.project.ui.wizard.Bundle"/> + <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/org/netbeans/modules/mobility/project/ui/resources/mobile-project.png"/> + <attr name="instantiatingWizardURL" urlvalue="nbresloc:/org/netbeans/modules/mobility/project/ui/resources/emptyMEEPProject.html"/> + <attr boolvalue="true" name="application"/> + <attr boolvalue="true" name="embedded"/> + <attr name="embeddedProfile" stringvalue="MEEP"/> </file> <file name="MobileLibrary"> mobility.project/src/org/netbeans/modules/mobility/project/ui/wizard/Bundle.properties @@ -165,6 +165,7 @@ Templates/Project/J2ME=Java ME Templates/Project/J2ME/MobileApplication=Mobile Application Templates/Project/J2ME/EmbeddedApplication=Embedded Application +Templates/Project/J2ME/MEEmbeddedProfileApplication=ME Embedded Profile Application Templates/Project/J2ME/MobileLibrary=Mobile Class Library Templates/MIDP=CLDC Templates/MIDP/Midlet.java=MIDlet mobility.project/src/org/netbeans/modules/mobility/project/ui/wizard/NewProjectIterator.java @@ -135,6 +135,13 @@ if (!(Templates.getTemplate(templateWizard).getAttribute("embedded") instanceof Boolean)) { // NOI18N embedded = false; } + String embeddedProfile = null; + Object embeddedProfileValue = Templates.getTemplate(templateWizard).getAttribute("embeddedProfile"); + if ( embeddedProfileValue == null || + !(embeddedProfileValue instanceof String) || + (embeddedProfile = (String)embeddedProfileValue).length() == 0){ + embeddedProfile = "IMP-NG"; + } final String panelTitle = create ? ( embedded ? NbBundle.getMessage(NewProjectIterator.class, "TXT_EmbeddedApplication") : NbBundle.getMessage(NewProjectIterator.class, "TXT_MobileApplication") // NOI18N @@ -150,7 +157,7 @@ psPanel = new PlatformSelectionPanel(); csPanel = new ConfigurationsSelectionPanel(); templateWizard.putProperty(PlatformSelectionPanel.REQUIRED_CONFIGURATION, null); - templateWizard.putProperty(PlatformSelectionPanel.REQUIRED_PROFILE, embedded ? "IMP-NG" : null); // NOI18N + templateWizard.putProperty(PlatformSelectionPanel.REQUIRED_PROFILE, embedded ? embeddedProfile : null); // NOI18N templateWizard.putProperty(PlatformSelectionPanel.PLATFORM_DESCRIPTION, null); templateWizard.putProperty(ConfigurationsSelectionPanel.CONFIGURATION_TEMPLATES, null); templateWizard.putProperty(Utils.IS_LIBRARY, !create); mobility.project/src/org/netbeans/modules/mobility/project/ui/wizard/PlatformSelectionPanel.java @@ -78,6 +78,8 @@ public static final String IMPNG_PROFILE_NAME = "IMP-NG"; // NOI18N public static final String IMPNG_PROFILE_VERSION = "1.0"; // NOI18N + public static final String MEEP_PROFILE_NAME = "MEEP"; // NOI18N + public static final String MEEP_PROFILE_VERSION = "1.0"; // NOI18N public static final String PLATFORM_DESCRIPTION = "PlatformDescription"; //NOI18N @@ -193,6 +195,9 @@ if(IMPNG_PROFILE_NAME.equals(profile)) { return new Profile(IMPNG_PROFILE_NAME, new SpecificationVersion(IMPNG_PROFILE_VERSION)); } + if(MEEP_PROFILE_NAME.equals(profile)) { + return new Profile(MEEP_PROFILE_NAME, new SpecificationVersion(MEEP_PROFILE_VERSION)); + } final int j = profile.lastIndexOf('-'); //NOI18N return j > 0 ? new Profile(profile.substring(0, j).trim(), new SpecificationVersion(profile.substring(j+1).trim())) : new Profile(profile.trim(), null); } catch (NumberFormatException nfe) { mobility.project/src/org/netbeans/modules/mobility/project/ui/wizard/PlatformSelectionPanelGUI.java @@ -239,7 +239,7 @@ } } - if(embedded && profile != null && profile.equals("IMP-NG") && select == null) { // NOI18N + if(embedded && profile != null && (profile.equals("IMP-NG")||profile.equals("MEEP")) && select == null) { // NOI18N // no NG embedded support in this SDK for (int i=0; i<devices.length; i++) { final J2MEPlatform.J2MEProfile p[] = devices[i].getProfiles();
Created attachment 137159 [details] New ME Embedded Profile Project
Java ME 8 Embedded Application project has been added to the wizard. Implemented in javame8_232770 branch.
As of today, with a fresh copy of Netbeans 8.1 and a fresh install of the JDK and Java ME SDK, this problem still persists.
I cannot reproduce this issue. The original scenario was fixed and works correctly. Please, note that NetBeans 8.1 is not supported by latest available MESDK8.2 (from MESDK plugins point of view, but you can use it as a platform). NetBeans 8.1 support is expected in upcoming MESDK 8.3. So, it seems you are doing something wrong (e.g., installed old mobile plugins instead of new embedded ones). If the problem still exists for you, please, provide more details to reproduce it.