準備
- JDK(Java)8以上が必要なのでinstallしておきます。
Download
- URL
- “Get Eclipse OXYGEN” > “Download 64 bit”
- “Eclipse Installer.app”がダウンロードされます。
Install
- Open “Eclipse Installer.app”
- “Eclipse IDE for PHP Developers”を選択。
- “Installation folder” :
/Applications/php-oxygen
- Click to “Accept now”
Settings
- https://www.drupal.org/docs/develop/development-tools/configuring-eclipse
Theme
- Path : Preferences > Appearance
- Theme: “Dark”
- Color and Font theme: Default(current)
- Checked “Enable animations”
- “Apply”
File encoding and characters
- Path: General -> Workspace:
- “Text file encoding:” > Other : “UTF-8”
- “New text file line delimiter” > Other: “Unix”
Spaces are used instead of tabs
- Path: General -> Editors -> Text Editors:
- Check “Insert spaces for tabs.”
- PHP -> Code Style -> Formatter: Set Tab policy: Spaces. Set “Indentation size” to “2”.
Removing trailing whitespaces
- Path: Preferences->PHP->Editor->Save Actions
- check ‘Remove trailing whitespace’ and select ‘All lines’.
