config eclipse drupal

5 篇文章 0 订阅
3 篇文章 0 订阅

http://drupal.org/node/75242


Download Eclipse PDT version

then

necessary st


Eclipse Hook Templates

A collection of very handy Drupal hook templates is available for Eclipse. These are great for quickly inserting many common Drupal hook functions for both Drupal 6 and 7.

  1. Download the templates from the Eclipse Hook Templates project page.
  2. In Eclipse, go to Preferences > PHP > Editor > Templates and 'Import' the downloaded XML file. Apply your changes.
  3. Use the templates by typing the name of the hook (eg. 'hook_form') and pressing ctrl-space to pop up the auto-complete window.



PHP Development Tools (PDT) (package)

This is the official Eclipse project developed by Zend at http://www.eclipse.org/pdt/.

  1. Make sure Drupal file types are recognized as PHP files:

    For PDT version 2.1.1: Under Window -> Preferences (Eclipse
    -> Preferences
    on Mac) menu:

    • Expand the left-hand menu to General -> Content Types. Under Content types on the right, click Text -> PHP Content Type. Add the *.engine, *.theme, *.install, *.inc, *.module *.profile and *.test file types so that these files will be recognized as PHP. The free plug-in to Eclipse for Drupal developers does this for you and is easy to install.
  2. Make sure the file encoding and characters are Unix friendly so that any code can be committed back in to the Drupal repositories (if you are so inclined):

    For PDT version 2.1.1: Under Window -> Preferences (Eclipse
    -> Preferences
    on Mac) menu:

    • In the left-hand menu click on General -> Workspace: Check Text file encoding and select
      Other :
             UTF-8
      Check New text file line delimiter and select
      Other:
             Unix

  3. Ensure that spaces are used instead of tabs:

    For PDT version 2.1.1: Under Window -> Preferences (Eclipse
    -> Preferences
    on Mac) menu:

    • In the left-hand menu click on General -> Editors -> Text
      Editors
      : Check Insert spaces for tabs.
    • In the left-hand menu click on PHP -> Code Style ->
      Formatter
      : Set Tab policy: Spaces. Set Indentation size to 2.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值