I’ve come across this interesting classification of developer types, by Frank Kelly.
It is a funny read… just try to assign a label to your workmates… and think which label they’ll apply to you
.
I’ve come across this interesting classification of developer types, by Frank Kelly.
It is a funny read… just try to assign a label to your workmates… and think which label they’ll apply to you
.
Wayne Beaton has made some great articles about using adapters in Eclipse to reduce coupling.
In Adapting, the last post of the series, he shows some code to check if an object is or adapts to a given interface. This code has the problem that it needs to be repeated for every interface you need to check against.
The process is:
IAdaptable and can adapt to the interface.Platform.getAdapterManager().loadAdapter(…)My solution to avoid repeating code and leverage Java5 generics is this:
private <T> T adaptAs( Class<T> clazz, Object object )
{
if ( object == null )
{
return null;
}
if ( clazz.isAssignableFrom( object.getClass() ) )
{
return (T) object;
}
if ( object instanceof IAdaptable )
{
return (T) ( (IAdaptable) object ).getAdapter( clazz );
}
else
{
return (T) Platform.getAdapterManager().getAdapter( object, clazz );
}
}
More solutions, all of them Java 1.4 compatible, are listed in the eclipse bug 118560.
I’m just back from my easter break and catching up with all q4e-related mail and issues… there has been lots of work and contributions, which means a lot of work for us (the committers) but also means a healthy community.
Thanks to everyone who’s been hacking at Q for Eclipse this weekend and in the past.
You rock!
Developing web applications with maven and q4e is really, really easy… try this:
Did it work? Sure it did… see it in action! (thank to Joakim Erdfelt for hosting it)
But, wait… this is the same process used for creating any q4e project, right?
Exactly!
Don’t you love when things are so simple?
And you can do hot deployment, edit your classes, save and see changes… edit resources… everything is updated in a few seconds.
This is bleeding edge, so we’re really interesting in receiving your feedback. Drop us a line on the q4e groups.
Support for WTP is only an example of what’s possible with q4e, a proof of concept of its extensibility. If you’re interested in developing support for your plug-in, let us know on the developers list. We can help!
A while back I talked about how maven dependency on artifacts published in the repository was an annoyance to IDE users. If you haven’t read it, it can be summarized as if you only edit the code and compile, your maven builds will pick up the wrong dependencies because it will build against your local repository versions, not against the compiled classes.
mvn install before you work in a different module.