KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > mapping > provider > TypeConverterItemProvider


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: TypeConverterItemProvider.java,v 1.5 2005/06/12 13:38:46 emerks Exp $
16  */

17 package org.eclipse.emf.mapping.provider;
18
19
20 import java.util.List JavaDoc;
21
22 import org.eclipse.emf.common.notify.AdapterFactory;
23 import org.eclipse.emf.common.notify.Notification;
24 import org.eclipse.emf.common.util.ResourceLocator;
25 import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
26 import org.eclipse.emf.edit.provider.IItemLabelProvider;
27 import org.eclipse.emf.edit.provider.IItemPropertySource;
28 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
29 import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
30 import org.eclipse.emf.mapping.MappingPlugin;
31
32
33 /**
34  * This is the item provider adpater for a {@link org.eclipse.emf.mapping.TypeConverter} object.
35  */

36 public class TypeConverterItemProvider
37   extends MappingHelperItemProvider
38   implements
39     IEditingDomainItemProvider,
40     IStructuredItemContentProvider,
41     ITreeItemContentProvider,
42     IItemLabelProvider,
43     IItemPropertySource
44 {
45   /**
46    * This constructs an instance from a factory and a notifier.
47    */

48   public TypeConverterItemProvider(AdapterFactory adapterFactory)
49   {
50     super(adapterFactory);
51   }
52
53   /**
54    * This returns the property descriptors for the adapted class.
55    */

56   public List JavaDoc getPropertyDescriptors(Object JavaDoc object)
57   {
58     if (itemPropertyDescriptors == null)
59     {
60       super.getPropertyDescriptors(object);
61     }
62     return itemPropertyDescriptors;
63   }
64
65   /**
66    * This returns the label text for the adapted class.
67    * <!-- begin-user-doc -->
68    * <!-- end-user-doc -->
69    * @generated NOT
70    */

71   public String JavaDoc getText(Object JavaDoc object)
72   {
73     return super.getText(object);
74   }
75
76   /**
77    * This handles notification by delegating to {@link #fireNotifyChanged fireNotifyChanged}.
78    */

79   public void notifyChanged(Notification msg)
80   {
81     super.notifyChanged(msg);
82   }
83
84   /**
85    * Return the resource locator for this item provider's resources.
86    * <!-- begin-user-doc -->
87    * <!-- end-user-doc -->
88    * @generated
89    */

90   public ResourceLocator getResourceLocator()
91   {
92     return MappingPlugin.INSTANCE;
93   }
94
95 }
96
Popular Tags