Posts Tagged ‘Eclipse’

Windows-like keyboard shortcuts in Linux Eclipse

I have worked with Windows as my main development platform since Windows 3.1 and the keyboard shortcuts are hardwired by now. Unfortunately Microsoft has failed utterly. In my opinion Windows 7 is the pinnacle from a usability standpoint, Windows 8 was a disaster and Windows 10 is not that much of an improvement. It is time to move on, in particular as Microsoft seems determined to spy on customers.

Java is cross-platform, so I can use Linux. It works well and bash is great, but the keyboard shortcuts are plain wrong. Fortunately there is a solution. For example, to expand a treeview in Eclipse StackOverflow recommends this for GTK 2:

binding "gtk-binding-tree-view" {
    bind "j"        { "move-cursor" (display-lines, 1) }
    bind "k"        { "move-cursor" (display-lines, -1) }
    bind "h"        { "expand-collapse-cursor-row" (1,0,0) }
    bind "l"        { "expand-collapse-cursor-row" (1,1,0) }
    bind "o"        { "move-cursor" (pages, 1) }
    bind "u"        { "move-cursor" (pages, -1) }
    bind "g"        { "move-cursor" (buffer-ends, -1) }
    bind "y"        { "move-cursor" (buffer-ends, 1) }
    bind "p"        { "select-cursor-parent" () }
    bind "Left"     { "expand-collapse-cursor-row" (0,0,0) }
    bind "Right"    { "expand-collapse-cursor-row" (0,1,0) }
    bind "semicolon" { "expand-collapse-cursor-row" (0,1,1) }
    bind "slash"    { "start-interactive-search" () }
class "GtkTreeView" binding "gtk-binding-tree-view"

And this for GTK 3:

@binding-set MyTreeViewBinding {
    bind "Left"     { "select-cursor-parent" ()
                      "expand-collapse-cursor-row" (0,0,0) };
    bind "Right"    { "expand-collapse-cursor-row" (0,1,0) };
GtkTreeView {
    gtk-key-bindings: MyTreeViewBinding;

With Ubuntu the files to edit are found below /usr/share/themes.

Categories: Java, Linux, Windows

Zoom in and out in Eclipse

Do you use Eclipse for presentations? In that case I bet you want to zoom in and out in order to handle different resolutions. That feature is not built in. I found a good answer at StackExchange.

In short, select "Help/Install New Software" and add as a site to "Work with". Pick the FontsFeature and install it. There should be two toolbar buttons for zooming in and out and the keyboard shortcuts Ctrl+- and Ctrl+= can be used as well, unless Eclipse has reserved them for something else.

Categories: Java

Add Eclipse Marketplace to MuleSoft Anypoint Studio

Anypoint Studio, the IDE for Mule, is based on Eclipse, but ships without the Marketplace client. That is a pity, as it makes it harder to add useful extensions. Fortunately it is easy to fix. Select “Help/Install New Software…” and add the Juno repository ( as a site to work with. Search for Marketplace Client. It is found under General Purpose Tools.

Install Eclipse Marketplace client

Install it and there you are!

Note that this covers the current version of Anypoint Studio for Mule 3.5, which is based on Eclipse 3.8. Future versions may not use the Juno repository. Check the version of Eclipse that Anypoint is based on and use the proper repository.

Categories: Mule

Affordable UML plugins for Eclipse

Nowadays there are almost as many UML plugins for Eclipse as there are logging frameworks for Java. While this is good, it makes it hard to pick the right one. Many are obsolete, but they still show up in search results. Others are overpriced to say the least.

Personally I don’t need a general-purpose UML editor in Eclipse. I tend to use Visio with a custom Visio UML stencil. What I need is a cheap, light-weight plugin that can generate good-looking class diagrams and sequence diagrams from the code. If it is free and open source, so much the better. It should be really easy to use and ideally it should be possible to tweak the generated diagrams manually.

ModelGoon UML4Java is free. It can generate class diagrams and sequence diagrams in a snap. It supports conditional statements and loops, which is important in some cases. Unfortunately there is little support for customizing the diagrams. I often want to remove all logging calls from sequence diagrams, for example, and ModelGoon does not support that. Furthermore it fails on some language constructs, such as for(;;) loops. Nevertheless, when it works it is good enough and gets the job done!

ObjectAid UML Explorer is another tool. It requires a license for sequence diagrams ($19 for a single user as of this writing), class diagrams are free. It is easy to use and generates good-looking diagrams that can be tweaked. Removing all logging calls is as easy as removing the logger class from the diagram. Unfortunately there seems to be no support for conditionals or loops. That can make it very difficult to see what is going on in some cases. If it is improved a bit it can be a winner.

Do you know of a better tool with an acceptable price tag? If so, let me know.

Categories: Java