gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-21 18:17:05 32 4
gpt4 key购买 nike

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

XSDConcreteComponent.getElement介绍

[英]Returns the value of the 'Element' attribute.

This is the underlying DOM element associated with this component, i.e., the #updateElement() of this component.
[中]返回“Element”属性的值。
这是与该组件关联的底层DOM元素,即该组件的#updateElement()。

代码示例

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

private boolean fallBackCheckIsReadOnly()
{
 Element element = ((XSDConcreteComponent)target).getElement();
 if (element instanceof IDOMNode
   || element instanceof ElementImpl)
 {
   return false;
 }
 return true;
}

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

@Override
public Object getPropertyValue(Object o)
 {
  XSDConcreteComponent concreteComponent = ((XSDConcreteComponent)o);
  if (concreteComponent.getElement() == null)
  {
   return "";
  }
  else
  {
   return concreteComponent.getElement().getTagName();
  }
 }
});

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

protected boolean isTreeViewerInputElement(Element element)
{     
 if (input instanceof XSDConcreteComponent)
 {  
  XSDConcreteComponent component = (XSDConcreteComponent)input;
  Element componentElement = component.getElement();
  Node parent = element.getParentNode();
  Node grandParent = parent != null ? parent.getParentNode() : null;
  return componentElement == element || componentElement == parent || componentElement == grandParent;
 }
 return false;
}

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

protected List<XSDTypeDefinition> getEcoreTypeQNamesAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
{
 Element element = xsdConcreteComponent.getElement();
 return
  element == null ?
   Collections.<XSDTypeDefinition>emptyList() :
    getEcoreTypeQNamesAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute);
}

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

public void undo()
{
 super.undo();
 if (appInfoAttributeAdded){
  component.getElement().removeAttribute(attributeQName);
 }
}

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

protected XSDTypeDefinition getEcoreTypeQNameAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
{
 Element element = xsdConcreteComponent.getElement();
 return  element == null ? null : getEcoreTypeQNameAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute);
}

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

protected String getEcoreAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
{
 if (xsdConcreteComponent == null)
 {
  return null;
 }
 else
 {
  Element element = xsdConcreteComponent.getElement();
  return getEcoreAttribute(element, attribute);
 }
}

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

protected XSDTypeDefinition getEcoreTypeQNameAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
{
 Element element = xsdConcreteComponent.getElement();
 return  element == null ? null : getEcoreTypeQNameAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute);
}

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

protected List<XSDTypeDefinition> getEcoreTypeQNamesAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
{
 Element element = xsdConcreteComponent.getElement();
 return
  element == null ?
   Collections.<XSDTypeDefinition>emptyList() :
    getEcoreTypeQNamesAttribute(xsdConcreteComponent, element, EcorePackage.eNS_URI, attribute);
}

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

protected String getEcoreAttribute(XSDConcreteComponent xsdConcreteComponent, String attribute)
{
 if (xsdConcreteComponent == null)
 {
  return null;
 }
 else
 {
  Element element = xsdConcreteComponent.getElement();
  return getEcoreAttribute(element, attribute);
 }
}

代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator

public Element getElement()
{
 if (element != null)
  return element;
 else if (getSchema() != null)
  element = getSchema().getElement();
 return element;
}

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

public void execute()
{
 try
 {
  beginRecording(component.getElement());
  super.execute();
  namespacePrefix = handleNamespacePrefices();
  attributeQName = namespacePrefix + ":" + attribute.getName(); //$NON-NLS-1$
  String value = component.getElement().getAttribute(attributeQName);
  if (value == null)
  {
   appInfoAttributeAdded = true;
   component.getElement().setAttribute(attributeQName, ""); //$NON-NLS-1$
  }
 }
 finally
 {
  endRecording();
 }
}

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

@Override
public String getURIFragment(EObject eObject)
{
 if (eObject instanceof XSDConcreteComponent)
 {
  XSDConcreteComponent xsdConcreteComponent = (XSDConcreteComponent)eObject;
  Element theElement = xsdConcreteComponent.getElement();
  if (theElement != null &&
     theElement.hasAttributeNS(null, XSDConstants.ID_ATTRIBUTE) &&
     theElement.getOwnerDocument().getElementById(theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE)) == theElement)
  {
   return theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE);
  }
 }
 return super.getURIFragment(eObject);
}

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

@Override
public String getURIFragment(EObject eObject)
{
 if (eObject instanceof XSDConcreteComponent)
 {
  XSDConcreteComponent xsdConcreteComponent = (XSDConcreteComponent)eObject;
  Element theElement = xsdConcreteComponent.getElement();
  if (theElement != null &&
     theElement.hasAttributeNS(null, XSDConstants.ID_ATTRIBUTE) &&
     theElement.getOwnerDocument().getElementById(theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE)) == theElement)
  {
   return theElement.getAttributeNS(null, XSDConstants.ID_ATTRIBUTE);
  }
 }
 return super.getURIFragment(eObject);
}

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

public String getQName(XSDConcreteComponent relativeToComponent)
{
 String theName = getName();
 if (theName != null && relativeToComponent != null)
 {
  Element theElement = relativeToComponent.getElement();
  if (theElement != null)
  {
   String qualifier = XSDConstants.lookupQualifier(theElement, getTargetNamespace());
   if (qualifier != null && qualifier.length() != 0)
   {
    return qualifier + ":" + theName;
   }
  }
 }
 return theName;
}

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

public String getQName(XSDConcreteComponent relativeToComponent)
{
 String theName = getName();
 if (theName != null && relativeToComponent != null)
 {
  Element theElement = relativeToComponent.getElement();
  if (theElement != null)
  {
   String qualifier = XSDConstants.lookupQualifier(theElement, getTargetNamespace());
   if (qualifier != null && qualifier.length() != 0)
   {
    return qualifier + ":" + theName;
   }
  }
 }
 return theName;
}

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

public void execute()
{
 try
 {
  beginRecording(component.getElement());
  super.execute();
  addAnnotationSet(component.getSchema(), extensionsSchemaSpec);
  formatChild(component.getElement());
 }
 finally
 {
  endRecording();
 }
}

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

public void execute()
{
 try
 {
  beginRecording(component.getElement());
  super.execute();
  doPreprocessing();
  addExtensionNode();
  doCustomizedActions();
  
  formatChild(component.getElement());
 }
 finally
 {
  endRecording();
 }
}

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

public void execute()
{
 try
 {
  beginRecording(parent.getElement());
  XSDConcreteComponent owner = getOwner();
  if (owner != null)
  {
   XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle();
   newModelGroup = createModelGroup();
   particle.setContent(newModelGroup);
   XSDComplexTypeDefinition ctd = (XSDComplexTypeDefinition) owner;
   ctd.setContent(particle);
  }
  formatChild(parent.getElement());
 }
 finally
 {
  endRecording();
 }
}

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

public void execute()
 {
  try
  {
   beginRecording(concreteComponent.getElement());
   XSDComponent td = computeComponent();
   if (td != null && td instanceof XSDTypeDefinition)
   {
    SetBaseTypeCommand command = new SetBaseTypeCommand(concreteComponent, (XSDTypeDefinition) td);
    command.execute();
   }
  }
  catch (Exception e)
  {

  }
  finally
  {
   endRecording();
  }
 }
}

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com