Thursday, April 28, 2016

IDE for OpenUI5 Development

Next was which IDE to use to write the code.

Eclipse seemed like the natural choice given SAP has the plugins made for it, but overall support for Javascript is poor and.... well... it's still Eclipse, which I've never liked.

Netbeans had better Javascript support and loads the maven war project much easier.   I did get the openui5 schemas loaded, but they only did the code completion when at the top level of your view.xml file.  I also could not find a way to get code completion on the javascript libraries.

WebStorm is great and following this guide can get both code completion in the views (xml) and in the controllers (js).  Webstorm setup for OpenUI5

Winner

For our uses and when working with the maven war build, IntelliJ Ultimate was even better.  We could build the war file, download the openui5 dependency and then use it locally for quick development.  I used the above guide for webstorm with some minor tweaks and it worked in IntelliJ.
  1. Install Java JDK
  2. Install JIdea (Ultimate Version)
  3. Install SAP UI5 SDK
  4. Open JIdea
  5. Open File->Settings
    1. Open Languages & Frameworks -> Javascript -> Libraries
    2. Click Add and enter the name OpenUI5
    3. Click on the Global button for the visibility setting
    4. Click the + to add a file and select attach files, then browse to where you installed openUI5 and put in these files
      1. resources/sap-ui-core-all-dbg.js
      2. resources/sap/m/library-all-dbg.js
    5. Open Languages & Frameworks -> Schemas and DTDs
    6. Click the Green +
    7. Switch to explorer tab and browse to where you installed openUI5, then downloads/schemas and select
      1. URI: sap.ui.core and select the file sap.ui.core.xsd
      2. URI: sap.m and select the file sap.m.xsd
    8. Deselect the checkboxes next to each entry so they are globally available and not just for this project
Note: the options are a bit different if running on a Mac.  This was on my Linux box.

No comments:

Post a Comment