use of org.eclipse.jface.text.presentation.IPresentationReconciler in project eclipse.platform.text by eclipse.
the class PresentationReconcilerRegistry method sync.
private void sync() {
Set<IConfigurationElement> toRemoveExtensions = new HashSet<>(this.extensions.keySet());
for (IConfigurationElement extension : Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_POINT_ID)) {
toRemoveExtensions.remove(extension);
if (!this.extensions.containsKey(extension)) {
try {
this.extensions.put(extension, new GenericContentTypeRelatedExtension<IPresentationReconciler>(extension));
} catch (Exception ex) {
GenericEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, GenericEditorPlugin.BUNDLE_ID, ex.getMessage(), ex));
}
}
}
for (IConfigurationElement toRemove : toRemoveExtensions) {
this.extensions.remove(toRemove);
}
this.outOfSync = false;
}
use of org.eclipse.jface.text.presentation.IPresentationReconciler in project eclipse.platform.text by eclipse.
the class SourceViewerConfiguration method getPresentationReconciler.
/**
* Returns the presentation reconciler ready to be used with the given source viewer.
*
* @param sourceViewer the source viewer
* @return the presentation reconciler or <code>null</code> if presentation reconciling should not be supported
*/
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler = new PresentationReconciler();
reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
return reconciler;
}
Aggregations