1 20 package org.apache.directory.ldapstudio.schemas.view.views; 21 22 23 import org.apache.directory.ldapstudio.schemas.Activator; 24 import org.eclipse.jface.text.IDocument; 25 import org.eclipse.jface.text.presentation.IPresentationReconciler; 26 import org.eclipse.jface.text.presentation.PresentationReconciler; 27 import org.eclipse.jface.text.rules.DefaultDamagerRepairer; 28 import org.eclipse.jface.text.source.ISourceViewer; 29 import org.eclipse.jface.text.source.SourceViewerConfiguration; 30 31 32 38 public class SchemaSourceViewerConfiguration extends SourceViewerConfiguration 39 { 40 43 public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer ) 44 { 45 PresentationReconciler reconciler = new PresentationReconciler(); 46 reconciler.setDocumentPartitioning( getConfiguredDocumentPartitioning( sourceViewer ) ); 47 48 DefaultDamagerRepairer dr = new DefaultDamagerRepairer( Activator.getSchemaCodeScanner() ); 50 reconciler.setDamager( dr, IDocument.DEFAULT_CONTENT_TYPE ); 51 reconciler.setRepairer( dr, IDocument.DEFAULT_CONTENT_TYPE ); 52 53 return reconciler; 54 } 55 } 56 | Popular Tags |