Add predefined Velocity and CSS templates if wiki builder is assigned to a project
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.wiki / src / net / sourceforge / phpeclipse / wiki / editor / WikiEditorPlugin.java
index 6226851..6e7669b 100644 (file)
@@ -53,12 +53,25 @@ public class WikiEditorPlugin extends AbstractUIPlugin {
   public final static String HTML_OUTPUT_PATH = "__static_wiki_folder";
 
   public final static String WIKI_TEXTS_BASE_PATH = "__wiki_texts_base_path";
-
+  
+  public final static String LOCAL_TEMPLATE_FILE_NAME = "__local_template_file_name";
+  public final static String EXPORT_TEMPLATE_FILE_NAME = "__export_template_file_name";
+  public final static String LOCAL_CSS_URL = "__local_css_url"; 
+  public final static String EXPORT_CSS_URL = "__export_css_url";
+  public final static String PREF_STRING_CONFIGURATIONS = "configurations";
+  public final static String CONFIG_MEMENTO = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+               "<configurations>"+
+"<config name=\"Google Search\" type-id=\"HTTP Query\" url=\"http://www.google.com/search?q=$text.selection\"/>" +
+"<config name=\"Koders.com Search\" type-id=\"HTTP Query\" url=\"http://koders.com/?s=$text.selection\"/>" +
+"<config name=\"Leo.org Translation\" type-id=\"HTTP Query\" url=\"http://dict.leo.org/?search=$text.selection\"/>" +
+"<config name=\"Wikipedia-en\" type-id=\"Wikipedia-Load Text\" url=\"http://en.wikipedia.org/w/wiki.phtml?title=$text.wikiname&amp;action=edit\"/>" +
+"<config name=\"Wikibooks-en\" type-id=\"Wikipedia-Load Text\" url=\"http://en.wikibooks.org/w/wiki.phtml?title=$text.wikiname&amp;action=edit\"/>" +
+"</configurations>";
   private static ConfigurationManager manager;
-
-  public static final String IMG_MONITOR_ON = "monitorOn";
-
-  public static final String IMG_MONITOR_OFF = "monitorOff";
+//
+//  public static final String IMG_MONITOR_ON = "monitorOn";
+//
+//  public static final String IMG_MONITOR_OFF = "monitorOff";
 
   /**
    * Creates an image and places it in the image registry.
@@ -212,6 +225,7 @@ public class WikiEditorPlugin extends AbstractUIPlugin {
    * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)
    */
   protected void initializeDefaultPreferences(IPreferenceStore store) {
+    store.setDefault(PREF_STRING_CONFIGURATIONS, CONFIG_MEMENTO);
   }
 
   /*