use of org.eclipse.wst.xsd.ui.internal.editor.XSDTypeReferenceEditManager in project webtools.sourceediting by eclipse.
the class XSDAttributeDeclarationSection method fillTypesCombo.
private void fillTypesCombo() {
IEditorPart editor = getActiveEditor();
XSDTypeReferenceEditManager manager = (XSDTypeReferenceEditManager) editor.getAdapter(XSDTypeReferenceEditManager.class);
if (manager != null) {
ComponentSpecification[] items = manager.getQuickPicks();
typeCombo.removeAll();
typeCombo.add(Messages._UI_COMBO_BROWSE);
typeCombo.add(Messages._UI_COMBO_NEW);
for (int i = 0; i < items.length; i++) {
typeCombo.add(items[i].getName());
}
XSDAttributeDeclaration namedComponent = ((XSDAttributeDeclaration) input).getResolvedAttributeDeclaration();
XSDTypeDefinition namedComponentType = namedComponent.getType();
if (namedComponentType != null) {
// no
String currentTypeName = namedComponentType.getQName(xsdSchema);
// prefix
ComponentSpecification ret = getComponentSpecFromQuickPickForValue(currentTypeName, manager);
if (// not in quickPick
ret == null)
typeCombo.add(currentTypeName);
}
}
}
Aggregations