From 24712d417041ea6f42ce93e8fee8a5efd7aa72b0 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Fri, 26 Oct 2012 12:49:49 +0000 Subject: [PATCH] SDK: - fix npe in Android Settings when no SDK is selected - change Android and Desktop ordering and naming in project properties slightly git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9898 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/android/Bundle.properties | 2 +- .../src/com/jme3/gde/android/MobileCustomizerPanel.java | 7 ++++++- .../desktop/executables/DesktopExeCompositeProvider.java | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sdk/jme3-android/src/com/jme3/gde/android/Bundle.properties b/sdk/jme3-android/src/com/jme3/gde/android/Bundle.properties index b019d3973..968ab8007 100644 --- a/sdk/jme3-android/src/com/jme3/gde/android/Bundle.properties +++ b/sdk/jme3-android/src/com/jme3/gde/android/Bundle.properties @@ -3,7 +3,7 @@ android-base=android-base OpenIDE-Module-Display-Category=jMonkeyEngine OpenIDE-Module-Name=Android Support OpenIDE-Module-Short-Description=Provides Android deployment for jMonkeyEngine SDK -LBL_Category_Mobile=Mobile +LBL_Category_Mobile=Android MobileCustomizerPanel.jLabel2.text=Mobile Deployment MobileCustomizerPanel.jCheckBox1.text=Enable Android Deployment MobileCustomizerPanel.jLabel1.text=Android Target diff --git a/sdk/jme3-android/src/com/jme3/gde/android/MobileCustomizerPanel.java b/sdk/jme3-android/src/com/jme3/gde/android/MobileCustomizerPanel.java index 32a08dc40..cb943ab22 100644 --- a/sdk/jme3-android/src/com/jme3/gde/android/MobileCustomizerPanel.java +++ b/sdk/jme3-android/src/com/jme3/gde/android/MobileCustomizerPanel.java @@ -71,7 +71,12 @@ public class MobileCustomizerPanel extends javax.swing.JPanel implements ActionL properties.setProperty("mobile.android.enabled", ""); } //TODO: check properties - properties.setProperty("mobile.android.target", ((AndroidTarget) jComboBox1.getSelectedItem()).getName()); + AndroidTarget target = ((AndroidTarget) jComboBox1.getSelectedItem()); + if (target != null) { + properties.setProperty("mobile.android.target", target.getName()); + } else { + properties.setProperty("mobile.android.target", ""); + } properties.setProperty("mobile.android.package", jTextField1.getText()); } diff --git a/sdk/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java b/sdk/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java index 7cdc2437d..8a40a484e 100644 --- a/sdk/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java +++ b/sdk/jme3-desktop-executables/src/com/jme3/gde/desktop/executables/DesktopExeCompositeProvider.java @@ -22,7 +22,7 @@ import org.openide.util.NbBundle; * * @author normenhansen */ -@ProjectCustomizer.CompositeCategoryProvider.Registration(projectType = "org-netbeans-modules-java-j2seproject", category = "Application", position = 400) +@ProjectCustomizer.CompositeCategoryProvider.Registration(projectType = "org-netbeans-modules-java-j2seproject", category = "Application", position = 420) public class DesktopExeCompositeProvider implements ProjectCustomizer.CompositeCategoryProvider { private static final String CAT_LWJGL_APPLET = "DesktopExe"; // NOI18N