For Developers

Notes for developers

SVN at sourceforge:
command line (all projects)

svn checkout http://svn.code.sf.net/p/walkingtoolsgpx/code/ walkingtoolsgpx-code
(Project developers who will be making commits, use https://)

URLs per project:
http://svn.code.sf.net/p/walkingtoolsgpx/code/[project name – see below]

Beginning in August 2011, (currently September 2012) many of the walkingtools reference APIs and other code projects were transitioned from the NetBeans IDE to the Eclipse IDE, which will now become the preferred IDE for walkingtools developers. The reason for this transition is pretty much only the availability of the Google Android and GPE plug-ins for the Eclipse IDE, both of which represent platforms that the project currently support and around which experimentation will continue. The “legacy” JavaMe packages (all libraries with j2me in the package names) will continue to be supported by the excellent Netbeans IDE, but for now the future project will be Eclipse and Google centric.

Bottom line(s) on IDEs and repos:

The JavaMe walkingtools reference APIs in the wtj2me package remain in NetBeans. Of some interest, the tbdemo project – shown in many national and international art venues – depends on the wtj2me project, so both projects should be checked out if you want to look or listen to the poetry. (See notes on build path foo below) The wtj2me compass also remains as one of the most functional GPS compass interfaces for the declining JavaMe platform, and is completely free and open source. All of these “legacy” APIs can be checked out as NetBeans projects via the sourceforge subversion repository at the following subversion URIs:
http://svn.code.sf.net/p/walkingtoolsgpx/code/[tbdemo|wtj2me|tbtool]

The projects exported to the Eclipse IDE:

     

  • wtandroid The goodness of wtj2me, but ported to Android. This is an android library project, depending on having the wtgpx project in its build path. (See build path foo below for nitty gritty on getting the build paths correct.)
  • wtandroidExamples is a regular android project using the wtandroid library project. It contains examples for testing the wtandroid libraries, and for learning purposes. It was split out of wtandroid as of revision 34.
  • The wtgpx J2SE Walkingtools GPX project, classes for processing GPX files. Used by both wtandroid and wtserver. Note that examples can be found in the net.walkingtools.main package as plain old java
    “public static void main(String[] args)” kind of examples.
  • wtserver GPX/GPS Model classes and Server (GAE/JDO), under active development (and only recently kind of working well) this project too depends on wtgpx.
  • NEW: hipergeo The Android other of wtserver (Still very experimental)
  • psychogeo This tool can also be found in the Google Play Store
  • wtsim (coming soon) A J2SE utility that pretends to be a mobile phone speaking the walkingtools protocol as the user walks around, never released in NetBeans, btw. We think this will be an important test platform once again, soon.
  •  

Build path foo on projects depending on projects

There are two kinds of  “depending on” that are important here. Or three. One is that the wtgpx project, which is plain old J2SE, must be in the build path of various other projects. (Which in turn use its thoroughgoing GPX parsing and dynamic/programmatic GPX construction and formatting abilities.) For example, if you only check out wtandroid, it will be full of errors because it depends on (many) classes in wtgpx. Because we don’t have a svn guru among our little dev team, when you first check out a project it will be pretty normal to have a number of missing classes and settings or project files that are in a “strange state” for your installation of Eclispe. Poke with stick until fixed.

A major strangeness we know of: the build path will probably be wrong. Check under project properties->java build path->projects and make sure that wtgpx is in the build path of wtandroid. (And wtserver, hipergeo.) Such are the costs of being modular.

Another: when you check out wtgpx, you may see the mysterious Eclipse fat red exclamation mark (not to be confused with the tiny red exclamation mark of normal compiler errors) marring this otherwise self sufficient project. This is because it is not so self-sufficient after all, as it uses two different open source libraries whose jars legally distributed, and which are in fact included with the project. But whereas my Eclipse running on (sigh) Windows 7 may think that those jars are located at something like D:\Users\brett\Documents\sourceforge\wtgpx\jar.jar, which is where you would find them on my machine, your paths to your Eclipse workspace might well (probably will) be different, and thus unhappiness is the result. This is fairly easy to fix however: project properties->build path->libraries tab->, then “remove” the broken library references. Once complete, “Add Jars…” for the geotransform.jar and swing-layout-1.0.4.jar. And may all your compilers be happy.

Finally, it is important to understand that the wtandroid project is a “library” project, meaning that it can not be executed on a phone, (much like you can’t instantiate an abstract class.) Instead, you create your own android project (at least API level 8, or Android 2.2 Froyo) and then add wtandroid to it as a library project so as to make use of it’s many fine Activity subclasses and other resource goodness. How so? First make a new android project, and set the API level to 8, (Android 2.2.) We plan to support 2.2 for as long as 2.2 phones are cheap on ebay! Making older, cheaper hardware work is part of our roots going back to the Transborder Immigrant Tool project.

Then do this: Project properties->Android->scroll all the way down (this if you are a big fan of using the Android Virtual Device manager to download every possible API level and device, as we are) -> “Add” the wtandroid library project. You will want to examine the wtandroidExamples project – which is set up in the same way – for some ideas of how to use the various resources that wtandroid makes available (like a sweet CompassActivity that presents both a compass and a Google map view and can be fed gpx files for display and navigation.) All OK? We hope so!

To check these and related proejcts out of the repo: http://svn.code.sf.net/p/walkingtoolsgpx/code/
[wtandroid|wtandroidExamples|wtgpx|wtserver|psychogeo]

Zoom out: what plug-ins or IDEs do I need for various projects?

  • Eclipse EE version (best choice)…
  • a subversion (svn) plug-in for eclipse, like subversive
  • Google app engine plug-in, for the wtserver project
  • The Android SDK, ADT and Google Android Plug-in for Eclipse, supporting, wtandroid and other newer mobile projects and libraries.

There are many websites and good books on these topics.

SVN TIPS: The new version of svn (as of version 1.7.4 of the Polarion Subversive JavaHL SVN connector for the Subversive plug-in) is still half baked. As of now, our projects have been stored with SVN version 1.6.x, and while apparently there is an “upgrade” command in svn 1.7.x, the 1.7.4 connector for Subversion does not seem to make this command available through the GUI. Not so useful. Until we are clear on how to upgrade our projects to the new version, (please send any suggestions), version 1.7.4 seems not to work. Bottom Line, use a 1.6.x connector for now.

One more good note: Yes, we intend to do something about getting the Second Life/OpenSim related digichotomy projects into the repo. Someday. Because terrain in this world and in OpenSim should meet each other. Still thinking though this with some walkingtools researchers.

This page is maintained by Brett Stalbaum, please contact me through sourceforge with any questions.