@Test public void testMethodCompletion() { List<CodeCompletionHint> hints = completer.complete("runtimeService.signalEventR"); Assert.assertEquals(4, hints.size()); }
public List<CodeCompletionHint> complete(String incompletePath) { List<CodeCompletionHint> hints = new ArrayList<CodeCompletionHint>(); String objectPath = null; String prefix = null; String lastDelimiter = null; int lastSplit = splitter.lastSplit(incompletePath); if (lastSplit == -1) { prefix = incompletePath; } else { objectPath = incompletePath.substring(0, lastSplit); prefix = incompletePath.substring(lastSplit + 1); lastDelimiter = incompletePath.substring(lastSplit, lastSplit + 1); } if (objectPath == null) { hints = completeFromBindings(prefix); } else { String[] splitObjectPath = splitter.split(objectPath); List<Class<?>> resolvedTypes = resolveTypes(splitObjectPath); hints = completeForTypes(resolvedTypes, prefix, objectPath + lastDelimiter); } return hints; }
CodeCompleter { public List<CodeCompletionHint> complete(String incompletePath) { List<CodeCompletionHint> hints = new ArrayList<CodeCompletionHint>(); String objectPath = null; String prefix = null; String lastDelimiter = null; int lastSplit = splitter.lastSplit(incompletePath); if (lastSplit == -1) { prefix = incompletePath; } else { objectPath = incompletePath.substring(0, lastSplit); prefix = incompletePath.substring(lastSplit + 1); lastDelimiter = incompletePath.substring(lastSplit, lastSplit + 1); } if (objectPath == null) { hints = completeFromBindings(prefix); } else { String[] splitObjectPath = splitter.split(objectPath); List<Class<?>> resolvedTypes = resolveTypes(splitObjectPath); hints = completeForTypes(resolvedTypes, prefix, objectPath + lastDelimiter); } return hints; } }
CodeCompleter { public List<CodeCompletionHint> complete(String incompletePath) { List<CodeCompletionHint> hints = new ArrayList<CodeCompletionHint>(); String objectPath = null; String prefix = null; String lastDelimiter = null; int lastSplit = splitter.lastSplit(incompletePath); if (lastSplit == -1) { prefix = incompletePath; } else { objectPath = incompletePath.substring(0, lastSplit); prefix = incompletePath.substring(lastSplit + 1); lastDelimiter = incompletePath.substring(lastSplit, lastSplit + 1); } if (objectPath == null) { hints = completeFromBindings(prefix); } else { String[] splitObjectPath = splitter.split(objectPath); List<Class<?>> resolvedTypes = resolveTypes(splitObjectPath); hints = completeForTypes(resolvedTypes, prefix, objectPath + lastDelimiter); } return hints; } CodeCompleter(); }
CodeCompleter { public List<CodeCompletionHint> complete(String incompletePath) { List<CodeCompletionHint> hints = new ArrayList<CodeCompletionHint>(); String objectPath = null; String prefix = null; String lastDelimiter = null; int lastSplit = splitter.lastSplit(incompletePath); if (lastSplit == -1) { prefix = incompletePath; } else { objectPath = incompletePath.substring(0, lastSplit); prefix = incompletePath.substring(lastSplit + 1); lastDelimiter = incompletePath.substring(lastSplit, lastSplit + 1); } if (objectPath == null) { hints = completeFromBindings(prefix); } else { String[] splitObjectPath = splitter.split(objectPath); List<Class<?>> resolvedTypes = resolveTypes(splitObjectPath); hints = completeForTypes(resolvedTypes, prefix, objectPath + lastDelimiter); } return hints; } CodeCompleter(); void addVariableBindings(Bindings bindings); void setVariableBindings(Set<Bindings> bindings); void setSplitter(PrefixSplitter splitter); List<CodeCompletionHint> complete(String incompletePath); }
CodeCompleter { public List<CodeCompletionHint> complete(String incompletePath) { List<CodeCompletionHint> hints = new ArrayList<CodeCompletionHint>(); String objectPath = null; String prefix = null; String lastDelimiter = null; int lastSplit = splitter.lastSplit(incompletePath); if (lastSplit == -1) { prefix = incompletePath; } else { objectPath = incompletePath.substring(0, lastSplit); prefix = incompletePath.substring(lastSplit + 1); lastDelimiter = incompletePath.substring(lastSplit, lastSplit + 1); } if (objectPath == null) { hints = completeFromBindings(prefix); } else { String[] splitObjectPath = splitter.split(objectPath); List<Class<?>> resolvedTypes = resolveTypes(splitObjectPath); hints = completeForTypes(resolvedTypes, prefix, objectPath + lastDelimiter); } return hints; } CodeCompleter(); void addVariableBindings(Bindings bindings); void setVariableBindings(Set<Bindings> bindings); void setSplitter(PrefixSplitter splitter); List<CodeCompletionHint> complete(String incompletePath);  }