Package org.eclipse.jface.text.formatter

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


          if (fContentFormatter instanceof IContentFormatterExtension) {
            IContentFormatterExtension extension = (IContentFormatterExtension) fContentFormatter;
            IFormattingContext context = new FormattingContext();
            context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.valueOf(formatDocument));
            context.setProperty(FormattingContextProperties.CONTEXT_REGION, region);
            extension.format(document, context);
          }
          else {
            fContentFormatter.format(document, region);
          }
        }
View Full Code Here


          if (fContentFormatter instanceof IContentFormatterExtension) {
            IContentFormatterExtension extension = (IContentFormatterExtension) fContentFormatter;
            IFormattingContext context = new FormattingContext();
            context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.FALSE);
            context.setProperty(FormattingContextProperties.CONTEXT_REGION, region);
            extension.format(getDocument(), context);
          }
          else {
            fContentFormatter.format(getDocument(), region);
          }
        }
View Full Code Here

          if (fContentFormatter instanceof IContentFormatterExtension) {
            IContentFormatterExtension extension = (IContentFormatterExtension) fContentFormatter;
            IFormattingContext context = new FormattingContext();
            context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.valueOf(formatDocument));
            context.setProperty(FormattingContextProperties.CONTEXT_REGION, region);
            extension.format(document, context);
          }
          else {
            fContentFormatter.format(document, region);
          }
        }
View Full Code Here

          if (fContentFormatter instanceof IContentFormatterExtension) {
            IContentFormatterExtension extension = (IContentFormatterExtension) fContentFormatter;
            IFormattingContext context = new FormattingContext();
            context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.FALSE);
            context.setProperty(FormattingContextProperties.CONTEXT_REGION, region);
            extension.format(getDocument(), context);
          }
          else {
            fContentFormatter.format(getDocument(), region);
          }
        }
View Full Code Here

                  context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.TRUE);
                } else {
                  context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.FALSE);
                  context.setProperty(FormattingContextProperties.CONTEXT_REGION, new Region(selection.x, selection.y));
                }
                extension.format(document, context);
              } else {
                IRegion r;
                if (selection.y == 0) {
                  IRegion coverage= getModelCoverage();
                  r= coverage == null ? new Region(0, 0) : coverage;
View Full Code Here

                  context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.TRUE);
                } else {
                  context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.FALSE);
                  context.setProperty(FormattingContextProperties.CONTEXT_REGION, new Region(selection.x, selection.y));
                }
                extension.format(document, context);
              } else {
                IRegion r;
                if (selection.y == 0) {
                  IRegion coverage= getModelCoverage();
                  r= coverage == null ? new Region(0, 0) : coverage;
View Full Code Here

                  context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.TRUE);
                } else {
                  context.setProperty(FormattingContextProperties.CONTEXT_DOCUMENT, Boolean.FALSE);
                  context.setProperty(FormattingContextProperties.CONTEXT_REGION, new Region(selection.x, selection.y));
                }
                extension.format(document, context);
              } else {
                IRegion r;
                if (selection.y == 0) {
                  IRegion coverage= getModelCoverage();
                  r= coverage == null ? new Region(0, 0) : coverage;
View Full Code Here

          context.setProperty(
              FormattingContextProperties.CONTEXT_DOCUMENT,
              Boolean.TRUE);
          context.setProperty(
              FormattingContextProperties.CONTEXT_REGION, region);
          extension.format(getDocument(), context);
        } else {
          fContentFormatter.format(getDocument(), region);
        }
      } finally {
        // end recording
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.