Package com.aptana.shared_core.string

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


                    if (spacesFound > 0) {
                        tabsToAdd = spacesFound / spacesIndentString.length();
                        if (spacesFound % spacesIndentString.length() != 0) {
                            tabsToAdd += 1;
                        }
                        newTabsIndent.clear();
                        for (int j = 0; j < tabsToAdd; j++) {
                            newTabsIndent.append("\t");
                        }
                        newPattern.append(newTabsIndent);
                    }
View Full Code Here


                String key = entry.getKey();
                int index = StringUtils.rFind(key, '/');
                boolean add = true;
                if (index != -1) {
                    //If it's in the root, we don't need to check for __init__
                    buffer.clear();
                    buffer.append(key.substring(0, index));
                    if (zipContentsType == ZIP_CONTENTS_TYPE_PY_ZIP) {
                        //we don't need to check for __init__ if we have a jar
                        if (buffer.length() > 0) {
                            buffer.append("/");
View Full Code Here

            FastStringBuffer tempBuffer = new FastStringBuffer(128);
            for (Tuple<IJavaElement, CompletionProposal> element : elementsFound) {
                IJavaElement javaElement = element.o1;
                String args = "";
                if (javaElement instanceof IMethod) {
                    tempBuffer.clear();
                    tempBuffer.append("()");
                    IMethod method = (IMethod) javaElement;
                    for (String param : method.getParameterTypes()) {
                        if (tempBuffer.length() > 2) {
                            tempBuffer.insert(1, ", ");
View Full Code Here

                    args = tempBuffer.toString();

                    String elementName = method.getElementName();
                    if (elementName.startsWith("get") || elementName.startsWith("set")) {
                        //Create a property for it
                        tempBuffer.clear();
                        elementName = elementName.substring(3);
                        if (elementName.length() > 0) {
                            tempBuffer.append(Character.toLowerCase(elementName.charAt(0)));
                            tempBuffer.append(elementName.substring(1));
View Full Code Here

            } else {
                break;
            }
        }

        modNameBuf.clear();
        FastStringBuffer pathInJavaClass = modNameBuf; //get it cleared
        if (validModule == null) {
            validModule = this;
            pathInJavaClass.clear();
            pathInJavaClass.append(state.getActivationToken());
View Full Code Here

        modNameBuf.clear();
        FastStringBuffer pathInJavaClass = modNameBuf; //get it cleared
        if (validModule == null) {
            validModule = this;
            pathInJavaClass.clear();
            pathInJavaClass.append(state.getActivationToken());
        } else {
            //After having found a valid java class, we must also check which was the resulting token within that class
            //to check if it's some method or something alike (that should be easy after having the class and the path
            //to the method we want to find within it).
View Full Code Here

                    if (n == null && dontSearchInit == false) {
                        if (buffer == null) {
                            buffer = new FastStringBuffer();
                        } else {
                            buffer.clear();
                        }
                        keyForCacheAccess.name = buffer.append(name).append(".__init__").toString();
                        n = cache.getObj(keyForCacheAccess, this);
                    }
View Full Code Here

                        Properties stringSubstitutionVariables = info.getStringSubstitutionVariables();
                        if (stringSubstitutionVariables != null) {
                            Enumeration<Object> keys = stringSubstitutionVariables.keys();
                            while (keys.hasMoreElements()) {
                                Object key = keys.nextElement();
                                buf.clear();
                                buf.append("${");
                                buf.append(key.toString());
                                buf.append("}");

                                if (complete.indexOf(buf.toString()) != -1) {
View Full Code Here

     * Changes for bold any Pydev hints.
     */
    public String handlePydevTags(TextPresentation presentation, String str) {
        FastStringBuffer buf = new FastStringBuffer(str.length());

        String newString = handleLinks(presentation, str, buf.clear(), "pydev_hint_bold", false);
        newString = handleLinks(presentation, newString, buf.clear(), "pydev_link", true);
        return newString;
    }

    private String handleLinks(TextPresentation presentation, String str, FastStringBuffer buf, String tag,
View Full Code Here

     */
    public String handlePydevTags(TextPresentation presentation, String str) {
        FastStringBuffer buf = new FastStringBuffer(str.length());

        String newString = handleLinks(presentation, str, buf.clear(), "pydev_hint_bold", false);
        newString = handleLinks(presentation, newString, buf.clear(), "pydev_link", true);
        return newString;
    }

    private String handleLinks(TextPresentation presentation, String str, FastStringBuffer buf, String tag,
            boolean addLinkUnderline) {
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.