Package com.aptana.shared_core.string

Examples of com.aptana.shared_core.string.FastStringBuffer


        nextMustBeNewLineOrComment = false;
        nextMustBeNewLine = false;
        if (lastState == LAST_STATE_NEW_LINE) {
            this.writeIndent();
        }
        FastStringBuffer buf = this.getBuffer();
        if (buf.endsWith("\r") || buf.endsWith("\n") || buf.endsWith(" ") || buf.endsWith("\t")) {
            writeRaw(StringUtils.leftTrim(o));

        } else {
            writeRaw(o);
        }
View Full Code Here


    //------------ toString

    @Override
    public String toString() {
        FastStringBuffer buf = new FastStringBuffer();
        buf.append("PrettyPrinterDocV2[\n");
        Set<Entry<Integer, PrettyPrinterDocLineEntry>> entrySet = linesToColAndContents.entrySet();
        for (Entry<Integer, PrettyPrinterDocLineEntry> entry : entrySet) {
            buf.append(entry.getKey() + ": " + entry.getValue() + "\n");
        }
        return "PrettyPrinterDocV2[" + buf + "]";
    }
View Full Code Here

        wrapped.setTokenImportedModules(tokenImportedModules);
    }

    @Override
    public String toString() {
        FastStringBuffer buf = new FastStringBuffer();
        buf.append("CompletionStateWrapper[ ");
        buf.append(this.activationToken);
        buf.append(" ]");
        return buf.toString();
    }
View Full Code Here

        SimpleNode jjtn000 = builder.openNode(JJTDOTTED_NAME);
        boolean jjtc000 = true;
        jjtree.openNodeScope(jjtn000);
        jjtreeOpenNodeScope(jjtn000);
        Token t;
        FastStringBuffer sb = dottedNameStringBuffer.clear();
        try {
            t = Name();
            sb.append(t.image);
            label_16: while (true) {
                switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                    case DOT:
                        ;
                        break;
                    default:
                        jj_la1[61] = jj_gen;
                        break label_16;
                }
                jj_consume_token(DOT);
                t = Name();
                sb.append(".").append(t.image);
            }
            jjtree.closeNodeScope(jjtn000, true);
            jjtc000 = false;
            jjtreeCloseNodeScope(jjtn000);
            {
                if (true)
                    return sb.toString();
            }
        } catch (Throwable jjte000) {
            if (jjtc000) {
                jjtree.clearNodeScope(jjtn000);
                jjtc000 = false;
View Full Code Here

        return linePart;
    }

    @Override
    public String toString() {
        FastStringBuffer buf = new FastStringBuffer();
        for (ILinePart c : getSortedParts()) {
            if (c instanceof ILinePart2) {
                ILinePart2 iLinePart2 = (ILinePart2) c;
                buf.append(iLinePart2.getString());
            } else {
                buf.append(c.toString());
            }
            buf.append(c.isMarkedAsFound() ? "+" : "?");
            buf.append(" ");
        }
        return buf.toString();
    }
View Full Code Here

        if (open != Window.OK) {
            return;
        }
        Object[] result = dialog.getResult();

        final FastStringBuffer buf = new FastStringBuffer();
        if (result != null && result.length > 0) {

            for (Object o : result) {
                ASTEntry entry = (ASTEntry) o;
                if (entry.node instanceof ClassDef) {
                    if (buf.length() > 0) {
                        buf.append(',');
                    }
                    buf.append(NodeUtils.getFullRepresentationString(entry.node));

                } else if (entry.node instanceof FunctionDef && entry.parent != null
                        && entry.parent.node instanceof ClassDef) {
                    if (buf.length() > 0) {
                        buf.append(',');
                    }
                    buf.append(NodeUtils.getFullRepresentationString(entry.parent.node));
                    buf.append('.');
                    buf.append(NodeUtils.getFullRepresentationString(entry.node));

                }

            }
        }

        final String arguments;
        if (buf.length() > 0) {
            arguments = buf.toString();
        } else {
            arguments = "";
        }

        AbstractLaunchShortcut shortcut = new AbstractLaunchShortcut() {
View Full Code Here

        beforeNode(node);
        LinePartRequireMark mark = this.doc.addRequire("from ", bindFromTo);

        if (node.level > 0) {
            String s = new FastStringBuffer(node.level).appendN('.', node.level).toString();
            doc.addRequireAfter(s, mark);
        }

        if (!emptyModule) {
            node.module.accept(this); //no need to add an empty module
View Full Code Here

    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        FastStringBuffer buf = new FastStringBuffer("DocCmd(\n", 100);
        buf.append("  offset: ");
        buf.append(offset);
        buf.append("\n  len: ");
        buf.append(length);
        buf.append("\n  text: ");
        buf.append(text);
        buf.append("\n  doit: ");
        buf.append(doit);
        buf.append("\n  caretOffset: ");
        buf.append(caretOffset);
        buf.append("\n  shiftsCaret: ");
        buf.append(shiftsCaret);
        buf.append("\n)");
        return buf.toString();
    }
View Full Code Here

        return 7;
    }

    @Override
    public String toString() {
        FastStringBuffer buffer = new FastStringBuffer();
        buffer.append("Tuple [");
        buffer.appendObject(o1);
        buffer.append(" -- ");
        buffer.appendObject(o2);
        buffer.append("]");
        return buffer.toString();
    }
View Full Code Here

        if (file != null && file.exists()) {
            //only check files that actually exist

            if (file.isDirectory()) {
                if (level != 0) {
                    FastStringBuffer newModuleRep = new FastStringBuffer(currModuleRep, 128);
                    if (newModuleRep.length() != 0) {
                        newModuleRep.append(".");
                    }
                    newModuleRep.append(file.getName());
                    currModuleRep = newModuleRep.toString();
                }

                // check if it is a symlink loop
                try {
                    File canonicalizedDir = file.getCanonicalFile();
View Full Code Here

TOP

Related Classes of com.aptana.shared_core.string.FastStringBuffer

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.