String startPart = tk.getWordPrefix();
this.setSourceRange(position - startPart.length(), position);
// 090813:
RutaModuleDeclaration parsed = (RutaModuleDeclaration) this.parser.parse(module);
// types = getShortNames(types);
if (classloader == null) {
IScriptProject scriptProject = sourceModule.getModelElement().getScriptProject();
try {
Collection<String> dependencies = RutaProjectUtils.getClassPath(scriptProject.getProject());
URL[] urls = new URL[dependencies.size()];
int counter = 0;
for (String dep : dependencies) {
urls[counter] = new File(dep).toURI().toURL();
counter++;
}
classloader = new URLClassLoader(urls);
} catch (MalformedURLException e) {
RutaIdeCorePlugin.error(e);
} catch (CoreException e) {
RutaIdeCorePlugin.error(e);
}
}
ASTNode node;
if (parsed != null) {
try {
RutaReferenceVisitor referenceVisitor = new RutaReferenceVisitor(actualCompletionPosition);
parsed.traverse(referenceVisitor);
node = referenceVisitor.getResult();
if (node == null) {
doCompletionOnEmptyStatement(module, position, i);
doCompletionOnDeclaration(module, startPart);