WARNING: This blog entry was imported from my old blog on blogs.sun.com (which used different blogging software), so formatting and links may not be correct.
My previous blog entry discussed the new Quick Fix feature for Ruby in NetBeans.
Today, I'd like to invite you all to jump in and add your own quick fixes!
Nothing (with some notable exceptions...) could be more fun! Writing a quickfix is easy, fairly self-contained (so it's easy to get started), and the resulting feature has high user visibility and utility. Thus, I think it's a great way to join an open source project and have some fun. Besides, working on tools is extra rewarding since at the end of the day, as a programmer you get to use the stuff you're building in your day-to-day work!
I've written a bunch of "Getting Started" documentation for how to write your own hints. The main starting point is is the How to Write a Hint document, which tells you everything you need to know. Look it over and see if you get inspired! If so, follow these steps:
- Check out the code and build the IDE (as described here).
- Read more information on how to join the project (license requirements etc.)
- If you want to write other code than just hints, check out the code ideas document.
- If some of the documentation is not clear, please let me know or ask on dev@ruby.netbeans.org - or if you know how to improve it, edit it directly!
Even if you don't want to code on the project, I'd love to have your active mailing list participation. Please join the mailinglists (or read it with a newsreader or web interface). Also feel free to edit the wiki pages and add your own quickfix requests.
I hope to see some of you on dev@ruby.netbeans.org soon!
Here are some hint ideas to get you started (a more up to date list is in the hint-howto wiki page):
- Offer to replace a { } block with a do-end and vice versa (unless it's a single-line block where braces are most common)
- Look for typos: incorrect spelling of "initialize", or perhaps an assignment to a variable that is close in spelling to another symbol
- Offer to add parentheses to a code construct where the lack of parentheses results in ambiguity (such as nested method calls without parentheses)
- Offer to remove parentheses where that's okay (some developers prefer not to use them)
- Offer non-Railsy deprecations: Use fileutils instead of ftools, cgi instead of cgi-lib, avoid importenv, ... Anything else?
- Offer to remove unused variables (the left hand side of the assignment, or if the right hand side is known not to
have side effects, the entire statement) - Style warnings: Using method names containing uppercase/camelcase names, or constants containing lowercase characters
- Camelcase warnings should perhaps not kick in for projects enabled for Java API calls (e.g. with JRuby)
- Camelcase warnings should perhaps not kick in for projects enabled for Java API calls (e.g. with JRuby)
- Offer to fix various code style violations - see one example style guide,
here's another, and yet another- As an example, replace x = y = whatever with x=whatever newline y=whatever (codestyle recommending this)
- As an example, replace x = y = whatever with x=whatever newline y=whatever (codestyle recommending this)
- Split multiple statements on a line into separate lines (I have this for defs and classes but x=y; foo should be splittable.)
- (JRuby projects) For an unknown class, check the Java index and offer to "import" the Java class into the Ruby name space
- Tell us your own ideas!
Tor, perhaps you do not yet realize how much netbeans is slow with real large projects. Quite often IDE freezes and must be killed.
ReplyDeleteThose bugs with schillmen's editor still exist. I tried latest build and IDE froze couple of times and hence went back to older release.
What I would really like is to have those bugs fixed. But anyways....
Hi Tor - can you comment on whether there is a way to achieve the following textmate bundles (not sure if I'm missing them or they were some of the harder to implement):
ReplyDeleteHTML
- Wrap selection in open/close tag (i.e. wraps selection and then highlights the first tag, when you type in the tag value the closing tag is auto-matched to this)
- Wrap each selected line in open/close tag
RUBY
- Insert ERBs <% %> or <%= %>
Tks
Greg
Tor - I've just move from the full NB M10 download to the "#netbeans-rubyide-hudson-macosx-3105.zip" download from "http://deadlock.netbeans.org/hudson/job/ruby/".
ReplyDelete* I assume I can now delete the NBM10 install then?
* Do updates to the rubyide zip files install over the top of each other, i.e. do I need to do any special clean up each time I download a new zip?
* If I have specific GEM installation in my normal Ruby installation area (e.g. RMagick which took a bit to get working) am I best just to point NB off to this area (c.f. trying to get such GEMS installed in the JRuby area, and potentially having to do this multiple times for each rubyide zip file update)? What are the pro's/con's of using the NB JRuby installation versus the normal Ruby installation?
thanks
I've had a couple lockups in NB10, the most repeatable is a ruby addition. If you use the ruby comment function to add 3 or 4 levels of comments, then try the uncomment to remove them--you will almost certainly lock up your entire IDE.
ReplyDeleteMight be exclusive to Linux, but I've seen it happen on 4 different linux (Ubuntu) boxes across the last two versions of Netbeans (Actually, I've never added multiple level of comments without it locking)
The comment/uncomment functionality in NB is also annoying, I don't really understand why it's not a toggle as it is with Eclipse, Textmate, etc. But that may not be something you have control over.
Oh, and might I suggest that :<tab> bind to:
{Key} => {value}
I can't seem to get NetBeans to allow me to use ":" as a template trigger.
Finally (as long as we're here), Selenium tests are not recognized as ruby source.
Thanks for the work you do!
Bill
Hi Tor, where can we find a cheat sheet for NetBeans that tells us the keyboard binding shortcuts, etc?
ReplyDeleteAlso, DRYML with Hobo is being updated pretty dramatically and was curious how easy it would be to get those updates integrated.
Thanks Tor.
ReplyDeleteI've been torn between Aptana and NetBeans lately. It seems that I can't find anyone that is very experienced in either one to really give a blow by blow comparison and really let us know how they fair in a fight at the moment, especially with the most recent Aptana update. HOWEVER, I thought that you'd perhaps like to review this review and also see the comments. I think that the last comment about grouping files by user choice has some merit that might need to be addressed by the NB team:
http://www.mslater.com/2007/7/3/goodbye-aptana-hello-netbeans
Do you know of any new/up-to-date reviews that I'm missing? Also with Leopard coming from Apple, it seems that TextMate might end up being back on top for Rails developer choice as there is a lot of hush hush work going on behind the scenes by Allan.