Author: DartPeng
Date: 2009-04-14 02:40:37 -0400 (Tue, 14 Apr 2009)
New Revision: 14723
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractReaderItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractResourceConfigItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionsTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/DocumentRootItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ElementVisitorItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/FeaturesTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlerTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlersTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ImportTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamsTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfileTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfilesTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ReaderTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceConfigTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOffTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOnTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksItemProviderAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java
Log:
JBIDE-4171
Delete useless codes
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,174 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.jboss.tools.smooks.model.groovy.DocumentRoot;
-import org.jboss.tools.smooks.model.groovy.GroovyFactory;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-
-/**
- * This is the item provider adapter for a {@link groovy.DocumentRoot} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class DocumentRootItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DocumentRootItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY);
- childrenFeatures.add(GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns DocumentRoot.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/DocumentRoot"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_DocumentRoot_type");
- }
-
- /**
- * 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(DocumentRoot.class)) {
- case GroovyPackage.DOCUMENT_ROOT__GROOVY:
- case GroovyPackage.DOCUMENT_ROOT__SCRIPT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
- GroovyFactory.eINSTANCE.createGroovy()));
-
- newChildDescriptors.add
- (createChildParameter
- (GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT,
- GroovyFactory.eINSTANCE.createScriptType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return GroovyEditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,93 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-import org.eclipse.emf.common.EMFPlugin;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-/**
- * This is the central singleton for the Groovy-1 edit plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class GroovyEditPlugin extends EMFPlugin {
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final GroovyEditPlugin INSTANCE = new GroovyEditPlugin();
-
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static Implementation plugin;
-
- /**
- * Create the instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyEditPlugin() {
- super
- (new ResourceLocator [] {
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- @Override
- public ResourceLocator getPluginResourceLocator() {
- return plugin;
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- public static Implementation getPlugin() {
- return plugin;
- }
-
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Implementation extends EclipsePlugin {
- /**
- * Creates an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Implementation() {
- super();
-
- // Remember the static instance.
- //
- plugin = this;
- }
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,278 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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;
-import org.jboss.tools.smooks.model.groovy.Groovy;
-import org.jboss.tools.smooks.model.groovy.GroovyFactory;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.provider.ElementVisitorItemProvider;
-
-/**
- * This is the item provider adapter for a {@link groovy.Groovy} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class GroovyItemProvider
- extends ElementVisitorItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyItemProvider(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);
-
- addImportsPropertyDescriptor(object);
- addExecuteBeforePropertyDescriptor(object);
- addExecuteOnElementPropertyDescriptor(object);
- addExecuteOnElementNSPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Imports feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addImportsPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_imports_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_imports_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__IMPORTS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Execute Before feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addExecuteBeforePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_executeBefore_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_executeBefore_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__EXECUTE_BEFORE,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Execute On Element feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addExecuteOnElementPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_executeOnElement_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_executeOnElement_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Execute On Element NS feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addExecuteOnElementNSPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_executeOnElementNS_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_Groovy_executeOnElementNS_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT_NS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(GroovyPackage.Literals.GROOVY__PARAM);
- childrenFeatures.add(GroovyPackage.Literals.GROOVY__SCRIPT);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns Groovy.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/Groovy"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((Groovy)object).getTargetProfile();
- return label == null || label.length() == 0 ?
- getString("_UI_Groovy_type") :
- getString("_UI_Groovy_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(Groovy.class)) {
- case GroovyPackage.GROOVY__IMPORTS:
- case GroovyPackage.GROOVY__EXECUTE_BEFORE:
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
false, true));
- return;
- case GroovyPackage.GROOVY__PARAM:
- case GroovyPackage.GROOVY__SCRIPT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (GroovyPackage.Literals.GROOVY__PARAM,
- SmooksFactory.eINSTANCE.createParamType()));
-
- newChildDescriptors.add
- (createChildParameter
- (GroovyPackage.Literals.GROOVY__SCRIPT,
- GroovyFactory.eINSTANCE.createScriptType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return GroovyEditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,249 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.jboss.tools.smooks.model.groovy.util.GroovyAdapterFactory;
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers.
- * The adapters generated by this factory convert EMF adapter notifications into calls to
{@link #fireNotifyChanged fireNotifyChanged}.
- * The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class GroovyItemProviderAdapterFactory extends GroovyAdapterFactory implements
ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType
isFactoryForType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection<Object> supportedTypes = new ArrayList<Object>();
-
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyItemProviderAdapterFactory() {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link groovy.DocumentRoot}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DocumentRootItemProvider documentRootItemProvider;
-
- /**
- * This creates an adapter for a {@link groovy.DocumentRoot}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createDocumentRootAdapter() {
- if (documentRootItemProvider == null) {
- documentRootItemProvider = new DocumentRootItemProvider(this);
- }
-
- return documentRootItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link groovy.Groovy} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected GroovyItemProvider groovyItemProvider;
-
- /**
- * This creates an adapter for a {@link groovy.Groovy}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createGroovyAdapter() {
- if (groovyItemProvider == null) {
- groovyItemProvider = new GroovyItemProvider(this);
- }
-
- return groovyItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link groovy.ScriptType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ScriptTypeItemProvider scriptTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link groovy.ScriptType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createScriptTypeAdapter() {
- if (scriptTypeItemProvider == null) {
- scriptTypeItemProvider = new ScriptTypeItemProvider(this);
- }
-
- return scriptTypeItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this :
parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object type) {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void dispose() {
- if (documentRootItemProvider != null) documentRootItemProvider.dispose();
- if (groovyItemProvider != null) groovyItemProvider.dispose();
- if (scriptTypeItemProvider != null) scriptTypeItemProvider.dispose();
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,318 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-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.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-import org.jboss.tools.smooks.model.groovy.ScriptType;
-
-/**
- * This is the item provider adapter for a {@link groovy.ScriptType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ScriptTypeItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ScriptTypeItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(XMLTypePackage.Literals.ANY_TYPE__MIXED);
- childrenFeatures.add(XMLTypePackage.Literals.ANY_TYPE__ANY_ATTRIBUTE);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns ScriptType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ScriptType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_ScriptType_type");
- }
-
- /**
- * 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(ScriptType.class)) {
- case GroovyPackage.SCRIPT_TYPE__MIXED:
- case GroovyPackage.SCRIPT_TYPE__ANY_ATTRIBUTE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
-// "")));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
-// "")));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
-// XMLTypeFactory.eINSTANCE.createProcessingInstruction())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
-// "")));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
-// GroovyFactory.eINSTANCE.createGroovy())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT,
-// GroovyFactory.eINSTANCE.createScriptType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION,
-// SmooksFactory.eINSTANCE.createConditionType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS,
-// SmooksFactory.eINSTANCE.createConditionsType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES,
-// SmooksFactory.eINSTANCE.createFeaturesType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER,
-// SmooksFactory.eINSTANCE.createHandlerType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS,
-// SmooksFactory.eINSTANCE.createHandlersType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
-// SmooksFactory.eINSTANCE.createImportType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__PARAM,
-// SmooksFactory.eINSTANCE.createParamType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS,
-// SmooksFactory.eINSTANCE.createParamsType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE,
-// SmooksFactory.eINSTANCE.createProfileType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES,
-// SmooksFactory.eINSTANCE.createProfilesType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
-// SmooksFactory.eINSTANCE.createReaderType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE,
-// SmooksFactory.eINSTANCE.createResourceType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
-// SmooksFactory.eINSTANCE.createResourceConfigType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF,
-// SmooksFactory.eINSTANCE.createSetOffType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON,
-// SmooksFactory.eINSTANCE.createSetOnType())));
-//
-// newChildDescriptors.add
-// (createChildParameter
-// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
-// FeatureMapUtil.createEntry
-// (SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST,
-// SmooksFactory.eINSTANCE.createSmooksResourceListType())));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return GroovyEditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractReaderItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractReaderItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractReaderItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,134 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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;
-import org.jboss.tools.smooks.model.smooks.AbstractReader;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-
-/**
- * This is the item provider adapter for a {@link smooks.AbstractReader} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class AbstractReaderItemProvider
- extends AbstractResourceConfigItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AbstractReaderItemProvider(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);
-
- addTargetProfilePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Target Profile feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTargetProfilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AbstractReader_targetProfile_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_AbstractReader_targetProfile_feature",
"_UI_AbstractReader_type"),
- SmooksPackage.Literals.ABSTRACT_READER__TARGET_PROFILE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((AbstractReader)object).getTargetProfile();
- return label == null || label.length() == 0 ?
- getString("_UI_AbstractReader_type") :
- getString("_UI_AbstractReader_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(AbstractReader.class)) {
- case SmooksPackage.ABSTRACT_READER__TARGET_PROFILE:
- 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);
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractResourceConfigItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractResourceConfigItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/AbstractResourceConfigItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,113 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.AbstractResourceConfig} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class AbstractResourceConfigItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public AbstractResourceConfigItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_AbstractResourceConfig_type");
- }
-
- /**
- * 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);
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,233 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.ConditionType;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.ConditionType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ConditionTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ConditionTypeItemProvider(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);
-
- addValuePropertyDescriptor(object);
- addEvaluatorPropertyDescriptor(object);
- addIdPropertyDescriptor(object);
- addIdRefPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Value feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ConditionType_value_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ConditionType_value_feature", "_UI_ConditionType_type"),
- SmooksPackage.Literals.CONDITION_TYPE__VALUE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Evaluator feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addEvaluatorPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ConditionType_evaluator_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ConditionType_evaluator_feature", "_UI_ConditionType_type"),
- SmooksPackage.Literals.CONDITION_TYPE__EVALUATOR,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Id feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addIdPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ConditionType_id_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ConditionType_id_feature", "_UI_ConditionType_type"),
- SmooksPackage.Literals.CONDITION_TYPE__ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Id Ref feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addIdRefPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ConditionType_idRef_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ConditionType_idRef_feature", "_UI_ConditionType_type"),
- SmooksPackage.Literals.CONDITION_TYPE__ID_REF,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns ConditionType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ConditionType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ConditionType)object).getId();
- return label == null || label.length() == 0 ?
- getString("_UI_ConditionType_type") :
- getString("_UI_ConditionType_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(ConditionType.class)) {
- case SmooksPackage.CONDITION_TYPE__VALUE:
- case SmooksPackage.CONDITION_TYPE__EVALUATOR:
- case SmooksPackage.CONDITION_TYPE__ID:
- case SmooksPackage.CONDITION_TYPE__ID_REF:
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionsTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionsTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ConditionsTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,170 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.ViewerNotification;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.ConditionsType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.ConditionsType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ConditionsTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ConditionsTypeItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.CONDITIONS_TYPE__CONDITION);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns ConditionsType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ConditionsType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_ConditionsType_type");
- }
-
- /**
- * 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(ConditionsType.class)) {
- case SmooksPackage.CONDITIONS_TYPE__CONDITION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.CONDITIONS_TYPE__CONDITION,
- SmooksFactory.eINSTANCE.createConditionType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/DocumentRootItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/DocumentRootItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/DocumentRootItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,280 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.jboss.tools.smooks.model.smooks.DocumentRoot;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-/**
- * This is the item provider adapter for a {@link smooks.DocumentRoot} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class DocumentRootItemProvider
- extends ItemProviderAdapter
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DocumentRootItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__ABSTRACT_READER);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__ABSTRACT_RESOURCE_CONFIG);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__ELEMENT_VISITOR);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__PARAM);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__READER);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON);
- childrenFeatures.add(SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns DocumentRoot.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/DocumentRoot"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_DocumentRoot_type");
- }
-
- /**
- * 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(DocumentRoot.class)) {
- case SmooksPackage.DOCUMENT_ROOT__ABSTRACT_READER:
- case SmooksPackage.DOCUMENT_ROOT__ABSTRACT_RESOURCE_CONFIG:
- case SmooksPackage.DOCUMENT_ROOT__CONDITION:
- case SmooksPackage.DOCUMENT_ROOT__CONDITIONS:
- case SmooksPackage.DOCUMENT_ROOT__ELEMENT_VISITOR:
- case SmooksPackage.DOCUMENT_ROOT__FEATURES:
- case SmooksPackage.DOCUMENT_ROOT__HANDLER:
- case SmooksPackage.DOCUMENT_ROOT__HANDLERS:
- case SmooksPackage.DOCUMENT_ROOT__IMPORT:
- case SmooksPackage.DOCUMENT_ROOT__PARAM:
- case SmooksPackage.DOCUMENT_ROOT__PARAMS:
- case SmooksPackage.DOCUMENT_ROOT__PROFILE:
- case SmooksPackage.DOCUMENT_ROOT__PROFILES:
- case SmooksPackage.DOCUMENT_ROOT__READER:
- case SmooksPackage.DOCUMENT_ROOT__RESOURCE:
- case SmooksPackage.DOCUMENT_ROOT__RESOURCE_CONFIG:
- case SmooksPackage.DOCUMENT_ROOT__SET_OFF:
- case SmooksPackage.DOCUMENT_ROOT__SET_ON:
- case SmooksPackage.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION,
- SmooksFactory.eINSTANCE.createConditionType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS,
- SmooksFactory.eINSTANCE.createConditionsType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES,
- SmooksFactory.eINSTANCE.createFeaturesType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER,
- SmooksFactory.eINSTANCE.createHandlerType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS,
- SmooksFactory.eINSTANCE.createHandlersType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
- SmooksFactory.eINSTANCE.createImportType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__PARAM,
- SmooksFactory.eINSTANCE.createParamType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS,
- SmooksFactory.eINSTANCE.createParamsType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE,
- SmooksFactory.eINSTANCE.createProfileType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES,
- SmooksFactory.eINSTANCE.createProfilesType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
- SmooksFactory.eINSTANCE.createReaderType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE,
- SmooksFactory.eINSTANCE.createResourceType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
- SmooksFactory.eINSTANCE.createResourceConfigType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF,
- SmooksFactory.eINSTANCE.createSetOffType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON,
- SmooksFactory.eINSTANCE.createSetOnType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST,
- SmooksFactory.eINSTANCE.createSmooksResourceListType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ElementVisitorItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ElementVisitorItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ElementVisitorItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,174 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.ecore.EStructuralFeature;
-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;
-import org.jboss.tools.smooks.model.smooks.ElementVisitor;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-
-/**
- * This is the item provider adapter for a {@link smooks.ElementVisitor} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ElementVisitorItemProvider
- extends AbstractResourceConfigItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ElementVisitorItemProvider(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);
-
- addTargetProfilePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Target Profile feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTargetProfilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ElementVisitor_targetProfile_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ElementVisitor_targetProfile_feature",
"_UI_ElementVisitor_type"),
- SmooksPackage.Literals.ELEMENT_VISITOR__TARGET_PROFILE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.ELEMENT_VISITOR__CONDITION);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ElementVisitor)object).getTargetProfile();
- return label == null || label.length() == 0 ?
- getString("_UI_ElementVisitor_type") :
- getString("_UI_ElementVisitor_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(ElementVisitor.class)) {
- case SmooksPackage.ELEMENT_VISITOR__TARGET_PROFILE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
false, true));
- return;
- case SmooksPackage.ELEMENT_VISITOR__CONDITION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.ELEMENT_VISITOR__CONDITION,
- SmooksFactory.eINSTANCE.createConditionType()));
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/FeaturesTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/FeaturesTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/FeaturesTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,177 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.ViewerNotification;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.FeaturesType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.FeaturesType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class FeaturesTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeaturesTypeItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.FEATURES_TYPE__SET_ON);
- childrenFeatures.add(SmooksPackage.Literals.FEATURES_TYPE__SET_OFF);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns FeaturesType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/FeaturesType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_FeaturesType_type");
- }
-
- /**
- * 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(FeaturesType.class)) {
- case SmooksPackage.FEATURES_TYPE__SET_ON:
- case SmooksPackage.FEATURES_TYPE__SET_OFF:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.FEATURES_TYPE__SET_ON,
- SmooksFactory.eINSTANCE.createSetOnType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.FEATURES_TYPE__SET_OFF,
- SmooksFactory.eINSTANCE.createSetOffType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlerTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlerTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlerTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,161 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.HandlerType;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.HandlerType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class HandlerTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public HandlerTypeItemProvider(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);
-
- addClassPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Class feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addClassPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_HandlerType_class_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_HandlerType_class_feature", "_UI_HandlerType_type"),
- SmooksPackage.Literals.HANDLER_TYPE__CLASS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns HandlerType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/HandlerType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((HandlerType)object).getClass_();
- return label == null || label.length() == 0 ?
- getString("_UI_HandlerType_type") :
- getString("_UI_HandlerType_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(HandlerType.class)) {
- case SmooksPackage.HANDLER_TYPE__CLASS:
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlersTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlersTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/HandlersTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,170 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.ViewerNotification;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.HandlersType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.HandlersType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class HandlersTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public HandlersTypeItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.HANDLERS_TYPE__HANDLER);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns HandlersType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/HandlersType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_HandlersType_type");
- }
-
- /**
- * 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(HandlersType.class)) {
- case SmooksPackage.HANDLERS_TYPE__HANDLER:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.HANDLERS_TYPE__HANDLER,
- SmooksFactory.eINSTANCE.createHandlerType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ImportTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ImportTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ImportTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,185 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.ecore.EStructuralFeature;
-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;
-import org.jboss.tools.smooks.model.smooks.ImportType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-
-/**
- * This is the item provider adapter for a {@link smooks.ImportType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ImportTypeItemProvider
- extends AbstractResourceConfigItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ImportTypeItemProvider(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);
-
- addFilePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the File feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addFilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ImportType_file_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ImportType_file_feature", "_UI_ImportType_type"),
- SmooksPackage.Literals.IMPORT_TYPE__FILE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.IMPORT_TYPE__PARAM);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns ImportType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ImportType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ImportType)object).getFile();
- return label == null || label.length() == 0 ?
- getString("_UI_ImportType_type") :
- getString("_UI_ImportType_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(ImportType.class)) {
- case SmooksPackage.IMPORT_TYPE__FILE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
false, true));
- return;
- case SmooksPackage.IMPORT_TYPE__PARAM:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.IMPORT_TYPE__PARAM,
- SmooksFactory.eINSTANCE.createParamType()));
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,185 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.ParamType;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.ParamType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ParamTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ParamTypeItemProvider(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);
-
- addNamePropertyDescriptor(object);
- addTypePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Name feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ParamType_name_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ParamType_name_feature", "_UI_ParamType_type"),
- SmooksPackage.Literals.PARAM_TYPE__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Type feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ParamType_type_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ParamType_type_feature", "_UI_ParamType_type"),
- SmooksPackage.Literals.PARAM_TYPE__TYPE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns ParamType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ParamType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ParamType)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_ParamType_type") :
- getString("_UI_ParamType_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(ParamType.class)) {
- case SmooksPackage.PARAM_TYPE__NAME:
- case SmooksPackage.PARAM_TYPE__TYPE:
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamsTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamsTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ParamsTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,170 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.ViewerNotification;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.ParamsType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.ParamsType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ParamsTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ParamsTypeItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.PARAMS_TYPE__PARAM);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns ParamsType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ParamsType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_ParamsType_type");
- }
-
- /**
- * 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(ParamsType.class)) {
- case SmooksPackage.PARAMS_TYPE__PARAM:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.PARAMS_TYPE__PARAM,
- SmooksFactory.eINSTANCE.createParamType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfileTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfileTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfileTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,209 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.ProfileType;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.ProfileType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ProfileTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ProfileTypeItemProvider(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);
-
- addValuePropertyDescriptor(object);
- addBaseProfilePropertyDescriptor(object);
- addSubProfilesPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Value feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ProfileType_value_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ProfileType_value_feature", "_UI_ProfileType_type"),
- SmooksPackage.Literals.PROFILE_TYPE__VALUE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Base Profile feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addBaseProfilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ProfileType_baseProfile_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ProfileType_baseProfile_feature", "_UI_ProfileType_type"),
- SmooksPackage.Literals.PROFILE_TYPE__BASE_PROFILE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Sub Profiles feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addSubProfilesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ProfileType_subProfiles_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ProfileType_subProfiles_feature", "_UI_ProfileType_type"),
- SmooksPackage.Literals.PROFILE_TYPE__SUB_PROFILES,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns ProfileType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ProfileType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ProfileType)object).getValue();
- return label == null || label.length() == 0 ?
- getString("_UI_ProfileType_type") :
- getString("_UI_ProfileType_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(ProfileType.class)) {
- case SmooksPackage.PROFILE_TYPE__VALUE:
- case SmooksPackage.PROFILE_TYPE__BASE_PROFILE:
- case SmooksPackage.PROFILE_TYPE__SUB_PROFILES:
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfilesTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfilesTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ProfilesTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,170 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-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.ViewerNotification;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.ProfilesType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.ProfilesType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ProfilesTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ProfilesTypeItemProvider(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);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.PROFILES_TYPE__PROFILE);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns ProfilesType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ProfilesType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_ProfilesType_type");
- }
-
- /**
- * 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(ProfilesType.class)) {
- case SmooksPackage.PROFILES_TYPE__PROFILE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.PROFILES_TYPE__PROFILE,
- SmooksFactory.eINSTANCE.createProfileType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ReaderTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ReaderTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ReaderTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,199 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.ecore.EStructuralFeature;
-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;
-import org.jboss.tools.smooks.model.smooks.ReaderType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-
-/**
- * This is the item provider adapter for a {@link smooks.ReaderType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ReaderTypeItemProvider
- extends AbstractReaderItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ReaderTypeItemProvider(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);
-
- addClassPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Class feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addClassPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ReaderType_class_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ReaderType_class_feature", "_UI_ReaderType_type"),
- SmooksPackage.Literals.READER_TYPE__CLASS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.READER_TYPE__HANDLERS);
- childrenFeatures.add(SmooksPackage.Literals.READER_TYPE__FEATURES);
- childrenFeatures.add(SmooksPackage.Literals.READER_TYPE__PARAMS);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns ReaderType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ReaderType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ReaderType)object).getTargetProfile();
- return label == null || label.length() == 0 ?
- getString("_UI_ReaderType_type") :
- getString("_UI_ReaderType_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(ReaderType.class)) {
- case SmooksPackage.READER_TYPE__CLASS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
false, true));
- return;
- case SmooksPackage.READER_TYPE__HANDLERS:
- case SmooksPackage.READER_TYPE__FEATURES:
- case SmooksPackage.READER_TYPE__PARAMS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.READER_TYPE__HANDLERS,
- SmooksFactory.eINSTANCE.createHandlersType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.READER_TYPE__FEATURES,
- SmooksFactory.eINSTANCE.createFeaturesType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.READER_TYPE__PARAMS,
- SmooksFactory.eINSTANCE.createParamsType()));
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceConfigTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceConfigTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceConfigTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,247 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.ecore.EStructuralFeature;
-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;
-import org.jboss.tools.smooks.model.smooks.ResourceConfigType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-
-/**
- * This is the item provider adapter for a {@link smooks.ResourceConfigType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ResourceConfigTypeItemProvider
- extends AbstractResourceConfigItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceConfigTypeItemProvider(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);
-
- addSelectorPropertyDescriptor(object);
- addSelectorNamespacePropertyDescriptor(object);
- addTargetProfilePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Selector feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addSelectorPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ResourceConfigType_selector_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ResourceConfigType_selector_feature",
"_UI_ResourceConfigType_type"),
- SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__SELECTOR,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Selector Namespace feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addSelectorNamespacePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ResourceConfigType_selectorNamespace_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ResourceConfigType_selectorNamespace_feature",
"_UI_ResourceConfigType_type"),
- SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__SELECTOR_NAMESPACE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Target Profile feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTargetProfilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ResourceConfigType_targetProfile_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ResourceConfigType_targetProfile_feature",
"_UI_ResourceConfigType_type"),
- SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__TARGET_PROFILE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__RESOURCE);
- childrenFeatures.add(SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__CONDITION);
- childrenFeatures.add(SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__PARAM);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns ResourceConfigType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ResourceConfigType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ResourceConfigType)object).getSelectorNamespace();
- return label == null || label.length() == 0 ?
- getString("_UI_ResourceConfigType_type") :
- getString("_UI_ResourceConfigType_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(ResourceConfigType.class)) {
- case SmooksPackage.RESOURCE_CONFIG_TYPE__SELECTOR:
- case SmooksPackage.RESOURCE_CONFIG_TYPE__SELECTOR_NAMESPACE:
- case SmooksPackage.RESOURCE_CONFIG_TYPE__TARGET_PROFILE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
false, true));
- return;
- case SmooksPackage.RESOURCE_CONFIG_TYPE__RESOURCE:
- case SmooksPackage.RESOURCE_CONFIG_TYPE__CONDITION:
- case SmooksPackage.RESOURCE_CONFIG_TYPE__PARAM:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__RESOURCE,
- SmooksFactory.eINSTANCE.createResourceType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__CONDITION,
- SmooksFactory.eINSTANCE.createConditionType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__PARAM,
- SmooksFactory.eINSTANCE.createParamType()));
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/ResourceTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,185 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.ResourceType;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.ResourceType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class ResourceTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceTypeItemProvider(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);
-
- addValuePropertyDescriptor(object);
- addTypePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Value feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addValuePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ResourceType_value_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ResourceType_value_feature", "_UI_ResourceType_type"),
- SmooksPackage.Literals.RESOURCE_TYPE__VALUE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Type feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ResourceType_type_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_ResourceType_type_feature", "_UI_ResourceType_type"),
- SmooksPackage.Literals.RESOURCE_TYPE__TYPE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns ResourceType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/ResourceType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((ResourceType)object).getValue();
- return label == null || label.length() == 0 ?
- getString("_UI_ResourceType_type") :
- getString("_UI_ResourceType_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(ResourceType.class)) {
- case SmooksPackage.RESOURCE_TYPE__VALUE:
- case SmooksPackage.RESOURCE_TYPE__TYPE:
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOffTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOffTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOffTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,161 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.SetOffType;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.SetOffType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class SetOffTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SetOffTypeItemProvider(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);
-
- addFeaturePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Feature feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addFeaturePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_SetOffType_feature_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_SetOffType_feature_feature", "_UI_SetOffType_type"),
- SmooksPackage.Literals.SET_OFF_TYPE__FEATURE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns SetOffType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/SetOffType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((SetOffType)object).getFeature();
- return label == null || label.length() == 0 ?
- getString("_UI_SetOffType_type") :
- getString("_UI_SetOffType_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(SetOffType.class)) {
- case SmooksPackage.SET_OFF_TYPE__FEATURE:
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOnTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOnTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SetOnTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,161 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.smooks.SetOnType;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.SetOnType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class SetOnTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SetOnTypeItemProvider(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);
-
- addFeaturePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Feature feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addFeaturePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_SetOnType_feature_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_SetOnType_feature_feature", "_UI_SetOnType_type"),
- SmooksPackage.Literals.SET_ON_TYPE__FEATURE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This returns SetOnType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/SetOnType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((SetOnType)object).getFeature();
- return label == null || label.length() == 0 ?
- getString("_UI_SetOnType_type") :
- getString("_UI_SetOnType_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(SetOnType.class)) {
- case SmooksPackage.SET_ON_TYPE__FEATURE:
- 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);
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksItemProviderAdapterFactory.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksItemProviderAdapterFactory.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksItemProviderAdapterFactory.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,585 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.jboss.tools.smooks.model.smooks.util.SmooksAdapterFactory;
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers.
- * The adapters generated by this factory convert EMF adapter notifications into calls to
{@link #fireNotifyChanged fireNotifyChanged}.
- * The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class SmooksItemProviderAdapterFactory extends SmooksAdapterFactory implements
ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType
isFactoryForType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection<Object> supportedTypes = new ArrayList<Object>();
-
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SmooksItemProviderAdapterFactory() {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ConditionsType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ConditionsTypeItemProvider conditionsTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ConditionsType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createConditionsTypeAdapter() {
- if (conditionsTypeItemProvider == null) {
- conditionsTypeItemProvider = new ConditionsTypeItemProvider(this);
- }
-
- return conditionsTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ConditionType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ConditionTypeItemProvider conditionTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ConditionType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createConditionTypeAdapter() {
- if (conditionTypeItemProvider == null) {
- conditionTypeItemProvider = new ConditionTypeItemProvider(this);
- }
-
- return conditionTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.DocumentRoot}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DocumentRootItemProvider documentRootItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.DocumentRoot}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createDocumentRootAdapter() {
- if (documentRootItemProvider == null) {
- documentRootItemProvider = new DocumentRootItemProvider(this);
- }
-
- return documentRootItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.FeaturesType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected FeaturesTypeItemProvider featuresTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.FeaturesType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createFeaturesTypeAdapter() {
- if (featuresTypeItemProvider == null) {
- featuresTypeItemProvider = new FeaturesTypeItemProvider(this);
- }
-
- return featuresTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.HandlersType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected HandlersTypeItemProvider handlersTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.HandlersType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createHandlersTypeAdapter() {
- if (handlersTypeItemProvider == null) {
- handlersTypeItemProvider = new HandlersTypeItemProvider(this);
- }
-
- return handlersTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.HandlerType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected HandlerTypeItemProvider handlerTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.HandlerType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createHandlerTypeAdapter() {
- if (handlerTypeItemProvider == null) {
- handlerTypeItemProvider = new HandlerTypeItemProvider(this);
- }
-
- return handlerTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ImportType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ImportTypeItemProvider importTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ImportType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createImportTypeAdapter() {
- if (importTypeItemProvider == null) {
- importTypeItemProvider = new ImportTypeItemProvider(this);
- }
-
- return importTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ParamsType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ParamsTypeItemProvider paramsTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ParamsType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createParamsTypeAdapter() {
- if (paramsTypeItemProvider == null) {
- paramsTypeItemProvider = new ParamsTypeItemProvider(this);
- }
-
- return paramsTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ParamType} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ParamTypeItemProvider paramTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ParamType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createParamTypeAdapter() {
- if (paramTypeItemProvider == null) {
- paramTypeItemProvider = new ParamTypeItemProvider(this);
- }
-
- return paramTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ProfilesType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ProfilesTypeItemProvider profilesTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ProfilesType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createProfilesTypeAdapter() {
- if (profilesTypeItemProvider == null) {
- profilesTypeItemProvider = new ProfilesTypeItemProvider(this);
- }
-
- return profilesTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ProfileType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ProfileTypeItemProvider profileTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ProfileType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createProfileTypeAdapter() {
- if (profileTypeItemProvider == null) {
- profileTypeItemProvider = new ProfileTypeItemProvider(this);
- }
-
- return profileTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ReaderType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ReaderTypeItemProvider readerTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ReaderType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createReaderTypeAdapter() {
- if (readerTypeItemProvider == null) {
- readerTypeItemProvider = new ReaderTypeItemProvider(this);
- }
-
- return readerTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ResourceConfigType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ResourceConfigTypeItemProvider resourceConfigTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ResourceConfigType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createResourceConfigTypeAdapter() {
- if (resourceConfigTypeItemProvider == null) {
- resourceConfigTypeItemProvider = new ResourceConfigTypeItemProvider(this);
- }
-
- return resourceConfigTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.ResourceType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ResourceTypeItemProvider resourceTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.ResourceType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createResourceTypeAdapter() {
- if (resourceTypeItemProvider == null) {
- resourceTypeItemProvider = new ResourceTypeItemProvider(this);
- }
-
- return resourceTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.SetOffType}
instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SetOffTypeItemProvider setOffTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.SetOffType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createSetOffTypeAdapter() {
- if (setOffTypeItemProvider == null) {
- setOffTypeItemProvider = new SetOffTypeItemProvider(this);
- }
-
- return setOffTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link smooks.SetOnType} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SetOnTypeItemProvider setOnTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.SetOnType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createSetOnTypeAdapter() {
- if (setOnTypeItemProvider == null) {
- setOnTypeItemProvider = new SetOnTypeItemProvider(this);
- }
-
- return setOnTypeItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link
smooks.SmooksResourceListType} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SmooksResourceListTypeItemProvider smooksResourceListTypeItemProvider;
-
- /**
- * This creates an adapter for a {@link smooks.SmooksResourceListType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createSmooksResourceListTypeAdapter() {
- if (smooksResourceListTypeItemProvider == null) {
- smooksResourceListTypeItemProvider = new SmooksResourceListTypeItemProvider(this);
- }
-
- return smooksResourceListTypeItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this :
parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object type) {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void dispose() {
- if (conditionsTypeItemProvider != null) conditionsTypeItemProvider.dispose();
- if (conditionTypeItemProvider != null) conditionTypeItemProvider.dispose();
- if (documentRootItemProvider != null) documentRootItemProvider.dispose();
- if (featuresTypeItemProvider != null) featuresTypeItemProvider.dispose();
- if (handlersTypeItemProvider != null) handlersTypeItemProvider.dispose();
- if (handlerTypeItemProvider != null) handlerTypeItemProvider.dispose();
- if (importTypeItemProvider != null) importTypeItemProvider.dispose();
- if (paramsTypeItemProvider != null) paramsTypeItemProvider.dispose();
- if (paramTypeItemProvider != null) paramTypeItemProvider.dispose();
- if (profilesTypeItemProvider != null) profilesTypeItemProvider.dispose();
- if (profileTypeItemProvider != null) profileTypeItemProvider.dispose();
- if (readerTypeItemProvider != null) readerTypeItemProvider.dispose();
- if (resourceConfigTypeItemProvider != null) resourceConfigTypeItemProvider.dispose();
- if (resourceTypeItemProvider != null) resourceTypeItemProvider.dispose();
- if (setOffTypeItemProvider != null) setOffTypeItemProvider.dispose();
- if (setOnTypeItemProvider != null) setOnTypeItemProvider.dispose();
- if (smooksResourceListTypeItemProvider != null)
smooksResourceListTypeItemProvider.dispose();
- }
-
-}
Deleted:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-14
06:32:09 UTC (rev 14722)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-14
06:40:37 UTC (rev 14723)
@@ -1,349 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.smooks.provider;
-
-
-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.common.util.ResourceLocator;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.FeatureMapUtil;
-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;
-import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
-import org.jboss.tools.smooks.model.fileRouting.FileRoutingFactory;
-import org.jboss.tools.smooks.model.fileRouting.FileRoutingPackage;
-import org.jboss.tools.smooks.model.freemarker.FreemarkerFactory;
-import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
-import org.jboss.tools.smooks.model.javabean.JavabeanFactory;
-import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
-import org.jboss.tools.smooks.model.xsl.XslFactory;
-import org.jboss.tools.smooks.model.xsl.XslPackage;
-import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
-
-
-
-/**
- * This is the item provider adapter for a {@link smooks.SmooksResourceListType} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class SmooksResourceListTypeItemProvider
- extends AbstractAnyTypeItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SmooksResourceListTypeItemProvider(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);
-
- addDefaultConditionRefPropertyDescriptor(object);
- addDefaultSelectorPropertyDescriptor(object);
- addDefaultSelectorNamespacePropertyDescriptor(object);
- addDefaultTargetProfilePropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Default Condition Ref feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDefaultConditionRefPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_SmooksResourceListType_defaultConditionRef_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_SmooksResourceListType_defaultConditionRef_feature",
"_UI_SmooksResourceListType_type"),
- SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_CONDITION_REF,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Default Selector feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDefaultSelectorPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_SmooksResourceListType_defaultSelector_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_SmooksResourceListType_defaultSelector_feature",
"_UI_SmooksResourceListType_type"),
- SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Default Selector Namespace feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDefaultSelectorNamespacePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_SmooksResourceListType_defaultSelectorNamespace_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_SmooksResourceListType_defaultSelectorNamespace_feature",
"_UI_SmooksResourceListType_type"),
- SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR_NAMESPACE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Default Target Profile feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addDefaultTargetProfilePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_SmooksResourceListType_defaultTargetProfile_feature"),
- getString("_UI_PropertyDescriptor_description",
"_UI_SmooksResourceListType_defaultTargetProfile_feature",
"_UI_SmooksResourceListType_type"),
- SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_TARGET_PROFILE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an
appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link
org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object)
{
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__PARAMS);
- childrenFeatures.add(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__CONDITIONS);
- childrenFeatures.add(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__PROFILES);
- childrenFeatures.add(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_READER_GROUP);
- childrenFeatures.add(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use
for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns SmooksResourceListType.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object,
getResourceLocator().getImage("full/obj16/SmooksResourceListType"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((SmooksResourceListType)object).getDefaultSelectorNamespace();
- return label == null || label.length() == 0 ?
- getString("_UI_SmooksResourceListType_type") :
- getString("_UI_SmooksResourceListType_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(SmooksResourceListType.class)) {
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_CONDITION_REF:
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR:
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR_NAMESPACE:
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_TARGET_PROFILE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
false, true));
- return;
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__PARAMS:
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__CONDITIONS:
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__PROFILES:
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_READER_GROUP:
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(),
true, false));
- 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);
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__PARAMS,
- SmooksFactory.eINSTANCE.createParamsType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__CONDITIONS,
- SmooksFactory.eINSTANCE.createConditionsType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__PROFILES,
- SmooksFactory.eINSTANCE.createProfilesType()));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_READER_GROUP,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
- SmooksFactory.eINSTANCE.createReaderType())));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
- FeatureMapUtil.createEntry
- (JavabeanPackage.Literals.DOCUMENT_ROOT__BINDINGS,
- JavabeanFactory.eINSTANCE.createBindingsType())));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
- FeatureMapUtil.createEntry
- (FileRoutingPackage.Literals.DOCUMENT_ROOT__OUTPUT_STREAM,
- FileRoutingFactory.eINSTANCE.createOutputStream())));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
- FeatureMapUtil.createEntry
- (XslPackage.Literals.DOCUMENT_ROOT__XSL,
- XslFactory.eINSTANCE.createXsl())));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
- FeatureMapUtil.createEntry
- (FreemarkerPackage.Literals.DOCUMENT_ROOT__FREEMARKER,
- FreemarkerFactory.eINSTANCE.createFreemarker())));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
- SmooksFactory.eINSTANCE.createImportType())));
-
- newChildDescriptors.add
- (createChildParameter
- (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
- SmooksFactory.eINSTANCE.createResourceConfigType())));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return Xsl1EditPlugin.INSTANCE;
- }
-
-}