Package org.eclipse.jface.text.formatter

Examples of org.eclipse.jface.text.formatter.ContentFormatter


    return doubleClickStrategy;
  }
 
  @Override
  public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
    ContentFormatter formatter = new ContentFormatter();
   
    formatter.setFormattingStrategy(new TextFormattingStrategy(), IDocument.DEFAULT_CONTENT_TYPE);
    formatter.setFormattingStrategy(new TextFormattingStrategy(), IDjangoPartitions.DJANGO_TAG);
    formatter.setFormattingStrategy(new TextFormattingStrategy(), IDjangoPartitions.DJANGO_VARIABLE);
    formatter.setFormattingStrategy(new TextFormattingStrategy(), IDjangoPartitions.HTML_TAG);
    formatter.setFormattingStrategy(new TextFormattingStrategy(), IDjangoPartitions.JAVA_SCRIPT);
    formatter.setFormattingStrategy(new TextFormattingStrategy(), IDjangoPartitions.HTML_CSS);
   
    return formatter;
  }
View Full Code Here


    /* (non-Javadoc)
     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentFormatter(org.eclipse.jface.text.source.ISourceViewer)
     */
    public IContentFormatter getContentFormatter( ISourceViewer sourceViewer )
    {
        ContentFormatter formatter = new ContentFormatter();
        IFormattingStrategy formattingStrategy = new ACIFormattingStrategy( sourceViewer );
        formatter.enablePartitionAwareFormatting( false );
        formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        return formatter;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentFormatter(org.eclipse.jface.text.source.ISourceViewer)
     */
    public IContentFormatter getContentFormatter( ISourceViewer sourceViewer )
    {
        ContentFormatter formatter = new ContentFormatter();
        IFormattingStrategy formattingStrategy = new ACIFormattingStrategy( sourceViewer );
        formatter.enablePartitionAwareFormatting( false );
        formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        return formatter;
    }
View Full Code Here

        {
            this.formattingStrategy = new FilterFormattingStrategy( this.sourceViewer, this.parser );
        }
        if ( this.formatter == null )
        {
            this.formatter = new ContentFormatter();
            this.formatter.enablePartitionAwareFormatting( false );
            this.formatter.setFormattingStrategy( this.formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        }
        return formatter;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentFormatter(org.eclipse.jface.text.source.ISourceViewer)
     */
    public IContentFormatter getContentFormatter( ISourceViewer sourceViewer )
    {
        ContentFormatter formatter = new ContentFormatter();
        IFormattingStrategy formattingStrategy = new ACIFormattingStrategy( sourceViewer );
        formatter.enablePartitionAwareFormatting( false );
        formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        return formatter;
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public IContentFormatter getContentFormatter( ISourceViewer sourceViewer )
    {
        ContentFormatter formatter = new ContentFormatter();
        IFormattingStrategy formattingStrategy = new ACIFormattingStrategy( sourceViewer );
        formatter.enablePartitionAwareFormatting( false );
        formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        return formatter;
    }
View Full Code Here

        {
            formattingStrategy = new FilterFormattingStrategy( sourceViewer, parser );
        }
        if ( formatter == null )
        {
            formatter = new ContentFormatter();
            formatter.enablePartitionAwareFormatting( false );
            formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        }
        return formatter;
    }
View Full Code Here

        {
            formattingStrategy = new FilterFormattingStrategy( sourceViewer, parser );
        }
        if ( formatter == null )
        {
            formatter = new ContentFormatter();
            formatter.enablePartitionAwareFormatting( false );
            formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        }
        return formatter;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getContentFormatter(org.eclipse.jface.text.source.ISourceViewer)
     */
    public IContentFormatter getContentFormatter( ISourceViewer sourceViewer )
    {
        ContentFormatter formatter = new ContentFormatter();
        IFormattingStrategy formattingStrategy = new ACIFormattingStrategy( sourceViewer );
        formatter.enablePartitionAwareFormatting( false );
        formatter.setFormattingStrategy( formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        return formatter;
    }
View Full Code Here

        {
            this.formattingStrategy = new FilterFormattingStrategy( this.sourceViewer, this.parser );
        }
        if ( this.formatter == null )
        {
            this.formatter = new ContentFormatter();
            this.formatter.enablePartitionAwareFormatting( false );
            this.formatter.setFormattingStrategy( this.formattingStrategy, IDocument.DEFAULT_CONTENT_TYPE );
        }
        return formatter;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.formatter.ContentFormatter

Copyright © 2018 www.massapicom. 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.