@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); DefaultDamagerRepairer dr = new DefaultDamagerRepairer(fPropertyKeyScanner); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr = new DefaultDamagerRepairer(fPropertyValueScanner); reconciler.setDamager(dr, ManifestPartitionScanner.MANIFEST_HEADER_VALUE); reconciler.setRepairer(dr, ManifestPartitionScanner.MANIFEST_HEADER_VALUE); return reconciler; }
/** * Processes the given damage. * @param damage the damage to be repaired * @param document the document whose presentation must be repaired */ private void processDamage(IRegion damage, IDocument document) { if (damage != null && damage.getLength() > 0) { TextPresentation p= createPresentation(damage, document); if (p != null) applyTextRegionCollection(p); } }
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); SimpleDamagerRepairer dr = new SimpleDamagerRepairer(); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); return reconciler; }
private void configureReconciler(PresentationReconciler reconciler, String partitionType, ITokenScanner scanner) { DefaultDamagerRepairer dr; dr = new DefaultDamagerRepairer(scanner); reconciler.setDamager(dr, partitionType); reconciler.setRepairer(dr, partitionType); }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new ScriptPresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); DefaultDamagerRepairer dr = new DefaultDamagerRepairer(this.fCodeScanner); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr = new DefaultDamagerRepairer(getStringScanner()); reconciler.setDamager(dr, RutaPartitions.RUTA_STRING); reconciler.setRepairer(dr, RutaPartitions.RUTA_STRING); dr = new DefaultDamagerRepairer(getCommentScanner()); reconciler.setDamager(dr, RutaPartitions.RUTA_COMMENT); reconciler.setRepairer(dr, RutaPartitions.RUTA_COMMENT); return reconciler; }
private void createAndInstallPresentationReconciler() { presentationReconciler = new PresentationReconciler(); DamageRepairer dr = new DamageRepairer(new DynamicRuleBasedScanner(store.getString(ILogViewerConstants.PREF_COLORING_ITEMS))); presentationReconciler.setDamager(dr,IDocument.DEFAULT_CONTENT_TYPE); presentationReconciler.setRepairer(dr,IDocument.DEFAULT_CONTENT_TYPE); presentationReconciler.install(txtViewer); }
/** * 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; }
public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); configureReconciler(reconciler, IDocument.DEFAULT_CONTENT_TYPE, getBndScanner()); configureReconciler(reconciler, SINGLELINE_COMMENT_TYPE, getMultiLineCommentScanner()); return reconciler; }
public TextPresentation createRepairDescription(IRegion damage, IDocument document) { if (document != fLastDocument) { setDocumentToDamagers(document); setDocumentToRepairers(document); fLastDocument= document; } return super.createPresentation(new Region(0, document.getLength()), document); } }
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler= new JavaPresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); DefaultDamagerRepairer dr= new DefaultDamagerRepairer(getPropertyKeyScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr= new DefaultDamagerRepairer(getCommentScanner()); reconciler.setDamager(dr, IPropertiesFilePartitions.COMMENT); reconciler.setRepairer(dr, IPropertiesFilePartitions.COMMENT); dr= new DefaultDamagerRepairer(getPropertyValueScanner()); reconciler.setDamager(dr, IPropertiesFilePartitions.PROPERTY_VALUE); reconciler.setRepairer(dr, IPropertiesFilePartitions.PROPERTY_VALUE); return reconciler; }
/** * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer) */ public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer ) { if ( damagerRepairer == null ) { damagerRepairer = new FilterDamagerRepairer( parser ); } if ( presentationReconciler == null ) { presentationReconciler = new PresentationReconciler(); presentationReconciler.setDamager( damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE ); presentationReconciler.setRepairer( damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE ); } return presentationReconciler; }
private void configureReconciler(PresentationReconciler reconciler, String partitionType, ITokenScanner scanner) { DefaultDamagerRepairer dr; dr = new DefaultDamagerRepairer(scanner); reconciler.setDamager(dr, partitionType); reconciler.setRepairer(dr, partitionType); }
/** * 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; }
public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); configureReconciler(reconciler, IDocument.DEFAULT_CONTENT_TYPE, getBndScanner()); configureReconciler(reconciler, SINGLELINE_COMMENT_TYPE, getMultiLineCommentScanner()); return reconciler; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); MarkupViewerDamagerRepairer dr = createMarkupViewerDamagerRepairer(); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); return reconciler; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler= new JavaPresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); DefaultDamagerRepairer dr= new DefaultDamagerRepairer(getPropertyKeyScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr= new DefaultDamagerRepairer(getCommentScanner()); reconciler.setDamager(dr, IPropertiesFilePartitions.COMMENT); reconciler.setRepairer(dr, IPropertiesFilePartitions.COMMENT); dr= new DefaultDamagerRepairer(getPropertyValueScanner()); reconciler.setDamager(dr, IPropertiesFilePartitions.PROPERTY_VALUE); reconciler.setRepairer(dr, IPropertiesFilePartitions.PROPERTY_VALUE); return reconciler; }
public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer ){ PresentationReconciler pr = new PresentationReconciler(); DefaultDamagerRepairer dr = new YEditDamageRepairer(getScanner() ); pr.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); pr.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); return pr; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { MDScanner scanner = new MDScanner(colorManager); PresentationReconciler pr = (PresentationReconciler) super.getPresentationReconciler(sourceViewer); // FIXME DefaultDamagerRepairer ddr = new DefaultDamagerRepairer(scanner); pr.setRepairer(ddr, IDocument.DEFAULT_CONTENT_TYPE); pr.setDamager(ddr, IDocument.DEFAULT_CONTENT_TYPE); return pr; }
/** * Processes the given damage. * @param damage the damage to be repaired * @param document the document whose presentation must be repaired */ private void processDamage(IRegion damage, IDocument document) { if (damage != null && damage.getLength() > 0) { TextPresentation p= createPresentation(damage, document); if (p != null) applyTextRegionCollection(p); } }
/** * {@inheritDoc} */ public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer ) { if ( this.presentationReconciler == null ) { this.presentationReconciler = new PresentationReconciler(); this.presentationReconciler.setDocumentPartitioning( getConfiguredDocumentPartitioning( sourceViewer ) ); damagerRepairer = new LdifDamagerRepairer( this.editor ); this.presentationReconciler.setDamager( damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE ); this.presentationReconciler.setRepairer( damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE ); this.presentationReconciler.setDamager( damagerRepairer, LdifPartitionScanner.LDIF_RECORD ); this.presentationReconciler.setRepairer( damagerRepairer, LdifPartitionScanner.LDIF_RECORD ); } return this.presentationReconciler; }