302 Private method to expand a template variable with special formatting. |
302 Private method to expand a template variable with special formatting. |
303 |
303 |
304 @param var template variable name (string) |
304 @param var template variable name (string) |
305 @param val value of the template variable (string) |
305 @param val value of the template variable (string) |
306 @param txt template text (string) |
306 @param txt template text (string) |
|
307 @return expanded and formatted variable (string) |
307 """ |
308 """ |
308 t = "" |
309 t = "" |
309 for line in txt.splitlines(): |
310 for line in txt.splitlines(): |
310 ind = line.find(var) |
311 ind = line.find(var) |
311 if ind >= 0: |
312 if ind >= 0: |
927 |
928 |
928 return True |
929 return True |
929 |
930 |
930 def readTemplates(self, filename=None): |
931 def readTemplates(self, filename=None): |
931 """ |
932 """ |
932 Public method to read in the templates file (.e4c) |
933 Public method to read in the templates file (.e4c). |
933 |
934 |
934 @param filename name of a templates file to read (string) |
935 @param filename name of a templates file to read (string) |
935 """ |
936 """ |
936 if filename is None: |
937 if filename is None: |
937 filename = os.path.join(Utilities.getConfigDir(), "eric5templates.e4c") |
938 filename = os.path.join(Utilities.getConfigDir(), "eric5templates.e4c") |