private void configureReconciler(PresentationReconciler reconciler, String partitionType, ITokenScanner scanner) { DefaultDamagerRepairer dr; dr = new DefaultDamagerRepairer(scanner); reconciler.setDamager(dr, partitionType); reconciler.setRepairer(dr, partitionType); }
private void configureReconciler(PresentationReconciler reconciler, String partitionType, ITokenScanner scanner) { DefaultDamagerRepairer dr; dr = new DefaultDamagerRepairer(scanner); reconciler.setDamager(dr, partitionType); reconciler.setRepairer(dr, partitionType); }
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; }
@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(fCommentScanner); reconciler.setDamager(dr, COMMENT); reconciler.setRepairer(dr, COMMENT); dr = new DefaultDamagerRepairer(fPropertyValueScanner); reconciler.setDamager(dr, PROPERTY_VALUE); reconciler.setRepairer(dr, PROPERTY_VALUE); return reconciler; }
@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; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); MarkupDamagerRepairer damagerRepairer = new MarkupDamagerRepairer(getMarkupScanner()); for (String partitionType : FastMarkupPartitioner.ALL_CONTENT_TYPES) { reconciler.setDamager(damagerRepairer, partitionType); reconciler.setRepairer(damagerRepairer, partitionType); } reconciler.setDamager(damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(damagerRepairer, IDocument.DEFAULT_CONTENT_TYPE); 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; }
/** * {@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; }
@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; }
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) { 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; }
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; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getXMLTagScanner()); reconciler.setDamager(dr, XMLPartitionScanner.XML_TAG); reconciler.setRepairer(dr, XMLPartitionScanner.XML_TAG); dr = new DefaultDamagerRepairer(getXMLScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); NonRuleBasedDamagerRepairer ndr = new NonRuleBasedDamagerRepairer(new TextAttribute( colorManager.getColor(IXMLColorConstants.XML_COMMENT))); reconciler.setDamager(ndr, XMLPartitionScanner.XML_COMMENT); reconciler.setRepairer(ndr, XMLPartitionScanner.XML_COMMENT); return reconciler; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); reconciler.setDocumentPartitioning(XMLDocumentSetupParticpant.XML_PARTITIONING); MultilineDamagerRepairer dr = new MultilineDamagerRepairer(getPDEScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr = new MultilineDamagerRepairer(getPDETagScanner()); reconciler.setDamager(dr, XMLPartitionScanner.XML_TAG); reconciler.setRepairer(dr, XMLPartitionScanner.XML_TAG); fXMLCommentAttr = BasePDEScanner.createTextAttribute(fColorManager, IPDEColorConstants.P_XML_COMMENT); fDamagerRepairer = new MultilineDamagerRepairer(null, fXMLCommentAttr); reconciler.setDamager(fDamagerRepairer, XMLPartitionScanner.XML_COMMENT); reconciler.setRepairer(fDamagerRepairer, XMLPartitionScanner.XML_COMMENT); 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; }
@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; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler = new PresentationReconciler(); DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getCssTokenScanner()); reconciler.setDamager(dr, CssPartitionScanner.CONTENT_TYPE_BLOCK); reconciler.setRepairer(dr, CssPartitionScanner.CONTENT_TYPE_BLOCK); dr = new DefaultDamagerRepairer(getCssScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); CommentDamagerRepairer commentDamagerRepairer = new CommentDamagerRepairer(new TextAttribute( colorRegistry.get(Colors.KEY_COMMENT))); reconciler.setDamager(commentDamagerRepairer, CssPartitionScanner.CONTENT_TYPE_COMMENT); reconciler.setRepairer(commentDamagerRepairer, CssPartitionScanner.CONTENT_TYPE_COMMENT); return reconciler; }
@Override public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) { PresentationReconciler reconciler= new JavaPresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); DefaultDamagerRepairer dr= new DefaultDamagerRepairer(getCodeScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr= new DefaultDamagerRepairer(getJavaDocScanner()); reconciler.setDamager(dr, IJavaPartitions.JAVA_DOC); reconciler.setRepairer(dr, IJavaPartitions.JAVA_DOC); dr= new DefaultDamagerRepairer(getMultilineCommentScanner()); reconciler.setDamager(dr, IJavaPartitions.JAVA_MULTI_LINE_COMMENT); reconciler.setRepairer(dr, IJavaPartitions.JAVA_MULTI_LINE_COMMENT); dr= new DefaultDamagerRepairer(getSinglelineCommentScanner()); reconciler.setDamager(dr, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT); reconciler.setRepairer(dr, IJavaPartitions.JAVA_SINGLE_LINE_COMMENT); dr= new DefaultDamagerRepairer(getStringScanner()); reconciler.setDamager(dr, IJavaPartitions.JAVA_STRING); reconciler.setRepairer(dr, IJavaPartitions.JAVA_STRING); dr= new DefaultDamagerRepairer(getStringScanner()); reconciler.setDamager(dr, IJavaPartitions.JAVA_CHARACTER); reconciler.setRepairer(dr, IJavaPartitions.JAVA_CHARACTER); 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; }
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); }