Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Archive for April, 2011

on Apr 30th, 2011Eclipse on Ubuntu 11.04 (Natty)

Already running the latest and greatest Ubuntu with the new unity desktop?
It also introduced a new menu bar and java apps seam to have probs with that. When your eclipse doesn’t want to make use of it check out this post: http://blog.matto1990.com/2011/04/using-eclipse-under-ubuntu-11-04-natty/

Not running the unity desktop yet? Try it in your VirtualBox and follow these steps to enable the 3d support for unity: http://www.webupd8.org/2010/12/how-to-test-ubuntu-1104-with-unity-in.html

on Apr 30th, 2011Eclipse 3.7 (Indigo) M7, available for download

For those of you wondering what to get Will and Kate for a wedding gift, what about a nice, new, shiny version of Eclipse.  As predictable as the changing of the guard, Eclipse has put out yet another milestone.

This milestone has some fancy new features that is sure to fit anyones taste, such as:

The ability to import / export your software configuration

import plugins Eclipse 3.7 (Indigo) M7, available for download

A lightweight resource refresh option

lightweight refresh Eclipse 3.7 (Indigo) M7, available for download

A a number of UI polishes to Eclipse 4.1

shared area polish Eclipse 3.7 (Indigo) M7, available for download

Checkout the entire New and Noteworthy.

Or download the milestone and try it yourself:

http://download.eclipse.org/eclipse/downloads/drops/S-3.7M7-201104280848/index.php

 

on Apr 27th, 2011Key Bindings in RAP

Support for key bindings (bug 282449) has been one of the most requested features for RAP. So I’m happy to say that since 1.4 M5, RAP implements the JFace key bindings API, provides the org.eclipse.ui.bindings extension point, and enables most of the default workbench key bindings. As a result, you can now use most* of the key shortcuts of your application also in the browser–if your application uses the workbench. But many use RAP without using the workbench. So how can you enable key bindings in a plain RWT application?

In M7, we now introduce a simple way of doing this. Let’s first have a look on how you would implement a key binding in SWT. You would have to register a global listener for key events on the display like this:

display.addFilter( SWT.KeyDown, new Listener() {
  public void handleEvent( Event event ) {
    if( event.stateMask == 0 && event.keyCode == SWT.ESCAPE ) {
      // handle escape key
    }
  }
} );

Well, you can now use the same code in RWT.

But there’s one more thing to it: RWT is a client-server architecture and we don’t want the browser client to send a request for each and every key stroke. The server should only be notified when the user presses one of the key sequences that we are really interested in. Therefore, we have to inform the client, which key sequences should be active. This information can now be attached to the display using Display.setData() with the new constant RWT.ACTIVE_KEYS as property key. The value of this property must be an array of strings, each one representing a single active key sequence. The syntax is the same that you know from key binding extensions for the workbench. So if you want to enable some simple key bindings like, for example, “c” for compose and “x” for delete, and maybe some more advanced key sequences like “Ctrl+F11″ for power-users, you could write something like this:

display.setData( RWT.ACTIVE_KEYS, new String[] { "C", "X", "CTRL+F11" } );
display.addFilter( SWT.KeyDown, new Listener() {
  public void handleEvent( Event event ) {
    if( event.stateMask == 0 && event.character == 'C' ) {
      handleCompose();
    } else if( event.stateMask == 0 && event.character == 'X' ) {
      handleDelete();
    } else if( event.stateMask == SWT.CTRL && event.keyCode == SWT.F11 ) {
      doSomeAdvancedStuff();
    }
  }
} );

Only the first line is RAP-specific. So for a single-sourcing RWT/SWT application, you only have to care about the constant. I’m sure you have an idea how to do that. M7 will be available on May 7–easy to remember.

*) Some shortcuts may be reserved by some browsers and cannot be used. Other shortcuts will override browser actions, like Ctrl-N (new window) Ctrl-T (new tab) etc. You also may not like to disable C&P in form fields by adding key bindings for Ctrl-C etc. So you have to choose your web key bindings wisely… Ah, and sequences of key strokes like Ctrl+X T are not yet supported.

on Apr 17th, 2011CSS3 and Shadows in RAP

RAP already offers advanced styling features including customizable cross-browser gradients, rounded borders and animations. We now complete this feature set by introducing advanced, configurable shadows, giving your RAP application a modern, subtle 3D-look.

Screenshot CSS3 and Shadows in RAP

Unlike other frameworks, RAP does not rely on pre-rendered images to create those effects. Instead it does all the rendering itself based on CSS declarations, using multiple browser-native technologies for drawing. Up until now this always involved several complex vector-graphic operations. However, this is 2011, and support for mordern web standards is becoming widely available. By using the CSS3 capabilities of modern browsers, we no longer need to use any vector graphics in Safari, Google Chrome and Firefox 4+. Internet Explorer 9 will follow soon.

Of course, RAP will continue to support all its theming features (including shadows) in browsers without CSS3 capabilities. Shadows and CSS3-support will be part of RAP 1.4 M7, coming on May 7.

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.

 

© EclipseSource 2008 - 2011