Examples of IFormatter


Examples of com.iisigroup.cap.formatter.IFormatter

          str = s[0];
        } catch (Exception e) {
          val = "";
        }
        if (dataReformatter != null && dataReformatter.containsKey(str)) {
          IFormatter callback = dataReformatter.get(str);
          if (callback instanceof IBeanFormatter) {
            val = callback.reformat(data);
          } else {
            val = callback.reformat(val);
          }
        } else if (val instanceof Timestamp) {
          val = new ADDateTimeFormatter().reformat(val);
        } else if (val instanceof Date || val instanceof Calendar) {
          val = new ADDateFormatter().reformat(val);
View Full Code Here

Examples of com.iisigroup.cap.formatter.IFormatter

          str = s[0];
        } catch (Exception e) {
          val = "";
        }
        if (reformat != null && reformat.containsKey(str)) {
          IFormatter callback = reformat.get(str);
          if (callback instanceof IBeanFormatter) {
            val = callback.reformat(this);
          } else {
            val = callback.reformat(val);
          }
        } else if (val instanceof Timestamp) {
          val = new ADDateTimeFormatter().reformat(val);
        } else if (val instanceof Date || val instanceof Calendar) {
          val = new ADDateFormatter().reformat(val);
View Full Code Here

Examples of com.iisigroup.cap.formatter.IFormatter

          val = get(str);
        } catch (Exception e) {
          val = "";
        }
        if (reformat != null && reformat.containsKey(str)) {
          IFormatter callback = reformat.get(str);
          if (callback instanceof IBeanFormatter) {
            val = callback.reformat(this);
          } else {
            val = callback.reformat(val);
          }
        } else if (val instanceof Timestamp) {
          val = new ADDateTimeFormatter().reformat(val);
        } else if (val instanceof Date || val instanceof Calendar) {
          val = new ADDateFormatter().reformat(val);
View Full Code Here

Examples of org.python.pydev.parser.prettyprinterv2.IFormatter

     * be formatted.
     * @throws SyntaxErrorException
     */
    public void applyFormatAction(PyEdit pyEdit, PySelection ps, int[] regionsToFormat, boolean throwSyntaxError)
            throws BadLocationException, SyntaxErrorException {
        final IFormatter participant = getFormatter();
        final IDocument doc = ps.getDoc();
        final SelectionKeeper selectionKeeper = new SelectionKeeper(ps);

        DocumentRewriteSession session = null;
        try {

            if (regionsToFormat == null || regionsToFormat.length == 0) {
                if (doc instanceof IDocumentExtension4) {
                    IDocumentExtension4 ext = (IDocumentExtension4) doc;
                    session = ext.startRewriteSession(DocumentRewriteSessionType.STRICTLY_SEQUENTIAL);
                }
                participant.formatAll(doc, pyEdit, true, throwSyntaxError);

            } else {
                if (doc instanceof IDocumentExtension4) {
                    IDocumentExtension4 ext = (IDocumentExtension4) doc;
                    session = ext.startRewriteSession(DocumentRewriteSessionType.SEQUENTIAL);
                }
                participant.formatSelection(doc, regionsToFormat, pyEdit, ps);
            }

        } finally {
            if (session != null) {
                ((IDocumentExtension4) doc).stopRewriteSession(session);
View Full Code Here

Examples of org.python.pydev.parser.prettyprinterv2.IFormatter

    /**
     * @return the source code formatter to be used.
     */
    public IFormatter getFormatter() {
        IFormatter participant = (IFormatter) ExtensionHelper.getParticipant(ExtensionHelper.PYDEV_FORMATTER, false);
        if (participant == null) {
            participant = this;
        }
        return participant;
    }
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.