本文整理了Java中org.eclipse.xsd.XSDTypeDefinition.getQName()
方法的一些代码示例,展示了XSDTypeDefinition.getQName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDTypeDefinition.getQName()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDTypeDefinition
类名称:XSDTypeDefinition
方法名:getQName
暂无
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
private void fillTypesCombo()
{
baseTypeCombo.removeAll();
baseTypeCombo.add(Messages._UI_ACTION_BROWSE);
baseTypeCombo.add(Messages._UI_ACTION_NEW);
// Add the current Type of this attribute if needed
XSDComplexTypeDefinition complexType = (XSDComplexTypeDefinition) input;
XSDTypeDefinition baseType = complexType.getBaseType();
if (baseType != null && baseType.getQName() != null)
{
String currentTypeName = baseType.getQName(xsdSchema); //no prefix
if (currentTypeName != null && !currentTypeName.equals("anyType"))
baseTypeCombo.add(currentTypeName);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public String getText()
{
XSDComplexTypeDefinition xsdComplexTypeDefinition = (XSDComplexTypeDefinition) target;
StringBuffer result = new StringBuffer();
result.append(xsdComplexTypeDefinition.getName() == null ? "local type" : xsdComplexTypeDefinition.getName()); //$NON-NLS-1$
XSDTypeDefinition baseTypeDefinition = xsdComplexTypeDefinition.getBaseTypeDefinition();
if (baseTypeDefinition != null && baseTypeDefinition != xsdComplexTypeDefinition.getContent() && baseTypeDefinition.getName() != null && !XSDConstants.isURType(baseTypeDefinition))
{
result.append(" : "); //$NON-NLS-1$
result.append(baseTypeDefinition.getQName(xsdComplexTypeDefinition));
}
return result.toString();
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
@Override
public String getText(Object object)
{
XSDElementDeclaration xsdElementDeclaration = ((XSDElementDeclaration)object);
XSDElementDeclaration resolvedElementDeclaration = xsdElementDeclaration.getResolvedElementDeclaration();
String name =
xsdElementDeclaration != resolvedElementDeclaration ?
xsdElementDeclaration.getQName() :
xsdElementDeclaration.getName();
StringBuffer result = new StringBuffer();
if (name == null)
{
result.append(XSDEditPlugin.INSTANCE.getString("_UI_Absent_label"));
}
else
{
result.append(name);
}
if (resolvedElementDeclaration.getAnonymousTypeDefinition() == null && resolvedElementDeclaration.getTypeDefinition() != null)
{
result.append(" : ");
result.append(resolvedElementDeclaration.getTypeDefinition().getQName(xsdElementDeclaration));
}
return result.toString();
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
public String getText(Object object, boolean showType)
{
XSDComplexTypeDefinition xsdComplexTypeDefinition = ((XSDComplexTypeDefinition)object);
StringBuffer result = new StringBuffer();
result.append
(xsdComplexTypeDefinition.getName() == null ?
xsdComplexTypeDefinition.getAliasName() :
xsdComplexTypeDefinition.getName());
if (showType)
{
XSDTypeDefinition baseTypeDefinition = xsdComplexTypeDefinition.getBaseTypeDefinition();
if (baseTypeDefinition != null &&
baseTypeDefinition != xsdComplexTypeDefinition.getContent() &&
baseTypeDefinition.getName() != null &&
!XSDConstants.isURType(baseTypeDefinition))
{
result.append(" : ");
result.append(baseTypeDefinition.getQName(xsdComplexTypeDefinition));
}
}
return result.toString();
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
private void fillTypesCombo()
{
typesCombo.removeAll();
IEditorPart editor = getActiveEditor();
ComponentReferenceEditManager manager = (ComponentReferenceEditManager)editor.getAdapter(XSDTypeReferenceEditManager.class);
ComponentSpecification[] items = manager.getQuickPicks();
typesCombo.add(org.eclipse.wst.xsd.ui.internal.adt.editor.Messages._UI_ACTION_BROWSE);
typesCombo.add(org.eclipse.wst.xsd.ui.internal.editor.Messages._UI_ACTION_NEW);
for (int i = 0; i < items.length; i++)
{
typesCombo.add(items[i].getName());
}
// Add the current Type of this attribute if needed
XSDSimpleTypeDefinition simpleType = (XSDSimpleTypeDefinition) input;
XSDTypeDefinition baseType = simpleType.getBaseType();
if (baseType != null && baseType.getQName() != null)
{
String currentTypeName = baseType.getQName(xsdSchema); //no prefix
ComponentSpecification ret = getComponentSpecFromQuickPickForValue(currentTypeName,manager);
if (ret == null && currentTypeName != null) //not in quickPick
{
typesCombo.add(currentTypeName);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
if (typeDef != null)
typeName = typeDef.getQName(xsdSchema);
if (typeName == null)
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
private void fillTypesCombo()
{
IEditorPart editor = getActiveEditor();
XSDTypeReferenceEditManager manager = (XSDTypeReferenceEditManager)editor.getAdapter(XSDTypeReferenceEditManager.class);
ComponentSpecification[] items = manager.getQuickPicks();
typeCombo.removeAll();
typeCombo.add(Messages._UI_ACTION_BROWSE);
typeCombo.add(Messages._UI_ACTION_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)
{
String currentTypeName = namedComponentType.getQName(xsdSchema); // no prefix
ComponentSpecification ret = getComponentSpecFromQuickPickForValue(currentTypeName, manager);
if (ret == null) //not in quickPick
typeCombo.add(currentTypeName);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
private void fillTypesCombo()
{
IEditorPart editor = getActiveEditor();
ComponentReferenceEditManager manager = (ComponentReferenceEditManager)editor.getAdapter(XSDTypeReferenceEditManager.class);
ComponentSpecification[] items = manager.getQuickPicks();
typeCombo.removeAll();
typeCombo.add(Messages._UI_ACTION_BROWSE);
typeCombo.add(Messages._UI_ACTION_NEW);
for (int i = 0; i < items.length; i++)
{
typeCombo.add(items[i].getName());
}
// Add the current Type of this element if needed
XSDElementDeclaration namedComponent = ((XSDElementDeclaration) input).getResolvedElementDeclaration();
XSDTypeDefinition td = namedComponent.getType();
if (td != null)
{
String currentTypeName = td.getQName(xsdSchema);
if (currentTypeName == null) // anonymous type
currentTypeName = "**Anonymous**";
ComponentSpecification ret = getComponentSpecFromQuickPickForValue(currentTypeName,manager);
if (ret == null && currentTypeName != null) //not in quickPick
{
typeCombo.add(currentTypeName);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
typeName = typeDef.getQName(xsdSchema);
内容来源于网络,如有侵权,请联系作者删除!