Resistance Is Futile
We are the Borg. We bring the NetBeans. You will be assimilated. Resistance is futile!
http://www.autexier.de/jmau/blog/2005/05/does-sun-wants-to-assimilate-us.html
This is just very funny :-) Did I reveal I am a Star Trek fan already?
Disobedient Abbreviations in NetBeans
A very strange word may be found in sources created in Netbeans (such as NetBeans itself):
we'return. I did
a search for this word in the sources at netbeans.org and found it on several places in CVS:
You can even find this strange word being discussed on some web forums, like this one:
http://www.javakb.com/Uwe/Forum.aspx/java-tools/1027/NetBeans-Annoyance
How did it happen? Well, NetBeans has a very useful support for abbrevations. You can type in "sout" and this word is by pressing space expanded into System.out.println("|"). The vertical line denotes the new position of cursor. Works great, except for some rare cases like if you want to write "we're" in a comment. In that case, the "re" string is expanded into "return" and we have the magical "we'return". Tricky, isn't it?
Unfortunately, we will miss this we'return in new sources, because such behaviour is fixed now - abbreviations get no longer expanded in comments and string literals. I wonder if there are any other artificial words like we'return created by this side effect, the list of abbreviations is quite large. You can find it in Help | Keyboard Shortcuts.
Here is my comment to the fix from developers, inspired by
Tor's first reply:
I have tested the new build with fixed abbreviations and it works fine, bothrows in javadoc and string literals. I hoprotected we can also change some of the conflicting abbreviations. For sureturn we should replace the "st" and "br" abbreviations as these two areturn often used for StringTokenizer and BufferedReader. The bestatic abbreviations for them areturn sc and bk in my opinion. It's a complextends problem, but at leastatic we'll fix these two cases.
This would not be reproducible even in old NetBeans, because the apostrophe was the reason why it got expanded in we'return - the "re" characters were taken as a new word. I guess this kind of funny issues is one of the reasons why I enjoy working on a software project.