Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.fifesoft:spellchecker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.fifesoft:spellchecker

A simple spell checker add-on for RSyntaxTextArea. It will spell-check comments in source code, or the entire file if you are editing plain text. Spelling errors are squiggle-underlined with the color of your choice, and tooltips are available offering any spelling suggestions.

  • 3.3.1
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

SpellChecker

Build CodeQL

SpellChecker is a spell check add-on for RSyntaxTextArea. For programming languages, it spell-checks text in comments, and when editing plain text files, the entire file is spell-checked. Spelling errors are squiggle-underlined in the color of your choosing, and hovering the mouse over a misspelled word displays a tool tip with suggested fixes (if any). You can configure the library to also use a "user dictionary" file, allowing the user to add extra words to the spell check white list.

This add-on is based on Jazzy, a Java spell checker. Indeed, 99% of the code is just Jazzy, with changes made for performance, bug fixes, and Java 8 syntax.

This library is built with Java 8. Using a more recent version of Java will result in compile warnings, but the build should still complete. Cleaning up these warnings is not a priority as long as this library targets Java 8.

Getting a dictionary file

While the SpellingParser class can take any implementation of the SpellDictionary interface, typically English users will use one of the SpellingParser.createEnglishSpellingParser() overloads. These overloads take a zip file containing .dic files for either American or British English. Such a zip file is generated by this library when running ./gradlew clean build - src/main/dist/english_dic.zip. This file is not source controlled, but the .dic files that make up its contents are, so we can easily track added words over time.

Usage

As mentioned above, building this project builds an english_dic.zip file that can be used for both American and British English spellchecking. Using this zip file, the easiest method to add spell checking to RSTA is as follows:

import org.fife.ui.rsyntaxtextarea.spell.*;
// ...
File zip = new File("location/of/generated/english_dic.zip");
boolean usEnglish = true; // "false" will use British English
SpellingParser parser = SpellingParser.createEnglishSpellingParser(zip, usEnglish);
textArea.addParser(parser);

See the SpellCheckerDemo submodule for a working example.

Just like Jazzy itself, this add-on is licensed under the LGPL; see the included LICENSE.md file.

Sister Projects

  • RSyntaxTextArea provides syntax highlighting, code folding, and many other features out-of-the-box.
  • AutoComplete - Adds code completion to RSyntaxTextArea (or any other JTextComponent).
  • RSTALanguageSupport - Code completion for RSTA for the following languages: Java, JavaScript, HTML, PHP, JSP, Perl, C, Unix Shell. Built on both RSTA and AutoComplete.
  • RSTAUI - Common dialogs needed by text editing applications: Find, Replace, Go to Line, File Properties.

FAQs

Package last updated on 18 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc