下面列出了怎么用org.eclipse.jface.text.presentation.IPresentationDamager的API类实例代码及写法,或者点击链接到github查看源代码。
@Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
XtextPresentationReconciler reconciler = getPresentationReconcilerProvider().get();
reconciler.setDocumentPartitioning(getDocumentPartitioning(sourceViewer));
IPresentationRepairer repairer = repairerProvider.get();
IPresentationDamager damager = damagerProvider.get();
String[] types = partitionTypesMapper.getSupportedPartitionTypes();
for (String partitionType : types) {
reconciler.setRepairer(repairer, partitionType);
reconciler.setDamager(damager, partitionType);
}
return reconciler;
}
@Override
public IPresentationDamager getDamager(String contentType) {
return null;
}
protected Tester(IPresentationDamager damager) {
this.damager = damager;
doc = createDocument("");
damager.setDocument(doc);
doc.addDocumentListener(this);
}
protected IPresentationDamager createRegionDamager() {
return new PresentationDamager();
}
public Class<? extends IPresentationDamager> bindIPresentationDamager() {
return PresentationDamager.class;
}
protected IPresentationDamager createRegionDamager() {
return new PresentationDamager();
}
protected IPresentationDamager createRegionDamager() {
return new PresentationDamager();
}