KickJava   Java API By Example, From Geeks To Geeks.

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


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: MappingStrategyItemProvider.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.MappingStrategy} object.
35  */

36 public class MappingStrategyItemProvider
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 MappingStrategyItemProvider(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 MappingStrategy.gif.
67    */

68   public Object JavaDoc getImage(Object JavaDoc object)
69   {
70     return MappingPlugin.getPlugin().getImage("full/obj16/MappingStrategy");
71   }
72
73   public String JavaDoc getText(Object JavaDoc object)
74   {
75     return "MappingStrategy";
76   }
77
78   /**
79    * This handles notification by delegating to {@link #fireNotifyChanged fireNotifyChanged}.
80    */

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

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