

Both XSD’s are now listed under ‘ External Schemas and DTDs’.Do the same for sap.m.xsd, with URI ‘ sap.m’.Switch to the ‘ Explorer‘ tab, and navigate to the location where you copied the sap.ui.core.xsd file, and provide an URI ‘ sap.ui.core’.Under ‘ External Schemas and DTDs’ click the ‘+’ button.In WebStorm, from the ‘ Template Project Settings’, select ‘ Schema’s and DTDs’.Do this for both the core and mobile libraries. libraries folder and copy the *.xsd file to a different directory on your computer.

From the extracted content, navigate to the.Locate both ‘ _n.nn.n.jar’ and ‘ _n.nn.n.jar’ files, and extract their content.First, we need to copy the XML definitions from our Eclipse UI5 plugin.Now, we need to add the XML definitions for use with XML Views. Both files are now listed in the ‘New Library’ list, and you can click ‘OK’ to save our just configured ‘OpenUI5’ library.Navigate to the folder you have downloaded and extracted the OpenUI5 SDK, and select the “.Click the‘+’ sign, and choose ‘ Attach Files…’.In the dialog, specify a name and version, and set ‘ Visibility’ to ‘ Global’.From the ‘ Template Project Settings’, select ‘ JavaScript > Libraries’ and click the ‘ Add…’ button.Open WebStorm, and from the ‘ Welcome to WebStorm’ screen, select ‘ Configure > Preferences’.If you need other libraries, you can include these in the same way. Since I mainly use the sap.ui.core and sap.m libraries, I will use these now as well. So we need to have Eclipse installed with the UI5 plugin.Īnd of course, you need to have WebStorm installed 😉Īfter you have installed WebStorm, we need to make it OpenUI5-aware. For reasons unknown, these definitions aren’t included in the OpenUI5 download, but they are included in the UI5 plugin for Eclipse.

Phpstorm 10.0.3 code#
In order to use XML validation and code completion when using XML Views, we need the XML definition for the UI5 libraries. This blog tries to fill the gap and help you set up WebStorm for use with UI5 development. Unfortunately, it currently has no support yet from SAP or the Open Source community for UI5, but according to some of the topics on SCN and Stackoverflow regarding UI5 development with WebStorm, it seems quite in demand.
Phpstorm 10.0.3 license#
WebStorm isn’t Open Source like Eclipse, but a personal license costs a mere 44 EUR and as such is worth it every penny. No other IDE I know of does this so perfectly and blazingly fast as WebStorm! In addition, it shows the onInit() function and oView variable as ‘unused’, making it easy to find redundant code. In the onInit() method, a variable oView is defined, and as you can see, the code completion is fully aware that within the controller ‘ this.getView()‘ is 1) a reference to the controller’s view, 2) that it’s of type sap.ui., and 3) provides access to the view’s methods and events. Here you see the WebStorm IDE with a file in the active editor tab. And if you add JsDoc comments to your code, you even benefit from proper type checking! You really have to try it to believe it.Īnd once you complete the steps described in this blog, you will benefit from excellent UI5 coding support as well! JetBrains WebStorm actually does all that: it is aware of your code, it does a good job at inspecting and analyzing your code, and has terrific support for other HTML5/CSS related stuff (for instance, it does refactoring across multiple file types such as *.js and *.css). The same is true for text editors like Sublime Text and Atom, which - although they have plugins that allow for rudimentary syntax highlighting and code checking - don’t have the context knowledge of the Javascript code you are writing, let alone check for syntax errors, unused variables/functions, type checking, and function signature mismatches, to name just a few. Although SAP provides pretty useful Eclipse plugins for SAPUI5 / OpenUI5 development, it still doesn’t help you write better, efficient, correct code.
