Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Holger Staudacher

on Jun 10th, 2011You don’t have to use git to access code on github

I guess a lot of people would agree that github is the current kick-ass platform for developing software. Many platforms showed up fast and with the same speed they disappeared. Github is different. It’s also genuinely innovative. For several months I use github to share small projects (widgets, tools, small plug-ins). When I write a blog about something new I always link the associated github repository.

A few days ago some people mentioned to me that it’s great that the sources from my posts are open but they can’t install git on their machines due to security restrictions in their company. They aren’t even allowed to install egit as an Eclipse plug-in. But there is  good news. You don’t have to use git when you want to get sources from github. You can download every branch from every (public) github repository without git. When you browse to a repository you can simply press the download button on the right and download the latest version of the repository as zip or tar.gz. Is this simple? As I said, it’s a kick-ass platform icon wink You dont have to use git to access code on github

github You dont have to use git to access code on github

 

on Jun 7th, 2011jQuery timeago in Java with RAP

A few weeks ago I showed you how easy it is to integrate jQuery into RAP using the browser widget. I’d like to show you another example of what can be integrated. Last time I created a carousel widget; this time the demo is something smaller but still really cool.

Yesterday I came across a github repository by Ryan McGeary. He has created a very clever jQuery plug-in called “timeago“. What this plug-in does is simple. It takes a timestamp and displays a text string instead of the stamp that describes the difference between the actual time and the one in the timestamp.  We’ve all seen the messages, “about a minute ago.”  The cool thing about this plug-in is that it refreshes automatically. I mean, it isn’t new to transform timestamps in this way, but it is usually done just once. So, when you visit a website in the morning and leave the tab open until evening, it still says something like, “The page was opened about minute ago” icon wink jQuery timeago in Java with RAP . This can’t happen with McGeary’s plug-in.

While having a jQuery plug-in is nice for javascript developers, it’s not as nice if you’re a Java Developer. But, fortunately we can integrate jQuery painlessly into RAP. As a result I wrote a RWT/SWT widget that simply maps the functionality of the timeago plug-in. You can set a date from the server and read the displayed text from the client.
timeago jQuery timeago in Java with RAP
If you like this idea you can grab the sources at github. Of course this is just a demo. Let me know if you would like to work with me on an implementation for productive use. Have fun with timeago icon wink jQuery timeago in Java with RAP

on May 4th, 2011Launch an OSGi app and automatically kill its running instance

If you use Eclipse to develop OSGi based applications you may use the OSGi Launcher provided by the PDE Tooling. It’s cool tooling because it gives you full control over the OSGi instance to be launched.  You can choose the OSGi framework (e.g. Equinox or Felix), select the bundles to install and much more.

But this launcher has one drawback that hurts every time I run across it. It appears when an OSGi application uses the OSGi HttpService. When you used this service you may have configured a port for it via the property “org.osgi.service.http.port” VM Argument.  I use this configuration all the time.

When I launch the application everything works fine the first time. But, during development I often come to the point where I need to relaunch the application. When I forget to kill the previous running instance I get a java.net.BindException because the address is already in use. So, to fix this I have to kill both instances and launch it again. This happens to me a lot just because I forget to terminate the previous instance. Of course this isn’t a bug because it’s often useful to launch a second instance of the same configuration. But, not when it comes to developing with the HttpService.

bindException Launch an OSGi app and automatically kill its running instance

There is a fix now (though not necessarily for my forgetfulness icon wink Launch an OSGi app and automatically kill its running instance ).  Luckily we live in a modular world in Eclipse. As a result, I was able to develop a separate bundle called the “OSGi Eliminator” (what a descriptive name icon smile Launch an OSGi app and automatically kill its running instance ). The bundle contributes the functionality to automatically terminate a running OSGi Instance when you try to launch the same instance a second time. This functionality already existed in the RAP launcher created by Rüdiger Hermann. All I did was to refactor the functionality out to make it run in a separate bundle and contribute to the OSGi Launcher instead of the RAP Launcher. This solves an annoying problem for me – maybe for you as well?

