Search in sources :

Example 1 with STPFunctionCompletionProposal

use of org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.proposals.STPFunctionCompletionProposal in project linuxtools by eclipse.

the class STPCompletionProcessor method getFunctionCompletions.

private ICompletionProposal[] getFunctionCompletions(int offset, String prefix) {
    TreeNode[] completionData = stpMetadataSingleton.getFunctionCompletions(prefix);
    ICompletionProposal[] result = new ICompletionProposal[completionData.length];
    for (int i = 0; i < completionData.length; i++) {
        result[i] = new STPFunctionCompletionProposal(completionData[i], prefix.length(), offset);
    }
    return result;
}
Also used : TreeNode(org.eclipse.linuxtools.systemtap.structures.TreeNode) ICompletionProposal(org.eclipse.jface.text.contentassist.ICompletionProposal) STPFunctionCompletionProposal(org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.proposals.STPFunctionCompletionProposal)

Aggregations

ICompletionProposal (org.eclipse.jface.text.contentassist.ICompletionProposal)1 STPFunctionCompletionProposal (org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.proposals.STPFunctionCompletionProposal)1 TreeNode (org.eclipse.linuxtools.systemtap.structures.TreeNode)1