Package org.jitterbit.ui.text.contentassist

Examples of org.jitterbit.ui.text.contentassist.DefaultCompletionToken


    }

    private CompletionToken createToken(int offset, int startPos, Node node) {
        String path = KongaStringUtils.removeStartAndEnd(node.m_deName, "[", "]");
        String display = node.getDisplay();
        DefaultCompletionToken t = new DefaultCompletionToken(path, startPos, offset, display);
        if (includeTokenInfo) {
            // TODO: I'd like to show a small image of the tree leading to Node here, but
            // unfortunately the CompletionToken API does not allow for that, I can
            // only set an info string. Change the CompletionToken API to allow for
            // more flexibility. For example, we have have a TokenInfo class, with a text and
            // an icon field.
            t.setInfo(node.m_deName);
        }
        Icon icon = getIcon(node);
        t.setIcon(icon);
        return t;
    }
View Full Code Here


    private final DefaultCompletionToken impl;

    public PluginCompletionToken(PipelinePluginManifest manifest, int cursorPosition) {
        this.manifest = manifest;
        impl = new DefaultCompletionToken(ScriptConstants.getPluginTagString(manifest), cursorPosition, cursorPosition);
        impl.setIcon(ClientIcons.PLUGIN_16);
    }
View Full Code Here

    private final DefaultCompletionToken impl;

    public ProjectItemCompletionToken(IntegrationEntity item, int cursorPosition) {
        this.item = item;
        impl = new DefaultCompletionToken(ScriptConstants.getProjectItemTagString(item), cursorPosition, cursorPosition);
        impl.setIcon(IconStore.defaultIcon(item));
    }
View Full Code Here

    }
   
    private CompletionToken[] createMatchingTokens(List<String> matchingPackages, int start, int cursor) {
        List<CompletionToken> tokens = Lists.newArrayList();
        for (String p : matchingPackages) {
            tokens.add(new DefaultCompletionToken(p, start, cursor));
        }
        return tokens.toArray(new CompletionToken[tokens.size()]);
    }
View Full Code Here

        this.htmlInfo = htmlInfo;
    }

    @Override
    public CompletionToken asCompletionToken(int start, int cursor) {
        DefaultCompletionToken token = new DefaultCompletionToken(name, start, cursor);
        token.setInfo(htmlInfo);
        return token;
    }
View Full Code Here

        }

        @Override
        public CompletionToken apply(File f) {
            String path = getPath(f);
            DefaultCompletionToken token = new DefaultCompletionToken(path, 0, offset);
            token.setIcon(view.getSystemIcon(f));
            return token;
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.ui.text.contentassist.DefaultCompletionToken

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.