Examples of format()


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

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

                //CFDocumentSetupParticipant.CFML_PARTITIONING,
        IDocumentExtension3.DEFAULT_PARTITIONING,
                IDocument.DEFAULT_CONTENT_TYPE);

        formatter.setMasterStrategy(new CFMLFormattingStrategy());
        formatter.format(doc, new Region(0, doc.getLength()));
  }

  /**
     * Format the text using the ant code formatter using the preferences
     * settings in the plug-in preference store.
View Full Code Here

Examples of org.eclipse.jgit.diff.DiffFormatter.format()

      List<DiffEntry> result = diffFmt.scan(oldTree, newTree);
      if (showNameAndStatusOnly) {
        return result;
      } else {
        diffFmt.format(result);
        diffFmt.flush();
        return result;
      }
    } finally {
      diffFmt.release();
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectInserter.format()

          commit.setAuthor(author);
          commit.setMessage(message);

          commit.setParentIds(parents.toArray(new ObjectId[] {}));
          commit.setTreeId(indexTreeId);
          ObjectId commitId = odi.insert(Constants.OBJ_COMMIT, odi
              .format(commit));
          odi.flush();

          RevWalk revWalk = new RevWalk(repo);
          try {
View Full Code Here

Examples of org.eclipse.jgit.lib.Tree.format()

    {
      final Tree root = new Tree(db);
      {
        final Tree subA = root.addTree("sub-a");
        subA.addFile("empty").setId(aFileId);
        subA.setId(inserter.insert(OBJ_TREE, subA.format()));
      }
      {
        final Tree subC = root.addTree("sub-c");
        subC.addFile("empty").setId(cFileId1);
        subC.setId(inserter.insert(OBJ_TREE, subC.format()));
View Full Code Here

Examples of org.eclipse.php.internal.core.format.PhpFormatter.format()

        new PhpSourceParser());
    String start = "<?php"; //$NON-NLS-1$
    newdocument.set(start + newline + tempsb.toString());
    PhpFormatter formatter = new PhpFormatter(0, newdocument.getLength(),
        true, indentationObject);
    formatter.format(newdocument.getFirstStructuredDocumentRegion());

    List<String> list = new ArrayList<String>();
    try {
      int lineNumber = newdocument.getNumberOfLines();
      for (int i = 0; i < lineNumber; i++) {
View Full Code Here

Examples of org.eclipse.sapphire.LocalizableText.format()

                    for( String baseType : requiredBaseTypes )
                    {
                        if( ! type.isOfType( baseType ) )
                        {
                            final LocalizableText template = ( type.kind() == JavaTypeKind.INTERFACE ? interfaceDoesNotExtend : classDoesNotImplementOrExtend );
                            final String msg = template.format( val, baseType );
                            return Status.createErrorStatus( msg );
                        }
                    }
                }
                else
View Full Code Here

Examples of org.eclipse.sapphire.modeling.xml.XmlElement.format()

                    sortSequenceContent( root );
                }
               
                sort( root );
               
                root.format();
               
                xmlResourceStore.save();
            }
            catch( ResourceStoreException e )
            {
View Full Code Here

Examples of org.eclipse.wst.css.core.internal.formatter.CSSSourceFormatter.format()

    // try another way to get formatter
    if (formatter == null)
      formatter = CSSSourceFormatterFactory.getInstance().getSourceFormatter(notifier);
    if (formatter == null)
      return null;
    StringBuffer buffer = formatter.format(document);
    if (buffer == null)
      return null;
    return buffer.toString();
  }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatter.format()

          .getInstance().createFormatter(child,
              getFormatPreferences());
      if (formatter != null) {
        if (formatter instanceof HTMLFormatter) {
          HTMLFormatter htmlFormatter = (HTMLFormatter) formatter;
          htmlFormatter.format(child, contraints);
        } else {
          formatter.format(child);
        }
      }
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.