fixed remote debug run conf. ui. added suspend on connect option (PY-2452)
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 13 Dec 2010 16:34:18 +0000 (19:34 +0300)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Mon, 13 Dec 2010 16:34:18 +0000 (19:34 +0300)
platform/util/src/com/intellij/openapi/util/JDOMExternalizerUtil.java

index a3485ffdd198c007f0208dc04e923ff1f1e8f742..7f56aaaa184fdebab3f94dc8b30cf7586195d507 100644 (file)
@@ -18,6 +18,8 @@ package com.intellij.openapi.util;
 import com.intellij.openapi.diagnostic.Logger;
 import org.jdom.Element;
 import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
 
 import java.util.List;
 
@@ -32,6 +34,17 @@ public class JDOMExternalizerUtil {
     root.addContent(element);
   }
 
+  @NotNull
+  public static String readField(Element parent, @NonNls String fieldName, @NotNull String defaultValue) {
+    String val = readField(parent, fieldName);
+    if (val != null) {
+      return val;
+    } else {
+      return defaultValue;
+    }
+  }
+
+  @Nullable
   public static String readField(Element parent, @NonNls String fieldName) {
     List list = parent.getChildren("option");
     for (int i = 0; i < list.size(); i++) {