How to configure formatting options in PhpEclipse?

I use Eclipse Helios with PHPEclipse, which works fine, but I can not get the format (Ctrl-Shift-F) to work with the selected code. He seems to be doing nothing. Does anyone know if there is a way to edit the settings (i.e. import / export formatting options, for example in Eclipse Java) for PHPEclipse?

Basically, my problem is that it doesn't even do anything reasonable. If I have:

   class SomeClass {
     function myFunc() {
     if (isEnabled()
     ) 
   {
   // do something
   }
     }
   }

It will not move the brackets to the correct indent. If it were possible, I would be happy. :)

+3
source share
2 answers

Select your code and press Ctrl + I to format the above code as follows:

class SomeClass {
    public function myFunc() {
        if (isEnabled()
        )
        {
            // do something
        }
    }
}

, , .

Windows -> Preferences

:

PHP -> Code Style -> Formatter
+4

Eclipse PDT!

"" > ""

PHP, PHP.

" ", PHP

eclipse

class SomeClass {
    function myFunc() {
        if (isEnabled()
        )
        {
            // do something
        }
    }
}

,

0

Source: https://habr.com/ru/post/1788709/


All Articles