UI5 Boilerplate with Eclipse + SAPUI5 Toolkit

eclipseIDEThis post describes how to use the UI5 SplitApp Boilerplate (hosted on Github) with Eclipse 4.3.x and installed SAP UI Development Toolkit for HTML5. Using the UI5 Boilerplate without Eclipse is outlined in this blog post.

Prerequisites

The following assumes, you using Eclipse Kepler (4.3.x) and have already installed the SAP UI5 Toolkit (for setup, please see the blog article „SAP UI5 – Quickstart“).

There at least two options, how to import the UI5 Boilerplate into Eclipse. But for all options it is important to use the git branch eclipseKepler and not the master branch, as this branch has the necessary eclipse project structure and files:

branch-EclipseKepler

Clone locally first and Import in Eclipse (Option 1)

Assuming you have git installed, open a terminal or command window and clone the branch eclipseKepler from GitHub with the following command:

git clone -b eclipseKepler https://github.com/6of5/UI5SplitApp-Boilerplate.git

The resulting file structure should look like:

clonefilestructure

Next step is to import this as „Existing Project“ into Eclipse:

1) Eclipse Menu: File -> Import

2) Select „General -> Existing Projects into Workspace“

import1

3) Press „Next“ and browse to the „UI5SplitApp-Boilerplate“ Folder:

import2

4) Press „Finish“. The project will be imported as „SAPUI5 Application Project“

Now you can start testing and developing with SAPUI5 or OpenUI5. Therefore SAPUI5 Application Projects have a nice Preview Feature. So you do not need an extra web server (like Apache HTTP or Tomcat) to run and view your App.

To use this select and right-click the index.html file and select „Run As -> Web App Preview“:

RunAsWebAppPreview

In the Preview Screen you can now see and use the App. The given URL can also be used „outside“ Eclipse e.g. with Chrome:

EclipseUI5SplitAppRunning

Everything within Eclipse (Option 2)

Instead of cloning the GitHub repository with command line, this can also be done within Eclipse (e.g. with EGit installed):

1) Start Import „Eclipse Menu: File -> Import“. But this time select „Git -> Projects from Git“:

egit1

2) Select „Clone URI:

egit2

3) Specify the URL to GitHub location: https://github.com/6of5/UI5SplitApp-Boilerplate.git:

egit3

4) Now important select the branch eclipseKepler:

egit4

The rest of the steps should be self explaining.

Enjoy!

Kommentare

Comments are closed.