/**
* This file is protected by Copyright.
* Please refer to the COPYRIGHT file distributed with this source distribution.
*
* This file is part of REDHAWK IDE.
*
* All rights reserved. This program and the accompanying materials are made available under
* the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html.
*
*/
// BEGIN GENERATED CODE
package gov.redhawk.eclipsecorba.library.provider;
import gov.redhawk.eclipsecorba.library.LibraryPackage;
import gov.redhawk.eclipsecorba.library.PreferenceNodePathSet;
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.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link gov.redhawk.eclipsecorba.library.PreferenceNodePathSet} object.
* <!-- begin-user-doc -->
* @since 3.0
* <!-- end-user-doc -->
* @generated
*/
public class PreferenceNodePathSetItemProvider extends PathItemProvider implements IEditingDomainItemProvider, IStructuredItemContentProvider,
ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PreferenceNodePathSetItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addQualifierPropertyDescriptor(object);
addKeyPropertyDescriptor(object);
addDelimiterPropertyDescriptor(object);
addFileUriPropertyDescriptor(object);
addReplaceEnvPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Qualifier feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addQualifierPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PreferenceNodePathSet_qualifier_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PreferenceNodePathSet_qualifier_feature", "_UI_PreferenceNodePathSet_type"),
LibraryPackage.Literals.PREFERENCE_NODE_PATH_SET__QUALIFIER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Key feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addKeyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PreferenceNodePathSet_key_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PreferenceNodePathSet_key_feature", "_UI_PreferenceNodePathSet_type"),
LibraryPackage.Literals.PREFERENCE_NODE_PATH_SET__KEY,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Delimiter feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addDelimiterPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PreferenceNodePathSet_delimiter_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PreferenceNodePathSet_delimiter_feature", "_UI_PreferenceNodePathSet_type"),
LibraryPackage.Literals.PREFERENCE_NODE_PATH_SET__DELIMITER,
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the File Uri feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addFileUriPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PreferenceNodePathSet_fileUri_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PreferenceNodePathSet_fileUri_feature", "_UI_PreferenceNodePathSet_type"),
LibraryPackage.Literals.PREFERENCE_NODE_PATH_SET__FILE_URI,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Replace Env feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addReplaceEnvPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PreferenceNodePathSet_replaceEnv_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PreferenceNodePathSet_replaceEnv_feature", "_UI_PreferenceNodePathSet_type"),
LibraryPackage.Literals.PREFERENCE_NODE_PATH_SET__REPLACE_ENV,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
/**
* This returns PreferenceNodePathSet.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/PreferenceNodePathSet"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((PreferenceNodePathSet)object).getQualifier();
return label == null || label.length() == 0 ?
getString("_UI_PreferenceNodePathSet_type") :
getString("_UI_PreferenceNodePathSet_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(PreferenceNodePathSet.class)) {
case LibraryPackage.PREFERENCE_NODE_PATH_SET__QUALIFIER:
case LibraryPackage.PREFERENCE_NODE_PATH_SET__KEY:
case LibraryPackage.PREFERENCE_NODE_PATH_SET__DELIMITER:
case LibraryPackage.PREFERENCE_NODE_PATH_SET__FILE_URI:
case LibraryPackage.PREFERENCE_NODE_PATH_SET__REPLACE_ENV:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
}