<commit_before>/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.wso2.developerstudio.eclipse.gmf.esb.provider;


import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory;
import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyAction;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyMediator;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyName;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyValueType;

/**
 * This is the item provider adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.PropertyMediator} object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public class PropertyMediatorItemProvider
	extends MediatorItemProvider {
	/**
	 * This constructs an instance from a factory and a notifier.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PropertyMediatorItemProvider(AdapterFactory adapterFactory) {
		super(adapterFactory);
	}

	/**
	 * This returns the property descriptors for the adapted class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated NOT
	 */
	
	
	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
		
		PropertyMediator property = (PropertyMediator) object;
		if (itemPropertyDescriptors != null) {
			itemPropertyDescriptors.clear();
		}
		super.getPropertyDescriptors(object);
		
		addPropertyNamePropertyDescriptor(object);
		if(property.getPropertyName().equals(PropertyName.NEW_PROPERTY_NAME)){
			addNewPropertyNamePropertyDescriptor(object);
		}
		addPropertyActionPropertyDescriptor(object);	
						
		if (property.getPropertyAction().equals(PropertyAction.SET)) {
			addValueTypePropertyDescriptor(object);
			if (property.getValueType().equals(PropertyValueType.LITERAL)) {
				addPropertyDataTypePropertyDescriptor(object);
				switch (property.getPropertyDataType()) {
					case OM: {
						addOMPropertyDescriptor(object);
						break;
					}

					case STRING: {
						addValuePropertyDescriptor(object);
						addValueStringPatternPropertyDescriptor(object);
						addValueStringCapturingGroupPropertyDescriptor(object);
						break;
					}
					case BOOLEAN:{
						addBooleanPropertyDescriptor(object);
						break;
					}

					default: {
						addValuePropertyDescriptor(object);
					}
				}
			} else {
				addValueExpressionPropertyDescriptor(object);
				/*if (property.getPropertyDataType() == PropertyDataType.STRING) {
					addValueStringPatternPropertyDescriptor(object);
					addValueStringCapturingGroupPropertyDescriptor(object);
				}*/
			}
		}								
		
		addPropertyScopePropertyDescriptor(object);	
		addDescriptionPropertyDescriptor(object);
		
		
		/*if (itemPropertyDescriptors == null) {
			super.getPropertyDescriptors(object);

			addPropertyNamePropertyDescriptor(object);
			addPropertyDataTypePropertyDescriptor(object);
			addPropertyActionPropertyDescriptor(object);
			addPropertyScopePropertyDescriptor(object);
			addValueTypePropertyDescriptor(object);
			addValueLiteralPropertyDescriptor(object);<commit_msg>Fixing DEVTOOLESB-451<commit_after>/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.wso2.developerstudio.eclipse.gmf.esb.provider;


import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.wso2.developerstudio.eclipse.gmf.esb.EsbFactory;
import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyAction;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyMediator;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyName;
import org.wso2.developerstudio.eclipse.gmf.esb.PropertyValueType;

/**
 * This is the item provider adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.PropertyMediator} object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public class PropertyMediatorItemProvider
	extends MediatorItemProvider {
	/**
	 * This constructs an instance from a factory and a notifier.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PropertyMediatorItemProvider(AdapterFactory adapterFactory) {
		super(adapterFactory);
	}

	/**
	 * This returns the property descriptors for the adapted class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated NOT
	 */
	
	
	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
		
		PropertyMediator property = (PropertyMediator) object;
		if (itemPropertyDescriptors != null) {
			itemPropertyDescriptors.clear();
		}
		super.getPropertyDescriptors(object);
		
		addPropertyNamePropertyDescriptor(object);
		if(property.getPropertyName().equals(PropertyName.NEW_PROPERTY_NAME)){
			addNewPropertyNamePropertyDescriptor(object);
		}
		addPropertyActionPropertyDescriptor(object);	
						
		if (property.getPropertyAction().equals(PropertyAction.SET)) {
			addValueTypePropertyDescriptor(object);
			addPropertyDataTypePropertyDescriptor(object);
			if (property.getValueType().equals(PropertyValueType.LITERAL)) {
				switch (property.getPropertyDataType()) {
					case OM: {
						addOMPropertyDescriptor(object);
						break;
					}

					case STRING: {
						addValuePropertyDescriptor(object);
						addValueStringPatternPropertyDescriptor(object);
						addValueStringCapturingGroupPropertyDescriptor(object);
						break;
					}
					case BOOLEAN:{
						addBooleanPropertyDescriptor(object);
						break;
					}

					default: {
						addValuePropertyDescriptor(object);
					}
				}
			} else {
				addValueExpressionPropertyDescriptor(object);
				switch (property.getPropertyDataType()) {
					case STRING: {
						addValueStringPatternPropertyDescriptor(object);
						addValueStringCapturingGroupPropertyDescriptor(object);
						break;
					}
					default:
						break;
				}
				/*if (property.getPropertyDataType() == PropertyDataType.STRING) {
					addValueStringPatternPropertyDescriptor(object);
					addValueStringCapturingGroupPropertyDescriptor(object);
				}*/
			}
		}								
		
		addPropertyScopePropertyDescriptor(object);	
		addDescriptionPropertyDescriptor(object);
		
		
		/*if (itemPropertyDescriptors == null) {
			super.getPropertyDescriptors(object);

			addPropertyNamePropertyDescriptor(object);
			addPropertyDataTypePropertyDescriptor(object);
			addPropertyActionPropertyDescriptor(object);
			addPropertyScopePropertyDescriptor(object);
			addValueTypePropertyDescriptor(object);
			addValueLiteralPropertyDescriptor(object);
{'fraction_non_alphanumeric': 0.10879912960696314, 'fraction_numerical': 0.002583979328165375, 'mean_word_length': 4.516879219804951, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3027543', 'n_tokens_mistral': 2484, 'n_tokens_neox': 2084, 'n_words': 299}