如果将模板引擎与之结合使用的话,它将会是一个极为强大的代码生成工具。
When combined with a template engine, it can be a very powerful tool in code generation.
默认情况下,在为模型生成代码时,EMF不会使用动态模板。
By default, EMF does not use dynamic templates when generating code for models.
您不用创建这个过程—该项目模板创建它并将其放入“生成的初始化代码”区域。
You don't create this procedure-the project template creates it and places it in the Generated initialization code region.
你可以用文本模板来生成文本的输出,例如代码文件和HTML报表。
You can use text templates to create text artifacts such as code files and HTML reports.
文本模板可以生成流程控制的代码和配置文件。
The text template can generate code and configuration files that implement that flow of control.
为强调JET不仅仅可用来生成代码,我们给出了下面这个实例,这是一个模板,生成具有不同语气的电子邮件消息。
To highlight the fact that JET doesn't need to be used only to generate code, the following example is a template that generates e-mail messages of varying moods.
GUI构建:[jsp风格的框架通常]对由模板生成的HTML代码的结构一无所知,因此很容易产生结构不正确的文档。
GUI Construction: [JSP-style frameworks have often] no knowledge of the structure of the HTML code generated by the template, so it is very easy to generate non well-formed documents.
XSLT 2.0为寻求代码生成模板引擎的开发人员提供了广泛的语言能力。
XSLT 2.0 offers expanded language capabilities to developers seeking a template engine for code generation.
本次旅程的下一站是创建用于生成代码的模板。
The next leg of our journey is to create a template we can use to generate code.
在模式中,当代码和模式同步时,把代码模板绑定到一个操作,便会生成相应代码。
Binding a code template to an operation in a pattern will cause that code to be generated when the code and model are synchronized.
我们将会导入该类(装载我们通过视图模板生成的类)并且接下来检验代码的相关部分。
We will import the class (overriding the one generated for us by the View template) and then examine the relevant portions of the code.
代码生成基于JET模板。
ModifyCase中的通用代码使用测试用例模板了作为输入参数,以生成1000个测试用例xml文件。
The custom code in ModifyCase USES test case template as the input parameter to generate the 1000 test cases XML document.
您在本文中了解了完整 mod_perl站点的模板 —使用了来自第 2部分和第 3部分的内容以及第 4 部分生成的代码。
You've now seen the templates for a full mod_perl site—using the pieces we wrote in Parts 2 and 3 and the code generated from Part 4.
另外,你可以写自己的Gas3代码生成模板,还能完全自定义生成的ActionScript 3类。
Additionally, you may write your own Gas3 code generation templates and fully customize generated ActionScript3 classes.
RoRRoR处理创建的模板,生成HTML代码,控制器的直接传入请求和模型,使数据库都处于活动状态对象中。
RoR deals with creating the templates that generate HTML code, the controllers that direct incoming requests and the model that makes the database come alive in objects.
列表8.为一个采用DTYPENAME_TEMPLATES选项的模板类所生成的代码。
Listing 8. Generated Code for a template class with DTYPENAME_TEMPLATES option.
生成JSF代码的所有模板现在在Preferences都可以使用,并且可以使用简化的JSP -like句法。
All templates for generating JSF code are now available in Preferences and use simplified JSP-like syntax.
模板可以绑定到UML方法,且当从上下文菜单中选择GenerateCode生成代码时被应用,或当Autosync Mode启用时自动执行。
The template can be bound to a UML method, and is applied when explicitly generating code when Generate code is selected from the context menu, or automatically when Autosync Mode is enabled.
来自ApacheJakarta 的一个项目,是用于从UML模型生成代码的模板引擎。
Velocity, a project from Apache Jakarta, is a template engine that has been used to generate code from UML models.
如果没有模板系统,那么就要使用Python代码生成类似示例电子邮件消息的文本片段。
Without a templating system, you'd use Python code to generate pieces of text like the example E-mail message.
它允许您将服务器端代码作为ajax端点公开,而所有模板都是自动生成的。
It lets you declaratively expose server-side code as an Ajax endpoint, generating all the plumbing for you auto-magically.
这段代码将生成ActiveRecord模型、带有相应映射路径的控制器和几个视图模板。
This generates an ActiveRecord model, a controller with an appropriate route mapped to it, and several view templates.
正如我之前所说,可视化Rails工作台所生成的代码是完全“常规的”Rails模板。
As I mentioned earlier, the files generated by the Visual Rails Workbench are all completely 'normal' Rails templates.
开发人员可以挑选一个模板并为模板回答向导的问题,然后架逻辑构师(LogicArchitect)根据模板生成适当的代码(见图5和6)。
The developer picks a template and responds to the wizard's questions for that template, and then Logic Architect populates the template with appropriate code (see Figures 5 and 6).
可以在此页上定义AspectJ模板(生成并包含在已编译的Aspect 的 AspectJ代码中),请参见图19。
You can define AspectJ templates (AspectJ code that is generated and included in a compiled aspect) on this page (see Figure 19).
在调整代码生成模板(例如为了遵循企业内部的规章制度而进行调整)时,您会享受到里面的灵活性。
You enjoy great flexibility when adjusting the Code-Generation templates (for example, to fulfill the conventions that you might face in an enterprise environment).
我已经把生成这一点的代码放入了它自己的模板中,所以当有更好的解决方案时,可以方便地替换它。
I've put code to generate this in its own template, so it can be easily replaced with a better solution when one becomes available.
这不但有助于对内容应用样式,还可以帮助进行调试,因为在查看页面源代码时很容易看出哪个模板生成了什么内容。
Not only did this help the styling of the content, but provided a debugging aid when looking at page source to determine which template generated what content.
现在可以不再担心所有的代码生成模板,并且可以编写标准的模板。
You can now stop worrying about all your code generation templates and write standard ones.
应用推荐