小编Pau*_*ael的帖子

在Delphi中唤起实时模板时如何创建GUID?

我在Delphi中使用了很多Live Templates,但他们试图想出一个将GUIDS添加到模板的解决方案.有谁知道如何做到这一点?

在模板下面我现在使用GUID作为单词我需要手动替换.

<?xml version="1.0" encoding="utf-8" ?>
<codetemplate   xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
            version="1.0.0">
<template name="iacc" surround="false" invoke="manual">
    <point name="name">
        <text>
            IntfAccessors
        </text>
        <hint>
            Accessors name
        </hint>
    </point>
    <description>
        accessor declaration
    </description>
    <author>
        PMH
    </author>
    <code language="Delphi" context="methoddecl" delimiter="|">    <![CDATA[I|name|Accessors = interface(IInterface)
GUID <-- here I want a GUID
end;


I|name| = interface(I|name|Accessors)
GUID <-- here I want a GUID
end;
    ]]>
        </code>
    </template>
</codetemplate>
Run Code Online (Sandbox Code Playgroud)

delphi templates

18
推荐指数
1
解决办法
627
查看次数

标签 统计

delphi ×1

templates ×1