Refresh Wiki Editor Texct from MySQL via JDBC interface
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / preferences / Util.java
index 241867a..417165e 100644 (file)
@@ -21,6 +21,15 @@ import org.eclipse.ui.PlatformUI;
 import org.plog4u.wiki.filter.FilterUtil;
 
 public class Util {
+  public static String titleToDB(String in) {
+    return in.replaceAll(" ", "_");
+  }
+  public static String db2Title(String in) {
+    return in.replaceAll("_", " ");
+  }
+  public static String db2TitleLink(String in) {
+    return "[["+in.replaceAll("_", " ")+"]]";
+  }
   public static Shell findShell() {
     IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
     if (window != null) {