本文整理汇总了Java中org.eclipse.jface.text.reconciler.IReconciler.install方法的典型用法代码示例。如果您正苦于以下问题:Java IReconciler.install方法的具体用法?Java IReconciler.install怎么用?Java IReconciler.install使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.text.reconciler.IReconciler
的用法示例。
在下文中一共展示了IReconciler.install方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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();
}
}
示例3: 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);
}
示例4: internalDoSetInput
import org.eclipse.jface.text.reconciler.IReconciler; //导入方法依赖的package包/类
private void internalDoSetInput(IEditorInput input) throws CoreException {
ISourceViewer sourceViewer= getSourceViewer();
JavaSourceViewer javaSourceViewer= null;
if (sourceViewer instanceof JavaSourceViewer)
javaSourceViewer= (JavaSourceViewer)sourceViewer;
IPreferenceStore store= getPreferenceStore();
if (javaSourceViewer != null && isFoldingEnabled() &&(store == null || !store.getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS)))
javaSourceViewer.prepareDelayedProjection();
super.doSetInput(input);
if (javaSourceViewer != null && javaSourceViewer.getReconciler() == null) {
IReconciler reconciler= getSourceViewerConfiguration().getReconciler(javaSourceViewer);
if (reconciler != null) {
reconciler.install(javaSourceViewer);
javaSourceViewer.setReconciler(reconciler);
}
}
if (fEncodingSupport != null)
fEncodingSupport.reset();
setOutlinePageInput(fOutlinePage, input);
if (isShowingOverrideIndicators())
installOverrideIndicator(false);
}