Dashboard > Admin > Home > 02 Development Environment > 07 Eclipse Preferences
Admin
07 Eclipse Preferences
Added by jive , last edited by Jody Garnett on Sep 08, 2008  (view change)
Labels: 
(None)

For uDig development a few changed to default Eclipse preferences settings will be needed.

Please start up Eclipse (as described in the previous step).

Java > Code Style > Coding Template

The code template supplies the default header header for udig project files, and offers a great starting place for your javadocs.

  1. From the eclipse menu bar select Window>Preferences
  2. In the Preferences Dialog navigate to the page Java>Code Style>Code Templates
  3. Press the 'Import ...' button
    • Select the file:
      C:\java\udig\trunk\extras\net.refractions.udig.dev\codetemplates.xml
      (from the doc project you checked out earlier)
  1. Confirm that the uDig header is available for "New Java Files" as shown.

Java > Code Style > Code Formatter

Rather than burden you with a bunch of coding conventions we are making use of the Eclipse Code Formatter.

  1. Open up Windows>Preferences and Navigate to Java>Code Style>Formatter
  2. Press the 'Import ...' button
  3. Confirm that the the profile is named uDig 1.0 as shown.

Java > Compiler

The default java compiler settings do not work for the udig application, you will need to change these before your first build.

  1. Open up Window>Preferences and Navigate to Java>Compiler
  2. On the 'Compliance and Classfiles' tab change the following:
    • Compiler compliance level: 1.5
  3. Everything else will be defaulted as required

Java > Compiler > Building

  1. Open up Window>Preferences and Navigate to *Java > Compiler > Building
  2. Toggle to arrow next to Output folder and add .svn to the list of Filtered Resources

    Note that missing this step would double your build times!

    Java > Compiler > Errors/Warnings

We are interested in making the following change:

Code style Level
Non-externalized strings (missing/unused $NON_NLS$ tag) Warning
  1. Open up Window>Preferences and Navigate to Java> Compiler > Errors/Warnings
  2. Open the Code Style category and change to match the following:

Java > Installed JREs

We need to ensure that you picked up a JRE with JAI and ImageIO included:

  1. Open up Window > Preferences and navigate to Java > Installed JREs
  2. Select your JRE from the list and press Edit
  3. Ensure JRE system libraries includes the following jars:
    • jai_codec.jar
    • jai_core.jar
    • jai_imageio.jar
  4. If they are not there you can fix this using the "Add External JARs" button. You should find these jar files the jre/lib/ext/ folder. If they are not there check that you installed JAI and ImageIO are use a search utility to find them.
  5. Here is what that looks like:
  6. Optional: To make Javadocs available while developing select the rt.jar above and press the Source Attachment... button. You can select a src.jar from any JDK on your system.

Plug-in Development > Compilers

Keep extension point documentation current:

  1. Open up Window>Preferences and Navigate to Plug-in Development>Compilers
  2. On the 'Schemas' tab check Generate reference documentation from schemas

Optional Settings For Working Around Problems

Run/Debug > Launching (Eclipse 3.3.1.1 Only)

Recommended if you have a slow machine (or as a workaround for an Eclipse 3.3.1.1 problem with automatic build running multiple times prior to launch).

  1. Select Window > Preferences and navigate to Run/Debug > Launching page
  2. Turn "wait for ongoing build to complete before launching" to PROMPT
  3. Uncheck "Build (if required) before launching
  4. Here is what that looks like:

Apply your Changes

  1. Press the OK to save these new preferences
  2. You may need to let Eclipse "do a full rebuild", since we have no code yet this will be quick

Previous: 06 Additional Eclipse Plugins Next: 08 Importing the Source Code

Powered by a free Atlassian Confluence Open Source Project License granted to uDig. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators
User-friendly Desktop Internet GIS