improved settings dialogs/improved HTTP Query action
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / internal / Configuration.java
index b27800d..85fd155 100644 (file)
@@ -15,7 +15,7 @@ import net.sourceforge.phpeclipse.wiki.editor.WikiEditorPlugin;
 /**
  *  
  */
-public class Configuration implements IConfiguration {
+public class Configuration implements IConfiguration, Comparable {
   private static final String MEMENTO_ID = "id";
 
   private static final String MEMENTO_NAME = "name";
@@ -144,4 +144,28 @@ public class Configuration implements IConfiguration {
       fPassword = "";
     }
   }
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  public String toString() {
+    StringBuffer buffer = new StringBuffer();
+    buffer.append(fName);
+    buffer.append(" - ");
+    buffer.append(fUser);
+    buffer.append(" - ");
+    buffer.append(fUrl);
+    buffer.append(" - ");
+    buffer.append(fType);
+    return buffer.toString();
+  }
+  
+  /* (non-Javadoc)
+   * @see java.lang.Comparable#compareTo(java.lang.Object)
+   */
+  public int compareTo(Object o) {
+    if (o instanceof IConfiguration) {
+      return fName.compareTo(((IConfiguration)o).getName());
+    }
+    return 1;
+  }
 }
\ No newline at end of file