• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SpellingReconcileStrategy类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy的典型用法代码示例。如果您正苦于以下问题:Java SpellingReconcileStrategy类的具体用法?Java SpellingReconcileStrategy怎么用?Java SpellingReconcileStrategy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SpellingReconcileStrategy类属于org.eclipse.ui.texteditor.spelling包,在下文中一共展示了SpellingReconcileStrategy类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
@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;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:17,代码来源:PropertiesFileSourceViewerConfiguration.java


示例2: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
@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;
}
 
开发者ID:ncjones,项目名称:editorconfig-eclipse,代码行数:17,代码来源:EditorConfigSourceViewerConfiguration.java


示例3: getReconcilingStrategies

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconcilingStrategy[] getReconcilingStrategies() {
	if (store.getBoolean(Prefs.SPELLING_ENABLED)) {
		SpellingService service = new SpellingService(store);
		if (service.getActiveSpellingEngineDescriptor(store) != null) {
			IReconcilingStrategy spellStrategy = new SpellingReconcileStrategy(viewer, service);
			return new IReconcilingStrategy[] { spellStrategy };
		}
	}
	return new IReconcilingStrategy[] { new NullReconcilingStrategy() };
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:11,代码来源:MkReconcilingStrategy.java


示例4: GWTJavaSpellingReconcileStrategy

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
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);
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:14,代码来源:GWTJavaSpellingReconcileStrategy.java


示例5: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
	if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
		return null;
	}
	
	SpellingService spellingService = EditorsUI.getSpellingService();
	if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
		return null;
	}
	
	IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
		
		@Override
		protected ISpellingProblemCollector createSpellingProblemCollector() {
			final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
			
			return new ISpellingProblemCollector() {
				
				public void accept(SpellingProblem problem) {
					int offset = problem.getOffset();
					int length = problem.getLength();
					if (sourceViewer == null) {
						return;
					}
					IDocument document = sourceViewer.getDocument();
					if (document == null) {
						return;
					}
					String text;
					try {
						text = document.get(offset, length);
					} catch (BadLocationException e) {
						return;
					}
					if (new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileIgnoredWordsFilter().ignoreWord(text)) {
						return;
					}
					collector.accept(problem);
				}
				
				public void beginCollecting() {
					collector.beginCollecting();
				}
				
				public void endCollecting() {
					collector.endCollecting();
				}
			};
		}
	};
	
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setDelay(500);
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:56,代码来源:DwprofileSourceViewerConfiguration.java


示例6: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
	if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
		return null;
	}
	
	SpellingService spellingService = EditorsUI.getSpellingService();
	if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
		return null;
	}
	
	IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
		
		@Override
		protected ISpellingProblemCollector createSpellingProblemCollector() {
			final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
			
			return new ISpellingProblemCollector() {
				
				public void accept(SpellingProblem problem) {
					int offset = problem.getOffset();
					int length = problem.getLength();
					if (sourceViewer == null) {
						return;
					}
					IDocument document = sourceViewer.getDocument();
					if (document == null) {
						return;
					}
					String text;
					try {
						text = document.get(offset, length);
					} catch (BadLocationException e) {
						return;
					}
					if (new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionIgnoredWordsFilter().ignoreWord(text)) {
						return;
					}
					collector.accept(problem);
				}
				
				public void beginCollecting() {
					collector.beginCollecting();
				}
				
				public void endCollecting() {
					collector.endCollecting();
				}
			};
		}
	};
	
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setDelay(500);
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:56,代码来源:HyexpressionSourceViewerConfiguration.java


示例7: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
	if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
		return null;
	}
	
	SpellingService spellingService = EditorsUI.getSpellingService();
	if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
		return null;
	}
	
	IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
		
		@Override
		protected ISpellingProblemCollector createSpellingProblemCollector() {
			final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
			
			return new ISpellingProblemCollector() {
				
				public void accept(SpellingProblem problem) {
					int offset = problem.getOffset();
					int length = problem.getLength();
					if (sourceViewer == null) {
						return;
					}
					IDocument document = sourceViewer.getDocument();
					if (document == null) {
						return;
					}
					String text;
					try {
						text = document.get(offset, length);
					} catch (BadLocationException e) {
						return;
					}
					if (new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaIgnoredWordsFilter().ignoreWord(text)) {
						return;
					}
					collector.accept(problem);
				}
				
				public void beginCollecting() {
					collector.beginCollecting();
				}
				
				public void endCollecting() {
					collector.endCollecting();
				}
			};
		}
	};
	
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setDelay(500);
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:56,代码来源:HyvalidityformulaSourceViewerConfiguration.java


