Skip to Content

Fighting the corner for Eclipse (still)


Following my last blog post that contained a few hints and tips on how to be more productive with Eclipse, I saw this video that DJ Adams posted over the weekend, along with this supporting blog post.  As mentioned in my comments, the thing that stands out the most to me is the speed and ease DJ gets a nice looking application up and running, mostly due to his familiarity with UI5 but also because of how he is working with Sublime Text.  I’d not seen the snippets and template shortcuts in action before but liked what I saw.

However, I’m a supporter of Eclipse for my SAP development, so after seeing how quickly DJ can get files and indeed applications up and running, I felt the gauntlet had been thrown down in terms of bringing similar templates and snippets to the world of Eclipse, for those brave/stupid* enough to use it as their IDE of choice.  I haven’t historically made use of the snippets functions in Eclipse but felt with UI5 taking over the world, now might be the time to change my position…

* Delete as appropriate.

What have I done?

No, not a cry of despair (well, maybe just a little!) – prompted by my current meddling with the boilerplate that HP Seitz demonstrated in his blog posting recently, I’ve been working on a kind of Desktop version.  It’s painful (as HP suggested it might be in the comments) trying to get a fully resolved template project for a desktop application as, by its very nature, it is much more complex than the cleaner sap.m based app’s can be.  I’m on the verge of chucking it up to GitHub so other, more able coders, can tidy up my mess (and in the process have a good chuckle at my code 🙂 )

Getting back on track, I’ve just spent 10mins creating a couple of Snippets for Eclipse to mirror the type of functionality DJ shows in his video.  I’ve uploaded them to GitHub (details to follow) so others can use & enhance them.  Over time, I’ll try to build up some more templates and snippets, along with some baseline Eclipse preferences files that support some of the content I put in my last blog posting.  I hope more and more will contribute to this effort and share more snippets for Eclipse based UI5 work.

On top of this, I’ve saved a basic Eclipse preferences file that includes some of the settings I mentioned in the last posting.  Unfortunately, Eclipse Kepler doesn’t allow you to export/import perspectives, which is a shame, however I’m now working with this SAPUI5 perspective I’ve set up to be a bit less cluttered than the standard perspectives:

SAPUI5 Perspective.jpg


Description URL
Root GitHub repository wizbongre/EclipseUI5 · GitHub
snippets.xml containing Desktop & Mobile index.html files for UI5 EclipseUI5/Snippets/snippets.xml at master · wizbongre/EclipseUI5 · GitHub
Preferences file (.epf) for baseline configuration from last blog post EclipseUI5/Preferences/Eclipse Kepler Preferences.epf at master · wizbongre/EclipseUI5 · GitHub


This is again only a starter for 10.  As mentioned, I hope more Eclipse fans add further useful snippets and templates to the repo on GitHub.  Hopefully DJ won’t mind me using his GitHub repo for inspiration, as there is already some great and useful snippets in there for Sublime Text fans.

Also, as I mentioned in my last post, to get the most out of Eclipse you really need to invest time in customising it to work your way – as homework* from this posting, I’d like people to use the Window->Save Perspective As… and Window->Customise Perspective… options to have a play with how their Eclipse looks.  Remember, you can create a completely new perspective that brings in views from others, as well as adding/deleting menu and toolbars.

*There is no reward or incentive whatsover for this.

As usual, I hope people find this useful.  Please don’t be shy with mocking adding to my GitHub repo.

SAPUI5 Perspective.jpg
You must be Logged on to comment or reply to a post.
  • Great pick-up of the gauntlet, Gareth! Love it that you're fighting the corner and doing what you want to do. Total props to you for that. And also even better that you're taking from the SublimeUI5 repo - I don't write "share and enjoy" at the end of my posts for nothing, y'know ... steal away, and even better that you're re-sharing on Github. Nice work.

    Would really love to see some video snippets from you on this - are you planning that also?


    • Thanks for the hint Jason - I've mostly given up on plugins for Eclipse as never really found any too useful, however as I hinted in the post above I'm re-thinking my approach to using Eclipse now that I'm starting to do more with UI5, and I'm not as hog-tied to the SAP way of doing things as I normally am with SUP, BPM, WDJ, etc...

      I'll have a play with Emmet and will also be looking at JSHint after Marco Voelz posted this.

      Ultimately, I'd like to end up with a slimmed down Eclipse, that has lost a lot of the baggage not needed for UI5 work, which in turn should also help out with the performance issues that have constantly plagued the platform.



  • Great share, thanks for sharing I must admit I did like DJ video on sublime and that tempted me to take a look, but I really do like Eclipse.  I used it far too many years now.

    As well as the above you also get the option of using all the great templates that the SAPUI5 team have created.

    For Example just type App in a JS File and CTRL+ Space, and select sap.m.App you see a great example.

    The long list can be seen here for all Preference > JavaScript > Editor > Templates.

    The same goes for XML as well, slowly making the move to XML Views here.


    PS the great Picasso quote comes to mind about great art 🙂

    • Good point talking about Editor Templates - this is another element of Eclipse that can be customised/extended and can also be exported/imported (so can be shared on GitHub too.)  I'm trying to decide where the line should be drawn between snippets and templates, so will be having a further play and hopefully will have more to share soon.



  • This also just goes to show that there is not one tool to rule them all. We all have our own preferences and approaches to development and tools, and as such it is only natural and correct that there should be a cottage industry of tool design, evangelism and refinement, with a tiny bit of holy-war thrown in for interest 🙂

    Anyone who tries to "fix" that cottage industry situation is either deluded, out of touch, or not a developer. Or of course all three 🙂

    • DJ,

      Like it, must admit what you done with sublime and sharing will help us all.  And while I like Eclipse if you new to SAPUI5 and also Eclipse then maybe trying to deal with both will increase you learning curve.

      I only like it as I used it for years and finally got my head around.

      Lets face it, Eclipse has a search feature in the Preferences as there are soooo many of them, now that mad 🙂

      Again Thanks to both DJ and Gareth for sharing.


    • What is nice about this Sublime vs Eclipse playoff, is that no doubt both camps will benefit as methods & tools are shared and adapted across the two platforms (as here with my initial efforts and more hints & tips coming out the woodwork.)

      From a wider perspective, I love that finally, with UI5, SAP have a product that you don't actually need SAP software to work with - massive step change!

      (Oh, and I'm sure you will all be amused to know I used Sublime to edit and validate the files before uploading them to GitHub 😉 )



  • Nice one Gareth, I am on your side as Eclipse fan.

    Idea for the next sitMAN. A knock out battle between you and DJ to see who can build a SAPUI5 app the fastest 😉

    Thanks for sharing your snippets.

    • Cheer Leo - I'm genuinely pleased that I'm not alone with my perseverance with Eclipse, given the feedback on here and via Twitter.

      DJ would have to have both hands tied behind his back and one eye covered to give me half a chance 😉