السبت، 22 أغسطس 2009

Five cool features of Eclipse 3.5

(1) Block selection mode: works for cut, copy, and paste.


(2) Go to the implementation of an interface method (control-click/command-click).

(3) Better completion of inner interface implementations: When completing an interface such as Runnable, stubs for the methods are created immediately (instead of on demand, via a quick fix, as a second step).
   public static void main(String[] args) {
new Runnable() {

public void run() {
// TODO Auto-generated method stub

}
};
}

(4) “Invert if” quick fix (when the cursor is on the “if” keyword). Turns
   public static void main(String[] args) {
if (args.length == 0) {
System.out.println("Need at least one argument.");
} else {
processArguments(args);
}
}
into
   if (args.length != 0) {
processArguments(args);
} else {
System.out.println("Need at least one argument.");
}

(5) Improved systrace for inner classes. Completing the word “systrace” inserts a system.out.println() with the name of the current method (if you do println debugging, you’ll always find where the printing happens). Prior to 3.5, this did not work well for inner classes. This has been fixed:
   public static void main(String[] args) {
new Runnable() {
public void run() {
System.out
.println("SidebarPanel.main(...).new Runnable() {...}.run()");
}
};
}

[Source of (2) and (4): Philip Mayer]

الجمعة، 14 أغسطس 2009

Likes and dislikes about Eclipse E4

Update 2009-08-22: discovered Java2Script, added an item about it below.

E4 is the next generation of the Eclipse Rich Client Platform and brings numerous improvements in a bid to stay relevant as a platform. In this post, I’ll first summarize what I have already written on E4 and then make several suggestions as to where I think E4 should be heading. It is an extended version of a comment I added to the artice “Eclipse has a future” which explains what E4 is and how it improves on prior versions. The author finishes with the sentence “I really am psyched!” (regarding Eclipse’s future). I share that excitement, especially after I found out that Eclipse is looking at all kinds of technologies (RAP, Flex, Dojo) for web-enablement.

What happened so far

First, a recap of what I’ve already blogged about E4 (directly or indirectly), listed in chronological order:

More suggestions

Next, I’ll mention the main things I would tell the Eclipse team were I ever to communicate with them directly. Due to developing Hyena and Facetator, I have experience with the following platforms: Dojo, GWT, Eclipse RCP, jQuery. This puts my in a good position to judge were Eclipse wants to go.
  • GWT: Talk to the GWT people as much as possible. They are doing incredible work, GWT version 2.0 is going to be amazing, also as a platform. They’ve already managed to make web programming in Java more comfortable than web programming in JavaScript. But GWT misses things that Eclipse could provide. I’ll list those things next.
  • Client-side modules: One big thing that GWT is missing and that Eclipse has (via OSGi) is true modularity. Very useful when collaborating with other people on a project. Some kind of client-side modularity mechanism plus server-side modules would result in a great platform. As a starting point, this page surveys existing JavaScript module systems: Spidermonkey, Dojo, etc. Even E4 is mentioned.
  • Browser widgets: Not enough standard widgets is another GWT problem. If GWT had the Eclipse community behind it, I’d suspect that that would quickly change.
  • GUI layout: For SWT browser edition, the thing to watch out for is GUI layout. It is what bothers me most when using GWT. Help is on the way, until then, drawing to Canvas (like Bespin does) is intriguing. Unfortunately, MS Internet Explorer does not support Canvas, yet.
  • More GWT wishes: More of my unfulfilled GWT wishes and a brief overview of 2.0 are posted here.
  • Java2Script: looks like an interesting alternative to GWT that is already Eclipse-based. I’m not too fond of how the widgets look (especially on Mac OS X Firefox). But the technology is sound and the widgets can (and probably should) be replaced by a standard widget toolkit such as Dojo.
  • RAP (a server-based technology that makes it relatively easy to add a web interface to an SWT application) is technically impressive. But the resulting applications are a bit slow, there is a limit of running only one application per browser and server at the same time, and you cannot do browser-only things like offline applications. As you can already guess, I would like E4 to focus on browser-centric technologies like GWT and Bespin and not on server-centric technologies like RAP.
  • Take a look at server-side JavaScript: They are doing exciting stuff such as modules, file system access, and binary data objects.
  • Client-side extensions: I would expect server-side plugins to provide client-side extensions. How can this be done? One possibility is to let the server-side plugin register a JavaScript URL with the server-side framework. This URL is sent to the client which downloads the script and executes it. The script then lets the client-side framework know about its services.

الخميس، 13 أغسطس 2009

Check out my link blog

I often come across interesting web sites for which a whole blog post does not make sense. I will post those to my new link blog.



Update 2011-02-17: I now publish my links as rauschma, on Twitter. An extra page details other ways of subscribing to things I publish.

الأربعاء، 12 أغسطس 2009

Mobile HTML: dial a phone number via a hyperlink

As HTML5 is becoming a really cool way of developing applications for the major smart mobile platforms (iPhone, Blackberry, Android, Palm Pre, all of them Webkit-based), it would be nice if one could invoke the dialer. It turns out, you already can, via URLs such as tel:+49/89/12345. Dots, slashes and a prefixed plus are all handled corrrectly. SMS URLs and Skype URLs are also possible.

الأحد، 9 أغسطس 2009

MVV und MVG fürs Handy

Es gibt mittlerweile zwei ganz nette mobile Auskünfte für den Nahverkehr in München.
  • www.efa.mobi: Die MVV-Auskunft, mobil.
  • mobil.mvg-live.de: Hier wird angezeigt, welche Verkehrsmittel demnächst an einer bestimmten Haltestelle abfahren. Zeigt leider nicht die S-Bahnen an. Beim MVV gibt es den „Abfahrtsmonitor“, der alles anzeigt.

السبت، 1 أغسطس 2009

Two great cross-platform mind-mapping applications

These two mind-mapping applications are written in Java and thus run on all major operating systems (Mac, Linux, Windows).

FreeMind

FreeMind is completely free. It has made some great progress in recent years. Tips:
  • Switch on “Format → Automatic Layout” in the menu bar. It formats the mind map nicely.
  • The default is for nodes to be selected on hover. I prefer having to click to select a node. This behavior can be enabled via “Preferences → Behavior → Selection Method → By Click”.
  • Check out the shortcuts in the “Insert” and “Navigate” menus. They really speed up mind map creation.

XMind

XMind has a slick user interface, the basic version is free. Unfortunately, PDF export is a professional feature.