Examples of PresentationReconciler


Examples of org.eclipse.jface.text.presentation.PresentationReconciler

  public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    if (reconciler != null)
      return reconciler;

    reconciler = new PresentationReconciler();

    DefaultDamagerRepairer dr = null;

    dr = new DefaultDamagerRepairer(getDefaultScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

        }
        return tagScanner;
    }

    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(PreferenceConstants.EDITOR_COLOR_XML_COMMENT)));
        reconciler.setDamager(ndr, XMLPartitionScanner.XML_COMMENT);
        reconciler.setRepairer(ndr, XMLPartitionScanner.XML_COMMENT);

        return reconciler;
    }
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

    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 );
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

    StyledText styleText = textViewer.getTextWidget();
    styleText.setEditable(true);
    styleText.setEnabled(true);
    styleText.setTabs(4);
   
    PresentationReconciler presentationReconciler = new PresentationReconciler();
    presentationReconciler.install(textViewer);
   
    // Enable the TextViewerUndoManager.
    textViewer.activatePlugins();
   
    makeActions();
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

        }
        return tagScanner;
    }

    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;
    }
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

    /* (non-Javadoc)
     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getPresentationReconciler(org.eclipse.jface.text.source.ISourceViewer)
     */
    public IPresentationReconciler getPresentationReconciler( ISourceViewer sourceViewer )
    {
        PresentationReconciler reconciler = new PresentationReconciler();
        reconciler.setDocumentPartitioning( getConfiguredDocumentPartitioning( sourceViewer ) );

        // Creating the damager/repairer for code
        DefaultDamagerRepairer dr = new DefaultDamagerRepairer( Activator.getDefault().getAciCodeScanner() );
        reconciler.setDamager( dr, IDocument.DEFAULT_CONTENT_TYPE );
        reconciler.setRepairer( dr, IDocument.DEFAULT_CONTENT_TYPE );

        return reconciler;
    }
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

   * Method declared on SourceViewerConfiguration
   */
  public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {

    JavaColorProvider provider= JConsolePlugin.getDefault().getJavaColorProvider();
    PresentationReconciler reconciler= new PresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));

    DefaultDamagerRepairer dr= new DefaultDamagerRepairer(JConsolePlugin.getDefault().getJavaCodeScanner());
    reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
    reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

    dr= new DefaultDamagerRepairer(JConsolePlugin.getDefault().getJavaDocScanner());
    reconciler.setDamager(dr, JavaPartitionScanner.JAVA_DOC);
    reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_DOC);

    dr= new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(provider.getColor(JavaColorProvider.MULTI_LINE_COMMENT))));
    reconciler.setDamager(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);
    reconciler.setRepairer(dr, JavaPartitionScanner.JAVA_MULTILINE_COMMENT);

    return reconciler;
  }
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

    /**
     * Define reconciler - this has to be done for each partition.
     * Currently there are 3 partitions, Inside rule, outside rule and inside comment.
     */
    public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
        PresentationReconciler reconciler = new PresentationReconciler();

        //bucket partition... (everything else outside a rule)
        DefaultDamagerRepairer dr = new DefaultDamagerRepairer(getScanner());
        reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
        reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);

        //inside a rule partition
        dr = new DefaultDamagerRepairer(getScanner());
        reconciler.setDamager(dr, DRLPartionScanner.RULE_PART_CONTENT);
        reconciler.setRepairer(dr, DRLPartionScanner.RULE_PART_CONTENT);

        //finally, inside a multi line comment.
        dr = new DefaultDamagerRepairer(new SingleTokenScanner(
                new TextAttribute(ColorManager.getInstance().getColor(
                        ColorManager.SINGLE_LINE_COMMENT))));
        reconciler.setDamager(dr, DRLPartionScanner.RULE_COMMENT);
        reconciler.setRepairer(dr, DRLPartionScanner.RULE_COMMENT);

        return reconciler;
    }
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

  }
 
 
  @Override
  public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
    PresentationReconciler reconciler = createPresentationReconciler();
    reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
    setupPresentationReconciler(reconciler);
    return reconciler;
  }
View Full Code Here

Examples of org.eclipse.jface.text.presentation.PresentationReconciler

    setupPresentationReconciler(reconciler);
    return reconciler;
  }
 
  protected PresentationReconciler createPresentationReconciler() {
    return new PresentationReconciler();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.