Eclipse Guide

How to Install Plugins

  • Eclipse Galileo
    • Help > Install New Software
    • Click "Add" Button, then "Add Site" dialog will be displayed.

Required Plugins

  • m2eclipse:  http://m2eclipse.sonatype.org/update
    • Maven Integration for Eclipse 0.9.6 (Required)
    • Maven Embedder 2.1.0
    • Maven Central repository index 0.9.6 (Optional)
    • Maven Integration for WTP 0.9.6 (Optional)
    • Maven POM XML Editor 0.9.6 (Optional)
    • Maven SCM handler for Subclipse 0.9.6 (Optional)
    • Maven SCM Integration 0.9.6 (Optional)
    • Maven: The Definitive Guide book (Optional)
  • subclipse:  http://subclipse.tigris.org/update_1.6.x

How to Compile

  • Press Ctrl+F11 on pom.xml at Package Explorer
    • Select "Maven clean" to clean
      • Maven generates class files and copies resources to target directory.
      • You should clean target directory if you removed some source or resource files.
    • Select "Maven package" to compile and packaging
    • Select "Maven install" to compile and add artifact to the local repository.
      • Local repository is located at ~user/.m2/repository (e.g. C:\Users\user\.m2\repository for windows vista)

Useful Shortcut Keys

  • F3: Go to declaration
  • F11: Run
  • Alt+Shift+S-V: Override/Import methods
  • Alt+Shift+S-R: Generate getters and setters
  • Alt+Shift+R: Rename
  • Alt+<-: Move backward
  • Alt+->: Move forward
  • Ctrl+Shift+M: Add package import
  • Ctrl+Shift+F: Reformat
  • Ctrl+1: Quick fix (e.g. add casting, add throws declaration, etc)
  • Ctrl+W: Close window
  • Ctrl+F6: Move tab
  • Ctrl+/: Toggle comment