22 comments
Comment actions Permalink

Heh, I'd use something like that, and maybe even attempt it if someone could
tell me of a java spell checking engine that I can use reliably on both
windows and unix based ops. (One that's free of course)

R

"charles decroes" <spam@decroes.com> wrote in message
news:16399589.1054058048471.JavaMail.jrun@is.intellij.net...

Just in case someone is looking for a good plugin to try and create. I

know create it yourself ;)


0
Comment actions Permalink

Yeah neither of which are Java, nor do they have Java APIs. I ain't writing
JNI code :)

R
"charles decroes" <spam@decroes.com> wrote in message
news:5839437.1054067535045.JavaMail.jrun@is.intellij.net...

I Found 2 open source ones

>

OpenOffice

http://lingucomponent.openoffice.org/download_dictionary.html#spelling
>
>

GNU Open Source ASpell http://aspell.sourceforge.net/

>
>


0
Comment actions Permalink

they both have downloadable dictionaries. how about this. Give me a SIMPLE api to implement and i'll write the java-to-dictionary api. Then after I send you that you write the plugin to interface with intellij?

0
Comment actions Permalink

googling for: java dict

http://sourceforge.net/projects/jcfd/


googling for: java spell

http://jazzy.sourceforge.net/

http://plugins.jedit.org/plugins/?SpellCheck -> aspell plugin for jedit,
maybe worth a look

http://developer.apple.com/samplecode/Sample_Code/Java/JavaSpellingFramework.htm
(osx only)


jazzy seems to be the most (and only) referred tool. From a quick look at
the download site seems to have only an english dictionary.



0
Comment actions Permalink

jazzy looks very cool.

0
Comment actions Permalink

We needed to add a spellchecker to our current project, and Jazzy was the
only OS Java one I could find. Overall the integration went quite smoothly
and we're pretty happy with the results, although I did hit a few bugs in
the Jazzy code on the way. I'm pretty swamped for spare time at the moment,
but I'll try to get the bug fixes into the Jazzy CVS within the next week or
so (fwiw, they were fairly minor problems anyway).

If anyone seriously wants to develop a spellchecking plugin for IDEA then
feel free to get in touch with me, I'll do what I can to help out.

"charles decroes" <spam@decroes.com> wrote in message
news:28039371.1054083658501.JavaMail.jrun@is.intellij.net...

jazzy looks very cool.



0
Comment actions Permalink

So let's start with what you'd like to spell check. Obviously it's not your
code, so I'm assuming that we spell check things in java docs and comments?

R

"Chris Miller" <chris_overseas@hotmail.c0m> wrote in message
news:bb1rd1$9j5$1@is.intellij.net...

We needed to add a spellchecker to our current project, and Jazzy was the
only OS Java one I could find. Overall the integration went quite smoothly
and we're pretty happy with the results, although I did hit a few bugs in
the Jazzy code on the way. I'm pretty swamped for spare time at the

moment,

but I'll try to get the bug fixes into the Jazzy CVS within the next week

or

so (fwiw, they were fairly minor problems anyway).

>

If anyone seriously wants to develop a spellchecking plugin for IDEA then
feel free to get in touch with me, I'll do what I can to help out.

>

"charles decroes" <spam@decroes.com> wrote in message
news:28039371.1054083658501.JavaMail.jrun@is.intellij.net...

jazzy looks very cool.

>
>


0
Comment actions Permalink

code, so I'm assuming that we spell check things in java docs and

comments?
...and strings!!!



0
Comment actions Permalink

+1 for Strings. We find mispelling in JOptionPanes all the time. Mostly caused by me :(

Maybe I should just buy hooked on phonics :)

0
Comment actions Permalink

I've just been talking to Chris about coding this one up myself using Jazzy
as a base. Anyone else been thinking of taking this plugin on-board? I'd
expect to use check selection as a starting point and then be looking to
check Java comments, strings, locale bundles and still being able to check
text, jsp/html, xml documents..

Richard

