2

Recently I've been trying to switch from Netbeans to PhpStorm (3.0.3, latest version) and there's only one thing that is holding me back.

My current project, written in Symfony 1.4, has A LOT of JavaScript (jQuery) in Symfony templates (PHP files). Netbeans is kind enough to list JS functions and variables in a navigator window, but I don't see a similar behavior in PhpStorm. Does PhpStorm have this kind of feature? If so, how do I turn it on?


EDIT: OK, I see there's some confusion. Lets say I have a PHP file called TEST.php. Inside that file I have the following:

<script type="text/javascript">
    $.myPluginContainer.definitions.TEST = {
        var1: someVar1,
        var2: someVar2,
        var3: someVar3,

        function1: function() {
            // function1 body
            return 'function1';
        },
        function2: function() {
            // function2 body
            return null;
        },
        function3: function() {
            // function3 body
            return 5;
        }
    }
</script>

In Netbeans' Navigator window I get:

Navigator window in Netbeans 7.1

Double-clicking on the function name in Netbeans takes me to that particular variable/function definition. PhpStorm has the same, only in pure *.js files, but I need this behaviour with *.php files too.

2
  • 1
    Apparently it is not supported for embedded JS -- file a Feature Request on their Issue Tracker: youtrack.jetbrains.net/issues/WI Commented Mar 29, 2012 at 13:28
  • Does this exist in PHPStorm v6.0.3? I used this a lot in NetBeans. Commented Jul 15, 2013 at 14:37

2 Answers 2

4

I have just found that the "Structure" tab down the left hand side of the screen will show you the equivalent of the NetBeans/Eclipse Function Navigator view.

I am using JetBrains PhpStorm 6.0.3

Sign up to request clarification or add additional context in comments.

1 Comment

Well, it turned out it was a bug. I contacted the dev team and it was taken care of, at least partially. Right now I only have trouble, if the last key is a PHP variable - Netbeans used to handle this pretty well, but they broke it in one of the recent versions. For instance: $.myPluginContainer.definitions.<? echo $varName ?> = {...};
-2

Get the javascript editor addition to phpstorm

http://www.jetbrains.com/editors/javascript_editor.jsp

1 Comment

Unfortunately, that is not the case, since the JavaScript Editor plugin is already installed and enabled (it's bundled with PhpStorm by default). JavaScript navigator functionality is working fine if I open a plain *.js file, but I can't achieve the same if JavaScript is inside *.php file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.