I’ve been using the IDEA 6 EAP for a week or so now. In terms of what I use day to day, most of the new features aren’t relevant to me, it’s just a bit smoother in some areas like CSS and JSP editing. Unfortunately I haven’t been able to get the EMMA integration working just yet.
One thing I’ve been paying attention to is the new change sets feature. This is a much nicer way to represent changes across a project, and it basically operates how I used to before: hit the commit all button, check out the list of changes, exclude some files I’m not interested in committing right now, commit the set I was primarily working on. Except now they are named and available from the main IDE (and it is a lot faster).
However, I’ve already been bitten once by something I was more careful with in the previous technique – that is, by making a change in something I’d already moved to a separate change set, without realising it wasn’t going to be committed with everything else.
Given the way IDEA is able to track changes at a level more granular than files, it seems plausible to me that it could track those individual changes. The way I’d see that working is that instead of a “default change set”, there would be a “current editing change set”, where all edits land in. It should be able to switch with a keyboard shortcut to a different current change set (that’s the IntelliJ way). If you made edits in the same file under two or more change sets, IntelliJ could warn you on commit and you could choose to take them all, or just the ones you had in the set (ie, it rolls back the other changes, commits, then puts them back automatically). While that might seem dangerous at first, remember that you were working in a different context at the time so the code should be isolated – it’s especially handy for non-code changes like notes and documentation, and if TeamCity (or another CI server) provides an unbreakable build then the risk is reduced anyway.
From this, there are some natural extensions to the concept – being able to move individual changes between change sets (not just files), and being able to hold on to some change sets for later while taking them out of the current codebase in case its getting in the way of other things.
So, it’s a helpful feature, but I still think it could do more. I generally try to do only one thing at a time anyway (and I’m not sure how much I want to be encouraged to do otherwise!), but it’s certainly nifty when you see something unrelated and are able to take a note or make a quick change without having to write it down to come back to.
I’m not sure if this is something Mylar is able to do in Eclipse, but I’m unlikely to find out because Eclipse drove me running back to IDEA last time I tried it out again. Oh well.
Technorati Tags: intellij java