Using scala-logger

Today I was adding logging to one of my projects. I decided to use scala-logger. I added scala-logger dependency to the build.sbt, excuted my test class and got the following error in the Eclipse console output:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Continue reading

“value ? is not a member of akka.actor.ActorRef”

I was trying to use a Future in Akka today and got the following error message:

value ? is not a member of akka.actor.ActorRef

It turns out you have to import the akka.pattern.ask to use ‘?’. There is a implicit conversion from ActorRef to AskableActorRef.

So add the following import and you should be set to go (take note that ask does not start with a capital:

import akka.pattern.ask

Adding the latest release of Akka to an SBT project

A quick note how to create a SBT project with the latest release of Akka.

Create a build.sbt file:

name := "ScalaAkkaTest"

organization := "<Your organisation name>"

version := "0.1.0-SNAPSHOT"

scalaVersion := "2.11.2"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.6"

Continue reading

Yes you can: Diff with EGit in Eclipse!

In my previous post on how to quickly view all the changes between two branches in Git I ended with the statement “Is there away to do the same in Eclipse with EGit?“. I Googled around for the answer a bit, but with no success. By accident I just discovered how to compare the working version of a file to the commited version. Not entirely the same, but getting closer 🙂 For the purpose of being able to quickly check what changes I have made to write meaningful commit messages this is sufficient for me.

Anyway, these are the steps:

  • Open Git Staging (Window > Show view > Git > Git Staging)
  • Double click on a file in “Unstaged Changes” or “Staged Changes”

And voilà! There is a beautiful window with a side to side diff of the working version and commited version. Nice! I hope this is useful.

Wicked Shell is your friend: Using the shell from Eclipse

I am using the Git flow as my development model. It is very easy to understand and use. Keeps development nice, tidy and clear. See more information for links about Git flow.

When preparing a release the release or version number needs to be bumped (increased). This requires a shell script. I was switching to a command prompt to do this. Then I came across a nifty little plug-in for Eclipse, so I can execute the shell script from within Eclipse. It is called Wicked Shell. Continue reading

Easy way to quickly view all the changes between two branches in Git

I was commiting some changes in Git and needed to view all the changes between, so that I could write a meaningful commit message. I used the following command to view the changes in each changed file:

git difftool -v development

This command is viewing the active branch (checked out branch) with the development branch. It will open the changed files one by one.

Is there away to do the same in Eclipse with EGit?