Examples of appendN()


Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

        if (buffer.length() > nameNumberOfColumns) {
            buffer = buffer.delete(0, Math.abs((nameNumberOfColumns - 2) - str.length()));
            buffer.insert(0, "..");
        }
        if (buffer.length() < nameNumberOfColumns) {
            buffer.appendN(' ', nameNumberOfColumns - str.length());
        }
        return buffer.toString();
    }

    private static String getStmts(int stmts) {
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

            //40 chars for name.
            int nameNumberOfColumns = PyCoveragePreferences.getNameNumberOfColumns();
            buffer.append("Name").appendN(' ', nameNumberOfColumns - 4)
                    .append("  Stmts     Miss      Cover  Missing\n");
            buffer.appendN('-', nameNumberOfColumns);
            buffer.append("-------------------------------------\n");

            int totalMiss = 0;
            int totalStmts = 0;
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

                } else {
                    buffer.append(element.toString()).append("\n");
                }
            }

            buffer.appendN('-', nameNumberOfColumns);
            buffer.append("-------------------------------------\n");
            FileNode.appendToBuffer(buffer, "TOTAL", totalStmts, totalMiss, "", nameNumberOfColumns).append("\n");

        } catch (NodeNotFoudException e) {
            buffer.append("File has no statistics.");
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

                }
                //Adds chars so that the initial presentation is bigger (they are later changed for spaces).
                //If that's not done, the created editor would be too small... especially if we consider
                //that the code-formatting can change for that editor (so, some parts wouldn't appear if we
                //need more space later on).
                buf.appendN('|', 8);
                buf.append(c);
            }
        }
        String result = buf.toString();
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

        this.tokReplacement.put(":", createSpacesStr(i, ":"));
    }

    private String createSpacesStr(int i, String startingWith) {
        FastStringBuffer buf = new FastStringBuffer(startingWith, i);
        buf.appendN(' ', i);
        return buf.toString();
    }

    public void setReplacement(String original, String replacement) {
        this.tokReplacement.put(original, replacement);
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

        if (command.length > 0) {
            String selectedText = ps.getSelectedText();
            if (selectedText.indexOf('\r') != -1 || selectedText.indexOf('\n') != -1) {
                //we have a new line
                FastStringBuffer buf = new FastStringBuffer(selectedText.length() + 10);
                buf.appendN(command.text, 3);
                buf.append(selectedText);
                buf.appendN(command.text, 3);
                document.replace(offset, ps.getSelLength(), buf.toString());
                linkOffset = offset + 3;
                linkLen = selectedText.length();
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

            if (selectedText.indexOf('\r') != -1 || selectedText.indexOf('\n') != -1) {
                //we have a new line
                FastStringBuffer buf = new FastStringBuffer(selectedText.length() + 10);
                buf.appendN(command.text, 3);
                buf.append(selectedText);
                buf.appendN(command.text, 3);
                document.replace(offset, ps.getSelLength(), buf.toString());
                linkOffset = offset + 3;
                linkLen = selectedText.length();
                linkExitPos = linkOffset + linkLen + 3;
            } else {
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

        //delimiter to use
        String delimiter = PyAction.getDelimiter(ps.getDoc());

        //get the 1st char (determines indent)
        FastStringBuffer startIndentBuffer = new FastStringBuffer(firstCharPosition + 1);
        startIndentBuffer.appendN(' ', firstCharPosition);
        final String startIndent = startIndentBuffer.toString();

        //code to be surrounded
        String surroundedCode = selectedText;
        surroundedCode = indentation + surroundedCode.replaceAll(delimiter, delimiter + indentation);
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

    private void updateSingle(String val, boolean alignToRight) {
        FastStringBuffer buf = new FastStringBuffer(200);
        if (val.length() == 0) {
            buf.append("Invalid");
            buf.appendN(' ', 23);
        } else {
            buf.appendN(val.charAt(0), 10); //Use only the pos 0!
            if (alignToRight) {
                buf.append(" my single block");
            } else {
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.appendN()

        FastStringBuffer buf = new FastStringBuffer(200);
        if (val.length() == 0) {
            buf.append("Invalid");
            buf.appendN(' ', 23);
        } else {
            buf.appendN(val.charAt(0), 10); //Use only the pos 0!
            if (alignToRight) {
                buf.append(" my single block");
            } else {
                buf.insert(0, " my single block ");
            }
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.