You can find this bundle on GitHub. I also created a p2 repository that lets you install the OSGi Eliminator directly into Eclipse.

on Apr 5th, 2011How to blog using GitHub and Eclipse

If this is not the first post by me that you’re reading, you may know that I try to blog regularly. Previously, I had 2 or 3 private blogs which, you also might know, were not that successful icon wink How to blog using GitHub and Eclipse . Since I started at EclipseSource, I publish on our company blog.

Anyway, I started my first blog 5 years ago and used some horrible, long forgotten php software. For my other blogs and the EclipseSource blog, WordPress is used. WordPress is probably the winner when it comes to blogging software. It’s widely accepted and heavily used by thousands of bloggers. While I like WordPress a lot, it has some drawbacks. Currently I’m sitting in the train writing this post and what tool do I use? A simple Text Editor. When I arrive at my company I have to paste this post into our WordPress, do a little formatting and publish it. What I really miss in this workflow with the text editior is the history of the post.

As a developer I like trying out the new stuff. As a result I’ve been using Git for a while now and I’m quite happy with it. I’m also an Eclipse committer and the Eclipse IDE is my home. Thanks to my colleagues I’m quite quick with all the shortcuts in the IDE. So, using the IDE as my blog editor and Git as the version control system (aka. history) would feel quite natural to me. But, how can we do this?

pages How to blog using GitHub and EclipseLuckily there is GitHub, probably your choice also for a Git hosting service too. Anyone can create a public Git repository for free. In the same way as WordPress is the winner for blog systems, GitHub is the winner when it comes to Git hosting services. What is less well known is that GitHub provides another service called GitHub pages. With pages you can use a Git repository to publish web contents. All you need to do is create a Git repository with a special naming (your-username.github.com) and everything pushed to this repository will be published under http://your-username.github.com (also good for publishing p2 repositories).

What the GitHub folks have also implemented is a Jekyll integration. Jekyll is a blog system that transforms your articles using static templates. You can add a blog post by adding a text file. After writing your posts, all you have to do is push the files to your GitHub pages repository and GitHub automatically starts the Jekyll transformation to create the blog. Isn’t this awesome? You get a blog system with Git as a history and a web hoster for free – in one provider icon wink How to blog using GitHub and Eclipse .

How does Eclipse come into the game? After cloning your repository to a local destination you can use linked workspace resources to edit the blog post in your IDE. All you have to do is create a new project and change the location to your Git repository root (see screenshot below).

projectWizard How to blog using GitHub and Eclipse

After editing your posts you have the option to use EGit (the Eclipse Git Integration) to push your changes to GitHub (don’t forget to share the project). The only piece missing is an Eclipse Jekyll integration (GSoC Students where are you?). With this I mean, when I save or commit a local blog post, it would be nice if a Jekyll transformation could be triggered to provide a local preview of the blog. Currently I do this by executing a command on the shell.

I’ve decided already that when I have to create a new blog I will use this technique. If you are not convinced yet, check out these example blogs which use GitHub and Jekyll.

 

on Mar 25th, 2011Eclipse Runtime out-of-the-box EclipseCon 2011 slides

Today I did a talk at the EclipseCon 2011 which was entitled “Eclipse Runtime out-of-the-box“. With this talk I introduced the EclipseRTP project. So, if you missed it here are the slides icon wink Eclipse Runtime out of the box EclipseCon 2011 slides

on Mar 16th, 2011See you at EclipseCon 2011

web header logo 20111 See you at EclipseCon 2011Over the last few days I’ve read many blogs from folks who are speaking at EclipseCon next week in Santa Clara. Everytime I find it really interesting to hear about the ideas behind the talks. So, with this post I want to show you what you can expect from the EclipseSource folks at EclipseCon.

First we’ll have a chance to meet every morning. EclipseSource is the activity sponsor again this year. What does this mean? This means that the first 50 people will get a cool running shirt and everyone will get the opportunity to meet Eclipse committers away from the conference stress. After the jogging you won’t have to wait long to hear from us again.

