Posts

Eclipse 3.4 - Essential hotkeys

This is the third part of my Eclipse configuration series. At work we have a new guy who never has used Eclipse before, so he's a little lost when it comes to navigating the code base. I tried to write down a list of hotkeys that would make his life easier, but there are so many of them! Here is a list of my favorite hotkeys grouped by the area of use. I really tried to keep the list short but some shortcuts you just can't live without. General ctrl+space - The most important hotkey of them all, auto complete. ctrl+m - Maximize the current view. ctrl+3 - Open preferences or any other view. Navigation f3 - Open declaration. ctrl+o - Quick outline of the class files, great for navigating within a class quickly. ctrl+t - Open the type hierarchy. ctrl+shift+g - Get a list of all methods that calls the current method. ctrl+k - Next occurrence of the currently selected text. ctrl+. - Goto the next error or warning, use ',' for the previous. ctrl+shift+r ...

jQuery Column Iterator Plugin

Today i needed a jQuery plugin that could iterate over all cells in a column of a table. Since our tables can be very large i didn't want to use the jQuery column cell selector plugin since it creates a lookup table. We won't use rowspan in the tables anyway so i made my own column iterator. A demo can be found at:     http://slackers.se/resources/demo/columniterator/demo.html The plugin can be downloaded at:     jquery.columniterator.js     jquery.columniterator.min.js

Eclipse 3.4 - Even more efficient use of auto complete

The auto complete feature in Eclipse is a real time saver. Not many people know that the feature can be used event more efficiently. I've worked with Eclipse every day the last couple of years and i didn't know about this until a few days ago when i "discovered" it by accident. A single capital letter matches itself and then everything until the next word. Actually it's more similar to [a-z0-9]* than "everything". In other words, you can search for, or auto complete, entire words with just one character. For example the string "RR" matches the classes:    ReportRepositoryBean    ReportResult    ReportResultImpl The feature can also be used with the shortcuts: ctrl+shift+r - Open Resource ctrl+shift+t - Open Type

iTunes blocks JBoss naming service port

Today I had problems with Eclipse and JBoss. Somehow Eclipse couldn't detect that JBoss had started and aborted the process after 420 seconds and i noticed the exception in the log. 2000-06-03 80:23:11,220 ERROR [Naming] Could not start on port 1099 java.net.BindException: Address already in use: JVM_Bind After a quick check with Active Ports i saw that iTunesHelper.exe held the port. And when the process got killed, Eclipse started working as expected again. 1099 might have been assigned to iTunesHelper since it's inside Windows' ephemeral port range. Just to be sure this doesn't happens again I removed the auto start of iTunesHelper from the registry. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\iTunesHelper  And adjusted Windows' ephemeral port range so that some other service doesn't grab the port. There's a great guide over at ncftp.com on how you do this for different operating systems.

Eclipse 3.4 - Templates and Save Actions

Image
My save action configuration in EclipseSave actions are actions which are performed when a file is saved, duh?. The configuration can be found by pressing ctrl+3 and typing 'save actions' (Java > Editor > Save Actions). The very first time I used Emacs I remember thinking, why would anyone use this? But the more I learned about how to configure Emacs the more i liked it. Nowadays it's on my top 10 list of things i would bring to a deserted island. The point is, the less time you spend struggling with the editor the more time you can spend on developing. Having a properly configured IDE will speed up your development significantly. I'm not going to list a bunch of hotkeys in this post. Instead I'm going to show the settings for 'code templates' and 'save actions' that I use. Code templates Both code templates and regular templates can be exported after they have been configured, which makes them easy to apply to new workspaces. The code temp...

KB927917

Today i ran into this warning when testing IE7 compatibility for a web project: Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917) The problem is that the site has some JavaScript code that tries to modify the parent of a DOM-node from the a child node before the child is finished loading. Here's a short example of a how to get the error: Same ol' child The content will still be replaced but with a warning in the console. To get rid of the warning just move the script out to the parent container, ie. Same ol' child OR, even better, use body.onload or jQuery(document).ready . If you want more information about this problem head over to Microsoft's support site: http://support.microsoft.com/default.aspx/kb/927917

jsTagCloud - JS canvas 3D tag cloud

jsTagCloud is a tag cloud plugin for jQuery. It uses the canvas element to render a 3d cloud that can be rotated with the mouse. It's made as a proof of concept, but it would be great if this someday evolved into a Wordpress plugin. So far i've only been able to test it in these browsers: Firefox/3.0.10 - Ubuntu 9.04 x64 yes, only one The tags in the demo is from this page and they should be clickable as well. The configuration of the plugin should be pretty obvious if you take a look at the source of demo.html . Features It's made as a jQuery plugin. Navigate the 3d cloud with the mouse pointer Clickable links I just wanted more than 3 items on my feature list :) Download and demo The source can be found at: https://projektserver.se/svn/tiny/javascript/jsTagCloud/ And a demo can be found at: http://slackers.se/resources/demo/jsTagCloud/demo.html FAQ q: Why is the text size jumping? a: Because i couldn't find any way to scale strings between integer ...