Java 类com.intellij.uiDesigner.propertyInspector.properties.ClientPropertiesProperty 实例源码

项目:intellij-ce-playground    文件:RadComponent.java   
private void writeClientProperties(final XmlWriter writer) {
  if (myModule == null) {
    return;
  }
  boolean haveClientProperties = false;
  try {
    ClientPropertiesProperty cpp = ClientPropertiesProperty.getInstance(getProject());
    for (Property prop : cpp.getChildren(this)) {
      ClientPropertyProperty clientProp = (ClientPropertyProperty)prop;
      final Object value = getDelegee().getClientProperty(clientProp.getName());
      if (value != null) {
        if (!haveClientProperties) {
          writer.startElement(UIFormXmlConstants.ELEMENT_CLIENT_PROPERTIES);
          haveClientProperties = true;
        }
        writer.startElement(clientProp.getName());
        writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_CLASS, value.getClass().getName());
        writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_VALUE, value.toString());
        writer.endElement();
      }
    }
  }
  finally {
    if (haveClientProperties) {
      writer.endElement();
    }
  }
}
项目:tools-idea    文件:RadComponent.java   
private void writeClientProperties(final XmlWriter writer) {
  if (myModule == null) {
    return;
  }
  boolean haveClientProperties = false;
  try {
    ClientPropertiesProperty cpp = ClientPropertiesProperty.getInstance(getProject());
    for (Property prop : cpp.getChildren(this)) {
      ClientPropertyProperty clientProp = (ClientPropertyProperty)prop;
      final Object value = getDelegee().getClientProperty(clientProp.getName());
      if (value != null) {
        if (!haveClientProperties) {
          writer.startElement(UIFormXmlConstants.ELEMENT_CLIENT_PROPERTIES);
          haveClientProperties = true;
        }
        writer.startElement(clientProp.getName());
        writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_CLASS, value.getClass().getName());
        writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_VALUE, value.toString());
        writer.endElement();
      }
    }
  }
  finally {
    if (haveClientProperties) {
      writer.endElement();
    }
  }
}
项目:consulo-ui-designer    文件:RadComponent.java   
private void writeClientProperties(final XmlWriter writer) {
  if (myModule == null) {
    return;
  }
  boolean haveClientProperties = false;
  try {
    ClientPropertiesProperty cpp = ClientPropertiesProperty.getInstance(getProject());
    for (Property prop : cpp.getChildren(this)) {
      ClientPropertyProperty clientProp = (ClientPropertyProperty)prop;
      final Object value = getDelegee().getClientProperty(clientProp.getName());
      if (value != null) {
        if (!haveClientProperties) {
          writer.startElement(UIFormXmlConstants.ELEMENT_CLIENT_PROPERTIES);
          haveClientProperties = true;
        }
        writer.startElement(clientProp.getName());
        writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_CLASS, value.getClass().getName());
        writer.addAttribute(UIFormXmlConstants.ATTRIBUTE_VALUE, value.toString());
        writer.endElement();
      }
    }
  }
  finally {
    if (haveClientProperties) {
      writer.endElement();
    }
  }
}