--
Richard Osbaldeston
(http://www.osbald.co.uk)


0
Comment actions Permalink

I was thinking starting with something along the lines of load the text of
the current page, parse for possible strings and java comments (using regex)
and then submit the code chunks to Jazzy I guess for checking.

I haven't looked at Jazzy, so if someone already knows how to work with it
and wants to do it, fine by me. If you post it on Sourceforge, I'd like to
participate.

R

"Richard Osbaldeston" <rosbaldeston@h-o-t-m-a-i-l.com> wrote in message
news:bb2cof$ea6$1@is.intellij.net...

I've just been talking to Chris about coding this one up myself using

Jazzy

as a base. Anyone else been thinking of taking this plugin on-board? I'd
expect to use check selection as a starting point and then be looking to
check Java comments, strings, locale bundles and still being able to check
text, jsp/html, xml documents..

>

Richard

>

--
Richard Osbaldeston
(http://www.osbald.co.uk)

>
>


0
Comment actions Permalink

I think the easiest approach would be to use Psi (program structure
information) since comments and strings are already parsed for you. Just
walk the portion of the tree to be spell-checked -- there's already a
utility class provided by Idea called PsiRecursiveElementVisitor to walk the
tree and handle each node according to its type. You just override the
method that handles comments etc.

-Dave

"Robert S. Sfeir" <robert@codepuccino.com> wrote in message
news:bb2flk$lqn$1@is.intellij.net...

I was thinking starting with something along the lines of load the text of
the current page, parse for possible strings and java comments (using

regex)

and then submit the code chunks to Jazzy I guess for checking.

>
]]>


0
Comment actions Permalink

Hum. Dunno enough so I will definitely need help. Again anyone want to
start a sourceforge project and lead this? I would be glad to participate,
I don't have enough time to do it alone I'm afraid.

R
"Dave Kriewall" <davek@wrq.com> wrote in message
news:bb2s0t$lvt$1@is.intellij.net...

I think the easiest approach would be to use Psi (program structure
information) since comments and strings are already parsed for you. Just
walk the portion of the tree to be spell-checked -- there's already a
utility class provided by Idea called PsiRecursiveElementVisitor to walk

the

tree and handle each node according to its type. You just override the
method that handles comments etc.

>

-Dave

>

"Robert S. Sfeir" <robert@codepuccino.com> wrote in message
news:bb2flk$lqn$1@is.intellij.net...

I was thinking starting with something along the lines of load the text

of

the current page, parse for possible strings and java comments (using

regex)

and then submit the code chunks to Jazzy I guess for checking.

>
<snip>

>
>


0
Comment actions Permalink

I'm willing to help, although gone for the next week or so. I can
contribute the code I described (locate all the comments and strings in a
selection or in a file) if someone else can provide the hooks to the spell
checker and the logic to do something when a spelling error is detected.

-Dave


0
Comment actions Permalink


"Dave Kriewall" <davek@wrq.com> wrote in message
news:bb2vpo$vtj$1@is.intellij.net...

I'm willing to help, although gone for the next week or so. I can
contribute the code I described (locate all the comments and strings in a
selection or in a file) if someone else can provide the hooks to the spell
checker and the logic to do something when a spelling error is detected.

>

Hi Dave,
I expect to start work on the integration of the spell
checker plugin later this week; initially I'm only planning on some very
simple, check current selection integration; but any insider knowledge you
can offer on PSI would be gratefully received.. Hopefully we'll be able to
get some help from Chris Millar too, who's more familiar with the Jazzy code
apparently it also needs further modification (and additional dictionaries /
phonetics files for non-English languages) most importantly it doesn't
currently support additions to the dictionaries and the code in general
needs a bit of TLC as there's not been much project activity since last
year.

I'll put up a wiki entry just as soon as we've got something working, from
there we'll gladly accept everybody's ideas and contributions; cvs seems a
bit overkill as Jazzy is already in sourceforge and Chris has cvs access -
if things get too hairy we can do the same later.

Richard

