org.eclipse.xsd.XSDAttributeDeclaration.isAttributeDeclarationReference()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.eclipse.xsd.XSDAttributeDeclaration.isAttributeDeclarationReference()方法的一些代码示例,展示了XSDAttributeDeclaration.isAttributeDeclarationReference()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDAttributeDeclaration.isAttributeDeclarationReference()方法的具体详情如下:
包路径:org.eclipse.xsd.XSDAttributeDeclaration
类名称:XSDAttributeDeclaration
方法名:isAttributeDeclarationReference

XSDAttributeDeclaration.isAttributeDeclarationReference介绍

[英]Returns the value of the 'Attribute Declaration Reference' attribute.

This concrete attribute is equivalent to

xsdAttributeDeclaration != xsdAttributeDeclaration. 
#getResolvedAttributeDeclaration()

An infoset feature will never return an instance for which this is the true since this is a concrete attribute that is used to represent an attribute declaration with a ref attribute.
[中]返回“属性声明引用”属性的值。
这个具体属性相当于

xsdAttributeDeclaration != xsdAttributeDeclaration. 
#getResolvedAttributeDeclaration()

信息集功能永远不会返回一个实例,因为这是一个具体的属性,用于用ref属性表示属性声明。

代码示例

代码示例来源:origin: geotools/geotools

for (Iterator itr = atts.iterator(); itr.hasNext();) {
        XSDAttributeDeclaration attribute = (XSDAttributeDeclaration) itr.next();
        if ( attribute.isAttributeDeclarationReference() ) {
          attribute = attribute.getResolvedAttributeDeclaration();

代码示例来源:origin: geotools/geotools

if (attribute.isAttributeDeclarationReference()) {
  attribute = attribute.getResolvedAttributeDeclaration();

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public void visitAttributeDeclaration(XSDAttributeDeclaration attr)
 {
  if (attr.isAttributeDeclarationReference())
  {
   thingsWeNeedToListenTo.add(attr);
   thingsWeNeedToListenTo.add(attr.getResolvedAttributeDeclaration());
   concreteComponentList.add(attr);
  }
  else
  {
   concreteComponentList.add(attr.getResolvedAttributeDeclaration());
   thingsWeNeedToListenTo.add(attr.getResolvedAttributeDeclaration());
  }
 }
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public Object caseXSDAttributeDeclaration(XSDAttributeDeclaration attributeDeclaration)
{
 XSDConcreteComponent target = null;
 if (attributeDeclaration.isAttributeDeclarationReference())
 {
  target = attributeDeclaration.getResolvedAttributeDeclaration();
 }
 else if (attributeDeclaration.getAnonymousTypeDefinition() == null)
 {
  target = attributeDeclaration.getTypeDefinition();
  // Avoid navigating to built in data types.
  if (isFromSchemaForSchema(target))
  {
   target = null;
  }
 }
 return target;
}

代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit

/**
  * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
  * that can be created under this object.
  */
 @Override
 protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object)
 {
  super.collectNewChildDescriptors(newChildDescriptors, object);
  XSDAttributeDeclaration ad = (XSDAttributeDeclaration) object;

  if (!ad.isAttributeDeclarationReference())
  {
   // annotation
   newChildDescriptors.add(createChildParameter(xsdPackage.getXSDAttributeDeclaration_Annotation(), xsdFactory.createXSDAnnotation()));

   // atomic, list, and union simple type definitions
   addSimpleTypeDefinitionChildParameters(newChildDescriptors, ad, xsdPackage.getXSDAttributeDeclaration_AnonymousTypeDefinition(), true, true, true);
  }
 }
}

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

if (((XSDAttributeDeclaration) selected).isAttributeDeclarationReference())

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

XSDAttributeDeclaration attrDecl = attrUse.getContent();
if (attrDecl != null && attrDecl.isAttributeDeclarationReference())

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

XSDAttributeDeclaration attrDecl = attrUse.getContent();
if (attrDecl != null && attrDecl.isAttributeDeclarationReference())

代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit

if (xsdAttributeDeclaration.isAttributeDeclarationReference())

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public Image getImage()
{
 XSDAttributeDeclaration xsdAttributeDeclaration = getXSDAttributeDeclaration();  // don't want the resolved attribute
 if (xsdAttributeDeclaration.isAttributeDeclarationReference())
 {
  if (isReadOnly())
  {
   return XSDEditorPlugin.getPlugin().getIcon("obj16/XSDAttributeRefdis.gif");
  }
  return XSDEditorPlugin.getXSDImage("icons/XSDAttributeRef.gif"); //$NON-NLS-1$
 }
 else
 {
  if (isReadOnly())
  {
   return XSDEditorPlugin.getPlugin().getIcon("obj16/XSDAttributedis.gif");
  }
  return XSDEditorPlugin.getXSDImage("icons/XSDAttribute.gif"); //$NON-NLS-1$
 }
}

代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit

@Override
public void setPropertyValue(Object o, Object value)
 {
  XSDAttributeDeclaration xsdAttributeDeclaration = (XSDAttributeDeclaration)o;
  if (xsdAttributeDeclaration.isAttributeDeclarationReference())
  {
   XSDAttributeDeclaration newResolvedAttributeDeclaration =
    xsdAttributeDeclaration.resolveAttributeDeclaration(xsdAttributeDeclaration.getTargetNamespace(), (String)value);
   EditingDomain editingDomain = getEditingDomain(xsdAttributeDeclaration);
   if (editingDomain == null)
   {
    xsdAttributeDeclaration.setResolvedAttributeDeclaration(newResolvedAttributeDeclaration);
   }
   else
   {
    editingDomain.getCommandStack().execute
     (SetCommand.create
      (editingDomain,
       xsdAttributeDeclaration,
       xsdPackage.getXSDAttributeDeclaration_ResolvedAttributeDeclaration(),
       newResolvedAttributeDeclaration));
   }
  }
  else
  {
   super.setPropertyValue(o, value);
  }
 }
});

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

if (attrDecl.isAttributeDeclarationReference())

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

isAttributeReference = ((XSDAttributeDeclaration)input).isAttributeDeclarationReference();
XSDTypeDefinition typeDef = xsdAttribute.getTypeDefinition();
boolean isAnonymous = xsdAttribute.getAnonymousTypeDefinition() != null;

代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit

((XSDElementDeclaration) child).isElementDeclarationReference()) ||
(child instanceof XSDAttributeDeclaration &&
 ((XSDAttributeDeclaration) child).isAttributeDeclarationReference()) ||
(child instanceof XSDModelGroupDefinition &&
 ((XSDModelGroupDefinition) child).isModelGroupDefinitionReference()) ||

相关文章

微信公众号

最新文章

更多