本文整理汇总了Java中org.eclipse.jface.text.reconciler.IReconciler类的典型用法代码示例。如果您正苦于以下问题:Java IReconciler类的具体用法?Java IReconciler怎么用?Java IReconciler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IReconciler类属于org.eclipse.jface.text.reconciler包,在下文中一共展示了IReconciler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: install
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
@Override
public void install(ITextViewer textViewer) {
if (fStrategies == null)
return;
for (int i = 0; i < fStrategies.length; i++) {
if (fStrategies[i] instanceof IReconciler) {
IReconciler extension = (IReconciler) fStrategies[i];
try {
extension.install(textViewer);
} catch (Exception e) {
}
}
}
}
示例2: uninstall
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
@Override
public void uninstall() {
if (fStrategies == null)
return;
for (int i = 0; i < fStrategies.length; i++) {
if (fStrategies[i] instanceof IReconciler) {
IReconciler extension = (IReconciler) fStrategies[i];
try {
extension.uninstall();
} catch (Exception e) {
}
}
}
}
示例3: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
/**
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getReconciler(org.eclipse.jface.text.source.ISourceViewer)
*/
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED))
return null;
if (!TexlipsePlugin.getDefault().getPreferenceStore().getBoolean(TexlipseProperties.ECLIPSE_BUILDIN_SPELLCHECKER))
return null;
//Set TeXlipse spelling Engine as default
PreferenceStore store = new PreferenceStore();
store.setValue(SpellingService.PREFERENCE_SPELLING_ENGINE,
"org.eclipse.texlipse.LaTeXSpellEngine");
store.setValue(SpellingService.PREFERENCE_SPELLING_ENABLED,
true);
SpellingService spellingService = new SpellingService(store);
if (spellingService.getActiveSpellingEngineDescriptor(store) == null)
return null;
IReconcilingStrategy strategy= new TeXSpellingReconcileStrategy(sourceViewer, spellingService);
MonoReconciler reconciler= new MonoReconciler(strategy, true);
reconciler.setDelay(500);
reconciler.setProgressMonitor(new NullProgressMonitor());
return reconciler;
}
示例4: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的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
示例5: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的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;
}
示例6: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
if (fPreferenceStore == null || !fPreferenceStore.getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) {
return null;
}
SpellingService spellingService = EditorsUI.getSpellingService();
if (spellingService.getActiveSpellingEngineDescriptor(fPreferenceStore) == null) {
return null;
}
//Overridden (just) to return a PyReconciler!
IReconcilingStrategy strategy = new PyReconciler(sourceViewer, spellingService);
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setIsIncrementalReconciler(false);
reconciler.setProgressMonitor(new NullProgressMonitor());
reconciler.setDelay(500);
return reconciler;
}
示例7: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
/**
* @param store
* @param coreStore
*/
// public ITPSourceViewerConfig(IPreferenceStore store, Preferences coreStore)
// {
// super(store, coreStore/*
// * , CommonSourceViewerConfiguration.CODESCANNER_TYPE_ITP
// */);
// }
public IReconciler getReconciler(ISourceViewer sourceViewer)
{
CommonReconcilingStrategy strategy = new ItpReconcilingStrategy(fEditor);
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setProgressMonitor(new NullProgressMonitor());
reconciler.setDelay(500);
return reconciler;
}
示例8: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
MonoReconciler reconciler = new MonoReconciler(new EiffelReconcilingStrategy(), true);
reconciler.install(sourceViewer);
return reconciler;
}
示例9: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
public IReconciler getReconciler(ISourceViewer sourceViewer) {
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setIsIncrementalReconciler(false);
reconciler.setProgressMonitor(new NullProgressMonitor());
reconciler.setDelay(200);
return reconciler;
}
示例10: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
/**
*
*/
public IReconciler getReconciler(ISourceViewer sourceViewer)
{
TLAReconcilingStrategy strategy = new TLAReconcilingStrategy();
strategy.setEditor(editor);
MonoReconciler reconciler = new MonoReconciler(strategy, false);
return reconciler;
}
示例11: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
public IReconciler getReconciler(ISourceViewer sourceViewer) {
NCLReconcilingStrategy strategy = new NCLReconcilingStrategy();
strategy.setEditor(editor);
MonoReconciler reconciler = new MonoReconciler(strategy, false);
return reconciler;
}
示例12: doSetInput
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
@Override
protected void doSetInput(IEditorInput input) throws CoreException {
if (getDocument() != null) getDocument().removeDocumentListener(docListener);
setPreferenceStore(getPrefsStore());
super.doSetInput(input);
IDocument doc = getDocumentProvider().getDocument(input);
// check and correct line endings
String tmp = doc.get();
int hash = tmp.hashCode();
tmp = Strings.normalize(tmp);
if (hash != tmp.hashCode()) doc.set(tmp);
connectPartitioningToElement(input, doc);
FluentMkSourceViewer sourceViewer = (FluentMkSourceViewer) getSourceViewer();
if (sourceViewer != null && sourceViewer.getReconciler() == null) {
IReconciler reconciler = getSourceViewerConfiguration().getReconciler(sourceViewer);
if (reconciler != null) {
reconciler.install(sourceViewer);
sourceViewer.setReconciler(reconciler);
}
}
// Attach listener to new doc
getDocument().addDocumentListener(docListener);
installSemanticHighlighting();
// Initialize code folding
if (projectionProvider != null) {
projectionProvider.initialize();
}
}
示例13: getReconciler
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
@Override
public IReconciler getReconciler(ISourceViewer viewer) {
if (editor != null && editor.isEditable()) {
MkReconcilingStrategy strategy = new MkReconcilingStrategy(viewer, editor,
getConfiguredDocumentPartitioning(viewer));
MonoReconciler reconciler = new MonoReconciler(strategy, false);
reconciler.setProgressMonitor(new ProgressMonitorAndCanceler());
reconciler.setDelay(500);
return reconciler;
}
return null;
}
示例14: internalDoSetInput
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
private void internalDoSetInput(IEditorInput input) throws CoreException {
ISourceViewer sourceViewer = getSourceViewer();
TypeScriptSourceViewer TypeScriptSourceViewer = null;
if (sourceViewer instanceof TypeScriptSourceViewer)
TypeScriptSourceViewer = (TypeScriptSourceViewer) sourceViewer;
IPreferenceStore store = getPreferenceStore();
// if (TypeScriptSourceViewer != null && isFoldingEnabled() &&(store ==
// null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS)))
// TypeScriptSourceViewer.prepareDelayedProjection();
super.doSetInput(input);
if (TypeScriptSourceViewer != null && TypeScriptSourceViewer.getReconciler() == null) {
IReconciler reconciler = getSourceViewerConfiguration().getReconciler(TypeScriptSourceViewer);
if (reconciler != null) {
reconciler.install(TypeScriptSourceViewer);
TypeScriptSourceViewer.setReconciler(reconciler);
}
}
// if (fEncodingSupport != null)
// fEncodingSupport.reset();
// setOutlinePageInput(fOutlinePage, input);
//
// if (isShowingOverrideIndicators())
// installOverrideIndicator(false);
}
示例15: getAdapter
import org.eclipse.jface.text.reconciler.IReconciler; //导入依赖的package包/类
/**
* @since 2.3
*/
@SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
if (IReconciler.class.isAssignableFrom(adapter)) {
return fReconciler;
}
return Platform.getAdapterManager().getAdapter(this, adapter);
}