[英]How can I organize a large number of Stringtemplate files into different folders
In my project, I am using StringTemplate files to generate java code extensively . 在我的项目中,我正在使用StringTemplate文件广泛地生成Java代码。 I am keeping all StringTemplate files in one folder .
我将所有StringTemplate文件保留在一个文件夹中 。 Now, I want to group StringTemplate files according to their category into different folders.
现在,我想根据其类别将StringTemplate文件分组到不同的文件夹中。 I am using the following way to get instance of String template file.
我正在使用以下方式获取String模板文件的实例。
StringTemplate templateOfSensorDriver = group.getInstanceOf("sensordriver");
// In this code, I am getting instance of sensordriver.st file
using getInstanceOf() method.
Can you please suggest me how can I give path of specific folder using getInstaceOf() method ? 您能建议我如何使用getInstaceOf()方法给出特定文件夹的路径吗?
Assuming you are using StringTemplate 4, you can qualify your template names. 假设您正在使用StringTemplate 4,则可以限定模板名称。 The
STGroupDir
group will change the path to folders. STGroupDir
组将更改文件夹的路径。
group.getInstanceOf("path/to/sensordriver");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.