Live template available function level but not class level
I have a live template (screenshot attached) that works fine either outside classes or inside class member functions.
However for some reason it doesn't seem to be available at a class level as shown below.
I'm using PhpStorm v7.1.3 - Anyone got any ideas?
<?php
// !! live template works here !!
class Fish {
// XX live template doesn't work here
function doSomething()
{
// !! live template works here !!
}
// XX live template doesn't work here
};
// !! live template works here !!
Attachment(s):
live-template.jpg
请先登录再写评论。
What contexts is your template enabled for? Please press 'Change' link next to 'Applicable for' and attach a screenshot
Actually the whole template definition from ~/.WebIdeXXX/config/templates would be helpful
Hi,
The screenshot is attached to the first post.
The XML from php.XML is as follows :
<template name="fh" value="/* ------------------------------------------------------------------------------- FUNCTION: $function_name$ DESCRIPTION: $function_description$ AUTHOR: Adam Smith $time$ $date$ REVISED BY: ------------------------------------------------------------------------------- */ " description="function header" toReformat="false" toShortenFQNames="true">
<variable name="function_name" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="function_description" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="date" expression="date("dd MMM yyyy")" defaultValue="" alwaysStopAt="false" />
<variable name="time" expression="time()" defaultValue="" alwaysStopAt="false" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="false" />
<option name="XML" value="false" />
<option name="JSP" value="false" />
<option name="CSS_PROPERTY_VALUE" value="false" />
<option name="CSS_DECLARATION_BLOCK" value="false" />
<option name="CSS_RULESET_LIST" value="false" />
<option name="CSS" value="false" />
<option name="JAVA_SCRIPT" value="true" />
<option name="TypeScript" value="false" />
<option name="SQL" value="false" />
<option name="CUCUMBER_FEATURE_FILE" value="false" />
<option name="CoffeeScript" value="false" />
<option name="PHP" value="true" />
<option name="HAML" value="false" />
<option name="OTHER" value="false" />
</context>
</template>
Thanks
similar template works fine for me (tried both PHPStorm 7.1.3 and 8 EAP)
Please can you attach a screencast that shows upo the issue? Your idea.log might also help
Just installed PHPStorm v8.0 build PS-138.2000 and all works fine now
Many Thanks