Author: yradtsevich
Date: 2009-04-23 05:45:10 -0400 (Thu, 23 Apr 2009)
New Revision: 14859
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/templates/empty-vpe-templates-auto.xml
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
Log:
issue JBIDE-4131: Change saving of vpe auto templates
https://jira.jboss.org/jira/browse/JBIDE-4131
- minor fix: name of the default user template file changed to
'empty-vpe-templates-auto.xml' .
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2009-04-22
23:31:24 UTC (rev 14858)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2009-04-23
09:45:10 UTC (rev 14859)
@@ -45,10 +45,10 @@
public class VpeTemplateManager {
- private static final String AUTO_TEMPLATES_DEFAULT_FILE
+ private static final String EMPTY_VPE_TEMPLATES_AUTO
+ = "templates/empty-vpe-templates-auto.xml"; //$NON-NLS-1$
+ private static final String VPE_TEMPLATES_AUTO
= "templates/vpe-templates-auto.xml"; //$NON-NLS-1$
- private static final String AUTO_TEMPLATES_WORKSPACE_FILE
- = "templates/vpe-templates-auto.xml"; //$NON-NLS-1$
static final String TEMPLATES_FOLDER = File.separator + "templates" +
File.separator; //$NON-NLS-1$
public static final String VPE_PREFIX = "vpe:"; //$NON-NLS-1$
@@ -1047,12 +1047,12 @@
*/
public static IPath getAutoTemplates() throws IOException {
final IPath workspaceTemplatePath = VpePlugin.getDefault()
- .getStateLocation().append(AUTO_TEMPLATES_WORKSPACE_FILE);
+ .getStateLocation().append(VPE_TEMPLATES_AUTO);
final File workspaceTemplateFile = workspaceTemplatePath.toFile();
if (!workspaceTemplateFile.exists()) {
final IPath dafaultTemplatePath = VpeTemplateFileList
- .getFilePath(AUTO_TEMPLATES_DEFAULT_FILE, null);
+ .getFilePath(EMPTY_VPE_TEMPLATES_AUTO, null);
final File defaultTemplateFile = dafaultTemplatePath.toFile();
copy(defaultTemplateFile, workspaceTemplateFile);
}
Copied: trunk/vpe/plugins/org.jboss.tools.vpe/templates/empty-vpe-templates-auto.xml (from
rev 14847, trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml)
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/empty-vpe-templates-auto.xml
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/templates/empty-vpe-templates-auto.xml 2009-04-23
09:45:10 UTC (rev 14859)
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<vpe:templates/>
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml 2009-04-22
23:31:24 UTC (rev 14858)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml 2009-04-23
09:45:10 UTC (rev 14859)
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates/>