This morning, I was fixing a bug using Netbeans.   Typical cycle: think, type, build, test.  However, the changes I made didn't seem to fix the bug.  I was nearly 100% sure that I'd identified the problem, but running the test was still showing the failure.  So another cycle of think, type, build and test.  Still, no dice.  Time to add some printlns - think, type, build, test. Woah! none of my debugging prints are showing up - what's going on? Dang!  The project I was working on was not my 'main' project in Netbeans. So when I hit build, it built the wrong project, so my changes were never being compiled. 

Netbeans should be smart enough to know that when you have multiple projects open and you are editing some source and you hit build you are likely to want to build the project related to the source that you just edited, and not the project that has no changes.  I'm probably bit by this at least once a week.  You'd think I'd learn my lesson, but I don't. Sigh.

Comments:

I've had very similar issues in Eclipse. It would be nice if that could get fixed. (For example, the IDE could set all open java files outside of the current project directories to read only.) Btw, I use printlns all the time... I couldn't do without them :-)

Posted by elias on March 28, 2007 at 08:26 AM EDT #

Agreed this can be annoying, but I find a really quick fix is to create a keymap which maps (say) F11 to "Build Project." Currently F11 maps to "Build Main Project." Setting it to "Build Project" ensures it build the currently selected project. Saves some grief.

Posted by 24.23.176.126 on March 28, 2007 at 01:22 PM EDT #

Post a Comment:
Comments are closed for this entry.

This blog copyright 2010 by plamere