How to enable autocomplete/syntax-highlight for PHP core functions in Eclipse?

后端 未结 8 1776
小鲜肉
小鲜肉 2020-12-14 16:19

I searched a lot, checked many times the neccesary steps, but it still don\'t work.

My environment is :

  1. Latest eclipse for PHP developer package

相关标签:
8条回答
  • 2020-12-14 16:48

    There seem to still be a lot of bugs related to auto-completion for the PHP Development Tools Project (PDT) (See Open Bugs).

    One has been entered two days ago: bug 286733 "When using sub namespace completion does not work."

    alt text

    But this is hardly the only one:

    • "Autocomplete on namespaces failed" (bug 281766)
    • "[php 5.3] Code assist doesn't provide method completion" (bug 286068)
    • ...

    They are all related to the namespace of the PHP code. Could you check if you reproduce the error in a global namespace?

    0 讨论(0)
  • 2020-12-14 16:53

    As noted before the 'natures' node for php core is listed but this is most insufficient when the project is imported or checked out.

    • Make a backup of your .project
    • Remove the 'natures' node children
    • Close/Re-open eclipse
    • Right-click project -> Configure -> Add PHP Support
    • Add back other 'natures' children

    The issue is that project will not make the necessary imports because it assumes it already has.

    0 讨论(0)
提交回复
热议问题