Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.texteditor.spelling
Class SpellingProblem

java.lang.Object
  extended by 
org.eclipse.ui.texteditor.spelling.SpellingProblem

public abstract class SpellingProblem
extends Object

A spelling problem as reported by the SpellingService service to the ISpellingProblemCollector.

This class is intended to be subclassed by clients.

Since:
3.1
See Also:
SpellingService, ISpellingProblemCollector

Constructor Summary
SpellingProblem ()
           
 
Method Summary
abstract  int getLength ()
          Returns the length of the incorrectly spelled region.
abstract   String getMessage ()
          Returns a localized, human-readable message string which describes the spelling problem.
abstract  int getOffset ()
          Returns the offset of the incorrectly spelled region.
abstract   ICompletionProposal[] getProposals ()
          Returns the proposals for the incorrectly spelled region.
  ICompletionProposal[] getProposals ( IQuickAssistInvocationContext context)
          Returns the proposals for the incorrectly spelled region.
static void removeAll ( ISourceViewer sourceViewer, String word)
          Removes all spelling problems that are reported for the given word in the active editor.
static void removeAllInActiveEditor ( ITextEditor editor, String word)
          Deprecated. As of 3.4, replaced by removeAll(ISourceViewer, String)
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpellingProblem

public SpellingProblem()
Method Detail

removeAllInActiveEditor

public static void removeAllInActiveEditor(
ITextEditor editor,
                                           
String word)
Deprecated. As of 3.4, replaced by removeAll(ISourceViewer, String)

Removes all spelling problems that are reported for the given word in the active editor.

This a workaround to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=134338 for 3.2 at the time where spelling still resides in JDT Text. Once we move the spell check engine along with its quick fixes down to Platform Text we need to provide the proposals with a way to access the annotation model.

Parameters:
editor - the text editor, if null this method does nothing
word - the word for which to remove the problems or null to remove all
Since:
3.3

removeAll

public static void removeAll(
ISourceViewer sourceViewer,
                             
String word)
Removes all spelling problems that are reported for the given word in the active editor.

Parameters:
sourceViewer - the source viewer
word - the word for which to remove the problems or null to remove all
Since:
3.4

getOffset

public abstract int getOffset()
Returns the offset of the incorrectly spelled region.

Returns:
the offset of the incorrectly spelled region

getLength

public abstract int getLength()
Returns the length of the incorrectly spelled region.

Returns:
the length of the incorrectly spelled region

getMessage

public abstract 
String getMessage()
Returns a localized, human-readable message string which describes the spelling problem.

Returns:
a localized, human-readable message string which describes the spelling problem

getProposals

public abstract 
ICompletionProposal[] getProposals()
Returns the proposals for the incorrectly spelled region.

Returns:
the proposals for the incorrectly spelled region

getProposals

public 
ICompletionProposal[] getProposals(
IQuickAssistInvocationContext context)
Returns the proposals for the incorrectly spelled region.

Parameters:
context - the invocation context or null if none
Returns:
the proposals for the incorrectly spelled region
Since:
3.4

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire