zoukankan      html  css  js  c++  java
  • c++builder 代码模板 code templates

    c++builder6.0  MENU:Tools>Editor Options>Code Insight>Code templates

    XE6 c++builder

    D:Program Files (x86)EmbarcaderoStudio14.0ObjReposenCode_Templatesc

    D:UsersAdministratorDocumentsEmbarcaderoStudiocode_templatesC

    可参考系统目录的例子 for循环

     http://delphi.wikia.com/wiki/Live_Templates_Technical_Info

    Menu:File-New-Other-Other files-Code Template或者代码编辑器中选中一段代码后

    Menu:View-Templates-New Code Template可以把代码直接贴到模板

    在弹出的面板里,可以删除,新增,edit模板

    下面是我写的for 循环 dataset的例子

    <?xml version="1.0" encoding="utf-8" ?>
    
    <codetemplate    xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
                    version="1.0.0">
        <template name="fords" surround="true" invoke="auto">
            <point name="expr1">
                <hint>
                    initial expression
                </hint>
                <text>
                    ds->First()
                </text>
            </point>
            <point name="expr2">
                <hint>
                    loop condition
                </hint>
                <text>
                    !ds->Eof
                </text>
            </point>
            <point name="expr3">
                <hint>
                    loop expression
                </hint>
                <text>
                    ds->Next()
                </text>
            </point>
            <description>
                for dataset statement
            </description>
            <author>
                ksrsoft 2014.8.26
            </author>
            <code language="C" context="methodbody"><![CDATA[for ($expr1$; $expr2$; $expr3$) 
    {
    $selected$$*$$end$
    }
    ]]>
            </code>
        </template>
    </codetemplate>

    新建的一定要设置<code language="C",否则弹不出来

    <template name="fnv" invoke="manual">
            <description>
                FieldByName
            </description>
            <author>
                 eeee
            </author>
            <code language="C"><![CDATA[queryd->FieldByName("aaa")->Value]]>
            </code>
        </template>

  • 相关阅读:
    venv(virtual environment)的使用
    Pytest 失败重运行机制
    Python 中方法和函数的区别
    手机移动端WEB资源整合
    Sass学习日志
    1、vue基础使用复习
    vscode配置笔记
    vue兼容IE浏览器、对低版本IE下的友好提示
    关闭eslint校验
    vue实现吸顶的效果
  • 原文地址:https://www.cnblogs.com/cb168/p/3937253.html
Copyright © 2011-2022 走看看