Swing. Joy.
Swing: selectAll when the cursor enters a table cell
{2009.12.28 17:27}
a tech blog, by Colin Pretorius
From How to get files from JAR dependencies in a plugin:
You could get the (runtime) class path of the current project via a mojo parameter like this:/** * @parameter default-value="${project.runtimeClasspathElements}" * @readonly */ private Listin combination with the mojo annotation @requiresDependencyResolution. From the class path, you can populate a URLClassLoader and call getResourceAsStream() on this.runtimeClassPath;
{2009.12.23 10:39}
I recently discovered JMockit. Not too foreign if you're used to JMock, but with one difference: instead of proxies it uses some creamy java.lang.instrument
goodness to do its mocking, meaning you can mock static methods, native methods, final classes and methods, and you can mock only parts of a class if you want.
Let that sink in for a bit... instead of whatever weird-ass things you had to do before to test time-dependent code, you can now mock System.currentTimeMillis()
. Way cool.
{2009.11.24 17:58}
An interesting take by Jeremey Allison on Mono. There is still uncertainty about Microsoft's patents covering .Net, and they could be a problem for Mono.
{2009.10.16 15:53}
For Google and posterity.
I recently reverted my home machine from Ubuntu 9.04 to 8.04 (long story). I re-used my old Eclipse workspaces, and after getting my Eclipse CDT projects compiling cleanly again, I still had various "include path not found" compiler warnings, referring to now-obsolete and invalid include directories. Eclipse regarded them as 'system' directories so I couldn't manually remove them from projects' path settings.
The culprits were .sc (scanner, I think) files in .metadata/.plugins/org.eclipse.cdt.make.core
. These files, one per project, seem to be cached paths and environment variables used by the build tools. I just closed Eclipse, removed all these .sc files, and they were recreated when I re-opened Eclipse. Problem solved.
{2009.10.04 10:28}
Cameron Purdy: The challenge with GC in Java and .NET.
Tim Bray: Concur.next
Right at the moment, we have a bunch of candidate technologies to fill in the concurrent-programming void; obvious examples include Erlang, Scala, Clojure, and Haskell. While there are common threads, they differ from each other in many essential ways. Between the lot of them, there are a whole lot of different characteristics. The fact is, we don’t know at this moment which laundry-list of features is going to turn some candidate into The Java Of Concurrency
{2009.09.30 23:41}
Back when I was fiddling with Eclipse RCP development one of the things which frustrated me about SWT in Gtk+ was autocomplete behaviour of drop-down lists. Type-ahead doesn't work, so while you can use the arrow keys to move through the list, and hit space or alt-down to see the choices, you can't hit keys and have the right entry show up. It works fine in Windows, so I'd presumed it had something to do with Gtk+.
I think I was right, since I've run into this again with wxWidgets in Gnome. I went as far as trying out some more widely used wxWidgets apps, and they all have the same problem, so I have to assume it's not just me doing something stupid. I found some wxPython code which tries to implement type-ahead on list controls but frankly, it's all just a pain in the butt. I went as far as trying out a simple combo using Gtk# in MonoDevelop, and it's the same thing.
Given my dislike of Swing, I have to grudgingly admit that I tried it in Swing, and a JComboBox does exactly what I expect.
Update: I noticed GtkEntryCompletion which seems to do the trick, but it doesn't seem to be exposed via wxWidgets.
Update2:: Links:
{2009.09.27 06:54}
A new Ubuntu distro based on the LXDE desktop environment. This article shows that not only does Lubuntu use a fraction of what Ubuntu uses, but it looks like Xubuntu, based on Xfce, is more of a memory hog than Ubuntu.
{2009.09.13 16:55}
An erratic trail lead me to an archive of the late Edsger Dijkstra's writings, and copies of his manuscripts, which make interesting reading.
Remarkable is how many of his manuscripts, especially later years, are hand-written. In our touch-typing world, how easy is it to turn out text so neatly, and succinctly, and with what often looks like no correction?
{2009.09.05 15:44}