示例8: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
	if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
		return null;
	}
	
	SpellingService spellingService = EditorsUI.getSpellingService();
	if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
		return null;
	}
	
	IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
		
		@Override
		protected ISpellingProblemCollector createSpellingProblemCollector() {
			final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
			
			return new ISpellingProblemCollector() {
				
				public void accept(SpellingProblem problem) {
					int offset = problem.getOffset();
					int length = problem.getLength();
					if (sourceViewer == null) {
						return;
					}
					IDocument document = sourceViewer.getDocument();
					if (document == null) {
						return;
					}
					String text;
					try {
						text = document.get(offset, length);
					} catch (BadLocationException e) {
						return;
					}
					if (new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueIgnoredWordsFilter().ignoreWord(text)) {
						return;
					}
					collector.accept(problem);
				}
				
				public void beginCollecting() {
					collector.beginCollecting();
				}
				
				public void endCollecting() {
					collector.endCollecting();
				}
			};
		}
	};
	
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setDelay(500);
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:56,代码来源:HydatavalueSourceViewerConfiguration.java


示例9: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
	if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
		return null;
	}
	
	SpellingService spellingService = EditorsUI.getSpellingService();
	if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
		return null;
	}
	
	IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
		
		@Override
		protected ISpellingProblemCollector createSpellingProblemCollector() {
			final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
			
			return new ISpellingProblemCollector() {
				
				public void accept(SpellingProblem problem) {
					int offset = problem.getOffset();
					int length = problem.getLength();
					if (sourceViewer == null) {
						return;
					}
					IDocument document = sourceViewer.getDocument();
					if (document == null) {
						return;
					}
					String text;
					try {
						text = document.get(offset, length);
					} catch (BadLocationException e) {
						return;
					}
					if (new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingIgnoredWordsFilter().ignoreWord(text)) {
						return;
					}
					collector.accept(problem);
				}
				
				public void beginCollecting() {
					collector.beginCollecting();
				}
				
				public void endCollecting() {
					collector.endCollecting();
				}
			};
		}
	};
	
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setDelay(500);
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:56,代码来源:HymappingSourceViewerConfiguration.java


示例10: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
	if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
		return null;
	}
	
	SpellingService spellingService = EditorsUI.getSpellingService();
	if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
		return null;
	}
	
	IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
		
		@Override
		protected ISpellingProblemCollector createSpellingProblemCollector() {
			final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
			
			return new ISpellingProblemCollector() {
				
				public void accept(SpellingProblem problem) {
					int offset = problem.getOffset();
					int length = problem.getLength();
					if (sourceViewer == null) {
						return;
					}
					IDocument document = sourceViewer.getDocument();
					if (document == null) {
						return;
					}
					String text;
					try {
						text = document.get(offset, length);
					} catch (BadLocationException e) {
						return;
					}
					if (new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsIgnoredWordsFilter().ignoreWord(text)) {
						return;
					}
					collector.accept(problem);
				}
				
				public void beginCollecting() {
					collector.beginCollecting();
				}
				
				public void endCollecting() {
					collector.endCollecting();
				}
			};
		}
	};
	
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setDelay(500);
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:56,代码来源:HyconstraintsSourceViewerConfiguration.java


示例11: getReconciler

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
public IReconciler getReconciler(final ISourceViewer sourceViewer) {
	if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
		return null;
	}
	
	SpellingService spellingService = EditorsUI.getSpellingService();
	if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
		return null;
	}
	
	IReconcilingStrategy strategy = new SpellingReconcileStrategy(sourceViewer, spellingService) {
		
		@Override
		protected ISpellingProblemCollector createSpellingProblemCollector() {
			final ISpellingProblemCollector collector = super.createSpellingProblemCollector();
			
			return new ISpellingProblemCollector() {
				
				public void accept(SpellingProblem problem) {
					int offset = problem.getOffset();
					int length = problem.getLength();
					if (sourceViewer == null) {
						return;
					}
					IDocument document = sourceViewer.getDocument();
					if (document == null) {
						return;
					}
					String text;
					try {
						text = document.get(offset, length);
					} catch (BadLocationException e) {
						return;
					}
					if (new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestIgnoredWordsFilter().ignoreWord(text)) {
						return;
					}
					collector.accept(problem);
				}
				
				public void beginCollecting() {
					collector.beginCollecting();
				}
				
				public void endCollecting() {
					collector.endCollecting();
				}
			};
		}
	};
	
	MonoReconciler reconciler = new MonoReconciler(strategy, false);
	reconciler.setDelay(500);
	return reconciler;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:56,代码来源:HymanifestSourceViewerConfiguration.java


示例12: testPrivateFields

import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:15,代码来源:GWTJavaSpellingReconcileStrategyTest.java



注:本文中的org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java OpaqueClassFile类代码示例发布时间:2022-05-22
下一篇:
Java AlfrescoTransactionSupport类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap