public abstract class BaseLanguageToolBridge extends java.lang.Object implements ILanguageToolBridge
If the subclass throws an exception, the bridge will log the exception and then simply return empty results from then on. This is OK because the bridge is recreated on project load, so in the case of temporary issues the user can just reload the project to restore functionality.
This failsafe is required because LanguageTool checks are called automatically and in large batches, so if an exception is thrown it will likely be thrown repeatedly for all invocations. Especially in the case of the network bridge we would otherwise spam the remote server or even DDoS it.
Constructor and Description |
---|
BaseLanguageToolBridge() |
Modifier and Type | Method and Description |
---|---|
java.util.List<LanguageToolResult> |
getCheckResults(java.lang.String sourceText,
java.lang.String translationText)
Get marks for Entry
|
protected abstract java.util.List<LanguageToolResult> |
getCheckResultsImpl(java.lang.String sourceText,
java.lang.String translationText) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRuleFilters, stop
public final java.util.List<LanguageToolResult> getCheckResults(java.lang.String sourceText, java.lang.String translationText)
ILanguageToolBridge
getCheckResults
in interface ILanguageToolBridge
protected abstract java.util.List<LanguageToolResult> getCheckResultsImpl(java.lang.String sourceText, java.lang.String translationText) throws java.lang.Exception
java.lang.Exception