- Extras for Eclipse: Neon Update - 6. July 2016
- What’s the Difference? Creating Diffs with JGit - 16. June 2016
- Terminate and Relaunch in Eclipse - 19. April 2016
Extras for Eclipse: Neon Update
A change in Eclipse Neon made it necessary to update Extras for Eclipse. Unfortunately, the Toggle Full Screen command uses the same key binding, Alt+F11, as the Launch Dialog (see this bug for the details). Hence the key binding for the Launch Dialog had to be changed to Shift+F11. We…
What’s the Difference? Creating Diffs with JGit
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…
Terminate and Relaunch in Eclipse
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…
How to Replace Rules in JUnit 5
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 user guide, these partially competing concepts have been replaced by a single consistent extension…
SWT ScrolledComposite Explained
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 it’s not only the authors of the ScrolledComposite to blame….
JUnit 5 – A First Look at the Next Generation of JUnit
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…
Announcing Extras for Eclipse
Over the last months, I wrote some extensions for the Eclipse IDE that I found were missing and could be implemented with reasonable effort. The outcome is Extras for Eclipse, a collection of small extensions for the Eclipse IDE, which include a launch dialog, a JUnit status bar, a launch…
A Help Command for Gonsole
We took the 4.2 release of JGit as an opportunity to not only include the new JGit version but also spend some time on Gonsole itself. The result are some bug fixes and smaller enhancements. Most notably there is now a help command. When entered as-is, a list of known…
Getting Started with JGit
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…
Gonsole 1.2: Open Git Consoles from Everywhere
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 selected…
How to Clone Git Repositories with JGit
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…
From Arrays to Streams and Back with Java 8
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…
Initializing Git Repositories with JGit
I was recently asked how to initialize a new Git repository with JGit, i.e. achieve what git init /path/to/repo does. While creating a repository with JGit isn’t particularly difficult, there are a few details that might be worth noting. And because there are few online resources on the topic, and…
Speed up Your Builds with Codeship Parallel Test Pipelines
Some time ago we were in need for a hosted CI service for a project that was held in a private GitHub repository. And in Codeship we found a suitable solution to build, test and deploy the code from the private repository. Soon we got excited by the reliable internet…
A Small Update for Gonsole
If you follow the respective channels you will certainly have read that recently a critical security vulnerability has been discovered in Git. The issue did not only affect Git itself but also all other Git implementations. Among them JGit, which Gonsole uses to actually execute the entered commands. Luckily, together…
JGit Authentication Explained
Authentication in JGit is mostly on par with native Git. Commonly used protocols like SSH and HTTP(S) and their authentication methods are supported. This article summarizes how to use the JGit authentication API to access remote Git repositories securely. Though the examples in this article use the CloneCommand, the described…
Explore Git Internals with the JGit API
Have you ever wondered how Git stores a commit and its content? Well, I have, and I had some spare time over the last rainy weekend, so I did a little research. Because I feel more at home with Java than with Bash, I used JGit and a couple of…
Codeship: Continuous Integration for GitHub and Bitbucket
Just recently I got the opportunity to use yet another continuous integration service: Codeship Continuous Integration. The hosted service builds GitHub and Bitbucket projects and offers various options for deployment. This post will give a brief overview how to build and deploy with Codeship. Simple Setup Setting up Codeship to…
How to Access a Git Repository with JGit
A Git repository is represented in JGit through the Repository class that can be viewed as a handle to a repository. With a Repository instance, you can create JGit commands (through the Git factory class), gain access to configuration settings, resolve refs, etc. There are several ways to obtain a…
How to Safely Use SWT’s Display asyncExec
Most user interface (UI) toolkits are single-threaded and SWT is no exception. This restriction means that UI objects must be accessed exclusively from a single thread, the so-called UI thread. On the other hand, long-running tasks should be executed in background threads to keep the UI responsive. This makes it…