use of org.apache.flex.compiler.definitions.ITypeDefinition in project vscode-nextgenas by BowlerHatLLC.
the class ActionScriptTextDocumentService method addDefinitionAutoCompleteMXML.
private void addDefinitionAutoCompleteMXML(IDefinition definition, String prefix, String uri, CompletionList result) {
if (definition.getBaseName().startsWith(VECTOR_HIDDEN_PREFIX)) {
return;
}
CompletionItem item = new CompletionItem();
item.setKind(getDefinitionKind(definition));
item.setDetail(getDefinitionDetail(definition));
item.setLabel(definition.getBaseName());
if (prefix != null) {
item.setInsertText(prefix + IMXMLCoreConstants.colon + definition.getBaseName());
if (definition instanceof ITypeDefinition && uri != null) {
item.setCommand(createMXMLNamespaceCommand(definition, prefix, uri));
}
}
result.getItems().add(item);
}
Aggregations