X-Git-Url: http://git.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/Util.java b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/Util.java index 4d154f7..b8d41f4 100644 --- a/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/Util.java +++ b/archive/net.sourceforge.phpeclipse.wiki/src/net/sourceforge/phpeclipse/wiki/preferences/Util.java @@ -116,16 +116,19 @@ public class Util { String globalBasePath = store.getString(WikiEditorPlugin.WIKI_TEXTS_BASE_PATH); if (globalBasePath == null || globalBasePath.equals("")) { store.setValue(WikiEditorPlugin.WIKI_TEXTS_BASE_PATH, value + "/wpsrc"); + store.setValue(WikiEditorPlugin.LOCAL_TEMPLATE_FILE_NAME, value + "/wpsrc/main.vm"); + store.setValue(WikiEditorPlugin.EXPORT_TEMPLATE_FILE_NAME, value + "/wpsrc/export.vm"); } String htmlFolder = store.getString(WikiEditorPlugin.HTML_OUTPUT_PATH); - if (htmlFolder == null || htmlFolder.equals("")) { - // set a global default + if (htmlFolder == null || htmlFolder.equals("")) { + // set a global default store.setValue(WikiEditorPlugin.HTML_OUTPUT_PATH, value + "/wpbin"); } setProperty(project, WikiProjectPreferences.PREF_ID, FieldEditorOverlayPage.USEPROJECTSETTINGS, "true"); setProperty(project, WikiProjectPreferences.PREF_ID, WikiEditorPlugin.WIKI_TEXTS_BASE_PATH, value + "/wpsrc"); setProperty(project, WikiProjectPreferences.PREF_ID, WikiEditorPlugin.HTML_OUTPUT_PATH, value + "/wpbin"); - + setProperty(project, WikiProjectPreferences.PREF_ID, WikiEditorPlugin.LOCAL_TEMPLATE_FILE_NAME, value + "/wpsrc/main.vm"); + setProperty(project, WikiProjectPreferences.PREF_ID, WikiEditorPlugin.EXPORT_TEMPLATE_FILE_NAME, value + "/wpsrc/export.vm"); // IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); // IResource resource = root.findMember(project.getLocation()); NullProgressMonitor _monitor = new NullProgressMonitor(); @@ -153,6 +156,14 @@ public class Util { return Util.getPreferenceValue(file.getProject(), WikiEditorPlugin.WIKI_TEXTS_BASE_PATH); } + public static String getLocalTemplate(IResource file) { + return Util.getPreferenceValue(file.getProject(), WikiEditorPlugin.LOCAL_TEMPLATE_FILE_NAME); + } + + public static String getExportTemplate(IResource file) { + return Util.getPreferenceValue(file.getProject(), WikiEditorPlugin.EXPORT_TEMPLATE_FILE_NAME); + } + public static String getProjectsWikiTextsPath(IProject project) { return Util.getPreferenceValue(project, WikiEditorPlugin.WIKI_TEXTS_BASE_PATH); }