Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Live Template Bracket Styles


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 0 Threads: [ Previous | Next ]
Marvin Wilkins

Posts: 1
Registered: 2/23/18
Live Template Bracket Styles  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 23, 2018 2:00 PM
How do I change the Live Temples to show brackets as below

if(true)
{

}

The template for "if" is as below,and gives the open bracket on the "if" line. I want a new line after the open bracket? I have it working fine if I reformat text using Cntrol-D but the live templates don't use it

Thanks

?xml version="1.0" encoding="utf-8" ?>

<codetemplate xmlns="http://schemas.borland.com/Delphi/2005/codetemplates"
version="1.0.0">
<template name="if" surround="true" invoke="auto">
<point name="expr">
<script language="C" onenter="true" onleave="true">
invoke_code_completion();
</script>
<hint>
conditional expression
</hint>
<text>
true
</text>
</point>

<description>
if statement
</description>
<author>
Embarcadero
</author>
<code language="C" context="methodbody"><![CDATA[if ($expr$) {
$selected$$*$$end$
}
]]>
</code>
</template>
</codetemplate>
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02