clean up, do not choose any build target if it cannot be read from xml

This commit is contained in:
Eugene Kudelevsky
2012-06-05 21:21:41 +04:00
parent 68550fa3d6
commit 264e7c8b46
2 changed files with 7 additions and 3 deletions
@@ -214,7 +214,7 @@ android.keystore.confirm.password.label=C&onfirm:
android.export.package.new.key.alias.label=&Alias:
android.key.password.label=Pa&ssword:
android.cannot.run.library.project.error=The module cannot be Android library project
android.compilation.error.specify.platform=Android SDK is not specified for module {0}
android.compilation.error.specify.platform=[{0}] Android SDK is not specified or cannot be parsed
android.compilation.error.manifest.not.found=[{0}] AndroidManifest.xml file not found. Please, check Android facet settings.
android.compilation.error.apt.gen.not.specified=AAPT destination directory not specified for module {0}
android.compilation.error.apk.path.not.specified=Final APK path not specified for module {0}
@@ -16,7 +16,6 @@
package org.jetbrains.android.sdk;
import com.android.sdklib.IAndroidTarget;
import com.intellij.ui.ListCellRendererWrapper;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.SdkModel;
import com.intellij.openapi.projectRoots.SdkModificator;
@@ -24,6 +23,7 @@ import com.intellij.openapi.roots.OrderRootType;
import com.intellij.openapi.roots.libraries.ui.OrderRoot;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.ListCellRendererWrapper;
import com.intellij.util.ArrayUtil;
import com.intellij.util.containers.HashMap;
import org.jetbrains.annotations.NotNull;
@@ -68,6 +68,9 @@ class AndroidSdkConfigurableForm {
if (value instanceof IAndroidTarget) {
setText(AndroidSdkUtils.getTargetPresentableName((IAndroidTarget)value));
}
else if (value == null) {
setText("<html><font color='red'>[none]</font></html>");
}
}
});
@@ -142,10 +145,11 @@ class AndroidSdkConfigurableForm {
IAndroidTarget target = (IAndroidTarget)myBuildTargetsModel.getElementAt(i);
if (buildTarget.hashString().equals(target.hashString())) {
myBuildTargetComboBox.setSelectedIndex(i);
break;
return;
}
}
}
myBuildTargetComboBox.setSelectedItem(null);
}
private void updateJdks() {