The first event is on Tuesday at 2:00 pm. You can meet Ian Bull and listen to him speaking about growing an open source project. He will show you how easy it is to get in touch with your favorite open source project by contributing to it.  He will demo how to overcome the major hurdles to becoming a first class contributor.

If you can’t get enough of Ian you will have a second chance to listen to him after a short break. On Tuesday at 4:00 pm he will show you everything you need to know about p2 together with Kim Moir and Pascal Rapicault. They will show you how to get around the biggest pain points in p2 and pointers for best practices.

If p2 is not your favorite topic and you want to go deep into some hardcore stuff, then I recommend attending Johannes Eickhold’s talk. It’s in the same slot as the p2 talk and is entitled, “Sovereign: Migrating Java Threads to Improve Availability of Web Applications“.  Johannes will describe two technical strategies on how to improve availability in RAP, a very interesting problem with big implications for RAP.

rap See you at EclipseCon 2011Because EclipseCon is full of good talks, you don’t have to wait long for the next one. Take a look ahead at RAP together with Ralf Sternberg at 4:30 pm. He will take you on a tour inside our plans with RAP and show some really cool demos. This talk also marks the end of this packed Tuesday for us.

But luckily the Wednesday is not far away.  Meet Ian again at 5:30 pm icon wink See you at EclipseCon 2011 . He will show you some really cool demos on the hot new products showcase reception. This is a great opportunity to go into detail together with Ian.

After meeting Ian again you can take a break from us. But, only until 7:30 pm. Ralf will moderate the RAP BoF and right after this you can join me on the RTP BoF.  The BoFs will give us a full hour to propose ideas and discuss concepts or internals. So, don’t miss them.

RTP logo small See you at EclipseCon 2011Because RTP is a hot new Eclipse Project icon wink See you at EclipseCon 2011 , in addition to the BoF, you will also have the chance to attend a presentation by me on Thursday 2:30 pm.  As you might already know,  we created the RTP project to enable more developers to use EclipseRT. In my talk,  “Eclipse Runtimes out of the Box“, you can hearing everything there is to know about RTP in 20 minutes.

In addition to this schedule there is more. Of course, you will find all of us at the Hyatt every evening icon wink See you at EclipseCon 2011 .  I’m really looking forward to meeting you there…

on Feb 21st, 2011An open source visual editor for Rich Internet Applications – the Eclipse way

A few weeks ago Google announced their WindowBuilder contribution to the Eclipse Foundation. The WindowBuilder was originally created by Instantiations and moved to Google after they swallowed Instantiations back in 2010. Anyway, the WindowBuilder is a first class visual editor for creating UIs and will be maintained by Google. It contains an Editor for three UI toolkits: GWT, Swing and SWT. And the coolest thing about the WindowBuilder is that it’s completely open source because it’s an Eclipse project now.

So, you probably know that there is a Rich Internet Application technology under the umbrella of Eclipse too. It’s called Rich Ajax Platform (RAP). RAP provides the SWT API which is also used within Eclipse. As a result, theoretically it should be no problem to use the WindowBuilder’s SWT Designer to create RAP applications and with it a Rich Internet Application. Today I found some time to check it out and I’m happy to say that it works like a charm.

All I had to do was create an Eclipse Plug-In project, change the dependency from org.eclipse.ui to org.eclipse.rap.ui and I could start designing my UI.

windowBuilder1 1024x620 An open source visual editor for Rich Internet Applications   the Eclipse way

On the screenshot above you can see my little experiment. It’s an SWT Shell with a group box and some TabItems filled with random Controls. One nice feature of the SWT Designer is that it provides a preview of the UI. So, the UI will look very similar to the one on my Mac below.

windowBuilder2 An open source visual editor for Rich Internet Applications   the Eclipse way

The next step after designing this UI (I know it’s really a masterful work icon wink An open source visual editor for Rich Internet Applications   the Eclipse way ) was to create a RAP launch configuration that would start the application in a browser. And poof, there it was: a RAP application completely created with the WindowBuilder.

windowBuilder3 An open source visual editor for Rich Internet Applications   the Eclipse way

