Bugfixing terracer: 3. Creating Eclipse Project

Posted by alexkemp on 11 January 2017 in English (English)
  1. There May be Troubles Ahead
  2. Errors whilst Compiling using Ant
  3. Creating Eclipse Project
  4. Eclipse Debugging Routines
  6. Importing the Project Bugs
  7. Have you Tried Restarting Your Program, Sir?
  8. Show Your Bugs, Damn You!
  9. Be Careful What You Wish For
  10. Installing NetBeans

Eclipse is an IDE (“Integrated Development Environment”). From the bug-fixing point of view, an IDE allows a program to be run until the program throws a software exception, when the IDE can re-appear, both showing the line within the source-code file that caused the error & giving opportunities to step forwards/backwards through the code, whilst examining changing values in key properties.

This is how Eclipse describes itself:-

Eclipse provides IDEs and platforms for nearly every language and architecture. We are famous for our Java IDE, C/C++, JavaScript and PHP IDEs built on extensible platforms for creating desktop, Web and cloud IDEs. These platforms deliver the most extensive collection of add-on tools available for software developers.

Having already used Subversion (SVN) to download the JOSM/plugins code, I thought that it would be easy to create a new Eclipse project from that directory, but could not find the way to do that, in spite of the advice in the Wiki:

Use Eclipse and the provided .project and .classpath file. Just import project using the JOSM core folder as root directory.

So, I decided instead to follow the YouTube Video to Checkout JOSM into Eclipse, even though it is years out of date.

  1. Create new workspace directory: ~/workspace
  2. Eclipse is installed on the system:

    :~$ apt --installed list | fgrep eclipse

    WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.

    eclipse/stable,now 3.8.1-7 all [installed]
    eclipse-jdt/stable,now 3.8.1-7 all [installed,automatic]
    eclipse-pde/stable,now 3.8.1-7 amd64 [installed,automatic]
    eclipse-platform/stable,now 3.8.1-7 amd64 [installed,automatic]
    eclipse-platform-data/stable,now 3.8.1-7 all [installed,automatic]
    eclipse-rcp/stable,now 3.8.1-7 amd64 [installed,automatic]
    eclipse-subclipse/stable,now 1.10.3-1 all [installed]

  3. Use the URL:

    IIRC that created both JOSM core + the plugins as one operation, with the base at ~/workspace/josm. It also created the Eclipse project (“Checkout as a project in the workspace”).

  4. Selecting core/build.xml + compile created josm-custom.jar in directory core/dist

  5. Running that file launched JOSM in the normal way:

    ~/workspace/josm/core/dist$ java -jar josm-custom.jar

I also tested compile + dist [default] for terracer. It produced ~/workspace/josm/dist/terracer.jar, which seems to be the identical file that was downloaded via SVN. My main concern on that at this moment is that I'm uncertain whether the SVN JOSM that is launched this way is using the Plugins available from local SVN download or the set of plugins available from the Debian install. I guess that I'll find out eventually.

I made a survey on Tuesday of Besecar Avenue (my next survey target in Gedling) & have compiled all the houses ready to enter under JOSM. Today (Wednesday) has been blowing cold & strong all day, and snow is forecast for tomorrow & the rest of the week. Brrr!

I now need to find out how to launch Eclipse in bug-checker mode, and it should then be Go! Go! Go! Hopefully.

Login to leave a comment