예제 #1
0
 private static void loadSetupBase(
     final String id,
     final Map<String, String> filter,
     final IConfigurationElement[] configurationElements,
     final RSetup setup)
     throws Exception {
   for (int i = 0; i < configurationElements.length; i++) {
     final IConfigurationElement element = configurationElements[i];
     if (element.getName().equals(BASE_ELEMENT_NAME)
         && id.equals(element.getAttribute(SETUP_ID_ATTRIBUTE_NAME))) {
       final String path = getLocation(element, filter);
       setup.setRHome(path);
       return;
     }
   }
   for (int i = 0; i < configurationElements.length; i++) {
     final IConfigurationElement element = configurationElements[i];
     if (element.equals(SETUP_ELEMENT_NAME)
         && id.equals(element.getAttribute(SETUP_ID_ATTRIBUTE_NAME))) {
       final String inheritId = element.getAttribute(INHERIT_BASE_ATTRIBUTE_NAME);
       if (inheritId != null) {
         loadSetupBase(inheritId, filter, configurationElements, setup);
       }
       return;
     }
   }
 }
 /**
  *
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  *
  * @generated
  */
 @Override
 public boolean eIsSet(int featureID) {
   switch (featureID) {
     case IUIBindingsPackage.STRING_TO_ICONFIGURATION_ELEMENT_MAP_ENTRY__KEY:
       return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
     case IUIBindingsPackage.STRING_TO_ICONFIGURATION_ELEMENT_MAP_ENTRY__VALUE:
       return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
   }
   return super.eIsSet(featureID);
 }
    @Override
    public boolean equals(Object obj) {

      if (obj instanceof Key) {
        Key other = (Key) obj;

        return (value == null ? (other.value == null) : (value.equals(other.value)))
            && (element == null ? (other.element == null) : (element.equals(other.element)));
      }

      return false;
    }
 /*
  * (non-Javadoc)
  *
  * @see java.lang.Object#equals(java.lang.Object)
  */
 @Override
 public boolean equals(Object obj) {
   if (delegateElement == null) return false;
   return delegateElement.equals(obj);
 }