Author: dmaliarevich
Date: 2010-01-15 11:22:20 -0500 (Fri, 15 Jan 2010)
New Revision: 19779
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2795, import wizard was commented.
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-01-15
16:17:29 UTC (rev 19778)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-01-15
16:22:20 UTC (rev 19779)
@@ -268,6 +268,10 @@
*/
List<VpeAnyData> currentList =
VpeTemplateManager.getInstance().getAnyTemplates();
+ /*
+ * Uploading will add only missing templates.
+ * So here all duplicated templates will be deleted from the tagsList.
+ */
Iterator<VpeAnyData> iterator = tagsList.iterator();
while (iterator.hasNext()) {
VpeAnyData loadedTemplate = (VpeAnyData) iterator.next();
@@ -278,11 +282,17 @@
}
}
/*
- * Store loaded templates to the default auto-templates location.
+ * Add unique templates to the current list.
*/
if (currentList.addAll(tagsList)) {
+ /*
+ * Store loaded templates to the default auto-templates location.
+ */
VpeTemplateManager.getInstance().setAnyTemplates(currentList);
} else {
+ /*
+ * Log error if the operation could not be performed.
+ */
VpePlugin.getDefault().logError(VpeUIMessages.ERROR_ON_IMPORT_TAG_TEMPLATES);
}
return true;