且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Eclipse PDT和自定义PHPDoc注释

更新时间:2023-09-29 07:57:34

I assumed there would be a configuration file somewhere, but looking through the various folders in my Zend Studio installation didnt give me the results I was hoping for. Searching Eclipse.org for Content Assist yielded

So I guess the "real" way to add a new Content Assist Context would be to extend Eclipse.

Alternative: Using Templates

The other way to get the annotations would be to add them via Templates. Follow these steps:

  • Go to Window > Preferences > PHP > Editor > Templates.
  • Click New, fill in the dialogue and confirm everything to get back to your editor

The template is now setup to appear when in the context of a PHP Comment. Go to a UnitTest DocBlock and type @. If Content Assist does not open automatically, hit Ctrl+Space. There should be an option to select @depends now.

Confirm as you would confirm any other suggestion. This should write @depends and put your cursor right next to it (so you can insert the name of the test).

相关阅读

推荐文章