use of org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.proposals.STPProbevarCompletionProposal in project linuxtools by eclipse.
the class STPCompletionProcessor method getProbeVariableCompletions.
private ICompletionProposal[] getProbeVariableCompletions(IDocument document, int offset, String prefix) {
try {
String probeName = getProbe(document, offset);
TreeNode[] completionData = stpMetadataSingleton.getProbeVariableCompletions(probeName, prefix);
ICompletionProposal[] result = new ICompletionProposal[completionData.length];
for (int i = 0; i < completionData.length; i++) {
result[i] = new STPProbevarCompletionProposal(completionData[i], prefix.length(), offset, probeName);
}
return result;
} catch (BadLocationException | BadPartitioningException e) {
return NO_COMPLETIONS;
}
}
Aggregations