Project

General

Profile

Step 3 - First steps with Z2 on Git » History » Revision 11

Revision 10 (Udo Offermann, 10.09.2012 17:36) → Revision 11/69 (Udo Offermann, 10.09.2012 17:37)

h1. First steps with z2 v2.1 

 [[How_to_install_z2_v21|prev]] :: [[Z2_v21|home]] 

 h2. Prerequisites 

 You need a cloned z2-base.core repository as described on the [[How_to_install_z2_v21|previous]] page. 
 Furthermore you need the "Eclipse-IDE":http://www.eclipse.org (one of Galileo, Helios, Indigo or Juno is fine) and the "Egit plg-in:":http://www.eclipse.org/egit.  

 h2. First steps with the z2-environment 

 As the next step you will learn how to do the first development steps using Eclipse. Please stop the server before you continue because we will now show you how to start it from inside the Eclipse IDE. 

 We recommend to keep the repositories and workspace close together. So please go back to the "z2-base" directory (@cd ../../..@, if you are still inside the "run/bin" directory) and create a folder called "workspace" - this will be used as the workspace root for Eclipse: 

 <pre> 
 :bin$ cd ../../.. 
 :z2-base$ mkdir workspace 
 :z2-base$ ls -l 
 total 0 
 0 drwxr-xr-x     2 mr_x    staff     68    7 Sep 16:34 workspace 
 0 drwxr-xr-x    12 mr_x    staff    408    7 Sep 15:11 z2-base.core 
 :z2-base$ 
 </pre> 

 Now start Eclipse and choose @.../z2-base/workspace@ as your workspace folder. 

 We have to add the core repository to the EGit repositories view. Detailed documentation of how-to work with EGit can be found on the "EGit Wiki pages":http://wiki.eclipse.org/EGit/User_Guide. 
 On the Git perspective choose "Add an existing local Git repository". In the "Directory" field type in the path to the ".../z2-base" directory.  
 After hitting "search" the search results should list the _z2-base.core_ repository, click "finish" and the repositories view should look like this: 

 > !EGit_repo_view_with_z2-core.png! 

 Now import the core project from the repository. Right-click the repository, choose "Import projects..." from the context menu and click "next" and then "finish".  
 On the Java perspective the "core" project should be now available in the package explorer: 

 > !z2_core_project_in_package_explorer.png! 

 The core project contains two launch entries, one for Linux/Mac OS and one for Windows. Right click the one that fits to your OS and choose "Run As >" and "z2_base". 
 This starts the z2-environment again and opens the z2-gui inside a new window labled "Z2 Home (z2-base v2.1)": 

 > !z2_gui.png! 

 The z2-environment provides an Eclipse plug-in called "Eclipsoid" that enables convenient development of z2 applications.  
 Developing modular software requires that the IDE can resolve the dependencies between single projects.  
 Either you import all projects into your workspace or you live with the red x-markers indicating that Eclipse cannot compile the Java sources properly.  
 The third option is that someone else resolves the dependencies for you - this is what the Eclipsoid does. This way you can checkout and focus on a project subsets while 
 the Eclipsoid plug-in provides the transitive closure of all required prjects and libraries.  
 There are other features provided by the Eclipsoid plug-in that are explained in more details on the [[Eclipsoid]] wiki pages. 

 h2. Installation of the Eclipsoid plug-in 

 The z2-environment that you just started contains the update-site for the Eclipsoid plug-in. Open the software update/installation wizard (in Indigo it's located at "Help/Install New Software...")  
 and use http://localhost:8080/eclipsoid/update as update-site URL (the field labled "Work with"): 

 > !Install_Eclipsoid.png! 

 Please note that the Eclipsoid version will be different because becaus the screenshots are made with an intermediate version of the plug-in. version. 
 Complete the installation wizard (you can speed up the installation procedure by deselecting "Contact all update sites during install...") and restart Eclipse.  
 Now you should see a new menu entry labled "z2-Environment" and two new icons: 

 >!Eclipsoid_menu_entries_and_icons.png! 


 
 [[How_to_install_z2_v21|prev]] :: [[Z2_v21|home]]