Source Code Cross Referenced for ElementItemProvider.java in  » Workflow-Engines » osbl-1_0 » newprocess » provider » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » osbl 1_0 » newprocess.provider 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * <copyright>
003:         * </copyright>
004:         *
005:         * $Id$
006:         */package newprocess.provider;
007:
008:        import java.util.Collection;
009:        import java.util.List;
010:
011:        import newprocess.Element;
012:        import newprocess.NewprocessFactory;
013:        import newprocess.NewprocessPackage;
014:
015:        import org.eclipse.emf.common.notify.AdapterFactory;
016:        import org.eclipse.emf.common.notify.Notification;
017:
018:        import org.eclipse.emf.common.util.ResourceLocator;
019:
020:        import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
021:        import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
022:        import org.eclipse.emf.edit.provider.IItemLabelProvider;
023:        import org.eclipse.emf.edit.provider.IItemPropertySource;
024:        import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
025:        import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
026:        import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
027:        import org.eclipse.emf.edit.provider.ItemProviderAdapter;
028:        import org.eclipse.emf.edit.provider.ViewerNotification;
029:
030:        /**
031:         * This is the item provider adapter for a {@link newprocess.Element} object.
032:         * <!-- begin-user-doc -->
033:         * <!-- end-user-doc -->
034:         * @generated
035:         */
036:        public class ElementItemProvider extends ItemProviderAdapter implements 
037:                IEditingDomainItemProvider, IStructuredItemContentProvider,
038:                ITreeItemContentProvider, IItemLabelProvider,
039:                IItemPropertySource {
040:            /**
041:             * This constructs an instance from a factory and a notifier.
042:             * <!-- begin-user-doc -->
043:             * <!-- end-user-doc -->
044:             * @generated
045:             */
046:            public ElementItemProvider(AdapterFactory adapterFactory) {
047:                super (adapterFactory);
048:            }
049:
050:            /**
051:             * This returns the property descriptors for the adapted class.
052:             * <!-- begin-user-doc -->
053:             * <!-- end-user-doc -->
054:             * @generated
055:             */
056:            public List getPropertyDescriptors(Object object) {
057:                if (itemPropertyDescriptors == null) {
058:                    super .getPropertyDescriptors(object);
059:
060:                    addNamePropertyDescriptor(object);
061:                    addDescriptionPropertyDescriptor(object);
062:                    addImplementationPropertyDescriptor(object);
063:                    addUrlPropertyDescriptor(object);
064:                }
065:                return itemPropertyDescriptors;
066:            }
067:
068:            /**
069:             * This adds a property descriptor for the Name feature.
070:             * <!-- begin-user-doc -->
071:             * <!-- end-user-doc -->
072:             * @generated
073:             */
074:            protected void addNamePropertyDescriptor(Object object) {
075:                itemPropertyDescriptors
076:                        .add(createItemPropertyDescriptor(
077:                                ((ComposeableAdapterFactory) adapterFactory)
078:                                        .getRootAdapterFactory(),
079:                                getResourceLocator(),
080:                                getString("_UI_Element_name_feature"),
081:                                getString("_UI_PropertyDescriptor_description",
082:                                        "_UI_Element_name_feature",
083:                                        "_UI_Element_type"),
084:                                NewprocessPackage.Literals.ELEMENT__NAME, true,
085:                                false, false,
086:                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
087:                                null, null));
088:            }
089:
090:            /**
091:             * This adds a property descriptor for the Description feature.
092:             * <!-- begin-user-doc -->
093:             * <!-- end-user-doc -->
094:             * @generated
095:             */
096:            protected void addDescriptionPropertyDescriptor(Object object) {
097:                itemPropertyDescriptors
098:                        .add(createItemPropertyDescriptor(
099:                                ((ComposeableAdapterFactory) adapterFactory)
100:                                        .getRootAdapterFactory(),
101:                                getResourceLocator(),
102:                                getString("_UI_Element_description_feature"),
103:                                getString("_UI_PropertyDescriptor_description",
104:                                        "_UI_Element_description_feature",
105:                                        "_UI_Element_type"),
106:                                NewprocessPackage.Literals.ELEMENT__DESCRIPTION,
107:                                true, false, false,
108:                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
109:                                null, null));
110:            }
111:
112:            /**
113:             * This adds a property descriptor for the Implementation feature.
114:             * <!-- begin-user-doc -->
115:             * <!-- end-user-doc -->
116:             * @generated
117:             */
118:            protected void addImplementationPropertyDescriptor(Object object) {
119:                itemPropertyDescriptors
120:                        .add(createItemPropertyDescriptor(
121:                                ((ComposeableAdapterFactory) adapterFactory)
122:                                        .getRootAdapterFactory(),
123:                                getResourceLocator(),
124:                                getString("_UI_Element_implementation_feature"),
125:                                getString("_UI_PropertyDescriptor_description",
126:                                        "_UI_Element_implementation_feature",
127:                                        "_UI_Element_type"),
128:                                NewprocessPackage.Literals.ELEMENT__IMPLEMENTATION,
129:                                true, false, false,
130:                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
131:                                null, null));
132:            }
133:
134:            /**
135:             * This adds a property descriptor for the Url feature.
136:             * <!-- begin-user-doc -->
137:             * <!-- end-user-doc -->
138:             * @generated
139:             */
140:            protected void addUrlPropertyDescriptor(Object object) {
141:                itemPropertyDescriptors.add(createItemPropertyDescriptor(
142:                        ((ComposeableAdapterFactory) adapterFactory)
143:                                .getRootAdapterFactory(), getResourceLocator(),
144:                        getString("_UI_Element_url_feature"), getString(
145:                                "_UI_PropertyDescriptor_description",
146:                                "_UI_Element_url_feature", "_UI_Element_type"),
147:                        NewprocessPackage.Literals.ELEMENT__URL, true, false,
148:                        false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
149:                        null, null));
150:            }
151:
152:            /**
153:             * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
154:             * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
155:             * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
156:             * <!-- begin-user-doc -->
157:             * <!-- end-user-doc -->
158:             * @generated
159:             */
160:            public Collection getChildrenFeatures(Object object) {
161:                if (childrenFeatures == null) {
162:                    super .getChildrenFeatures(object);
163:                    childrenFeatures
164:                            .add(NewprocessPackage.Literals.ELEMENT__HAS_ENV_ENTRIES);
165:                }
166:                return childrenFeatures;
167:            }
168:
169:            /**
170:             * This returns Element.gif.
171:             * <!-- begin-user-doc -->
172:             * <!-- end-user-doc -->
173:             * @generated
174:             */
175:            public Object getImage(Object object) {
176:                return overlayImage(object, getResourceLocator().getImage(
177:                        "full/obj16/Element"));
178:            }
179:
180:            /**
181:             * This returns the label text for the adapted class.
182:             * <!-- begin-user-doc -->
183:             * <!-- end-user-doc -->
184:             * @generated
185:             */
186:            public String getText(Object object) {
187:                String label = ((Element) object).getName();
188:                return label == null || label.length() == 0 ? getString("_UI_Element_type")
189:                        : getString("_UI_Element_type") + " " + label;
190:            }
191:
192:            /**
193:             * This handles model notifications by calling {@link #updateChildren} to update any cached
194:             * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
195:             * <!-- begin-user-doc -->
196:             * <!-- end-user-doc -->
197:             * @generated
198:             */
199:            public void notifyChanged(Notification notification) {
200:                updateChildren(notification);
201:
202:                switch (notification.getFeatureID(Element.class)) {
203:                case NewprocessPackage.ELEMENT__NAME:
204:                case NewprocessPackage.ELEMENT__DESCRIPTION:
205:                case NewprocessPackage.ELEMENT__IMPLEMENTATION:
206:                case NewprocessPackage.ELEMENT__URL:
207:                case NewprocessPackage.ELEMENT__ID:
208:                    fireNotifyChanged(new ViewerNotification(notification,
209:                            notification.getNotifier(), false, true));
210:                    return;
211:                case NewprocessPackage.ELEMENT__HAS_ENV_ENTRIES:
212:                    fireNotifyChanged(new ViewerNotification(notification,
213:                            notification.getNotifier(), true, false));
214:                    return;
215:                }
216:                super .notifyChanged(notification);
217:            }
218:
219:            /**
220:             * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
221:             * describing all of the children that can be created under this object.
222:             * <!-- begin-user-doc -->
223:             * <!-- end-user-doc -->
224:             * @generated
225:             */
226:            protected void collectNewChildDescriptors(
227:                    Collection newChildDescriptors, Object object) {
228:                super .collectNewChildDescriptors(newChildDescriptors, object);
229:
230:                newChildDescriptors.add(createChildParameter(
231:                        NewprocessPackage.Literals.ELEMENT__HAS_ENV_ENTRIES,
232:                        NewprocessFactory.eINSTANCE.createEnvEntry()));
233:            }
234:
235:            /**
236:             * Return the resource locator for this item provider's resources.
237:             * <!-- begin-user-doc -->
238:             * <!-- end-user-doc -->
239:             * @generated
240:             */
241:            public ResourceLocator getResourceLocator() {
242:                return New_processEditPlugin.INSTANCE;
243:            }
244:
245:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.