I don’t know if the Google guys know this, but their WindowBuilder actually supports 4 UI toolkits. The three mentioned above and RWT, the SWT port for RAP.

To try it yourself,  I recommend that you download the latest Eclipse package containing RAP from here. After installing you can use the WindowBuilder’s software site to install it into your IDE.  You can use my example project which already contains a launch configuration (don’t forget to switch your target before launching.)

Have fun clicking the UI together icon wink An open source visual editor for Rich Internet Applications   the Eclipse way .

on Feb 7th, 2011How to build a Server-Side Equinox/RAP Application

RAP Logo small How to build a Server Side Equinox/RAP ApplicationWhen you face the task of building a Server-Side Equinox or a RAP application (which is just a Server-Side Equinox application) you need to choose a build system from a fairly diverse palette. This choice is never easy because every build system has its pros and cons. In the end it comes down to which one you and others, love or hate.

To make this task a little easier we created a small github project called “RAP build examples”. It provides examples of how to build a RAP application with different build systems. Currently the following systems are covered:

PDE Build:

The goal of PDE Build is to facilitate the automation of plug-in build processes. Essentially, PDE Build produces Ant scripts based on development-time information provided by, for example, the plugin.xml and build.properties files. The generated Ant scripts, can fetch the relevant projects from a CVS repository, build jars, Javadoc, source zips, put everything together in a format ready to ship and send it out to a remote location (e.g., a local network or a downloads server). read more…

Tycho:

tycho logo How to build a Server Side Equinox/RAP ApplicationTycho is focused on a Maven-centric, manifest-first approach to building Eclipse plug-ins, features, update sites, RCP applications and OSGi bundles. Tycho is a set of Maven plugins and extensions for building Eclipse plugins and OSGi bundles with Maven. Eclipse plugins and OSGi bundles have their own metadata for expressing dependencies, source folder locations, etc. that are normally found in a Maven POM. Tycho uses native metadata for Eclipse plugins and OSGi bundles and uses the POM to configure and drive the build. read more…

WAR Products Tooling:

The WAR Products are similar to Eclipse Products but much more lightweight. All you have to do to export a RAP application is to create a .warproduct based on a working launch configuration and press ‘export’. The exported .war file is ready to deploy. There is a function included that validates your .war file content before you’ve exported it. read more…

All the examples in the git repository follow the same pattern. They provide a simple RAP Application (the famous mail demo) and the files you need for the build. You can read the instructions on how to run each build in the README file which is provided for every example. For those of you who are not using git we’ve also created a zip file which contains the whole repository. You can download it here.

We plan to extend the examples in the future. A Buckminster example is on its way shortly. If you have experience with other systems please feel free to leave a comment and we can create an example together.

on Feb 2nd, 2011Equinox/RAP WAR Products has moved. Hello Eclipse Libra…

A while ago I introduced you to my Google Summer of Code 2010 project, the WAR Products. I really appreciate your participation with feedback and bugs. It showed me that there is a real need for this tooling, so I’m proud to announce that the WAR Products development will not continue in the RAP Project.

You may think, “WTF? Odd thing to be proud of.” But, it really does make sense icon wink Equinox/RAP WAR Products has moved. Hello Eclipse Libra... . The WAR Products were never targeted to be part of RAP, primarily because the tooling is not RAP specific. It eases the deployment of Server-Side Equinox applications. And this kind of application does not necessarily have to be a RAP application.

Three months ago a new Eclipse project was announced. It’s called Libra or formerly “OSGi Enterprise Tools” (it had to be renamed ‘Libra’ because of legal issues). I don’t want to repeat the project goal here because Kaloyan (the Libra project lead) does a much better job with this than I could. You can read about the project in this proposal. Libra passed the project creation review a while ago and provisioning by the eclipse.org webmasters is ongoing. So, why am I talking about Libra here?

wtp logo 2010 Equinox/RAP WAR Products has moved. Hello Eclipse Libra...There is a simple reason.  Because of one sentence from Kaloyan about Libra, I thought it would be the perfect project to contribute the WAR Products to.  “Libra tries to close the gap between PDE and WTP”.  This maps exactly to the WAR Products as the tooling tries to ease the deployment of Equinox-based applications on Servlet-Containers or JavaEE Application Servers.

