get category
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / editor / WikiEditorPlugin.java
index 67f3451..d36277a 100644 (file)
@@ -146,6 +146,10 @@ public class WikiEditorPlugin extends AbstractUIPlugin {
 
   public final static String CONSOLE_OUTPUT = "__console_output";
 
+  public final static String HTTP_GET_THROTTLE = "http.get.throttle";
+
+  public final static String HTTP_PUT_THROTTLE = "http.put.throttle";
+
   public final static String HTTP_TIMEOUT = "http.timeout";
 
   public final static String HTTP_PROXYHOST = "http.proxyHost";
@@ -379,7 +383,7 @@ public class WikiEditorPlugin extends AbstractUIPlugin {
       try {
         String wordWrap = resourceBundle.getString(key);
         Boolean b = Boolean.valueOf(wordWrap);
-        if (b.booleanValue()) { 
+        if (b.booleanValue()) {
           store.setDefault(key, "true");
         } else {
           store.setDefault(key, "false");
@@ -388,6 +392,34 @@ public class WikiEditorPlugin extends AbstractUIPlugin {
         store.setDefault(key, "false");
       }
 
+      key = HTTP_GET_THROTTLE;
+      try {
+        String timeout = resourceBundle.getString(key);
+        int val = Integer.parseInt(timeout);
+        if (val > 0) {
+          val *= 1000;
+        } else {
+          val = 1000;
+        }
+        store.setDefault(key, Integer.toString(val));
+      } catch (Exception e) {
+        store.setDefault(key, "1000"); // 1 second
+      }
+
+      key = HTTP_PUT_THROTTLE;
+      try {
+        String timeout = resourceBundle.getString(key);
+        int val = Integer.parseInt(timeout);
+        if (val > 0) {
+          val *= 1000;
+        } else {
+          val = 5000;
+        }
+        store.setDefault(key, Integer.toString(val));
+      } catch (Exception e) {
+        store.setDefault(key, "5000"); // 5 seconds
+      }
+
       key = HTTP_TIMEOUT;
       try {
         String timeout = resourceBundle.getString(key);