Java 类org.eclipse.ui.texteditor.spelling.ISpellingEngine 实例源码

项目:gwt-eclipse-plugin    文件:GWTJavaSpellingReconcileStrategy.java   
@Override
public SpellingEngineDescriptor getActiveSpellingEngineDescriptor(
    IPreferenceStore preferences) {
  // Create dummy IConfigurationElement subclass so we have a non-null
  // instance to pass to the ctor of the anonymous subclass of
  // SpellingEngineDescriptor below
  IConfigurationElement configElement = new DummyConfigurationElement();

  // Dummy descriptor that always creates our spelling engine
  return new SpellingEngineDescriptor(configElement) {
    @Override
    public ISpellingEngine createEngine() throws CoreException {
      return new GWTSpellingEngine();
    }
  };
}
项目:Eclipse-Postfix-Code-Completion    文件:DefaultSpellingEngine.java   
public void check(IDocument document, IRegion[] regions, SpellingContext context, ISpellingProblemCollector collector, IProgressMonitor monitor) {
    ISpellingEngine engine= getEngine(context.getContentType());
    if (engine == null)
        engine= getEngine(TEXT_CONTENT_TYPE);
    if (engine != null)
        engine.check(document, regions, context, collector, monitor);
}
项目:Eclipse-Postfix-Code-Completion    文件:DefaultSpellingEngine.java   
/**
 * Returns a spelling engine for the given content type or
 * <code>null</code> if none could be found.
 *
 * @param contentType the content type
 * @return a spelling engine for the given content type or
 *         <code>null</code> if none could be found
 */
private ISpellingEngine getEngine(IContentType contentType) {
    if (contentType == null)
        return null;

    if (fEngines.containsKey(contentType))
        return fEngines.get(contentType);

    return getEngine(contentType.getBaseType());
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:DefaultSpellingEngine.java   
public void check(IDocument document, IRegion[] regions, SpellingContext context, ISpellingProblemCollector collector, IProgressMonitor monitor) {
    ISpellingEngine engine= getEngine(context.getContentType());
    if (engine == null)
        engine= getEngine(TEXT_CONTENT_TYPE);
    if (engine != null)
        engine.check(document, regions, context, collector, monitor);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:DefaultSpellingEngine.java   
/**
 * Returns a spelling engine for the given content type or
 * <code>null</code> if none could be found.
 *
 * @param contentType the content type
 * @return a spelling engine for the given content type or
 *         <code>null</code> if none could be found
 */
private ISpellingEngine getEngine(IContentType contentType) {
    if (contentType == null)
        return null;

    if (fEngines.containsKey(contentType))
        return fEngines.get(contentType);

    return getEngine(contentType.getBaseType());
}
项目:eclipse.spellchecker    文件:DefaultSpellingEngine.java   
public void check(IDocument document, IRegion[] regions, SpellingContext context, ISpellingProblemCollector collector, IProgressMonitor monitor) {
    ISpellingEngine engine= getEngine(context.getContentType());
    if (engine == null)
        engine= getEngine(TEXT_CONTENT_TYPE);
    if (engine != null)
        engine.check(document, regions, context, collector, monitor);
}
项目:eclipse.spellchecker    文件:DefaultSpellingEngine.java   
/**
 * Returns a spelling engine for the given content type or
 * <code>null</code> if none could be found.
 *
 * @param contentType the content type
 * @return a spelling engine for the given content type or
 *         <code>null</code> if none could be found
 */
private ISpellingEngine getEngine(IContentType contentType) {
    if (contentType == null)
        return null;

    if (fEngines.containsKey(contentType))
        return fEngines.get(contentType);

    return getEngine(contentType.getBaseType());
}