Additionally there are plans to extend the tooling with a WTP integration to enhance the creation of a WAR Archive with automated deployment functionality, without adding explicit dependencies to WTP. And where can this development be done better than in between PDE and WTP?

Yesterday I committed the WAR Products to the Libra git repository after it passed the IP process successfully. I also set up a temporary p2 repository from which you can install the tooling (Eclipse 3.7 M4+ required). Of course we’re trying to push Libra in the direction of Indigo. If this works you will soon be able to install the WAR Products from the Indigo Repository. Please keep in mind that the bundle ID’s have changed during the move. So, if you had installed the sneak-preview from this blog post, please uninstall the tooling before installing the Libra version. It’s really worth getting the new version because of many bug fixes and enhancements which are included. Please feel free to file bugs, but this time against Libra icon wink Equinox/RAP WAR Products has moved. Hello Eclipse Libra...

Please note: To use the WAR Product’s full functionality you need to add the Equinox Server-Side SDK to your target or set RAP 1.4 M5 as your target environment. There is no longer a “requiredBundles.zip” that you need. Use this temporary p2 repository to install the WAR Products: http://download.eclipsesource.com/~hstaudacher/warproducts/3.7/

on Jan 20th, 2011Amazon AWS Beanstalk and Eclipse Equinox

Yesterday Amazon launched a new service called AWS Elastic Beanstalk. It’s basically a Tomcat hosting service. You can upload your WAR files via a web interface, to an instance of a Linux cloud image pre-configured with Tomcat. This is from the official Amazon description:

aws Amazon AWS Beanstalk and Eclipse EquinoxAWS Elastic Beanstalk is an even easier way for you to quickly deploy and manage applications in the AWS cloud. You simply upload your application, and Elastic Beanstalk automatically handles the deployment details of capacity provisioning, load balancing, auto-scaling, and application health monitoring. At the same time, with Elastic Beanstalk, you retain full control over the AWS resources powering your application and can access the underlying resources at any time. Elastic Beanstalk leverages AWS services such as Amazon EC2, Amazon S3, Amazon Simple Notification Service, Elastic Load Balancing, and Auto-Scaling to deliver the same highly reliable, scalable, and cost-effective infrastructure that hundreds of thousands of businesses depend on today. AWS Elastic Beanstalk is easy to begin and impossible to outgrow.

So, as an Eclipse guy the first question that comes to mind is, “Does OSGi/Equinox run on this?” I mean, it definitely should because we have the great Server-Side Equinox technology which we can deploy in a WAR file. So, I did a little experiment which everyone can repeat on his own. It took only 5 minutes to confirm that Equinox can run on Amazon’s Beanstalk. Here are the steps:

  1. Create a Server-Side Equinox Application and package it into a WAR file. If you want to use an existing file I recommend that you download the rapdemo.war from the RAP Examples Demo. RAP Applications are basically Server-Side Equinox Applications with a UI.
  2. Create an AWS Account and activate AWS Elastic Beanstalk. Follow the steps described in the AWS Management console.
  3. Use the Web Interface to upload your example war archive. Don’t forget to check “Launch a new environment running this Application”.beanstsalkUpload Amazon AWS Beanstalk and Eclipse Equinox
  4. After the upload is successful you have to wait a few minutes until the instance is started. When this is finished your application will be online and reachable under name-of-your-application.beanstalk.com. The example I deployed can be reached using this URL: http://eclipserap.elasticbeanstalk.com/

It was highly likely that Equinox was going to work on the beanstalk. But to be certain it works, is even better.  I can also say that I was really impressed by how easy it is to get a WAR file running on the beanstalk.  Just  two years ago, the only option you had to deploy a WAR file was to rent a (V)Server and set up Tomcat on your own. The question for me  now is how long it will take until the deployment of OSGi bundles will be so easy. Oh wait, there is Eclipse RTP

© EclipseSource 2008 - 2011