Wiki source code of Create a new WO Application

Last modified by Lachlan Deck on 2006/08/21 03:54

Hide last authors
Denis Frolov 22.1 1 Eclipse is comprised of two major organizational features: Perspectives and Views. A Perspective is a grouping of related views – often associated with a particular workflow. For instance, two very common perspectives you will likely use are the Java Perspective and the CVS Perspective. The Java Perspective contains all the typical views you associate with editing Java files – Package Explorer, Java Hierarchy Browser, Problems List, Source Code Editor, etc. CVS Perspective contains a Repository Browser, a Revision Browser, a Synchronization View, etc. For the purposes of this tutorial, however, you will be using to the WOLips Perspective, which is very similar to the Java perspective but adds a few WO-related features.
Mike Schrag 18.1 2
Denis Frolov 22.1 3 ~1. In the upper right of your new Eclipse window is the quick access icons for common perspectives.
Mike Schrag 18.1 4
Denis Frolov 22.1 5 [[image:attach:Picture 1.png]]
6
Mike Schrag 18.1 7 ----
8
Denis Frolov 22.1 9 2. WOLips might not be in that list. If it isn't, click on the Add Perspective icon and choose "Other"
Mike Schrag 18.1 10
Denis Frolov 22.1 11 [[image:attach:Picture 2.png]]
Mike Schrag 18.1 12
13 ----
14
Denis Frolov 22.1 15 3. Select the WOLips Perspective from the list and click "OK"
Mike Schrag 18.1 16
Denis Frolov 22.1 17 [[image:attach:Picture 3.png]]
Mike Schrag 18.1 18
19 ----
20
Denis Frolov 22.1 21 4. Eclipse now switches to the WOLips perspective and you'll notice the WOLips icon now appears in your perspective bar.
Mike Schrag 18.1 22
Denis Frolov 22.1 23 [[image:attach:Picture 4.png]]
Mike Schrag 18.1 24
25 ----
26
Denis Frolov 22.1 27 5. Ctrl-click (Right click) in Package explorer and select "New" => "WOApplication"
Mike Schrag 18.1 28
Denis Frolov 22.1 29 [[image:attach:Picture 5.png]]
Mike Schrag 18.1 30
31 ----
32
Denis Frolov 22.1 33 6. The "New Project" dialog opens. Enter the name of the project – in this case, we chose "WOLipsTest". Click "Finish" when you are done.
Mike Schrag 18.1 34
Denis Frolov 22.1 35 [[image:attach:Picture 6.png]]
Mike Schrag 18.1 36
37 ----
38
Denis Frolov 22.1 39 7. You now have a (mostly) empty WO Application in your Package Explorer view. There are several notable elements that appear in the project that you should be aware of:
Mike Schrag 18.1 40
Denis Frolov 22.1 41 * Package Explorer shows a virtual view of your project, including source folders, frameworks, jar files, etc in a single unified hierarchy.
42 * The "src" folder is the folder that is setup as your default source folder. It contains the Java source code for your project. Note that it has a folder icon as the base icon. Anything with a folder icon is an actual folder on your filesystem.
43 * The "WO Frameworks" entry is a virtual folder that shows you all the framework dependencies for your project. A later tutorial shows how to change the list of dependencies.
44 * The "JRE System Library" entry is a virtual folder that represents the list of system jar files that are being used to build and run your project.
45 * The "build" folder is a dynamically updated folder that contains a .woa-like build of your application. Any time you make changes to your app, Eclipse and WOLips will incrementally compile the changes into this folder. When you Debug or Run your WOA from inside of Eclipse, it is actually executing out of this folder. Incrementally compiling is one of the most helpful features of Eclipse, because at any time you can see the current warning/error state of your code and WO's that is always kept up-to-date.
46 * The "Main.wo" folder is a default WO Component that was created as part of the new project template. WO Components do not have to appear off of the project root – you can reorganize them into subfolders if you prefer.
47 * The "Main.api" file is the .api file for the Main WO. The API file lists required bindings and validations that WOLips can use to ensure that you are using the WO properly in your projects. For instance, if you declare a required binding, WOLips will display an error in your Problems view if you use the Main WO without declaring that binding in your WOD file.
Mike Schrag 20.1 48
Denis Frolov 22.1 49 **WOLips Bug: If you DO NOT see all of the items listed below, or if your src folder does not have a package icon on it, you have hit a WOLips bug that we are actively trying to track down. This particular bug is a race condition in project creation from a template where it ends up not creating a proper Java/WOLips project, so it doesn't autobuild or include all the frameworks. Try deleting and recreating until it looks more like the picture below. You can also try closing the project by right-clicking and choosing Close Project, then reopening the project in a similar fashion. We're working on this one.**
Mike Schrag 20.1 50
Denis Frolov 22.1 51 [[image:attach:Picture 7.png]]
52
Lachlan Deck 24.1 53 8. You now have a WO Application shell to work from. You can now continue on to the [[doc:WOL.Home.Deprecated info.Edit a WO Component.WebHome]] tutorial.