PS The kind of thing we'll need from PSI is to be able to have a word
tokenisier for the comments & strings, then be able to select any misspelt
words and prompt the user for an action. So long as we can trace a
particular words offset & range from walking the strings (or whatever) parse
tree.. we shouldn't have too many problems making this work.


0
Comment actions Permalink

Richard,

Can do. I wrote some Psi code for the tabifier plugin that visits all the
Psi elements in a selection, which we can easily adapt to this purpose.
Comments and quoted strings are parsed by IDEA into essentially a single
byte array, so we'll have to use StringTokenizer or some better way to pick
out individual words. The offset and length for each word will be
available.

I'll check in with you next Thursday when I'm back, if you can wait that
long. Otherwise, you can peek at PsiTreeUtil.java in the tabifier source.

-Dave


0
Comment actions Permalink


If you are scanning the PsiFile structure for the comments and strings, you could also create a dictionary of all the method/field/class names in the file and automatically treat those as 'correct'ly spelled. Also, would need builtin dictionary of javadoc tags.

Have you tried copying some javadoc text into MSWord, etc. and doing a spell check. It can be quite a mess even when there are no spelling errors.

-Alex

0
Comment actions Permalink

Robert S. Sfeir wrote:

So let's start with what you'd like to spell check. Obviously it's not your
code, so I'm assuming that we spell check things in java docs and comments?

R

"Chris Miller" <chris_overseas@hotmail.c0m> wrote in message
news:bb1rd1$9j5$1@is.intellij.net...

>>We needed to add a spellchecker to our current project, and Jazzy was the
>>only OS Java one I could find. Overall the integration went quite smoothly
>>and we're pretty happy with the results, although I did hit a few bugs in
>>the Jazzy code on the way. I'm pretty swamped for spare time at the


moment,

>>but I'll try to get the bug fixes into the Jazzy CVS within the next week


or

>>so (fwiw, they were fairly minor problems anyway).
>>
>>If anyone seriously wants to develop a spellchecking plugin for IDEA then
>>feel free to get in touch with me, I'll do what I can to help out.
>>
>>"charles decroes" <spam@decroes.com> wrote in message
>>news:28039371.1054083658501.JavaMail.jrun@is.intellij.net...
>>
>>>jazzy looks very cool.
>>
>>


I would also ask for possibility to check methods names, when they are
breaked apart by uppercase letters. For example, getNime should be
breaked into get and Nime, and spell checker then can point error - that
possibly Name should be used instead of Nime .

Sergey Yevtushenko

0
Comment actions Permalink

The only thing I want to spell check is String literals.

0
Comment actions Permalink

I agree, though you might have:

getNime()

If you're using that all over your code, and made the spelling error all
over the code, you'd have to refactor everything, and I'd hate to be the one
linking spell check to refactoring! :)

R

"charles decroes" <spam@decroes.com> wrote in message
news:18513535.1054285818415.JavaMail.javamailuser@localhost...

The only thing I want to spell check is String literals.



0
Comment actions Permalink

String literal seems too limited to me. I agree with Sergey. I want my java
identifiers to be checked.
The tool should understand the difference between declaration and calls. It
would only verify class,method, field and potentially local variable names
at their declaration site not at every usage. Alternatively the tool could
just only report a misspelling only once at declaration but still do a full
scan (good for fully checking one file).
Our teams include many non-English speaking developers and you would not
believe the atrocities that are sometimes left in the code (and that is with
pairing!).
The other thing the tool could do is verify acronyms and abbreviations
against a standard list.

Jacques

"Robert S. Sfeir" <robert@codepuccino.com> wrote in message
news:bb7ees$lo$1@is.intellij.net...

I agree, though you might have:

>

getNime()

>

If you're using that all over your code, and made the spelling error all
over the code, you'd have to refactor everything, and I'd hate to be the

one

linking spell check to refactoring! :)

>

R

>

"charles decroes" <spam@decroes.com> wrote in message
news:18513535.1054285818415.JavaMail.javamailuser@localhost...

The only thing I want to spell check is String literals.

>
>


0

Please sign in to leave a comment.