Package org.eclipse.jface.text.formatter

Examples of org.eclipse.jface.text.formatter.IContentFormatter.format()


      if (document != null) {
        Region region = new Region(0, document.getLength());
        IContentFormatter formatter = getFormatter();
        if (formatter != null)
          formatter.format(document, region);
      }

    } catch (Exception e) {
      PHPCorePlugin.log(e);
    } finally {
View Full Code Here


   */
  public void formatModel(IStructuredModel structuredModel) {
    IStructuredDocument document = structuredModel.getStructuredDocument();
    IContentFormatter formatter = getFormatter();
    if (formatter != null)
      formatter.format(document, new Region(0, document.getLength()));
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

      int length) {
    IStructuredDocument document = structuredModel.getStructuredDocument();
    Region region = new Region(start, length);
    IContentFormatter formatter = getFormatter();
    if (formatter != null)
      formatter.format(document, region);
  }

  /*
   * (non-Javadoc)
   *
 
View Full Code Here

    IContentFormatter formatter = null;
    if (formatter == null) {
      formatter = PHPUiPlugin.getDefault().getActiveFormatter();
    }
    try {
      formatter.format(document, new Region(offset, length));
    } catch (Exception e) {
      Logger.logException(e);
    }
  }
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.