use of org.eclipse.jface.text.reconciler.IReconciler in project eclipse.platform.text by eclipse.
the class ReconcilerRegistry method syncHighlight.
private void syncHighlight() {
Set<IConfigurationElement> toRemoveExtensions = new HashSet<>(this.extensions.keySet());
for (IConfigurationElement extension : Platform.getExtensionRegistry().getConfigurationElementsFor(HIGHLIGHT_EXTENSION_POINT_ID)) {
toRemoveExtensions.remove(extension);
if (!this.highlightExtensions.containsKey(extension)) {
try {
this.highlightExtensions.put(extension, new GenericContentTypeRelatedExtension<IReconciler>(extension));
} catch (Exception ex) {
GenericEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, GenericEditorPlugin.BUNDLE_ID, ex.getMessage(), ex));
}
}
}
for (IConfigurationElement toRemove : toRemoveExtensions) {
this.highlightExtensions.remove(toRemove);
}
this.highlightOutOfSync = false;
}
use of org.eclipse.jface.text.reconciler.IReconciler in project eclipse.platform.text by eclipse.
the class ReconcilerRegistry 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<IReconciler>(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.reconciler.IReconciler in project linuxtools by eclipse.
the class DockerConfiguration method getReconciler.
@Override
public IReconciler getReconciler(ISourceViewer sourceViewer) {
Reconciler reconciler = new Reconciler();
IReconcilingStrategy strategy = new SyntaxReconcilingStrategy(editor);
reconciler.setReconcilingStrategy(strategy, IDocument.DEFAULT_CONTENT_TYPE);
return reconciler;
}
Aggregations