configtool/com.nokia.S60CT.CenRep.edit/src/cenrep/provider/AccessItemProvider.java
author terytkon
Thu, 11 Mar 2010 18:39:02 +0200
changeset 0 30eb2d538f02
permissions -rw-r--r--
Moved all configtools under oss repository and under epl licence.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     1
/*
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     3
* All rights reserved.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     4
* This component and the accompanying materials are made available
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     6
* which accompanies this distribution, and is available
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     8
*
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
     9
* Initial Contributors:
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    11
*
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    12
* Contributors:
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    13
*
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    14
* Description:
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    15
*
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    16
*/
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    17
package cenrep.provider;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    18
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    19
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    20
import java.util.Collection;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    21
import java.util.List;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    22
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    23
import org.eclipse.emf.common.notify.AdapterFactory;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    24
import org.eclipse.emf.common.notify.Notification;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    25
import org.eclipse.emf.common.util.ResourceLocator;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    26
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    27
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    28
import org.eclipse.emf.edit.provider.IItemLabelProvider;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    29
import org.eclipse.emf.edit.provider.IItemPropertySource;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    30
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    31
import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    32
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    33
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    34
import org.eclipse.emf.edit.provider.ViewerNotification;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    35
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    36
import cenrep.Access;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    37
import cenrep.CenrepFactory;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    38
import cenrep.CenrepPackage;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    39
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    40
/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    41
 * This is the item provider adapter for a {@link cenrep.Access} object.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    42
 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    43
 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    44
 * @generated NOT
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    45
 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    46
public class AccessItemProvider
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    47
	extends CommonAttrsItemProvider
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    48
	implements	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    49
		IEditingDomainItemProvider,	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    50
		IStructuredItemContentProvider,	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    51
		ITreeItemContentProvider,	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    52
		IItemLabelProvider,	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    53
		IItemPropertySource,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    54
		ITableItemLabelProvider{
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    55
	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    56
	public static final Access ZERO_ACCESS = CenrepFactory.eINSTANCE.createAccess();
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    57
	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    58
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    59
	 * This constructs an instance from a factory and a notifier.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    60
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    61
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    62
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    63
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    64
	public AccessItemProvider(AdapterFactory adapterFactory) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    65
		super(adapterFactory);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    66
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    67
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    68
	public Object getColumnImage(Object object, int columnIndex) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    69
		return null;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    70
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    71
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    72
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    73
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    74
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    75
	public String getColumnText(Object object, int columnIndex) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    76
		if(object.equals(ZERO_ACCESS))return null;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    77
		Access access = (Access)object;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    78
		switch(columnIndex){
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    79
		case 0: 
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    80
			return access.getType().getLiteral();
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    81
		case 1:
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    82
			return access.getSid();
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    83
		}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    84
		return null;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    85
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    86
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    87
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    88
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    89
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    90
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    91
	 * This returns the property descriptors for the adapted class.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    92
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    93
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    94
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    95
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    96
	public List getPropertyDescriptors(Object object) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    97
		if (itemPropertyDescriptors == null) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    98
			super.getPropertyDescriptors(object);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
    99
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   100
			addTypePropertyDescriptor(object);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   101
			addCapabilitiesPropertyDescriptor(object);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   102
			addSidPropertyDescriptor(object);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   103
		}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   104
		return itemPropertyDescriptors;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   105
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   106
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   107
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   108
	 * This adds a property descriptor for the Type feature.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   109
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   110
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   111
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   112
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   113
	protected void addTypePropertyDescriptor(Object object) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   114
		itemPropertyDescriptors.add
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   115
			(createItemPropertyDescriptor
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   116
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   117
				 getResourceLocator(),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   118
				 getString("_UI_Access_type_feature"),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   119
				 getString("_UI_PropertyDescriptor_description", "_UI_Access_type_feature", "_UI_Access_type"),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   120
				 CenrepPackage.Literals.ACCESS__TYPE,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   121
				 true,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   122
				 false,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   123
				 false,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   124
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   125
				 null,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   126
				 null));
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   127
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   128
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   129
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   130
	 * This adds a property descriptor for the Capabilities feature.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   131
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   132
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   133
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   134
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   135
	protected void addCapabilitiesPropertyDescriptor(Object object) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   136
		itemPropertyDescriptors.add
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   137
			(createItemPropertyDescriptor
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   138
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   139
				 getResourceLocator(),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   140
				 getString("_UI_Access_capabilities_feature"),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   141
				 getString("_UI_PropertyDescriptor_description", "_UI_Access_capabilities_feature", "_UI_Access_type"),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   142
				 CenrepPackage.Literals.ACCESS__CAPABILITIES,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   143
				 true,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   144
				 false,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   145
				 false,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   146
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   147
				 null,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   148
				 null));
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   149
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   150
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   151
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   152
	 * This adds a property descriptor for the Sid feature.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   153
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   154
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   155
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   156
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   157
	protected void addSidPropertyDescriptor(Object object) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   158
		itemPropertyDescriptors.add
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   159
			(createItemPropertyDescriptor
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   160
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   161
				 getResourceLocator(),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   162
				 getString("_UI_Access_sid_feature"),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   163
				 getString("_UI_PropertyDescriptor_description", "_UI_Access_sid_feature", "_UI_Access_type"),
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   164
				 CenrepPackage.Literals.ACCESS__SID,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   165
				 true,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   166
				 false,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   167
				 false,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   168
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   169
				 null,
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   170
				 null));
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   171
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   172
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   173
	
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   174
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   175
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   176
	 * This returns Access.gif.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   177
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   178
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   179
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   180
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   181
	public Object getImage(Object object) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   182
		return overlayImage(object, getResourceLocator().getImage("full/obj16/Access"));
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   183
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   184
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   185
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   186
	 * This returns the label text for the adapted class.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   187
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   188
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   189
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   190
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   191
	public String getText(Object object) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   192
		String label = ((Access)object).getId();
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   193
		return label == null || label.length() == 0 ?
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   194
			getString("_UI_Access_type") :
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   195
			getString("_UI_Access_type") + " " + label;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   196
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   197
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   198
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   199
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   200
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   201
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   202
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   203
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   204
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   205
	public void notifyChanged(Notification notification) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   206
		updateChildren(notification);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   207
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   208
		switch (notification.getFeatureID(Access.class)) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   209
			case CenrepPackage.ACCESS__TYPE:
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   210
			case CenrepPackage.ACCESS__CAPABILITIES:
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   211
			case CenrepPackage.ACCESS__SID:
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   212
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   213
				return;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   214
		}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   215
		super.notifyChanged(notification);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   216
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   217
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   218
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   219
	 * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   220
	 * describing all of the children that can be created under this object.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   221
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   222
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   223
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   224
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   225
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   226
		super.collectNewChildDescriptors(newChildDescriptors, object);
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   227
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   228
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   229
	/**
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   230
	 * Return the resource locator for this item provider's resources.
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   231
	 * <!-- begin-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   232
	 * <!-- end-user-doc -->
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   233
	 * @generated
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   234
	 */
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   235
	public ResourceLocator getResourceLocator() {
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   236
		return CRPluginModelEditPlugin.INSTANCE;
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   237
	}
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   238
30eb2d538f02 Moved all configtools under oss repository and under epl licence.
terytkon
parents:
diff changeset
   239
}