Merge branch 'master' of https://github.com/Kendos-Kenlen/intellij-community into...
authorDmitry Avdeev <dmitry.avdeev@jetbrains.com>
Wed, 13 Jul 2016 17:40:41 +0000 (20:40 +0300)
committerDmitry Avdeev <dmitry.avdeev@jetbrains.com>
Wed, 13 Jul 2016 17:40:41 +0000 (20:40 +0300)
platform/lang-impl/src/com/intellij/ide/fileTemplates/impl/FileTemplateManagerImpl.java
resources-en/src/fileTemplates/default.html
resources-en/src/fileTemplates/includes/File Header.java.html
resources-en/src/fileTemplates/includes/default.html

index 2673b736ad4292bbd52c49846183b63b2388859e..a80f45eaf824ceccd0944df9bcc6d1b07303621c 100644 (file)
@@ -204,6 +204,8 @@ public class FileTemplateManagerImpl extends FileTemplateManager implements Pers
     Date date = myTestDate == null ? calendar.getTime() : myTestDate;
     SimpleDateFormat sdfMonthNameShort = new SimpleDateFormat("MMM");
     SimpleDateFormat sdfMonthNameFull = new SimpleDateFormat("MMMM");
+    SimpleDateFormat sdfDayNameShort = new SimpleDateFormat("EEE");
+    SimpleDateFormat sdfDayNameFull = new SimpleDateFormat("EEEE");
     SimpleDateFormat sdfYearFull = new SimpleDateFormat("yyyy");
 
     props.setProperty("DATE", DateFormatUtil.formatDate(date));
@@ -213,8 +215,11 @@ public class FileTemplateManagerImpl extends FileTemplateManager implements Pers
     props.setProperty("MONTH_NAME_SHORT", sdfMonthNameShort.format(date));
     props.setProperty("MONTH_NAME_FULL", sdfMonthNameFull.format(date));
     props.setProperty("DAY", getCalendarValue(calendar, Calendar.DAY_OF_MONTH));
+    props.setProperty("DAY_NAME_SHORT", sdfDayNameShort.format(date));
+    props.setProperty("DAY_NAME_FULL", sdfDayNameFull.format(date));
     props.setProperty("HOUR", getCalendarValue(calendar, Calendar.HOUR_OF_DAY));
     props.setProperty("MINUTE", getCalendarValue(calendar, Calendar.MINUTE));
+    props.setProperty("SECOND", getCalendarValue(calendar, Calendar.SECOND));
 
     props.setProperty("USER", SystemProperties.getUserName());
     props.setProperty("PRODUCT_NAME", ApplicationNamesInfo.getInstance().getFullProductName());
@@ -251,7 +256,7 @@ public class FileTemplateManagerImpl extends FileTemplateManager implements Pers
 
   private void validateRecentNames() {
     final Collection<FileTemplateBase> allTemplates = myDefaultTemplatesManager.getAllTemplates(false);
-    final List<String> allNames = new ArrayList<String>(allTemplates.size());
+    final List<String> allNames = new ArrayList<>(allTemplates.size());
     for (FileTemplate fileTemplate : allTemplates) {
       allNames.add(fileTemplate.getName());
     }
@@ -468,7 +473,7 @@ public class FileTemplateManagerImpl extends FileTemplateManager implements Pers
   }
 
   public static class State {
-    public List<String> RECENT_TEMPLATES = new ArrayList<String>();
+    public List<String> RECENT_TEMPLATES = new ArrayList<>();
     public String SCHEME = FileTemplatesScheme.DEFAULT.getName();
 
     public void addName(@NotNull @NonNls String name) {
index 3fca66292fa5ae7bf28a001f3e522aa8d9199a2f..ce83fff93f142bb3439f2b3325e12fa8ce696ff0 100644 (file)
     <td width="10">&nbsp;</td>
     <td width="100%" valign="top"><font face="verdana" size="-1">current day of the month</font></td>
   </tr>
+  <tr>
+    <td valign="top"><nobr><font face="verdana" size="-2"><b>${DAY_NAME_SHORT}</b></font></nobr></td>
+    <td width="10">&nbsp;</td>
+    <td width="100%" valign="top"><font face="verdana" size="-1">first 3 letters of the current day name. Example: Mon, Tue, etc.</font></td>
+  </tr>
+  <tr>
+    <td valign="top"><nobr><font face="verdana" size="-2"><b>${DAY_NAME_FULL}</b></font></nobr></td>
+    <td width="10">&nbsp;</td>
+    <td width="100%" valign="top"><font face="verdana" size="-1">full name of the current day. Example: Monday, Tuesday, etc.</font></td>
+  </tr>
   <tr>
     <td valign="top"><nobr><font face="verdana" size="-2"><b>${HOUR}</b></font></nobr></td>
     <td width="10">&nbsp;</td>
@@ -86,4 +96,4 @@
   </tr>
 </table>
 </body>
-</html>
\ No newline at end of file
+</html>
index 4a6dd7d50fa1bc172e8f6a4638e75ae20314c399..4912e1694046b0d3e3db240852de8faa2ac10d56 100644 (file)
     <td width="10">&nbsp;</td>
     <td width="100%" valign="top"><font face="verdana" size="-1">current day of the month</font></td>
   </tr>
+  <tr>
+    <td valign="top"><nobr><font face="verdana" size="-2"><b>${DAY_NAME_SHORT}</b></font></nobr></td>
+    <td width="10">&nbsp;</td>
+    <td width="100%" valign="top"><font face="verdana" size="-1">first 3 letters of the current day name. Example: Mon, Tue, etc.</font></td>
+  </tr>
+  <tr>
+    <td valign="top"><nobr><font face="verdana" size="-2"><b>${DAY_NAME_FULL}</b></font></nobr></td>
+    <td width="10">&nbsp;</td>
+    <td width="100%" valign="top"><font face="verdana" size="-1">full name of the current day. Example: Monday, Tuesday, etc.</font></td>
+  </tr>
   <tr>
     <td valign="top"><nobr><font face="verdana" size="-2"><b>${HOUR}</b></font></nobr></td>
     <td width="10">&nbsp;</td>
@@ -75,4 +85,4 @@
   </tr>
 </table>
 </body>
-</html>
\ No newline at end of file
+</html>
index 12c6b46bb26cb69f2dfe835e357bb0f0df691fd5..7e217a4b682733a3adda7ef7e07c58d59bd22f03 100644 (file)
     <td width="10">&nbsp;</td>
     <td width="100%" valign="top"><font face="verdana" size="-1">current day of the month</font></td>
   </tr>
+  <tr>
+    <td valign="top"><nobr><font face="verdana" size="-2"><b>${DAY_NAME_SHORT}</b></font></nobr></td>
+    <td width="10">&nbsp;</td>
+    <td width="100%" valign="top"><font face="verdana" size="-1">first 3 letters of the current day name. Example: Mon, Tue, etc.</font></td>
+  </tr>
+  <tr>
+    <td valign="top"><nobr><font face="verdana" size="-2"><b>${DAY_NAME_FULL}</b></font></nobr></td>
+    <td width="10">&nbsp;</td>
+    <td width="100%" valign="top"><font face="verdana" size="-1">full name of the current day. Example: Monday, Tuesday, etc.</font></td>
+  </tr>
   <tr>
     <td valign="top"><nobr><font face="verdana" size="-2"><b>${HOUR}</b></font></nobr></td>
     <td width="10">&nbsp;</td>
@@ -76,4 +86,4 @@
   </tr>
 </table>
 </body>
-</html>
\ No newline at end of file
+</html>