When developing an AJAX application you often end up with some data interchange format, like XML, plain text, or, in my case: JSON. The trouble with JSON, however, it that's it's quite hard to read. Not because it's so complicated, but because it has been optimized for network communication, which in this case, means: all the whitespace has been stripped. Wouldn't it be nice to have an integrated JSON formatter in your IDE to handle this? Well, now it possible!
Tags: IntelliJ, json, plugin
Filed under Java | 1 Comment »
Smart code completion has been improved in IntelliJ 8. In the new version of JetBrains' IDE 'even smarter' code completion is added. But first I'll explain what smart code completion is! Basically, it's code completion on steroids, which takes the type of the variable into account too which the new value is assigned to. So, if your assigning a value to a variable of type String, smart code completion will only display methods which are compatible with a String type, and filters the list of methods accordingly. It does even a lot more than this, which you can read about here
(more...)
Tags: code completion, ide, IntelliJ
Filed under Java | 1 Comment »
A new feature is added in IntelliJ 8, which is the database browser. This functionality was already available with the help of some plugins, but now it has been integrated in the core of IntelliJ, and has been integrated in the complete IDE. This blog will give you some examples of how to set it up, and how to use it.
(more...)
Filed under Java | No Comments »
Coding is refactoring. What starts with a great idea, might prove incorrect in the future. A simple example is the following code:
public class Address { private String streetName; private Integer houseNumber; // getters and setters }
Tags: IntelliJ, Java, type migration
Filed under Java | 4 Comments »
IntelliJ 8 provides 7 new refactorings. One new powerful refactoring is the Introduce Parameter Object. The name speaks for itself: it introduces a parameter object! But what does it really do? The refactoring promotes good encapsulation. It encapsulates fields by introducing a new object for them.
Tags: IntelliJ, intellij 8, refactoring
Filed under Java | 7 Comments »
Today, a new release of IntelliJ 8 has been released! It's the magic number 8, and could a better name have been taken? IntelliJ 7 was already a very good Java IDE, but version 8 only builds further on this!
New features of the 8 release are (amongst others):
To celebrate this, I will release a series of blogs about some of the new or improved features of IntelliJ 8! So stay tuned!
Tags: IntelliJ, intellij 8, release
Filed under Java | No Comments »
A short while ago, a collegue and I decided to write an application with Grails and Eclipse RCP. We choose Grails for the ease of development, and Eclipse RCP (in favor of Flex and Plain Old HTML) because we wanted to give our users a solid and native look and feel, for which Eclipse RCP works really well.
Since the Eclipse RCP front-end would actually be a remote front-end, we needed some kind of kind of communication between the client and the server. One of our first idea's was to use XML-RPC, which is pretty well supported in Grails, but it would force us to to do some mapping between our domain and the XML. Since we wanted to use the same domain classes is Eclipse as in Grails (by exporting the Grails domain to external domain jars), we opted for a different approach: Burlap/Hessian.
Tags: burlap, Grails, Groovy, hessian, httpinvoker
Filed under Java | 8 Comments »
What if you're working with Maven, where you've got all your dependencies nicely organised, and now you decide to use any other piece of 'classpath-aware' software, like Fitnesse. The chances are that you'll need to use the same classpath in Fitnesse as in Maven. A possible solution could be to maintain it by hand, but why not write a very small script for it to do it for you? My (very very very!) basic solution is to use a Groovy, because it's easy to write, easy to read, and easy to use!
(more...)
A thing I was playing with today was many-to-many relationships in Grails to create a Tag Cloud. To create a Tag Cloud, I must have a set of key/value pairs, each with a label and a value of the label, which could look like this:
['Java': 5, 'Grails': 16, 'Groovy': 12]
But to query this, I need to query a many to many relationship and produce the above result. This blog will describe how to do this with HQL, Criteria and the HibernateCriteriaBuilder.
(more...)
Tags: Grails, Groovy, Hibernate
Filed under Java | 6 Comments »
Yesterday, I released my first plugin for Grails. The goal of the plugin is to do Syntax Highlighting for Code Snippets in HTML pages, for which no plugin existed yet. The plugin supports a whole range of languages, and even includes Groovy Highlighting support. The Grails Synax Highlighter builds on the great work of Alex Gorbatchev, who wrote and maintains the Javascript Syntax Highlighter.
(more...)
Tags: Grails, syntax highlighter
Filed under Usability | 3 Comments »