Home » Author Archives: Rudiger Herrmann

Author Archives: Rudiger Herrmann

What’s the Difference? Creating Diffs with JGit

git-logo

In this post, I will dig into the details of how to diff revisions and create patches with JGit. Starting from the high-level DiffCommand all the way down to the more versatile APIs to find particular changes in a file. DiffCommand, Take I The diff command can be used to compare two revisions and report which files were changed, added ...

Read More »

Terminate and Relaunch in Eclipse

eclipse-logo

A few days ago a new feature was committed to the Eclipse repository: Terminate and Relaunch. When enabled, Eclipse will terminate all currently running processes of a launch configuration before relaunching it. This feature is particularly useful if the process to launch holds a unique system resource. For example, a servlet container that listens on a particular port will throw ...

Read More »

How to Replace Rules in JUnit 5

junit-logo

The recently published JUnit 5 (aka JUnit Lambda) alpha release caught my interest and while skimming through the documentation I noticed that rules are gone – as well as runners and class rules. According to the documentation, these partially competing concepts have been replaced by a single consistent extension model. Over the years, Frank and I wrote several rules to ...

Read More »

SWT ScrolledComposite Explained

java-logo

Like a friend of mine once put it, SWTs ScrolledComposite is a nasty beast. And to some point I do agree. This is likely the reason why there are so many questions asked about how to use this widget. But its not only the authors of the ScrolledComposite to blame. When a piece of software doesn’t work the way you ...

Read More »

JUnit 5 – A First Look at the Next Generation of JUnit

junit-logo

In the beginning of February, the JUnit 5 (aka JUnit Lambda) team has published an alpha release. Since JUnit 4 is among the most used items in my toolbox I thought it might be worth to have a look at the next major release. I took the latest build for a spin and noted down the changes that I found noteworthy here. ...

Read More »

Getting Started with JGit

git-logo

If you ever wondered how basic Git commands like git init, git checkout and so on are executed in JGit, read on. This tutorial gives an overview of the most commonly used git commands and their counterparts in JGit. It walks through the steps to create a repository, fetch contents from a remote, add and remove files to/from the history, ...

Read More »

Gonsole 1.2: Open Git Consoles from Everywhere

git-logo

We have added a little feature to the Git Console for the Eclipse IDE that may be helpful here and there.                       In the Show In menu (Alt+Shift+W) there is now an entry for the Git Console. The entry is available if a single a file, folder or project is ...

Read More »

How to Clone Git Repositories with JGit

git-logo

Whatever you plan to do with an existing repository, first a clone has to be created. Whether you plan to contribute or just want to peek at its history, a local copy of the repository is needed. While cloning a repository with JGit isn’t particularly difficult, there are a few details that might be worth noting. And because there are ...

Read More »

From Arrays to Streams and Back with Java 8

java-logo

Not long ago we upgraded some Eclipse plug-in projects to Java 8. And never looked back since. Among many other things, filtering, mapping, and finding elements in collections has become so much easier and more concise with lambdas and the streams API. Nothing new so far for the most of you, I guess. But many existing APIs use arrays in ...

Read More »

Getting Java Event Notification Right

java-logo

Implementing the observer pattern to provide Java event notification seems to be a straight forward thing to do. However there are some pitfalls one easily can run into. Here comes an explanation of common mistakes I carelessly have produced myself on various occasions… Java Event Notification Let’s start with a simple bean StateHolder that encapsulates a private int field state ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns