org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy Java Examples
The following examples show how to use
org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PropertiesFileSourceViewerConfiguration.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { if (!EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; IReconcilingStrategy strategy= new SpellingReconcileStrategy(sourceViewer, EditorsUI.getSpellingService()) { @Override protected IContentType getContentType() { return PROPERTIES_CONTENT_TYPE; } }; MonoReconciler reconciler= new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
Example #2
Source File: EditorConfigSourceViewerConfiguration.java From editorconfig-eclipse with Apache License 2.0 | 6 votes |
@Override public IReconciler getReconciler(ISourceViewer sourceViewer) { if (!EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) return null; IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, EditorsUI.getSpellingService()) { @Override protected IContentType getContentType() { return EditorConfigTextTools.EDITORCONFIG_CONTENT_TYPE; } }; MonoReconciler reconciler = new MonoReconciler(strategy, false); reconciler.setDelay(500); return reconciler; }
Example #3
Source File: GWTJavaSpellingReconcileStrategy.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
public GWTJavaSpellingReconcileStrategy(ISourceViewer viewer, ITextEditor editor) { super(viewer, editor); try { // Reflectively set the spelling service to our own Field spellingServiceField = SpellingReconcileStrategy.class.getDeclaredField("fSpellingService"); spellingServiceField.setAccessible(true); spellingServiceField.set(this, GWTSpellingService.getSpellingService()); } catch (Exception e) { GWTPluginLog.logError(e); } }
Example #4
Source File: GWTJavaSpellingReconcileStrategyTest.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 2 votes |
/** * Verify that * {@link org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy} * contains the private fields we access reflectively in * {@link GWTJavaSpellingReconcileStrategy}. * * @throws NoSuchFieldException * @throws SecurityException */ public void testPrivateFields() throws SecurityException, NoSuchFieldException { Field spellingServiceField = SpellingReconcileStrategy.class.getDeclaredField("fSpellingService"); spellingServiceField.setAccessible(true); }