NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed. (sponsored)
In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.
Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.
Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Ahh, spelling errors. I think we all make them - I know I do anyway. After typing these tips on a near daily basis I've begun to recognize that no matter how good you think you are at spelling, stupid mistakes show up, and a lot of times you get a bad spelling habit stuck in your head and continually put too many c's in necessary or something. I would be surprised if a spelling error didn't find its way in to this very tip, as I'm usually too lazy to put a lot of effort into spell checking these .
Spelling errors in documentation can mean the difference between life and death. Really?! No... not really - but spelling
is
important. Bugs are opened in large frameworks when spelling and grammatical errors are in the documentation. Really, it happens! In addition, people immediately take you more seriously when you spend the time to ensure that your spelling is accurate. Finally, it is definitely possible that spelling errors can convey a different meaning than intended. (Deprecate and Depreciate anyone?)
Thankfully, Eclipse has a little hidden gem that makes quick work of spelling errors. The spelling support in Eclipse has actually been around for a while now (if I'm not mistaken, it was enabled in 3.0), and recently (3.1 M4) it was enabled in the properties file editor in addition to the already supported Java editor. So, how do you enable it?
Well, the first step is to find the preference for it. That's a relatively simple process as I already know, and I am going to tell you - just go to
Window->Preferences->Editors[+]->Text Editors[+]->Spelling
and check
Enable Spelling
.
Oops, wait a minute... it has a section to provide a 'User defined dictionary'. Is this mandatory? What format does it need to be in? Do we have to type all the words by hand? This could take a while! For spell checking to work, it is currently mandatory for you to provide a dictionary. Thankfully it's not that hard to find a word-list Eclipse can use. Eclipse supports a fairly standard one-word-per-line format for the 'dictionary' file, so we just have to find one of those. The best branching off point for that is probably
Kevin's Word List on Sourceforge.net
. Seem too hard? Ok, fair enough. I've compiled my own word list off of an amalgum of lists (I honestly can't remember which ones, otherwise I would be sure to give credit where credit is due), and I have uploaded it
here
. Fair warning! This file is substantial in size - so substantial that I couldn't attach it to this message in the conventional Javalobby 'Attach File' way (around 1.5 megabytes).
Ok, so now let's enable our spell-checking. I like to drop the dictionary file in the folder with my Eclipse installation, and then reference it in the preferences, as seen here:
Then all you have to do is use it. Spell checking shows up in one of two ways - first as squiggly warnings in your documentation and strings, and second as a preemptive auto-complete for content assist (assuming you have enabled that option in the advanced section seen in the screenshot above). Here is what the spelling error marker looks like (and what happens when I press Ctrl+1 with my cursor adjacent to the error):
Here is what it looks like using the auto-complete feature (Ctrl+Space):
Unfortunately, spelling support still needs a little work in some areas; it is no panacea. So, what would I like to see in the future? For one thing, there is no way yet to control what elements are spell-checked, and which ones aren't. What I mean by that is whether javadocs, regular comments, string literals, and/or type/method/field names are spell-checked. Currently all documentation and string literals are checked, but that's it. Frankly, my string literals need checking less often than my types and fields and methods - and in my string literals, it is more often the spell-checker would be wrong. In addition, the algorithm used for finding words of a closest match doesn't always seem the most appropriate - when using the word-list for auto-complete, if I were to type 'spell' and then press Ctrl+Space, I would like 'spelling' come up in the list before 'spew' - since that is the main benefit of an auto-complete feature - completing the word!
Nice post. I didn't realize that Eclipse had a spell checker built in. I have worked on some code in the past few years that could have been greatly improved if the developer had been using a spell checker.
I was able to get mine to work without changing the extension - I pulled that .txt file directly out of my workspace. You may have to change the file browse setting to 'All Files' however.
Can this function handle 'multiple word' term -
example: I have a statement-
SomeAbstractType iAmAProperty=new SomeType();
for this statement, can this function check all words' spelling - some, abstract, type, i, am, a, property
Yeah, I guess he removed those files.
What you can do is download the aspell program from http://aspell.net/win32/ (I assume you use windows). From that page you can also download all sorts of dictionaries.
Open a command line and change to the Aspell 'bin' directory. Issue the command 'Aspell.exe dump master en > en.dictionary'. This will create a plain text file containing all the English words. If you want to create another word list just replace the 'en' with the two letter combination of the langue you require. Use the newly created file as a user defined dictionary. Now you will have spell checking in Eclipse!!!
I realize the spelling checker is general and works with any text editor, but in the JDT I'd like to have spelling errors flagged as compiler warnings. Is it possible?
Eclipse: Catch Those Spelling Errors
At 11:36 PM on Feb 24, 2005, R.J. Lorimer wrote:
Fresh Jobs for Developers Post a job opportunity
Ahh, spelling errors. I think we all make them - I know I do anyway. After typing these tips on a near daily basis I've begun to recognize that no matter how good you think you are at spelling, stupid mistakes show up, and a lot of times you get a bad spelling habit stuck in your head and continually put too many c's in necessary or something. I would be surprised if a spelling error didn't find its way in to this very tip, as I'm usually too lazy to put a lot of effort into spell checking these
.
Spelling errors in documentation can mean the difference between life and death. Really?! No... not really - but spelling is important. Bugs are opened in large frameworks when spelling and grammatical errors are in the documentation. Really, it happens! In addition, people immediately take you more seriously when you spend the time to ensure that your spelling is accurate. Finally, it is definitely possible that spelling errors can convey a different meaning than intended. (Deprecate and Depreciate anyone?)
Thankfully, Eclipse has a little hidden gem that makes quick work of spelling errors. The spelling support in Eclipse has actually been around for a while now (if I'm not mistaken, it was enabled in 3.0), and recently (3.1 M4) it was enabled in the properties file editor in addition to the already supported Java editor. So, how do you enable it?
Well, the first step is to find the preference for it. That's a relatively simple process as I already know, and I am going to tell you
- just go to
Window->Preferences->Editors[+]->Text Editors[+]->Spellingand checkEnable Spelling.Oops, wait a minute... it has a section to provide a 'User defined dictionary'. Is this mandatory? What format does it need to be in? Do we have to type all the words by hand? This could take a while! For spell checking to work, it is currently mandatory for you to provide a dictionary. Thankfully it's not that hard to find a word-list Eclipse can use. Eclipse supports a fairly standard one-word-per-line format for the 'dictionary' file, so we just have to find one of those. The best branching off point for that is probably Kevin's Word List on Sourceforge.net . Seem too hard? Ok, fair enough. I've compiled my own word list off of an amalgum of lists (I honestly can't remember which ones, otherwise I would be sure to give credit where credit is due), and I have uploaded it here . Fair warning! This file is substantial in size - so substantial that I couldn't attach it to this message in the conventional Javalobby 'Attach File' way (around 1.5 megabytes).
Ok, so now let's enable our spell-checking. I like to drop the dictionary file in the folder with my Eclipse installation, and then reference it in the preferences, as seen here:
Then all you have to do is use it. Spell checking shows up in one of two ways - first as squiggly warnings in your documentation and strings, and second as a preemptive auto-complete for content assist (assuming you have enabled that option in the advanced section seen in the screenshot above). Here is what the spelling error marker looks like (and what happens when I press Ctrl+1 with my cursor adjacent to the error):
Here is what it looks like using the auto-complete feature (Ctrl+Space):
Unfortunately, spelling support still needs a little work in some areas; it is no panacea. So, what would I like to see in the future? For one thing, there is no way yet to control what elements are spell-checked, and which ones aren't. What I mean by that is whether javadocs, regular comments, string literals, and/or type/method/field names are spell-checked. Currently all documentation and string literals are checked, but that's it. Frankly, my string literals need checking less often than my types and fields and methods - and in my string literals, it is more often the spell-checker would be wrong. In addition, the algorithm used for finding words of a closest match doesn't always seem the most appropriate - when using the word-list for auto-complete, if I were to type 'spell' and then press Ctrl+Space, I would like 'spelling' come up in the list before 'spew' - since that is the main benefit of an auto-complete feature - completing the word!
12 replies so far (
Post your own)
Re: Eclipse: Catch Those Spelling Errors
Nice post. I didn't realize that Eclipse had a spell checker built in. I have worked on some code in the past few years that could have been greatly improved if the developer had been using a spell checker.Kerry
Kerry's Abend
Ramblings of a Programmer
Re: Eclipse: Catch Those Spelling Errors
Kerry,Glad you found it helpful. Thanks for the feedback.
Cheers,
Re: Eclipse: Catch Those Spelling Errors
RJ,You need to change the .txt extension to dictionary for the it to work..
Re: Eclipse: Catch Those Spelling Errors
Fred,I was able to get mine to work without changing the extension - I pulled that .txt file directly out of my workspace. You may have to change the file browse setting to 'All Files' however.
Regards,
Re: Eclipse: Catch Those Spelling Errors
Hmm...I did not tha tin Eclipse3.1 you can enable it for all editors..
Did Eclipse Foundation ever come out with a global wordlist to load as platform?
Re: Eclipse: Catch Those Spelling Errors
Can this function handle 'multiple word' term -example: I have a statement-
SomeAbstractType iAmAProperty=new SomeType();
for this statement, can this function check all words' spelling - some, abstract, type, i, am, a, property
Re: Eclipse: Catch Those Spelling Errors
I cannot download the dictionary file. It says i do not have permissions.Re: Eclipse: Catch Those Spelling Errors
Yeah, I guess he removed those files.What you can do is download the aspell program from http://aspell.net/win32/ (I assume you use windows). From that page you can also download all sorts of dictionaries.
Open a command line and change to the Aspell 'bin' directory. Issue the command 'Aspell.exe dump master en > en.dictionary'. This will create a plain text file containing all the English words. If you want to create another word list just replace the 'en' with the two letter combination of the langue you require. Use the newly created file as a user defined dictionary. Now you will have spell checking in Eclipse!!!
Good luck!
Re: Eclipse: Catch Those Spelling Errors
screen shots are not visible.Also gives permission error for
http://www.javalobby.org/images/postings/rj/eclipse_spelling/dictionary.txt
Re: Eclipse: Catch Those Spelling Errors
I can't see these screen shots too.Please check it.
I need it.
Java Software
Re: Eclipse: Catch Those Spelling Errors
I realize the spelling checker is general and works with any text editor, but in the JDT I'd like to have spelling errors flagged as compiler warnings. Is it possible?Re: Eclipse: Catch Those Spelling Errors
Nebula - thanks for link to cool program, i don't knew about them, but i needed! Thanks.