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
4 comments
Comment actions Permalink

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

0
Comment actions Permalink

Hi,

The screenshot is attached to the first post.

The XML from php.XML is as follows :

  <template name="fh" value="/*&#10;-------------------------------------------------------------------------------&#10;FUNCTION:&#10;    $function_name$&#10;DESCRIPTION:&#10;    $function_description$&#10;AUTHOR:&#10;    Adam Smith $time$ $date$&#10;REVISED BY:&#10;&#10;-------------------------------------------------------------------------------&#10;*/&#10;" 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(&quot;dd MMM yyyy&quot;)" 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


0
Comment actions Permalink

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

0
Comment actions Permalink

Just installed PHPStorm v8.0 build PS-138.2000 and all works fine now

Many Thanks

0

Please sign in to leave a comment.