Examples of CompletionProposal


Examples of org.eclipse.jface.text.contentassist.CompletionProposal

                if (o instanceof OtpErlangString) {
                    final OtpErlangString s = (OtpErlangString) o;
                    final String suffix = includes ? "" : ":";
                    final String cpl = quoted(s.stringValue() + suffix, kind);
                    final int prefixLength = prefix.length();
                    result.add(new CompletionProposal(cpl, offset - prefixLength,
                            prefixLength, cpl.length()));
                }
            }
        }
        return result;
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.CompletionProposal

            final int prefixLength = prefix.length();
            final String src = doc.get(o, offset - o - prefixLength);
            final Collection<String> vars = ErlangEngine.getInstance()
                    .getContextAssistService().getVariables(src, prefix);
            for (final String var : vars) {
                result.add(new CompletionProposal(var, offset - prefixLength,
                        prefixLength, var.length()));
            }
        }
        return result;
    }
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.CompletionProposal

    private void addIfMatches(final String name, final String prefix, final int offset,
            final List<ICompletionProposal> result) {
        final int length = prefix.length();
        if (name.regionMatches(true, 0, prefix, 0, length)) {
            result.add(new CompletionProposal(name, offset - length, length, name
                    .length()));
        }
    }
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.CompletionProposal

    List<ICompletionProposal> getTypeCompletions(final IOtpRpc backend,
            final String moduleOrRecord, final int offset, final String prefix) {
        final List<ICompletionProposal> result = new ArrayList<ICompletionProposal>();
        for (final String builtin : getBuiltinTypeCompletions()) {
            if (builtin.startsWith(prefix.trim())) {
                result.add(new CompletionProposal(builtin, offset - prefix.length(),
                        prefix.length(), builtin.length()));
            }
        }
        // TODO provide types completions from workspace
        return result;
View Full Code Here

Examples of org.eclipse.jface.text.contentassist.CompletionProposal

        ICompletionProposalExtension4 {

    CompletionProposal delegate;

    public DummyCompletionProposal(final int offset) {
        delegate = new CompletionProposal("", 0, 0, offset, null,
                "No completion proposal available", null, null);
    }
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.