Dashboard > UDIG Developer Guide > Home > Examples > 1 Code Examples
1 Code Examples Log In | Sign Up   View a printable version of the current page.

Added by Administrator , last edited by Administrator on Sep 16, 2008  (view change)
Labels: 
(None)

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 net.refractions.udig.tutorials.examples plug-in in the instructions provided below; you can use the same technique to import any plug-in for study.

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 net.refractions.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.

For the UDIG 1.1-RC14 release you will need to import the projects as binary; the src folder will still be there - it was just packaged up strangely.

Reading the Code Examples

You can view the "live" code examples directly from svn:

Checking out Examples from SVN

You can use svn to check out the examples onto disk (and then import them into your workspace):

  1. Use the command line svn tool:
    C:\java\sdk>
    svn co http://svn.geotools.org/udig/branches/1.1.x/udig/tutorials/net.refractions.udig.tutorials.examples examples
    
  2. Wait ...
  3. Select File > Import
  4. Choose General > Existing Projects into Workspace
  5. From the Import Projects page browse to: C:\java\sdk\examples
  6. Choose net.refractions.udig.code.examples from the list
  7. Press Finish
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