/** * 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; }
/** * 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(); SimpleDamagerRepairer dr = new SimpleDamagerRepairer(); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, 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; }
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; }
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 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; }
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); }
@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; }
@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; }
/** * {@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) { 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(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 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(); 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 PresentationReconciler(); reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); MultilineDamagerRepairer dr = new MultilineDamagerRepairer(getDefaultScanner()); reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE); reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE); dr = new MultilineDamagerRepairer(getTagScanner()); reconciler.setDamager(dr, AntEditorPartitionScanner.XML_TAG); reconciler.setRepairer(dr, AntEditorPartitionScanner.XML_TAG); int style = getStyle(IAntEditorColorConstants.XML_COMMENT_COLOR); xmlCommentAttribute = new TextAttribute(AntUIPlugin.getPreferenceColor(IAntEditorColorConstants.XML_COMMENT_COLOR), null, style); damageRepairer = new MultilineDamagerRepairer(null, xmlCommentAttribute); reconciler.setDamager(damageRepairer, AntEditorPartitionScanner.XML_COMMENT); reconciler.setRepairer(damageRepairer, AntEditorPartitionScanner.XML_COMMENT); style = getStyle(IAntEditorColorConstants.XML_DTD_COLOR); xmlDtdAttribute = new TextAttribute(AntUIPlugin.getPreferenceColor(IAntEditorColorConstants.XML_DTD_COLOR), null, style); dtdDamageRepairer = new MultilineDamagerRepairer(null, xmlDtdAttribute); reconciler.setDamager(dtdDamageRepairer, AntEditorPartitionScanner.XML_DTD); reconciler.setRepairer(dtdDamageRepairer, AntEditorPartitionScanner.XML_DTD); return reconciler; }
PresentationReconciler reconciler = new PresentationReconciler(); String docPartitioning = getConfiguredDocumentPartitioning( sourceViewer ); reconciler.setDocumentPartitioning( docPartitioning );