/******************************************************************************* * Copyright (c) 2008 Hallvard Traetteberg. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Hallvard Traetteberg - initial API and implementation ******************************************************************************/ /** * <copyright> * </copyright> * * $Id: WidgetsAdapterFactory.java,v 1.4 2009/10/23 12:40:32 htraetteb Exp $ */ package org.eclipse.e4.tm.widgets.util; import org.eclipse.e4.tm.styles.Styled; import org.eclipse.e4.tm.util.Labeled; import org.eclipse.e4.tm.util.ObjectData; import org.eclipse.e4.tm.util.Scripted; import org.eclipse.e4.tm.widgets.*; import org.eclipse.e4.tm.widgets.AbstractComposite; import org.eclipse.e4.tm.widgets.BoundedValueControl; import org.eclipse.e4.tm.widgets.Browser; import org.eclipse.e4.tm.widgets.Button; import org.eclipse.e4.tm.widgets.CheckBox; import org.eclipse.e4.tm.widgets.ComboBox; import org.eclipse.e4.tm.widgets.Composite; import org.eclipse.e4.tm.widgets.Control; import org.eclipse.e4.tm.widgets.GroupBox; import org.eclipse.e4.tm.widgets.IndexSelection; import org.eclipse.e4.tm.widgets.Label; import org.eclipse.e4.tm.widgets.List; import org.eclipse.e4.tm.widgets.ListViewer; import org.eclipse.e4.tm.widgets.MultipleSelectionList; import org.eclipse.e4.tm.widgets.PasswordField; import org.eclipse.e4.tm.widgets.PushButton; import org.eclipse.e4.tm.widgets.Separator; import org.eclipse.e4.tm.widgets.Shell; import org.eclipse.e4.tm.widgets.SingleSelectionList; import org.eclipse.e4.tm.widgets.SplitPane; import org.eclipse.e4.tm.widgets.Tab; import org.eclipse.e4.tm.widgets.TabFolder; import org.eclipse.e4.tm.widgets.Text; import org.eclipse.e4.tm.widgets.ToggleButton; import org.eclipse.e4.tm.widgets.TreeViewer; import org.eclipse.e4.tm.widgets.WidgetsPackage; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * The <b>Adapter Factory</b> for the model. * It provides an adapter <code>createXXX</code> method for each class of the model. * <!-- end-user-doc --> * @see org.eclipse.e4.tm.widgets.WidgetsPackage * @generated */ public class WidgetsAdapterFactory extends AdapterFactoryImpl { /** * The cached model package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static WidgetsPackage modelPackage; /** * Creates an instance of the adapter factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public WidgetsAdapterFactory() { if (modelPackage == null) { modelPackage = WidgetsPackage.eINSTANCE; } } /** * Returns whether this factory is applicable for the type of the object. * <!-- begin-user-doc --> * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. * <!-- end-user-doc --> * @return whether this factory is applicable for the type of the object. * @generated */ @Override public boolean isFactoryForType(Object object) { if (object == modelPackage) { return true; } if (object instanceof EObject) { return ((EObject)object).eClass().getEPackage() == modelPackage; } return false; } /** * The switch that delegates to the <code>createXXX</code> methods. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected WidgetsSwitch<Adapter> modelSwitch = new WidgetsSwitch<Adapter>() { @Override public Adapter caseControl(Control object) { return createControlAdapter(); } @Override public Adapter caseLabel(Label object) { return createLabelAdapter(); } @Override public Adapter caseText(Text object) { return createTextAdapter(); } @Override public Adapter caseList(List object) { return createListAdapter(); } @Override public Adapter caseSingleSelectionList(SingleSelectionList object) { return createSingleSelectionListAdapter(); } @Override public Adapter caseComboBox(ComboBox object) { return createComboBoxAdapter(); } @Override public Adapter caseMultipleSelectionList(MultipleSelectionList object) { return createMultipleSelectionListAdapter(); } @Override public Adapter caseBrowser(Browser object) { return createBrowserAdapter(); } @Override public Adapter caseButton(Button object) { return createButtonAdapter(); } @Override public Adapter casePushButton(PushButton object) { return createPushButtonAdapter(); } @Override public Adapter caseCheckBox(CheckBox object) { return createCheckBoxAdapter(); } @Override public Adapter caseToggleButton(ToggleButton object) { return createToggleButtonAdapter(); } @Override public <T> Adapter caseBoundedValueControl(BoundedValueControl<T> object) { return createBoundedValueControlAdapter(); } @Override public <T extends Control> Adapter caseAbstractComposite(AbstractComposite<T> object) { return createAbstractCompositeAdapter(); } @Override public Adapter caseComposite(Composite object) { return createCompositeAdapter(); } @Override public Adapter caseGroupBox(GroupBox object) { return createGroupBoxAdapter(); } @Override public Adapter caseTabFolder(TabFolder object) { return createTabFolderAdapter(); } @Override public Adapter caseTab(Tab object) { return createTabAdapter(); } @Override public Adapter caseShell(Shell object) { return createShellAdapter(); } @Override public Adapter caseSeparator(Separator object) { return createSeparatorAdapter(); } @Override public Adapter caseListViewer(ListViewer object) { return createListViewerAdapter(); } @Override public Adapter caseSplitPane(SplitPane object) { return createSplitPaneAdapter(); } @Override public Adapter casePasswordField(PasswordField object) { return createPasswordFieldAdapter(); } @Override public Adapter caseIndexSelection(IndexSelection object) { return createIndexSelectionAdapter(); } @Override public Adapter caseTreeViewer(TreeViewer object) { return createTreeViewerAdapter(); } @Override public Adapter caseTableViewer(TableViewer object) { return createTableViewerAdapter(); } @Override public Adapter caseScripted(Scripted object) { return createScriptedAdapter(); } @Override public Adapter caseObjectData(ObjectData object) { return createObjectDataAdapter(); } @Override public Adapter caseStyled(Styled object) { return createStyledAdapter(); } @Override public Adapter caseLabeled(Labeled object) { return createLabeledAdapter(); } @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } }; /** * Creates an adapter for the <code>target</code>. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param target the object to adapt. * @return the adapter for the <code>target</code>. * @generated */ @Override public Adapter createAdapter(Notifier target) { return modelSwitch.doSwitch((EObject)target); } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Control <em>Control</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Control * @generated */ public Adapter createControlAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.util.Labeled <em>Labeled</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.util.Labeled * @generated */ public Adapter createLabeledAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Label <em>Label</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Label * @generated */ public Adapter createLabelAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Text <em>Text</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Text * @generated */ public Adapter createTextAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.List <em>List</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.List * @generated */ public Adapter createListAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.SingleSelectionList <em>Single Selection List</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.SingleSelectionList * @generated */ public Adapter createSingleSelectionListAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.ComboBox <em>Combo Box</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.ComboBox * @generated */ public Adapter createComboBoxAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.MultipleSelectionList <em>Multiple Selection List</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.MultipleSelectionList * @generated */ public Adapter createMultipleSelectionListAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Browser <em>Browser</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Browser * @generated */ public Adapter createBrowserAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Button <em>Button</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Button * @generated */ public Adapter createButtonAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.PushButton <em>Push Button</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.PushButton * @generated */ public Adapter createPushButtonAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.CheckBox <em>Check Box</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.CheckBox * @generated */ public Adapter createCheckBoxAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.ToggleButton <em>Toggle Button</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.ToggleButton * @generated */ public Adapter createToggleButtonAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.BoundedValueControl <em>Bounded Value Control</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.BoundedValueControl * @generated */ public Adapter createBoundedValueControlAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.AbstractComposite <em>Abstract Composite</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.AbstractComposite * @generated */ public Adapter createAbstractCompositeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Composite <em>Composite</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Composite * @generated */ public Adapter createCompositeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.GroupBox <em>Group Box</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.GroupBox * @generated */ public Adapter createGroupBoxAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.TabFolder <em>Tab Folder</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.TabFolder * @generated */ public Adapter createTabFolderAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Tab <em>Tab</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Tab * @generated */ public Adapter createTabAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Shell <em>Shell</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Shell * @generated */ public Adapter createShellAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.util.Scripted <em>Scripted</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.util.Scripted * @generated */ public Adapter createScriptedAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.Separator <em>Separator</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.Separator * @generated */ public Adapter createSeparatorAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.ListViewer <em>List Viewer</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.ListViewer * @generated */ public Adapter createListViewerAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.SplitPane <em>Split Pane</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.SplitPane * @generated */ public Adapter createSplitPaneAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.PasswordField <em>Password Field</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.PasswordField * @generated */ public Adapter createPasswordFieldAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.IndexSelection <em>Index Selection</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.IndexSelection * @generated */ public Adapter createIndexSelectionAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.TreeViewer <em>Tree Viewer</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.TreeViewer * @generated */ public Adapter createTreeViewerAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.widgets.TableViewer <em>Table Viewer</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.widgets.TableViewer * @generated */ public Adapter createTableViewerAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.util.ObjectData <em>Object Data</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.util.ObjectData * @generated */ public Adapter createObjectDataAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.e4.tm.styles.Styled <em>Styled</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.eclipse.e4.tm.styles.Styled * @generated */ public Adapter createStyledAdapter() { return null; } /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> * This default implementation returns null. * <!-- end-user-doc --> * @return the new adapter. * @generated */ public Adapter createEObjectAdapter() { return null; } } //WidgetsAdapterFactory