Skip to main content
Jump to: navigation, search

Difference between revisions of "E4/UI/Running the photo demo"

< E4‎ | UI
(Known issues)
Line 5: Line 5:
  
 
==Prerequisites==
 
==Prerequisites==
*[[E4/Install|e4 SDK installation]]
+
#Download an Eclipse 4.0 SDK [http://download.eclipse.org/e4/sdk/ here].
 +
#Unzip/Untar the file as you would with a regular Eclipse SDK download.
 +
#Start up Eclipse.
  
 
==Features==
 
==Features==
Line 12: Line 14:
 
==Setup steps==
 
==Setup steps==
 
[[Image:LaunchPhoto.png|thumb|300px]]
 
[[Image:LaunchPhoto.png|thumb|300px]]
#Download an e4 SDK [http://download.eclipse.org/e4/downloads/ here].
+
#Select File > Import... and select CVS > Projects from CVS, click Next.
#Unzip/Untar the file as you would with a regular Eclipse SDK download.
+
#Copy the CVS repository location and paste it into the "Host" field to populate the wizard page: <code>:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse</code>
#Start up Eclipse.
+
#You should see "Host: dev.eclipse.org, Repository path: /cvsroot/eclipse, User: anonymous, Connection type: pserver".
##If you downloaded the eclipse e4 SDK you can quickly load the demo projects by generating a PSF project, using the menu '''e4>Generate e4 Example Project'''
+
#Click 'Next' and select the second option 'Use an existing module'.
##Then select the ''/org.eclipse.e4.examples.psf/e4-examples.psf'' file and '''Import PSF Project''' from the context menu.
+
#Drill down as follows: <code>e4</code> > <code>releng</code> > and select <code>org.eclipse.e4.ui.releng</code>. Click 'Next'.
##skip to step 11
+
#Important: Do not click Finish just yet. Advance to the last wizard page using Next, then click on Refresh Tags. Select the tag appropriate for your installation (you probably want v20100727-1415) and click Finish.
# Start Eclipse with an empty workspace directory.
+
#This will check out a project into your workspace. Expand the project in the 'Package Explorer' view and then right-click on the <code>e4.ui.examples.psf</code> file and then select 'Import Project Set...'.
# Select <i>File > Import...</i> and select <i>CVS > Projects from CVS</i>, click <i>Next</i>.
+
#Click OK to reuse the same repository you previously used above. If you are prompted for login credentials, simply enter in 'anonymous' for your user name.
# Copy the CVS repository location and paste it into the "Host" field to populate the wizard page: <i>:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse</i>
+
#You will now have a couple more projects in your workspace. Expand the 'org.eclipse.e4.demo.e4photo' project and open the e4photo.product file.  
# You should see "Host: dev.eclipse.org, Repository path: /cvsroot/eclipse, User: anonymous, Connection type: pserver".
+
#In the opened editor, navigate to the 'Testing' section in the 'General' tab. It should be located in the bottom left hand side of the editor.
# Click Next and select the second option <i>Use an existing module</i>.
+
#Click the 'Launch an Eclipse application' hyperlink. The demo should then launch.
# Drill down as follows: <i>e4 > org.eclipse.e4.ui > examples</i> and select <i>org.eclipse.e4.demo.e4photo</i>. Click <b><i>Next</i></b>.
+
# <b>Important:</b> Do not click Finish just yet. Advance to the last wizard page using Next, then click on <i>Refresh Tags</i>. Select the tag appropriate for your installation (e.g. <i>M3</i>, <i>I20100112-0800</i>, <i>R0_9</i> ... you can find your installation's build tag in the Help > About Eclipse SDK dialog) and click <i>Finish</i>.
+
# This will check out a project into your workspace. Expand the project in the Package Explorer and open the <i>e4photo.product</i> file.
+
# Click on the link <i>Launch an Eclipse Application</i> at the bottom left of the <i>e4photo.product</i> file editor. An error will show up.
+
#Run > Run Configurations...
+
#Now launch the product from the dialog, it should open.
+
  
 
Click on the <i>Create Album</i> toolbar button or select <i>File > Create Album</i>. The new album location on disk will be printed to your Eclipse console. Just drop a couple (not too many!) of JPEG photos in that directory, then play with the application. Make sure you find a photo with embedded GPS coordinates - when you select it in the <i>Exif</i> view, the <i>Location</i> view will show where the photo was taken using Google Maps. You can find an example photo with GPS coordinates on [https://bugs.eclipse.org/bugs/show_bug.cgi?id=263898 bug 263898].
 
Click on the <i>Create Album</i> toolbar button or select <i>File > Create Album</i>. The new album location on disk will be printed to your Eclipse console. Just drop a couple (not too many!) of JPEG photos in that directory, then play with the application. Make sure you find a photo with embedded GPS coordinates - when you select it in the <i>Exif</i> view, the <i>Location</i> view will show where the photo was taken using Google Maps. You can find an example photo with GPS coordinates on [https://bugs.eclipse.org/bugs/show_bug.cgi?id=263898 bug 263898].

Revision as of 10:09, 28 July 2010

A screenshot of the e4 photo demo.
The instructions provided on this page were last updated for the e4 1.0M4 milestone.

The e4 photo demo showcases an e4-based RCP application that allows the user to browse images in their workspace.

Prerequisites

  1. Download an Eclipse 4.0 SDK here.
  2. Unzip/Untar the file as you would with a regular Eclipse SDK download.
  3. Start up Eclipse.

Features

  • Shows how CSS can be used to skin an application (note that the CSS engine does not have any particular dependencies on e4 technologies and can be reused in an Eclipse 3.x-based application)

Setup steps

LaunchPhoto.png
  1. Select File > Import... and select CVS > Projects from CVS, click Next.
  2. Copy the CVS repository location and paste it into the "Host" field to populate the wizard page: :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
  3. You should see "Host: dev.eclipse.org, Repository path: /cvsroot/eclipse, User: anonymous, Connection type: pserver".
  4. Click 'Next' and select the second option 'Use an existing module'.
  5. Drill down as follows: e4 > releng > and select org.eclipse.e4.ui.releng. Click 'Next'.
  6. Important: Do not click Finish just yet. Advance to the last wizard page using Next, then click on Refresh Tags. Select the tag appropriate for your installation (you probably want v20100727-1415) and click Finish.
  7. This will check out a project into your workspace. Expand the project in the 'Package Explorer' view and then right-click on the e4.ui.examples.psf file and then select 'Import Project Set...'.
  8. Click OK to reuse the same repository you previously used above. If you are prompted for login credentials, simply enter in 'anonymous' for your user name.
  9. You will now have a couple more projects in your workspace. Expand the 'org.eclipse.e4.demo.e4photo' project and open the e4photo.product file.
  10. In the opened editor, navigate to the 'Testing' section in the 'General' tab. It should be located in the bottom left hand side of the editor.
  11. Click the 'Launch an Eclipse application' hyperlink. The demo should then launch.

Click on the Create Album toolbar button or select File > Create Album. The new album location on disk will be printed to your Eclipse console. Just drop a couple (not too many!) of JPEG photos in that directory, then play with the application. Make sure you find a photo with embedded GPS coordinates - when you select it in the Exif view, the Location view will show where the photo was taken using Google Maps. You can find an example photo with GPS coordinates on bug 263898.

Then, have a look at the Application.e4xmi file to see how the demo application is configured, and/or look at the source files for the individual pieces (views and command handlers).

Known issues

  • You may see some output into system error in the console like the following. It is safe to ignore them.
Unable to find parent with ID "{0}"

Unable to find parent with ID "{0}"
  • Switching perspectives does not work.
  • The 'Exif' view may not react to selection changes if it is rendered, see bug 299755 for more details.
  • On Windows, you may see errors if you have a browser rendered in the 'Location' view. See bug 303978 for more details.
  • Photo demo fails to launch from the .product file. Open the Run Configuration dialog and hit Run, see bug 303973.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.