uDig

«  Examples   ::   Contents   ::   Training Materials  »

Code Examples

The uDig SDK (and development team) makes many useful examples. This page covers several ways of getting the examples into your workspace so you can review and run them.

Please note these instructions can be followed to access both code examples (ie not always runnable) and tutorials from the training course. In addition you can use this technique to load up parts of the uDig application into your workspace for study and fixing.

We will use the org.locationtech.udig.tutorials.examples plug-in in the instructions provided below; you can use the same technique to import any plug-in for study.

h14 Import Examples Directly from your SDK

You can do this quickly now:

  1. Switch to the Plug-in Development Perspective
    • Click on the Change Perspective button and choose Other
    • From the Open Perspective dialog choose Plug-in Development
  2. Open the Plug-ins view
  3. Select org.locationtech.udig.tutorials.examples from the list
  4. Right click and choose Import As > Source Project
  5. The plug-in will be copied into your workspace so you can review it

Please note you can delete this plug-in from your workspace at any time; the origional in still in the SDK in case you want to restore it after breaking one of the examples.

Checking out Examples from GIT

You can also check out the source code for the project:

  1. 01 Git Install):

  2. 02 Checkout Source Code

  3. Select File > Import

  4. Choose General > Existing Projects into Workspace

  5. From the Import Projects page browse to: tutorials

  6. Choose org.locationtech.udig.code.examples from the list

    image0

  7. Press Finish

«  Examples   ::   Contents   ::   Training Materials  »