User Tools

Site Tools


mac:eclipse

Eclipse

Eclipse is not our favorite IDE, but it's probably the most popular for Open Source development, especially in Java. It's got a ton of plugins, and is essential for Android development.

Installation

  1. Download the latest Eclipse IDE for Java Developers package for 64-bit Mac OS X.
    • Starting with Java lets us start (relatively) small and add only the plugins we need.
      • We could (used to) start with the Classic package, but that's been hidden away on another page.
  2. Double-click on the downloaded tarball to unpack it.
  3. Rename the unpacked eclipse directory as Eclipse/4.3 (or whatever the corresponding version number is).
  4. Move the Eclipse/4.3 directory into Applications.
  5. Drag Eclipse.app from the Eclipse/4.3 directory into the dock.
  6. Start Eclipse.
  7. When prompted for a workspace, select ~/Work/Eclipse Workspace.
    • Check the box to set this as the default workspace.

NOTE: If you've got Gatekeeper set to its default strictness level ("Mac Store and identified developers") then the first time you run Eclipse, you'll need to right-click and choose Open, instead of clicking directly on the icon. This will let you override the Gatekeeper setting.

Plugins

Eclipse has a ton of plugins available. Even most of the core functionality is actually implemented as plugins.

Web Developer Tools

Web Developer Tools helps provides tools to work with HTML, XML, and JavaScript.

  1. Help » Install New Software
  2. Work with: Kepler
  3. Select Web, XML, Java EE and OSGi Enterprise Development / Eclipse Web Developer Tools and hit Next
  4. Confirm the components to be installed and hit Next
  5. Agree to licenses and hit Finish
  6. Hit Restart Now when prompted

PyDev

PyDev integrates Python tools into Eclipse, including syntax highlighting, code completion, and refactoring.

  1. Help » Eclipse Marketplace…
  2. Find: Python
  3. Click on Install for PyDev - Python IDE for Eclipse
  4. Confirm the components to be installed and hit Next
  5. Agree to licenses and hit Finish
  6. Hit OK when prompted about unsigned content

Android Development Tools

Android Development Tools help to develop applications for Android devices.

NOTE: You must have the Android SDK installed before installing the ADT plugin.

  1. Help » Install New Software
  2. Add a new site:
  3. Select all components to install and hit Next
  4. Confirm the components to be installed and hit Next
  5. Agree to licenses and hit Finish
  6. Hit OK when prompted about unsigned content
  7. Hit Restart Now when prompted
  8. When Eclipse restarts, you'll be prompted for the location of the Android SDK
    • Existing Location: /Applications/Android/SDK/21.0.1 (NOTE: The version may vary.)
  9. Allow usage statistics to be sent to Google and hit Finish

Infinitest

Infinitest runs unit tests automatically, as indicated by changes to tests and code.

  1. Help » Eclipse Marketplace…
  2. Find: Infinitest
  3. Click on Install for Infinitest
  4. Confirm the components to be installed and hit Next
  5. Agree to licenses and hit Finish
  6. Hit OK when prompted about unsigned content
  7. Hit Restart Now when prompted

Remote System Explorer

Remote System Explorer (RSE) allows SSH and SFTP access to files and command line.

  1. Help » Install New Software
  2. Site: Juno
  3. Select General Purpose Tools / Remote System Explorer End-User Runtime and hit Next
  4. Confirm the components to be installed and hit Next
  5. Agree to licenses and hit Finish
  6. Hit Restart Now when prompted

ShellEd

ShellEd provides syntax highlighting for UNIX shell scripts.

  1. Help » Eclipse Marketplace…
  2. Find: shelled
  3. Click on Install for ShellEd
  4. Confirm the components to be installed and hit Next
  5. Agree to licenses and hit Finish
  6. Hit Restart Now when prompted

Toad

The Toad Extension for Eclipse lets you work with MySQL, PostgreSQL, and Oracle databases. It allows you to query and view tables, and helps you to build queries.

  1. Help » Eclipse Marketplace…
  2. Find: toad
  3. Click on Install for Toad Extension for Eclipse
  4. Confirm the components to be installed and hit Next
  5. Agree to licenses and hit Finish
  6. Hit Restart Now when prompted

Configuration

General

We want to ensure that files are saved in UTF-8 encoding, with UNIX-style line endings.

  • Preferences
    • General
      • Workspace
        • Text file encoding: UTF-8
        • New text file line delimiter: Unix

Tip: To convert existing files, select them in the the package explorer and select File / Convert Line Delimiters To / Unix from the menu.

HTML

  • Preferences
    • General
      • Compare/Patch
        • CHECK Ignore white space
      • Editors
        • Text Editors
          • CHECK Insert spaces for tabs
          • CHECK Show line numbers
          • CHECK Show print margins
          • Print margin column: 120
    • Web
      • CSS Files
        • Encoding: UTF-8
        • Editor
          • Indent using spaces
          • Indentation size: 4
      • HTML Files
        • Encoding: UTF-8
        • Editor
          • Indent using spaces
          • Indentation size: 2
    • XML
      • XML Files
        • Encoding: UTF-8
        • Editor
          • Indent using spaces
          • Indentation size: 2

Code Formatting

We want to ensure that the last line ends with a newline character. This helps with some text-processing command-line tools, and also ensures that when we go to the bottom of the file, we're after the last line.

  • Java
    • Code Style
      • Formatter
        • Active Profile: BoochTek
        • Edit…
          • New Lines
            • CHECK at end of file
  • JavaScript
    • Code Style
      • Formatter
        • Active Profile: BoochTek
        • Edit…
          • New Lines
            • CHECK at end of file

We want to ensure that trailing whitespace is removed on save.

  • Java
    • Editor
      • Save Actions
        • CHECK Perform the following actions on save
        • UNCHECK Organize imports
        • CHECK Additional actions
          • Click on Configure…
            • Code Organizing
              • CHECK Remove trailing whitespace
              • CHECK All lines
            • Code Style
              • UNCHECK Use modifier 'final' where possible
            • Missing Code
              • UNCHECK Add missing Annotations
            • Unnecessary Code
              • UNCHECK Remove unnecessary casts
  • PHP
    • Editor
      • Save Actions
        • CHECK Remove trailing whitespace
        • CHECK All lines

Syntax Coloring

  • PyDev
    • Editor
      • Appearance Color Options
        • Comments: Dark grey, italic
        • Strings: Dark green, NOT italic
        • Self: Dark blue, bold, NOT italic
        • Keywords: Dark blue, bold

Java

  • Java
    • Compiler
      • Errors/Warnings
        • Potential programming problems
          • Empty statement: Ignore
          • Possible accidental boolean assignment: Warning
        • Unnecessary code
          • Unused import: Ignore

Python

  • PyDev
    • Editor
      • Code Analysis
        • Undefined tab
          • Undefined variable from import: Ignore

Android

  • Android
    • Select Android 2.3.3 as the SDK Target

Info

  • General
    • Editors
      • Text Editors
        • Annotations
          • Info
            • UNCHECK Vertical ruler
            • UNCHECK Overview ruler
mac/eclipse.txt · Last modified: 2013/07/10 07:58 by Admin