Merge commit 'd9d3891bf5f4922520783f2fbb1ff4ec61403ba0' into eclair-mr2-plus-aosp * commit 'd9d3891bf5f4922520783f2fbb1ff4ec61403ba0': Fix potential NPE in manifest editor when switching SDKs
This commit is contained in:
@@ -21,6 +21,7 @@ import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.Android
|
||||
import com.android.ide.eclipse.adt.internal.editors.manifest.descriptors.ManifestElementDescriptor;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiAttributeNode;
|
||||
import com.android.ide.eclipse.adt.internal.editors.uimodel.UiElementNode;
|
||||
import com.android.ide.eclipse.adt.internal.sdk.AndroidTargetData;
|
||||
import com.android.sdklib.SdkConstants;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
@@ -60,12 +61,17 @@ public final class UiManifestElementNode extends UiElementNode {
|
||||
*/
|
||||
@Override
|
||||
public String getShortDescription() {
|
||||
if (getXmlNode() != null &&
|
||||
AndroidTargetData target = getAndroidTarget();
|
||||
AndroidManifestDescriptors manifestDescriptors = null;
|
||||
if (target != null) {
|
||||
manifestDescriptors = target.getManifestDescriptors();
|
||||
}
|
||||
|
||||
if (manifestDescriptors != null &&
|
||||
getXmlNode() != null &&
|
||||
getXmlNode() instanceof Element &&
|
||||
getXmlNode().hasAttributes()) {
|
||||
|
||||
AndroidManifestDescriptors manifestDescriptors =
|
||||
getAndroidTarget().getManifestDescriptors();
|
||||
|
||||
// Application and Manifest nodes have a special treatment: they are unique nodes
|
||||
// so we don't bother trying to differentiate their strings and we fall back to
|
||||
|
||||
Reference in New Issue
Block a user