english português


search
login   |   sign up   |   buy
     
Downloads
  Documentation
  Bug Reports
  SourceForge
  Wiki
  Support System


Support / Configuring Eclipse

This tutorial explains how to configure Eclipse (version 3.0M7) to be used as a developing and debugging tool, with team-development support using CVS. We will use the ACME project as a sample. Make the download of the ACME project files from here, and extract them (recreating the folders) to \acme_project.

Notes:

  • The explanation always appears before the corresponding image.
  • To make the files smaller, we had decreased the image color depth, which caused some coloring problems in the screenshots.


After you had downloaded JDK 1.4 e and Eclipse, follow the steps below. We assume that the SuperWabaSDK was installed in the root of your harddrive, as recommended.
  1. Start Eclipse. A screen like the one below will appear.


     

  2. Click File / New / Project


     

  3. Select Java / Java Project. Click Next.


     

  4. In Project name, type ACME. Uncheck Create project in workspace and select the folder for the project (in our sample case, its the folder \acme_project). Click in the button Next


     

  5. A screen like the one below will appear:


     

  6. We need now to add SuperWaba.jar, which contains .class and .java of all the SuperWaba class library. To do this, click in the Libraries tab, and, right after, in the button Add External JARs.


     

  7. Select the file /SuperWabaSDK/lib/SuperWaba.jar


     

  8. Click in the + sign to open the options tree for the SuperWaba.jar. Click in Javadoc location and in the button Edit....


     

  9. Be sure that Javadoc URL is selected and click in the button Browse


     

  10. Select the folder /SuperWabaSDK/docs/html and click Ok


     

  11. Select option Source attachment and click in button Edit


     

  12. In next screen, click in button External Folder


     

  13. Select the folder java


     

  14. Click Finish. Eclipse will ask if you want to rebuild the project; select Yes.


     

  15. After this startup process, a screen will appear. Expand the package acme.coyote, clicking in the + sign, and do a double-click in each of the files (Eat, Fall, etc). The screen will appear like below.


     

  16. Now, we're going to configure the CVS, to access SuperWaba's repository. (Note: if are not a subscriber of the Professional package or do not want to configure the CVS, please go to step 26). If the Package Explorer is not being shown, click in menu Window / Show View / Package Explorer. In this window, click with the right mouse button in ACME to open the popup menu, and select Team / Share Project....


     

  17. Be sure that Create a new repository location is selected and click in button Next


     

  18. Now enter the following data (when you purchase a plan, the data for your company will be sent by e-mail):
    • Host: gforge.superwaba.net
    • Repository path: /cvsroot/spacme
    • User: acme
    • Password: secret!
    • Connection type: extssh
    Click in button Next. Note: you will not be able to test this from this tutorial, because the password will not be given. When sharing a real project, you can find the information for your user by logging in this site, going to the download SDK page, and clicking "Show instructions for CVS and support system usage".


     

  19. Click em Use specified module name and type spacme. Click in button Finish


     

  20. Select the Team Synchronizing perspective (4th button in the vertical toolbar). If this perspective is not being shown, click in Window / Open Perspective / Other / Team Synchronizing. In this perspective are shown only the project items that are out of synch with the repository. Since the repository is empty, we must commit the files (the blue arrow with the + sign tells that the file is a new one and must be commited). Note: unless you are sure that the project is new , you must always do a Refresh with the repository BEFORE a commit, otherwise, you can overwrite changes that other people made.


     

  21. To do the commit, click with the right mouse button in ACME to open the popup menu, and select Commit...


     

  22. Next, will be shown all the modified files. Click in Yes


     

  23. Write a comprehensive comment telling why you're doing this commit. This comment can be viewed by everyone that access the repository. In this first case, though, there's no much to write. Click in button Ok.


     

  24. When you return to the Team Synchronizing perspective, note that there's no file being shown, because there are no more differences between the repository and your local copy. Just to make sure, click in button Incoming/Outgoing mode (8th button in the Synchronize View) window, and also click in the 2nd button, Refresh with remote. As we expected, no files will be shown. Note: this repository is private, and no one unless you and the SuperWaba Team will be able to reach it.


     

  25. Lets now return to the Java perspective (3rd button in the vertical toolbar). Note that, at the right of the ACME package in the Package Explorer, there's now the name of the associated repository, and at each file, appears the file version. Its possible to click in the file with the right mouse button and select Compare with to verify version changes. We had now finished the repository configuration.


     

  26. Now lets finish the Eclipse configuration. Click with the right mouse button in ACME, and select Properties.


     

  27. SuperWaba does not supports the new .class file format that was created in JDK 1.3. Due to this, we must specify in Eclise that he generates the class files in the 1.1 format. To do this, in the Properties window, select Java Compiler.


     

  28. Select Use project specific settings


     

  29. In the combobox Compiler compliance level change to 1.3. Click Ok.


     

  30. Click Yes in the next window.


     

  31. Lets now configure Eclipse to execute our application. The Run button is the running man, shown in the image below. The debug button is located at his left side. Click in the arrow at the right of the Run button.


     

  32. The popup menu below will appear. Click in Run...


     

  33. In the next window, click in button New.


     

  34. In Name, type ACME. In Main class type waba.applet.Applet. This is the SuperWaba's class that emulates the PDA under JDK and must always be the main class.


     

  35. Click Arguments and type the following command line in Program arguments: /w 320 /h 320 /bpp 8 /scale 1 acme.coyote.Live. The first parameters specify what we are emulating (in this case, a high resolution Palm OS PDA, just like the Tungsten T), and acme.coyote.Live is the name of our main class (that extends waba.ui.MainWindow). To know which parameters you can use, please refer to the SuperWaba Companion.pdf.


     

  36. Now, click in button Run. It should appear the figure below. If it does not appear, redo the steps above.


     

  37. Great, we now have our application being executed. Lets now kill its process. In the Console window, click in button Terminate. The application's execution window will be closed.


     

  38. Now, to clean up the list of processes, click in button Remove All Terminated Launches. The process list will be cleaned. If you want to debug (which allows you to set breakpoints and see the value of variables) instead of execute, just mark the breakpoints making a double-click in the vertical bar that appears at left of the source code edit window (a red circle will appear), and click in button debug. The project's debug configurations were copied from the Run configuration. If it isnt the ACME project the one being executed, click in the arrow at right of the debug button and select the ACME project.


     

  39. We have our project being executed in the desktop. Now we must generate the files that will be exported to the PDA, using, for this, the Warp and Exegen programs (read the SuperWaba Companion.pdf if you don't know what they are). To make this process easier, we will use ANT (see http://ant.apache.org), which is a kind of multiplatform bat file. There exists a simple script in the acme.zip we'll use it. You can see the build.xml file it in the package explorer.

     

  40. Verify if Ant's window is appearing in Eclipse. If not, select Window / Show view / Ant. Click now in the Add Buildfiles button.


     

  41. Select the only build.xml that is available and click in the Ok button.


     

  42. Click now in the + sign at the left side of ACME [run-warp]. All the targets available in this script will appear. To hide the internal targets, click in button Hide internal targets. Note that there exists three public targets: one that calls Warp, one that calls Exegen, and one that calls both. In the majority of the cases, Exegen only needs to be executed once (the exception is when you are creating CAB installation files, or changes the program's icon, title or version). Besides, Warp must be executed every time that a source code is changed.


     

  43. Do a double-click in the run-exegen target. The output will be shown in the console window.


     

  44. Do a double-click in the run-warp target. If you want just to execute Warp, you can also click in the Run the Default Target of the Selected Buildfile button. Done, now the files Live.pdb and Live.prc are created. Now, you must import them to the PDA or to the Emulator (if you don't know how to proceed, read SuperWaba Companion.pdf and also the Wiki in SuperWaba's site).


     

  45. If you had configured the CVS, you must now commit the build.xml file into the repository. Change the perspective to Team Synchronizing. Notice that the build.xml has the blue+ arrow. Click in button Refresh with remote.


     

  46. Click Yes in next screen.


     

  47. Type a descriptive comment and click in button Ok.


     

Well, this tutorial is done. To learn more about Eclipse, search the web or click in the menu Help. The available documentation is very complete! For example, there's an online course at here. Enjoy!

Copyright© 2002-2008 SuperWaba19 userssite map