Branch model code to use older EMF versions
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.model.workbench/META-INF/MANIFEST.MF index e81ea3d..977b96c 100644 --- a/bundles/org.eclipse.e4.ui.model.workbench/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.e4.ui.model.workbench/META-INF/MANIFEST.MF
@@ -26,10 +26,8 @@ org.eclipse.e4.ui.workbench, org.eclipse.e4.ui.workbench.swt, org.eclipse.ui.workbench", - org.eclipse.e4.ui.model.application.commands.util;x-internal:=true, org.eclipse.e4.ui.model.application.descriptor.basic;x-friends:="org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.workbench", org.eclipse.e4.ui.model.application.descriptor.basic.impl;x-friends:="org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.workbench", - org.eclipse.e4.ui.model.application.descriptor.basic.util;x-internal:=true, org.eclipse.e4.ui.model.application.impl;x-friends:="org.eclipse.e4.ui.model.workbench.edit,org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.workbench.swt", org.eclipse.e4.ui.model.application.ui; x-friends:="org.eclipse.e4.ui.workbench, @@ -49,7 +47,6 @@ org.eclipse.e4.ui.workbench.addons.swt, org.eclipse.e4.ui.workbench.swt, org.eclipse.ui.workbench", - org.eclipse.e4.ui.model.application.ui.advanced.util;x-internal:=true, org.eclipse.e4.ui.model.application.ui.basic; x-friends:="org.eclipse.e4.ui.workbench, org.eclipse.e4.ui.workbench.addons.swt, @@ -63,7 +60,6 @@ org.eclipse.e4.ui.workbench.addons.swt, org.eclipse.e4.ui.workbench.swt, org.eclipse.ui.workbench", - org.eclipse.e4.ui.model.application.ui.basic.util;x-internal:=true, org.eclipse.e4.ui.model.application.ui.impl; x-friends:="org.eclipse.e4.ui.model.workbench.edit, org.eclipse.e4.ui.workbench, @@ -82,12 +78,8 @@ org.eclipse.e4.ui.workbench.renderers.swt, org.eclipse.e4.ui.workbench.swt, org.eclipse.ui.workbench", - org.eclipse.e4.ui.model.application.ui.menu.util;x-internal:=true, - org.eclipse.e4.ui.model.application.ui.util;x-internal:=true, - org.eclipse.e4.ui.model.application.util;x-internal:=true, org.eclipse.e4.ui.model.fragment;x-friends:="org.eclipse.e4.ui.workbench", org.eclipse.e4.ui.model.fragment.impl;x-friends:="org.eclipse.e4.ui.workbench", - org.eclipse.e4.ui.model.fragment.util;x-internal:=true, org.eclipse.e4.ui.model.internal;x-friends:="org.eclipse.e4.ui.workbench" Require-Bundle: org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport,
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/commands/util/CommandsAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/commands/util/CommandsAdapterFactory.java deleted file mode 100644 index 6ad0af6..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/commands/util/CommandsAdapterFactory.java +++ /dev/null
@@ -1,374 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.commands.util; - -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.commands.*; -import org.eclipse.e4.ui.model.application.commands.MBindingContext; -import org.eclipse.e4.ui.model.application.commands.MBindingTable; -import org.eclipse.e4.ui.model.application.commands.MBindingTableContainer; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MCategory; -import org.eclipse.e4.ui.model.application.commands.MCommand; -import org.eclipse.e4.ui.model.application.commands.MCommandParameter; -import org.eclipse.e4.ui.model.application.commands.MHandler; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.commands.MKeyBinding; -import org.eclipse.e4.ui.model.application.commands.MKeySequence; -import org.eclipse.e4.ui.model.application.commands.MParameter; -import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl; -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.ui.model.application.commands.impl.CommandsPackageImpl - * @generated - */ -public class CommandsAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static CommandsPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public CommandsAdapterFactory() { - if (modelPackage == null) { - modelPackage = CommandsPackageImpl.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 CommandsSwitch<Adapter> modelSwitch = - new CommandsSwitch<Adapter>() { - @Override - public Adapter caseBindingTableContainer(MBindingTableContainer object) { - return createBindingTableContainerAdapter(); - } - @Override - public Adapter caseBindings(MBindings object) { - return createBindingsAdapter(); - } - @Override - public Adapter caseBindingContext(MBindingContext object) { - return createBindingContextAdapter(); - } - @Override - public Adapter caseBindingTable(MBindingTable object) { - return createBindingTableAdapter(); - } - @Override - public Adapter caseCommand(MCommand object) { - return createCommandAdapter(); - } - @Override - public Adapter caseCommandParameter(MCommandParameter object) { - return createCommandParameterAdapter(); - } - @Override - public Adapter caseHandler(MHandler object) { - return createHandlerAdapter(); - } - @Override - public Adapter caseHandlerContainer(MHandlerContainer object) { - return createHandlerContainerAdapter(); - } - @Override - public Adapter caseKeyBinding(MKeyBinding object) { - return createKeyBindingAdapter(); - } - @Override - public Adapter caseKeySequence(MKeySequence object) { - return createKeySequenceAdapter(); - } - @Override - public Adapter caseParameter(MParameter object) { - return createParameterAdapter(); - } - @Override - public Adapter caseCategory(MCategory object) { - return createCategoryAdapter(); - } - @Override - public Adapter caseApplicationElement(MApplicationElement object) { - return createApplicationElementAdapter(); - } - @Override - public Adapter caseContribution(MContribution object) { - return createContributionAdapter(); - } - @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.ui.model.application.commands.MBindingTableContainer <em>Binding Table Container</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.ui.model.application.commands.MBindingTableContainer - * @generated - */ - public Adapter createBindingTableContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MBindings <em>Bindings</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.ui.model.application.commands.MBindings - * @generated - */ - public Adapter createBindingsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MBindingContext <em>Binding Context</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.ui.model.application.commands.MBindingContext - * @generated - */ - public Adapter createBindingContextAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MBindingTable <em>Binding Table</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.ui.model.application.commands.MBindingTable - * @generated - */ - public Adapter createBindingTableAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MCommand <em>Command</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.ui.model.application.commands.MCommand - * @generated - */ - public Adapter createCommandAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MCommandParameter <em>Command Parameter</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.ui.model.application.commands.MCommandParameter - * @generated - */ - public Adapter createCommandParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MHandler <em>Handler</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.ui.model.application.commands.MHandler - * @generated - */ - public Adapter createHandlerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MHandlerContainer <em>Handler Container</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.ui.model.application.commands.MHandlerContainer - * @generated - */ - public Adapter createHandlerContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MKeyBinding <em>Key Binding</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.ui.model.application.commands.MKeyBinding - * @generated - */ - public Adapter createKeyBindingAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MKeySequence <em>Key Sequence</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.ui.model.application.commands.MKeySequence - * @generated - */ - public Adapter createKeySequenceAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MParameter <em>Parameter</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.ui.model.application.commands.MParameter - * @generated - */ - public Adapter createParameterAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MCategory <em>Category</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.ui.model.application.commands.MCategory - * @generated - */ - public Adapter createCategoryAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplicationElement <em>Element</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.ui.model.application.MApplicationElement - * @generated - */ - public Adapter createApplicationElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MContribution <em>Contribution</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.ui.model.application.MContribution - * @generated - */ - public Adapter createContributionAdapter() { - 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; - } - -} //CommandsAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/commands/util/CommandsSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/commands/util/CommandsSwitch.java deleted file mode 100644 index 518386f..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/commands/util/CommandsSwitch.java +++ /dev/null
@@ -1,404 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.commands.util; - -import java.util.List; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.commands.*; -import org.eclipse.e4.ui.model.application.commands.MBindingContext; -import org.eclipse.e4.ui.model.application.commands.MBindingTable; -import org.eclipse.e4.ui.model.application.commands.MBindingTableContainer; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MCategory; -import org.eclipse.e4.ui.model.application.commands.MCommand; -import org.eclipse.e4.ui.model.application.commands.MCommandParameter; -import org.eclipse.e4.ui.model.application.commands.MHandler; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.commands.MKeyBinding; -import org.eclipse.e4.ui.model.application.commands.MKeySequence; -import org.eclipse.e4.ui.model.application.commands.MParameter; -import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl - * @generated - */ -public class CommandsSwitch<T> extends Switch<T> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static CommandsPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public CommandsSwitch() { - if (modelPackage == null) { - modelPackage = CommandsPackageImpl.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case CommandsPackageImpl.BINDING_TABLE_CONTAINER: { - MBindingTableContainer bindingTableContainer = (MBindingTableContainer)theEObject; - T result = caseBindingTableContainer(bindingTableContainer); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.BINDINGS: { - MBindings bindings = (MBindings)theEObject; - T result = caseBindings(bindings); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.BINDING_CONTEXT: { - MBindingContext bindingContext = (MBindingContext)theEObject; - T result = caseBindingContext(bindingContext); - if (result == null) result = caseApplicationElement(bindingContext); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.BINDING_TABLE: { - MBindingTable bindingTable = (MBindingTable)theEObject; - T result = caseBindingTable(bindingTable); - if (result == null) result = caseApplicationElement(bindingTable); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.COMMAND: { - MCommand command = (MCommand)theEObject; - T result = caseCommand(command); - if (result == null) result = caseApplicationElement(command); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.COMMAND_PARAMETER: { - MCommandParameter commandParameter = (MCommandParameter)theEObject; - T result = caseCommandParameter(commandParameter); - if (result == null) result = caseApplicationElement(commandParameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.HANDLER: { - MHandler handler = (MHandler)theEObject; - T result = caseHandler(handler); - if (result == null) result = caseContribution(handler); - if (result == null) result = caseApplicationElement(handler); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.HANDLER_CONTAINER: { - MHandlerContainer handlerContainer = (MHandlerContainer)theEObject; - T result = caseHandlerContainer(handlerContainer); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.KEY_BINDING: { - MKeyBinding keyBinding = (MKeyBinding)theEObject; - T result = caseKeyBinding(keyBinding); - if (result == null) result = caseApplicationElement(keyBinding); - if (result == null) result = caseKeySequence(keyBinding); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.KEY_SEQUENCE: { - MKeySequence keySequence = (MKeySequence)theEObject; - T result = caseKeySequence(keySequence); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.PARAMETER: { - MParameter parameter = (MParameter)theEObject; - T result = caseParameter(parameter); - if (result == null) result = caseApplicationElement(parameter); - if (result == null) result = defaultCase(theEObject); - return result; - } - case CommandsPackageImpl.CATEGORY: { - MCategory category = (MCategory)theEObject; - T result = caseCategory(category); - if (result == null) result = caseApplicationElement(category); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Binding Table Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Binding Table Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBindingTableContainer(MBindingTableContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Bindings</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Bindings</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBindings(MBindings object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Binding Context</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Binding Context</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBindingContext(MBindingContext object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Binding Table</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Binding Table</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBindingTable(MBindingTable object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Command</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Command</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCommand(MCommand object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Command Parameter</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Command Parameter</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCommandParameter(MCommandParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handler</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handler</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseHandler(MHandler object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseHandlerContainer(MHandlerContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Key Binding</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Key Binding</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseKeyBinding(MKeyBinding object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Key Sequence</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Key Sequence</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseKeySequence(MKeySequence object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Parameter</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Parameter</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseParameter(MParameter object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Category</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Category</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCategory(MCategory object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseApplicationElement(MApplicationElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Contribution</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Contribution</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseContribution(MContribution object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} //CommandsSwitch
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/util/BasicAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/util/BasicAdapterFactory.java deleted file mode 100644 index d6aaa1f..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/util/BasicAdapterFactory.java +++ /dev/null
@@ -1,222 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.descriptor.basic.util; - -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.descriptor.basic.*; -import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor; -import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer; -import org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -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.ui.model.application.descriptor.basic.impl.BasicPackageImpl - * @generated - */ -public class BasicAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static BasicPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BasicAdapterFactory() { - if (modelPackage == null) { - modelPackage = BasicPackageImpl.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 BasicSwitch<Adapter> modelSwitch = - new BasicSwitch<Adapter>() { - @Override - public Adapter casePartDescriptor(MPartDescriptor object) { - return createPartDescriptorAdapter(); - } - @Override - public Adapter casePartDescriptorContainer(MPartDescriptorContainer object) { - return createPartDescriptorContainerAdapter(); - } - @Override - public Adapter caseApplicationElement(MApplicationElement object) { - return createApplicationElementAdapter(); - } - @Override - public Adapter caseUILabel(MUILabel object) { - return createUILabelAdapter(); - } - @Override - public Adapter caseHandlerContainer(MHandlerContainer object) { - return createHandlerContainerAdapter(); - } - @Override - public Adapter caseBindings(MBindings object) { - return createBindingsAdapter(); - } - @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.ui.model.application.descriptor.basic.MPartDescriptor <em>Part Descriptor</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.ui.model.application.descriptor.basic.MPartDescriptor - * @generated - */ - public Adapter createPartDescriptorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer <em>Part Descriptor Container</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.ui.model.application.descriptor.basic.MPartDescriptorContainer - * @generated - */ - public Adapter createPartDescriptorContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUILabel <em>UI 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.ui.model.application.ui.MUILabel - * @generated - */ - public Adapter createUILabelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MHandlerContainer <em>Handler Container</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.ui.model.application.commands.MHandlerContainer - * @generated - */ - public Adapter createHandlerContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MBindings <em>Bindings</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.ui.model.application.commands.MBindings - * @generated - */ - public Adapter createBindingsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplicationElement <em>Element</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.ui.model.application.MApplicationElement - * @generated - */ - public Adapter createApplicationElementAdapter() { - 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; - } - -} //BasicAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/util/BasicSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/util/BasicSwitch.java deleted file mode 100644 index b94e76f..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/util/BasicSwitch.java +++ /dev/null
@@ -1,210 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.descriptor.basic.util; - -import java.util.List; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.descriptor.basic.*; -import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor; -import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer; -import org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl - * @generated - */ -public class BasicSwitch<T> extends Switch<T> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static BasicPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BasicSwitch() { - if (modelPackage == null) { - modelPackage = BasicPackageImpl.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - @Override - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case BasicPackageImpl.PART_DESCRIPTOR: { - MPartDescriptor partDescriptor = (MPartDescriptor)theEObject; - T result = casePartDescriptor(partDescriptor); - if (result == null) result = caseApplicationElement(partDescriptor); - if (result == null) result = caseUILabel(partDescriptor); - if (result == null) result = caseHandlerContainer(partDescriptor); - if (result == null) result = caseBindings(partDescriptor); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.PART_DESCRIPTOR_CONTAINER: { - MPartDescriptorContainer partDescriptorContainer = (MPartDescriptorContainer)theEObject; - T result = casePartDescriptorContainer(partDescriptorContainer); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Descriptor</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Descriptor</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePartDescriptor(MPartDescriptor object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Descriptor Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Descriptor Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePartDescriptorContainer(MPartDescriptorContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Label</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Label</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseUILabel(MUILabel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseHandlerContainer(MHandlerContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Bindings</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Bindings</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseBindings(MBindings object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseApplicationElement(MApplicationElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T defaultCase(EObject object) { - return null; - } - -} //BasicSwitch
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/util/AdvancedAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/util/AdvancedAdapterFactory.java deleted file mode 100644 index c208492..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/util/AdvancedAdapterFactory.java +++ /dev/null
@@ -1,393 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.advanced.util; - -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MGenericStack; -import org.eclipse.e4.ui.model.application.ui.MGenericTile; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.advanced.*; -import org.eclipse.e4.ui.model.application.ui.advanced.MArea; -import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective; -import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack; -import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder; -import org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedPackageImpl; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement; -import org.eclipse.e4.ui.model.application.ui.basic.MStackElement; -import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement; -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.ui.model.application.ui.advanced.impl.AdvancedPackageImpl - * @generated - */ -public class AdvancedAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static AdvancedPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public AdvancedAdapterFactory() { - if (modelPackage == null) { - modelPackage = AdvancedPackageImpl.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 AdvancedSwitch<Adapter> modelSwitch = - new AdvancedSwitch<Adapter>() { - @Override - public Adapter casePlaceholder(MPlaceholder object) { - return createPlaceholderAdapter(); - } - @Override - public Adapter casePerspective(MPerspective object) { - return createPerspectiveAdapter(); - } - @Override - public Adapter casePerspectiveStack(MPerspectiveStack object) { - return createPerspectiveStackAdapter(); - } - @Override - public Adapter caseArea(MArea object) { - return createAreaAdapter(); - } - @Override - public Adapter caseApplicationElement(MApplicationElement object) { - return createApplicationElementAdapter(); - } - @Override - public Adapter caseUIElement(MUIElement object) { - return createUIElementAdapter(); - } - @Override - public Adapter casePartSashContainerElement(MPartSashContainerElement object) { - return createPartSashContainerElementAdapter(); - } - @Override - public Adapter caseStackElement(MStackElement object) { - return createStackElementAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseElementContainer(MElementContainer<T> object) { - return createElementContainerAdapter(); - } - @Override - public Adapter caseUILabel(MUILabel object) { - return createUILabelAdapter(); - } - @Override - public Adapter caseContext(MContext object) { - return createContextAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericStack(MGenericStack<T> object) { - return createGenericStackAdapter(); - } - @Override - public Adapter caseWindowElement(MWindowElement object) { - return createWindowElementAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericTile(MGenericTile<T> object) { - return createGenericTileAdapter(); - } - @Override - public Adapter casePartSashContainer(MPartSashContainer object) { - return createPartSashContainerAdapter(); - } - @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.ui.model.application.ui.advanced.MPlaceholder <em>Placeholder</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.ui.model.application.ui.advanced.MPlaceholder - * @generated - */ - public Adapter createPlaceholderAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.advanced.MPerspective <em>Perspective</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.ui.model.application.ui.advanced.MPerspective - * @generated - */ - public Adapter createPerspectiveAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack <em>Perspective Stack</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.ui.model.application.ui.advanced.MPerspectiveStack - * @generated - */ - public Adapter createPerspectiveStackAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.advanced.MArea <em>Area</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.ui.model.application.ui.advanced.MArea - * @generated - */ - public Adapter createAreaAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplicationElement <em>Element</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.ui.model.application.MApplicationElement - * @generated - */ - public Adapter createApplicationElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUIElement <em>UI Element</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.ui.model.application.ui.MUIElement - * @generated - */ - public Adapter createUIElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement <em>Part Sash Container Element</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.ui.model.application.ui.basic.MPartSashContainerElement - * @generated - */ - public Adapter createPartSashContainerElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MStackElement <em>Stack Element</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.ui.model.application.ui.basic.MStackElement - * @generated - */ - public Adapter createStackElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</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.ui.model.application.ui.MElementContainer - * @generated - */ - public Adapter createElementContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUILabel <em>UI 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.ui.model.application.ui.MUILabel - * @generated - */ - public Adapter createUILabelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MContext <em>Context</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.ui.model.application.ui.MContext - * @generated - */ - public Adapter createContextAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericStack <em>Generic Stack</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.ui.model.application.ui.MGenericStack - * @generated - */ - public Adapter createGenericStackAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MWindowElement <em>Window Element</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.ui.model.application.ui.basic.MWindowElement - * @generated - */ - public Adapter createWindowElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericTile <em>Generic Tile</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.ui.model.application.ui.MGenericTile - * @generated - */ - public Adapter createGenericTileAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer <em>Part Sash Container</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.ui.model.application.ui.basic.MPartSashContainer - * @generated - */ - public Adapter createPartSashContainerAdapter() { - 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; - } - -} //AdvancedAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/util/AdvancedSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/util/AdvancedSwitch.java deleted file mode 100644 index b80d186..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/util/AdvancedSwitch.java +++ /dev/null
@@ -1,385 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.advanced.util; - -import java.util.List; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MGenericStack; -import org.eclipse.e4.ui.model.application.ui.MGenericTile; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.advanced.*; -import org.eclipse.e4.ui.model.application.ui.advanced.MArea; -import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective; -import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack; -import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder; -import org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedPackageImpl; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement; -import org.eclipse.e4.ui.model.application.ui.basic.MStackElement; -import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedPackageImpl - * @generated - */ -public class AdvancedSwitch<T1> extends Switch<T1> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static AdvancedPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public AdvancedSwitch() { - if (modelPackage == null) { - modelPackage = AdvancedPackageImpl.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - @Override - protected T1 doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case AdvancedPackageImpl.PLACEHOLDER: { - MPlaceholder placeholder = (MPlaceholder)theEObject; - T1 result = casePlaceholder(placeholder); - if (result == null) result = casePartSashContainerElement(placeholder); - if (result == null) result = caseStackElement(placeholder); - if (result == null) result = caseUIElement(placeholder); - if (result == null) result = caseApplicationElement(placeholder); - if (result == null) result = defaultCase(theEObject); - return result; - } - case AdvancedPackageImpl.PERSPECTIVE: { - MPerspective perspective = (MPerspective)theEObject; - T1 result = casePerspective(perspective); - if (result == null) result = caseElementContainer(perspective); - if (result == null) result = caseUILabel(perspective); - if (result == null) result = caseContext(perspective); - if (result == null) result = caseUIElement(perspective); - if (result == null) result = caseApplicationElement(perspective); - if (result == null) result = defaultCase(theEObject); - return result; - } - case AdvancedPackageImpl.PERSPECTIVE_STACK: { - MPerspectiveStack perspectiveStack = (MPerspectiveStack)theEObject; - T1 result = casePerspectiveStack(perspectiveStack); - if (result == null) result = caseGenericStack(perspectiveStack); - if (result == null) result = casePartSashContainerElement(perspectiveStack); - if (result == null) result = caseWindowElement(perspectiveStack); - if (result == null) result = caseApplicationElement(perspectiveStack); - if (result == null) result = caseElementContainer(perspectiveStack); - if (result == null) result = caseUIElement(perspectiveStack); - if (result == null) result = defaultCase(theEObject); - return result; - } - case AdvancedPackageImpl.AREA: { - MArea area = (MArea)theEObject; - T1 result = caseArea(area); - if (result == null) result = casePartSashContainer(area); - if (result == null) result = caseUILabel(area); - if (result == null) result = caseGenericTile(area); - if (result == null) result = casePartSashContainerElement(area); - if (result == null) result = caseWindowElement(area); - if (result == null) result = caseElementContainer(area); - if (result == null) result = caseUIElement(area); - if (result == null) result = caseApplicationElement(area); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Placeholder</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Placeholder</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePlaceholder(MPlaceholder object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Perspective</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Perspective</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePerspective(MPerspective object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Perspective Stack</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Perspective Stack</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePerspectiveStack(MPerspectiveStack object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Area</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Area</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseArea(MArea object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseApplicationElement(MApplicationElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUIElement(MUIElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Sash Container Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Sash Container Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePartSashContainerElement(MPartSashContainerElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Stack Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Stack Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseStackElement(MStackElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseElementContainer(MElementContainer<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Label</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Label</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUILabel(MUILabel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Context</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Context</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContext(MContext object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Stack</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Stack</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericStack(MGenericStack<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Window Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Window Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseWindowElement(MWindowElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Tile</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Tile</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericTile(MGenericTile<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Sash Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Sash Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePartSashContainer(MPartSashContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T1 defaultCase(EObject object) { - return null; - } - -} //AdvancedSwitch
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/util/BasicAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/util/BasicAdapterFactory.java deleted file mode 100644 index 2aebf4f..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/util/BasicAdapterFactory.java +++ /dev/null
@@ -1,564 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.basic.util; - -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MDirtyable; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MGenericStack; -import org.eclipse.e4.ui.model.application.ui.MGenericTile; -import org.eclipse.e4.ui.model.application.ui.MGenericTrimContainer; -import org.eclipse.e4.ui.model.application.ui.MInput; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.basic.*; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; -import org.eclipse.e4.ui.model.application.ui.basic.MPart; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement; -import org.eclipse.e4.ui.model.application.ui.basic.MPartStack; -import org.eclipse.e4.ui.model.application.ui.basic.MStackElement; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimBar; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow; -import org.eclipse.e4.ui.model.application.ui.basic.MWindow; -import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement; -import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl; -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.ui.model.application.ui.basic.impl.BasicPackageImpl - * @generated - */ -public class BasicAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static BasicPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BasicAdapterFactory() { - if (modelPackage == null) { - modelPackage = BasicPackageImpl.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 BasicSwitch<Adapter> modelSwitch = - new BasicSwitch<Adapter>() { - @Override - public Adapter casePart(MPart object) { - return createPartAdapter(); - } - @Override - public Adapter caseInputPart(MInputPart object) { - return createInputPartAdapter(); - } - @Override - public Adapter casePartStack(MPartStack object) { - return createPartStackAdapter(); - } - @Override - public Adapter casePartSashContainer(MPartSashContainer object) { - return createPartSashContainerAdapter(); - } - @Override - public Adapter caseWindow(MWindow object) { - return createWindowAdapter(); - } - @Override - public Adapter caseTrimmedWindow(MTrimmedWindow object) { - return createTrimmedWindowAdapter(); - } - @Override - public Adapter caseTrimElement(MTrimElement object) { - return createTrimElementAdapter(); - } - @Override - public Adapter casePartSashContainerElement(MPartSashContainerElement object) { - return createPartSashContainerElementAdapter(); - } - @Override - public Adapter caseWindowElement(MWindowElement object) { - return createWindowElementAdapter(); - } - @Override - public Adapter caseTrimBar(MTrimBar object) { - return createTrimBarAdapter(); - } - @Override - public Adapter caseStackElement(MStackElement object) { - return createStackElementAdapter(); - } - @Override - public Adapter caseApplicationElement(MApplicationElement object) { - return createApplicationElementAdapter(); - } - @Override - public Adapter caseUIElement(MUIElement object) { - return createUIElementAdapter(); - } - @Override - public Adapter caseContribution(MContribution object) { - return createContributionAdapter(); - } - @Override - public Adapter caseContext(MContext object) { - return createContextAdapter(); - } - @Override - public Adapter caseUILabel(MUILabel object) { - return createUILabelAdapter(); - } - @Override - public Adapter caseHandlerContainer(MHandlerContainer object) { - return createHandlerContainerAdapter(); - } - @Override - public Adapter caseDirtyable(MDirtyable object) { - return createDirtyableAdapter(); - } - @Override - public Adapter caseBindings(MBindings object) { - return createBindingsAdapter(); - } - @Override - public Adapter caseInput(MInput object) { - return createInputAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseElementContainer(MElementContainer<T> object) { - return createElementContainerAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericStack(MGenericStack<T> object) { - return createGenericStackAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericTile(MGenericTile<T> object) { - return createGenericTileAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericTrimContainer(MGenericTrimContainer<T> object) { - return createGenericTrimContainerAdapter(); - } - @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.ui.model.application.ui.basic.MPart <em>Part</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.ui.model.application.ui.basic.MPart - * @generated - */ - public Adapter createPartAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MInputPart <em>Input Part</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.ui.model.application.ui.basic.MInputPart - * @generated - */ - public Adapter createInputPartAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MPartStack <em>Part Stack</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.ui.model.application.ui.basic.MPartStack - * @generated - */ - public Adapter createPartStackAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer <em>Part Sash Container</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.ui.model.application.ui.basic.MPartSashContainer - * @generated - */ - public Adapter createPartSashContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MWindow <em>Window</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.ui.model.application.ui.basic.MWindow - * @generated - */ - public Adapter createWindowAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow <em>Trimmed Window</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.ui.model.application.ui.basic.MTrimmedWindow - * @generated - */ - public Adapter createTrimmedWindowAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MTrimElement <em>Trim Element</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.ui.model.application.ui.basic.MTrimElement - * @generated - */ - public Adapter createTrimElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement <em>Part Sash Container Element</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.ui.model.application.ui.basic.MPartSashContainerElement - * @generated - */ - public Adapter createPartSashContainerElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MWindowElement <em>Window Element</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.ui.model.application.ui.basic.MWindowElement - * @generated - */ - public Adapter createWindowElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MTrimBar <em>Trim Bar</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.ui.model.application.ui.basic.MTrimBar - * @generated - */ - public Adapter createTrimBarAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MStackElement <em>Stack Element</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.ui.model.application.ui.basic.MStackElement - * @generated - */ - public Adapter createStackElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplicationElement <em>Element</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.ui.model.application.MApplicationElement - * @generated - */ - public Adapter createApplicationElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MContribution <em>Contribution</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.ui.model.application.MContribution - * @generated - */ - public Adapter createContributionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MContext <em>Context</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.ui.model.application.ui.MContext - * @generated - */ - public Adapter createContextAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUIElement <em>UI Element</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.ui.model.application.ui.MUIElement - * @generated - */ - public Adapter createUIElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUILabel <em>UI 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.ui.model.application.ui.MUILabel - * @generated - */ - public Adapter createUILabelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MHandlerContainer <em>Handler Container</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.ui.model.application.commands.MHandlerContainer - * @generated - */ - public Adapter createHandlerContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MDirtyable <em>Dirtyable</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.ui.model.application.ui.MDirtyable - * @generated - */ - public Adapter createDirtyableAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MBindings <em>Bindings</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.ui.model.application.commands.MBindings - * @generated - */ - public Adapter createBindingsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MInput <em>Input</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.ui.model.application.ui.MInput - * @generated - */ - public Adapter createInputAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</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.ui.model.application.ui.MElementContainer - * @generated - */ - public Adapter createElementContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericStack <em>Generic Stack</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.ui.model.application.ui.MGenericStack - * @generated - */ - public Adapter createGenericStackAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericTile <em>Generic Tile</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.ui.model.application.ui.MGenericTile - * @generated - */ - public Adapter createGenericTileAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericTrimContainer <em>Generic Trim Container</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.ui.model.application.ui.MGenericTrimContainer - * @generated - */ - public Adapter createGenericTrimContainerAdapter() { - 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; - } - -} //BasicAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/util/BasicSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/util/BasicSwitch.java deleted file mode 100644 index addad9f..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/util/BasicSwitch.java +++ /dev/null
@@ -1,611 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.basic.util; - -import java.util.List; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MDirtyable; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MGenericStack; -import org.eclipse.e4.ui.model.application.ui.MGenericTile; -import org.eclipse.e4.ui.model.application.ui.MGenericTrimContainer; -import org.eclipse.e4.ui.model.application.ui.MInput; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.basic.*; -import org.eclipse.e4.ui.model.application.ui.basic.MInputPart; -import org.eclipse.e4.ui.model.application.ui.basic.MPart; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainer; -import org.eclipse.e4.ui.model.application.ui.basic.MPartSashContainerElement; -import org.eclipse.e4.ui.model.application.ui.basic.MPartStack; -import org.eclipse.e4.ui.model.application.ui.basic.MStackElement; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimBar; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow; -import org.eclipse.e4.ui.model.application.ui.basic.MWindow; -import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement; -import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl - * @generated - */ -public class BasicSwitch<T1> extends Switch<T1> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static BasicPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public BasicSwitch() { - if (modelPackage == null) { - modelPackage = BasicPackageImpl.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - @Override - protected T1 doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case BasicPackageImpl.PART: { - MPart part = (MPart)theEObject; - T1 result = casePart(part); - if (result == null) result = casePartSashContainerElement(part); - if (result == null) result = caseStackElement(part); - if (result == null) result = caseContribution(part); - if (result == null) result = caseContext(part); - if (result == null) result = caseUILabel(part); - if (result == null) result = caseHandlerContainer(part); - if (result == null) result = caseDirtyable(part); - if (result == null) result = caseBindings(part); - if (result == null) result = caseWindowElement(part); - if (result == null) result = caseUIElement(part); - if (result == null) result = caseApplicationElement(part); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.INPUT_PART: { - MInputPart inputPart = (MInputPart)theEObject; - T1 result = caseInputPart(inputPart); - if (result == null) result = casePart(inputPart); - if (result == null) result = caseInput(inputPart); - if (result == null) result = casePartSashContainerElement(inputPart); - if (result == null) result = caseStackElement(inputPart); - if (result == null) result = caseContribution(inputPart); - if (result == null) result = caseContext(inputPart); - if (result == null) result = caseUILabel(inputPart); - if (result == null) result = caseHandlerContainer(inputPart); - if (result == null) result = caseDirtyable(inputPart); - if (result == null) result = caseBindings(inputPart); - if (result == null) result = caseWindowElement(inputPart); - if (result == null) result = caseUIElement(inputPart); - if (result == null) result = caseApplicationElement(inputPart); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.PART_STACK: { - MPartStack partStack = (MPartStack)theEObject; - T1 result = casePartStack(partStack); - if (result == null) result = caseGenericStack(partStack); - if (result == null) result = casePartSashContainerElement(partStack); - if (result == null) result = caseWindowElement(partStack); - if (result == null) result = caseElementContainer(partStack); - if (result == null) result = caseUIElement(partStack); - if (result == null) result = caseApplicationElement(partStack); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.PART_SASH_CONTAINER: { - MPartSashContainer partSashContainer = (MPartSashContainer)theEObject; - T1 result = casePartSashContainer(partSashContainer); - if (result == null) result = caseGenericTile(partSashContainer); - if (result == null) result = casePartSashContainerElement(partSashContainer); - if (result == null) result = caseWindowElement(partSashContainer); - if (result == null) result = caseElementContainer(partSashContainer); - if (result == null) result = caseUIElement(partSashContainer); - if (result == null) result = caseApplicationElement(partSashContainer); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.WINDOW: { - MWindow window = (MWindow)theEObject; - T1 result = caseWindow(window); - if (result == null) result = caseElementContainer(window); - if (result == null) result = caseUILabel(window); - if (result == null) result = caseContext(window); - if (result == null) result = caseHandlerContainer(window); - if (result == null) result = caseBindings(window); - if (result == null) result = caseUIElement(window); - if (result == null) result = caseApplicationElement(window); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.TRIMMED_WINDOW: { - MTrimmedWindow trimmedWindow = (MTrimmedWindow)theEObject; - T1 result = caseTrimmedWindow(trimmedWindow); - if (result == null) result = caseWindow(trimmedWindow); - if (result == null) result = caseElementContainer(trimmedWindow); - if (result == null) result = caseUILabel(trimmedWindow); - if (result == null) result = caseContext(trimmedWindow); - if (result == null) result = caseHandlerContainer(trimmedWindow); - if (result == null) result = caseBindings(trimmedWindow); - if (result == null) result = caseUIElement(trimmedWindow); - if (result == null) result = caseApplicationElement(trimmedWindow); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.TRIM_ELEMENT: { - MTrimElement trimElement = (MTrimElement)theEObject; - T1 result = caseTrimElement(trimElement); - if (result == null) result = caseUIElement(trimElement); - if (result == null) result = caseApplicationElement(trimElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.PART_SASH_CONTAINER_ELEMENT: { - MPartSashContainerElement partSashContainerElement = (MPartSashContainerElement)theEObject; - T1 result = casePartSashContainerElement(partSashContainerElement); - if (result == null) result = caseUIElement(partSashContainerElement); - if (result == null) result = caseApplicationElement(partSashContainerElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.WINDOW_ELEMENT: { - MWindowElement windowElement = (MWindowElement)theEObject; - T1 result = caseWindowElement(windowElement); - if (result == null) result = caseUIElement(windowElement); - if (result == null) result = caseApplicationElement(windowElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.TRIM_BAR: { - MTrimBar trimBar = (MTrimBar)theEObject; - T1 result = caseTrimBar(trimBar); - if (result == null) result = caseGenericTrimContainer(trimBar); - if (result == null) result = caseElementContainer(trimBar); - if (result == null) result = caseUIElement(trimBar); - if (result == null) result = caseApplicationElement(trimBar); - if (result == null) result = defaultCase(theEObject); - return result; - } - case BasicPackageImpl.STACK_ELEMENT: { - MStackElement stackElement = (MStackElement)theEObject; - T1 result = caseStackElement(stackElement); - if (result == null) result = caseUIElement(stackElement); - if (result == null) result = caseApplicationElement(stackElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePart(MPart object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Input Part</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Input Part</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseInputPart(MInputPart object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Stack</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Stack</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePartStack(MPartStack object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Sash Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Sash Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePartSashContainer(MPartSashContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Window</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Window</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseWindow(MWindow object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Trimmed Window</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Trimmed Window</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseTrimmedWindow(MTrimmedWindow object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Trim Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Trim Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseTrimElement(MTrimElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Sash Container Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Sash Container Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePartSashContainerElement(MPartSashContainerElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Window Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Window Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseWindowElement(MWindowElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Trim Bar</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Trim Bar</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseTrimBar(MTrimBar object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Stack Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Stack Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseStackElement(MStackElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseApplicationElement(MApplicationElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Contribution</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Contribution</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContribution(MContribution object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Context</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Context</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContext(MContext object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUIElement(MUIElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Label</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Label</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUILabel(MUILabel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseHandlerContainer(MHandlerContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Dirtyable</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Dirtyable</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseDirtyable(MDirtyable object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Bindings</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Bindings</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseBindings(MBindings object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Input</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Input</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseInput(MInput object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseElementContainer(MElementContainer<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Stack</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Stack</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericStack(MGenericStack<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Tile</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Tile</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericTile(MGenericTile<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Trim Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Trim Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericTrimContainer(MGenericTrimContainer<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T1 defaultCase(EObject object) { - return null; - } - -} //BasicSwitch
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/util/MenuAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/util/MenuAdapterFactory.java deleted file mode 100644 index d22566c..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/util/MenuAdapterFactory.java +++ /dev/null
@@ -1,791 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.menu.util; - -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement; -import org.eclipse.e4.ui.model.application.ui.menu.*; -import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MDirectToolItem; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledToolItem; -import org.eclipse.e4.ui.model.application.ui.menu.MItem; -import org.eclipse.e4.ui.model.application.ui.menu.MMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuContribution; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuSeparator; -import org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenuSeparator; -import org.eclipse.e4.ui.model.application.ui.menu.MPopupMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MRenderedMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MRenderedMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MRenderedToolBar; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBar; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarContribution; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarElement; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarSeparator; -import org.eclipse.e4.ui.model.application.ui.menu.MToolControl; -import org.eclipse.e4.ui.model.application.ui.menu.MToolItem; -import org.eclipse.e4.ui.model.application.ui.menu.MTrimContribution; -import org.eclipse.e4.ui.model.application.ui.menu.MTrimContributions; -import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl; -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.ui.model.application.ui.menu.impl.MenuPackageImpl - * @generated - */ -public class MenuAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static MenuPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public MenuAdapterFactory() { - if (modelPackage == null) { - modelPackage = MenuPackageImpl.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 MenuSwitch<Adapter> modelSwitch = - new MenuSwitch<Adapter>() { - @Override - public Adapter caseItem(MItem object) { - return createItemAdapter(); - } - @Override - public Adapter caseHandledItem(MHandledItem object) { - return createHandledItemAdapter(); - } - @Override - public Adapter caseMenuElement(MMenuElement object) { - return createMenuElementAdapter(); - } - @Override - public Adapter caseMenuItem(MMenuItem object) { - return createMenuItemAdapter(); - } - @Override - public Adapter caseMenuSeparator(MMenuSeparator object) { - return createMenuSeparatorAdapter(); - } - @Override - public Adapter caseMenu(MMenu object) { - return createMenuAdapter(); - } - @Override - public Adapter caseMenuContribution(MMenuContribution object) { - return createMenuContributionAdapter(); - } - @Override - public Adapter casePopupMenu(MPopupMenu object) { - return createPopupMenuAdapter(); - } - @Override - public Adapter caseDirectMenuItem(MDirectMenuItem object) { - return createDirectMenuItemAdapter(); - } - @Override - public Adapter caseHandledMenuItem(MHandledMenuItem object) { - return createHandledMenuItemAdapter(); - } - @Override - public Adapter caseToolItem(MToolItem object) { - return createToolItemAdapter(); - } - @Override - public Adapter caseToolBar(MToolBar object) { - return createToolBarAdapter(); - } - @Override - public Adapter caseToolBarElement(MToolBarElement object) { - return createToolBarElementAdapter(); - } - @Override - public Adapter caseToolControl(MToolControl object) { - return createToolControlAdapter(); - } - @Override - public Adapter caseHandledToolItem(MHandledToolItem object) { - return createHandledToolItemAdapter(); - } - @Override - public Adapter caseDirectToolItem(MDirectToolItem object) { - return createDirectToolItemAdapter(); - } - @Override - public Adapter caseToolBarSeparator(MToolBarSeparator object) { - return createToolBarSeparatorAdapter(); - } - @Override - public Adapter caseMenuContributions(MMenuContributions object) { - return createMenuContributionsAdapter(); - } - @Override - public Adapter caseRenderedMenu(MRenderedMenu object) { - return createRenderedMenuAdapter(); - } - @Override - public Adapter caseRenderedToolBar(MRenderedToolBar object) { - return createRenderedToolBarAdapter(); - } - @Override - public Adapter caseToolBarContribution(MToolBarContribution object) { - return createToolBarContributionAdapter(); - } - @Override - public Adapter caseToolBarContributions(MToolBarContributions object) { - return createToolBarContributionsAdapter(); - } - @Override - public Adapter caseTrimContribution(MTrimContribution object) { - return createTrimContributionAdapter(); - } - @Override - public Adapter caseTrimContributions(MTrimContributions object) { - return createTrimContributionsAdapter(); - } - @Override - public Adapter caseRenderedMenuItem(MRenderedMenuItem object) { - return createRenderedMenuItemAdapter(); - } - @Override - public Adapter caseOpaqueToolItem(MOpaqueToolItem object) { - return createOpaqueToolItemAdapter(); - } - @Override - public Adapter caseOpaqueMenuItem(MOpaqueMenuItem object) { - return createOpaqueMenuItemAdapter(); - } - @Override - public Adapter caseOpaqueMenuSeparator(MOpaqueMenuSeparator object) { - return createOpaqueMenuSeparatorAdapter(); - } - @Override - public Adapter caseOpaqueMenu(MOpaqueMenu object) { - return createOpaqueMenuAdapter(); - } - @Override - public Adapter caseApplicationElement(MApplicationElement object) { - return createApplicationElementAdapter(); - } - @Override - public Adapter caseUIElement(MUIElement object) { - return createUIElementAdapter(); - } - @Override - public Adapter caseUILabel(MUILabel object) { - return createUILabelAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseElementContainer(MElementContainer<T> object) { - return createElementContainerAdapter(); - } - @Override - public Adapter caseContext(MContext object) { - return createContextAdapter(); - } - @Override - public Adapter caseContribution(MContribution object) { - return createContributionAdapter(); - } - @Override - public Adapter caseTrimElement(MTrimElement object) { - return createTrimElementAdapter(); - } - @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.ui.model.application.ui.menu.MItem <em>Item</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.ui.model.application.ui.menu.MItem - * @generated - */ - public Adapter createItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MHandledItem <em>Handled Item</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.ui.model.application.ui.menu.MHandledItem - * @generated - */ - public Adapter createHandledItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MMenuElement <em>Element</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.ui.model.application.ui.menu.MMenuElement - * @generated - */ - public Adapter createMenuElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MMenuItem <em>Item</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.ui.model.application.ui.menu.MMenuItem - * @generated - */ - public Adapter createMenuItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MMenuSeparator <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.ui.model.application.ui.menu.MMenuSeparator - * @generated - */ - public Adapter createMenuSeparatorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MMenu <em>Menu</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.ui.model.application.ui.menu.MMenu - * @generated - */ - public Adapter createMenuAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MMenuContribution <em>Contribution</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.ui.model.application.ui.menu.MMenuContribution - * @generated - */ - public Adapter createMenuContributionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MPopupMenu <em>Popup Menu</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.ui.model.application.ui.menu.MPopupMenu - * @generated - */ - public Adapter createPopupMenuAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem <em>Direct Menu Item</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.ui.model.application.ui.menu.MDirectMenuItem - * @generated - */ - public Adapter createDirectMenuItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem <em>Handled Menu Item</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.ui.model.application.ui.menu.MHandledMenuItem - * @generated - */ - public Adapter createHandledMenuItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolItem <em>Tool Item</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.ui.model.application.ui.menu.MToolItem - * @generated - */ - public Adapter createToolItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolBar <em>Tool Bar</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.ui.model.application.ui.menu.MToolBar - * @generated - */ - public Adapter createToolBarAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolBarElement <em>Tool Bar Element</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.ui.model.application.ui.menu.MToolBarElement - * @generated - */ - public Adapter createToolBarElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolControl <em>Tool 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.ui.model.application.ui.menu.MToolControl - * @generated - */ - public Adapter createToolControlAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MHandledToolItem <em>Handled Tool Item</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.ui.model.application.ui.menu.MHandledToolItem - * @generated - */ - public Adapter createHandledToolItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MDirectToolItem <em>Direct Tool Item</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.ui.model.application.ui.menu.MDirectToolItem - * @generated - */ - public Adapter createDirectToolItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolBarSeparator <em>Tool Bar 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.ui.model.application.ui.menu.MToolBarSeparator - * @generated - */ - public Adapter createToolBarSeparatorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MMenuContributions <em>Contributions</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.ui.model.application.ui.menu.MMenuContributions - * @generated - */ - public Adapter createMenuContributionsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MRenderedMenu <em>Rendered Menu</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.ui.model.application.ui.menu.MRenderedMenu - * @generated - */ - public Adapter createRenderedMenuAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MRenderedToolBar <em>Rendered Tool Bar</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.ui.model.application.ui.menu.MRenderedToolBar - * @generated - */ - public Adapter createRenderedToolBarAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolBarContribution <em>Tool Bar Contribution</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.ui.model.application.ui.menu.MToolBarContribution - * @generated - */ - public Adapter createToolBarContributionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolBarContributions <em>Tool Bar Contributions</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.ui.model.application.ui.menu.MToolBarContributions - * @generated - */ - public Adapter createToolBarContributionsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MTrimContribution <em>Trim Contribution</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.ui.model.application.ui.menu.MTrimContribution - * @generated - */ - public Adapter createTrimContributionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MTrimContributions <em>Trim Contributions</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.ui.model.application.ui.menu.MTrimContributions - * @generated - */ - public Adapter createTrimContributionsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MRenderedMenuItem <em>Rendered Menu Item</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.ui.model.application.ui.menu.MRenderedMenuItem - * @generated - */ - public Adapter createRenderedMenuItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MOpaqueToolItem <em>Opaque Tool Item</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.ui.model.application.ui.menu.MOpaqueToolItem - * @generated - */ - public Adapter createOpaqueToolItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenuItem <em>Opaque Menu Item</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.ui.model.application.ui.menu.MOpaqueMenuItem - * @generated - */ - public Adapter createOpaqueMenuItemAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenuSeparator <em>Opaque Menu 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.ui.model.application.ui.menu.MOpaqueMenuSeparator - * @generated - */ - public Adapter createOpaqueMenuSeparatorAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenu <em>Opaque Menu</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.ui.model.application.ui.menu.MOpaqueMenu - * @generated - */ - public Adapter createOpaqueMenuAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplicationElement <em>Element</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.ui.model.application.MApplicationElement - * @generated - */ - public Adapter createApplicationElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUIElement <em>UI Element</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.ui.model.application.ui.MUIElement - * @generated - */ - public Adapter createUIElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUILabel <em>UI 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.ui.model.application.ui.MUILabel - * @generated - */ - public Adapter createUILabelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</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.ui.model.application.ui.MElementContainer - * @generated - */ - public Adapter createElementContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MContext <em>Context</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.ui.model.application.ui.MContext - * @generated - */ - public Adapter createContextAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MContribution <em>Contribution</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.ui.model.application.MContribution - * @generated - */ - public Adapter createContributionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.basic.MTrimElement <em>Trim Element</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.ui.model.application.ui.basic.MTrimElement - * @generated - */ - public Adapter createTrimElementAdapter() { - 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; - } - -} //MenuAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/util/MenuSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/util/MenuSwitch.java deleted file mode 100644 index 412364b..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/util/MenuSwitch.java +++ /dev/null
@@ -1,974 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.menu.util; - -import java.util.List; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement; -import org.eclipse.e4.ui.model.application.ui.menu.*; -import org.eclipse.e4.ui.model.application.ui.menu.MDirectMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MDirectToolItem; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MHandledToolItem; -import org.eclipse.e4.ui.model.application.ui.menu.MItem; -import org.eclipse.e4.ui.model.application.ui.menu.MMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuContribution; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuSeparator; -import org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MOpaqueMenuSeparator; -import org.eclipse.e4.ui.model.application.ui.menu.MPopupMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MRenderedMenu; -import org.eclipse.e4.ui.model.application.ui.menu.MRenderedMenuItem; -import org.eclipse.e4.ui.model.application.ui.menu.MRenderedToolBar; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBar; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarContribution; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarElement; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarSeparator; -import org.eclipse.e4.ui.model.application.ui.menu.MToolControl; -import org.eclipse.e4.ui.model.application.ui.menu.MToolItem; -import org.eclipse.e4.ui.model.application.ui.menu.MTrimContribution; -import org.eclipse.e4.ui.model.application.ui.menu.MTrimContributions; -import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl - * @generated - */ -public class MenuSwitch<T1> extends Switch<T1> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static MenuPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public MenuSwitch() { - if (modelPackage == null) { - modelPackage = MenuPackageImpl.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - @Override - protected T1 doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case MenuPackageImpl.ITEM: { - MItem item = (MItem)theEObject; - T1 result = caseItem(item); - if (result == null) result = caseUIElement(item); - if (result == null) result = caseUILabel(item); - if (result == null) result = caseApplicationElement(item); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.HANDLED_ITEM: { - MHandledItem handledItem = (MHandledItem)theEObject; - T1 result = caseHandledItem(handledItem); - if (result == null) result = caseItem(handledItem); - if (result == null) result = caseUIElement(handledItem); - if (result == null) result = caseUILabel(handledItem); - if (result == null) result = caseApplicationElement(handledItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.MENU_ELEMENT: { - MMenuElement menuElement = (MMenuElement)theEObject; - T1 result = caseMenuElement(menuElement); - if (result == null) result = caseUIElement(menuElement); - if (result == null) result = caseUILabel(menuElement); - if (result == null) result = caseApplicationElement(menuElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.MENU_ITEM: { - MMenuItem menuItem = (MMenuItem)theEObject; - T1 result = caseMenuItem(menuItem); - if (result == null) result = caseItem(menuItem); - if (result == null) result = caseMenuElement(menuItem); - if (result == null) result = caseUIElement(menuItem); - if (result == null) result = caseUILabel(menuItem); - if (result == null) result = caseApplicationElement(menuItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.MENU_SEPARATOR: { - MMenuSeparator menuSeparator = (MMenuSeparator)theEObject; - T1 result = caseMenuSeparator(menuSeparator); - if (result == null) result = caseMenuElement(menuSeparator); - if (result == null) result = caseUIElement(menuSeparator); - if (result == null) result = caseUILabel(menuSeparator); - if (result == null) result = caseApplicationElement(menuSeparator); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.MENU: { - MMenu menu = (MMenu)theEObject; - T1 result = caseMenu(menu); - if (result == null) result = caseMenuElement(menu); - if (result == null) result = caseElementContainer(menu); - if (result == null) result = caseUIElement(menu); - if (result == null) result = caseUILabel(menu); - if (result == null) result = caseApplicationElement(menu); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.MENU_CONTRIBUTION: { - MMenuContribution menuContribution = (MMenuContribution)theEObject; - T1 result = caseMenuContribution(menuContribution); - if (result == null) result = caseElementContainer(menuContribution); - if (result == null) result = caseUIElement(menuContribution); - if (result == null) result = caseApplicationElement(menuContribution); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.POPUP_MENU: { - MPopupMenu popupMenu = (MPopupMenu)theEObject; - T1 result = casePopupMenu(popupMenu); - if (result == null) result = caseMenu(popupMenu); - if (result == null) result = caseContext(popupMenu); - if (result == null) result = caseMenuElement(popupMenu); - if (result == null) result = caseElementContainer(popupMenu); - if (result == null) result = caseUIElement(popupMenu); - if (result == null) result = caseUILabel(popupMenu); - if (result == null) result = caseApplicationElement(popupMenu); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.DIRECT_MENU_ITEM: { - MDirectMenuItem directMenuItem = (MDirectMenuItem)theEObject; - T1 result = caseDirectMenuItem(directMenuItem); - if (result == null) result = caseMenuItem(directMenuItem); - if (result == null) result = caseContribution(directMenuItem); - if (result == null) result = caseItem(directMenuItem); - if (result == null) result = caseMenuElement(directMenuItem); - if (result == null) result = caseUIElement(directMenuItem); - if (result == null) result = caseUILabel(directMenuItem); - if (result == null) result = caseApplicationElement(directMenuItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.HANDLED_MENU_ITEM: { - MHandledMenuItem handledMenuItem = (MHandledMenuItem)theEObject; - T1 result = caseHandledMenuItem(handledMenuItem); - if (result == null) result = caseMenuItem(handledMenuItem); - if (result == null) result = caseHandledItem(handledMenuItem); - if (result == null) result = caseItem(handledMenuItem); - if (result == null) result = caseMenuElement(handledMenuItem); - if (result == null) result = caseUIElement(handledMenuItem); - if (result == null) result = caseUILabel(handledMenuItem); - if (result == null) result = caseApplicationElement(handledMenuItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TOOL_ITEM: { - MToolItem toolItem = (MToolItem)theEObject; - T1 result = caseToolItem(toolItem); - if (result == null) result = caseItem(toolItem); - if (result == null) result = caseToolBarElement(toolItem); - if (result == null) result = caseUIElement(toolItem); - if (result == null) result = caseUILabel(toolItem); - if (result == null) result = caseApplicationElement(toolItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TOOL_BAR: { - MToolBar toolBar = (MToolBar)theEObject; - T1 result = caseToolBar(toolBar); - if (result == null) result = caseElementContainer(toolBar); - if (result == null) result = caseTrimElement(toolBar); - if (result == null) result = caseUIElement(toolBar); - if (result == null) result = caseApplicationElement(toolBar); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TOOL_BAR_ELEMENT: { - MToolBarElement toolBarElement = (MToolBarElement)theEObject; - T1 result = caseToolBarElement(toolBarElement); - if (result == null) result = caseUIElement(toolBarElement); - if (result == null) result = caseApplicationElement(toolBarElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TOOL_CONTROL: { - MToolControl toolControl = (MToolControl)theEObject; - T1 result = caseToolControl(toolControl); - if (result == null) result = caseToolBarElement(toolControl); - if (result == null) result = caseContribution(toolControl); - if (result == null) result = caseTrimElement(toolControl); - if (result == null) result = caseUIElement(toolControl); - if (result == null) result = caseApplicationElement(toolControl); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.HANDLED_TOOL_ITEM: { - MHandledToolItem handledToolItem = (MHandledToolItem)theEObject; - T1 result = caseHandledToolItem(handledToolItem); - if (result == null) result = caseToolItem(handledToolItem); - if (result == null) result = caseHandledItem(handledToolItem); - if (result == null) result = caseItem(handledToolItem); - if (result == null) result = caseToolBarElement(handledToolItem); - if (result == null) result = caseUIElement(handledToolItem); - if (result == null) result = caseUILabel(handledToolItem); - if (result == null) result = caseApplicationElement(handledToolItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.DIRECT_TOOL_ITEM: { - MDirectToolItem directToolItem = (MDirectToolItem)theEObject; - T1 result = caseDirectToolItem(directToolItem); - if (result == null) result = caseToolItem(directToolItem); - if (result == null) result = caseContribution(directToolItem); - if (result == null) result = caseItem(directToolItem); - if (result == null) result = caseToolBarElement(directToolItem); - if (result == null) result = caseUIElement(directToolItem); - if (result == null) result = caseUILabel(directToolItem); - if (result == null) result = caseApplicationElement(directToolItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TOOL_BAR_SEPARATOR: { - MToolBarSeparator toolBarSeparator = (MToolBarSeparator)theEObject; - T1 result = caseToolBarSeparator(toolBarSeparator); - if (result == null) result = caseToolBarElement(toolBarSeparator); - if (result == null) result = caseUIElement(toolBarSeparator); - if (result == null) result = caseApplicationElement(toolBarSeparator); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.MENU_CONTRIBUTIONS: { - MMenuContributions menuContributions = (MMenuContributions)theEObject; - T1 result = caseMenuContributions(menuContributions); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.RENDERED_MENU: { - MRenderedMenu renderedMenu = (MRenderedMenu)theEObject; - T1 result = caseRenderedMenu(renderedMenu); - if (result == null) result = caseMenu(renderedMenu); - if (result == null) result = caseMenuElement(renderedMenu); - if (result == null) result = caseElementContainer(renderedMenu); - if (result == null) result = caseUIElement(renderedMenu); - if (result == null) result = caseUILabel(renderedMenu); - if (result == null) result = caseApplicationElement(renderedMenu); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.RENDERED_TOOL_BAR: { - MRenderedToolBar renderedToolBar = (MRenderedToolBar)theEObject; - T1 result = caseRenderedToolBar(renderedToolBar); - if (result == null) result = caseToolBar(renderedToolBar); - if (result == null) result = caseElementContainer(renderedToolBar); - if (result == null) result = caseTrimElement(renderedToolBar); - if (result == null) result = caseUIElement(renderedToolBar); - if (result == null) result = caseApplicationElement(renderedToolBar); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TOOL_BAR_CONTRIBUTION: { - MToolBarContribution toolBarContribution = (MToolBarContribution)theEObject; - T1 result = caseToolBarContribution(toolBarContribution); - if (result == null) result = caseElementContainer(toolBarContribution); - if (result == null) result = caseUIElement(toolBarContribution); - if (result == null) result = caseApplicationElement(toolBarContribution); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TOOL_BAR_CONTRIBUTIONS: { - MToolBarContributions toolBarContributions = (MToolBarContributions)theEObject; - T1 result = caseToolBarContributions(toolBarContributions); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TRIM_CONTRIBUTION: { - MTrimContribution trimContribution = (MTrimContribution)theEObject; - T1 result = caseTrimContribution(trimContribution); - if (result == null) result = caseElementContainer(trimContribution); - if (result == null) result = caseUIElement(trimContribution); - if (result == null) result = caseApplicationElement(trimContribution); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.TRIM_CONTRIBUTIONS: { - MTrimContributions trimContributions = (MTrimContributions)theEObject; - T1 result = caseTrimContributions(trimContributions); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.RENDERED_MENU_ITEM: { - MRenderedMenuItem renderedMenuItem = (MRenderedMenuItem)theEObject; - T1 result = caseRenderedMenuItem(renderedMenuItem); - if (result == null) result = caseMenuItem(renderedMenuItem); - if (result == null) result = caseItem(renderedMenuItem); - if (result == null) result = caseMenuElement(renderedMenuItem); - if (result == null) result = caseUIElement(renderedMenuItem); - if (result == null) result = caseUILabel(renderedMenuItem); - if (result == null) result = caseApplicationElement(renderedMenuItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.OPAQUE_TOOL_ITEM: { - MOpaqueToolItem opaqueToolItem = (MOpaqueToolItem)theEObject; - T1 result = caseOpaqueToolItem(opaqueToolItem); - if (result == null) result = caseToolItem(opaqueToolItem); - if (result == null) result = caseItem(opaqueToolItem); - if (result == null) result = caseToolBarElement(opaqueToolItem); - if (result == null) result = caseUIElement(opaqueToolItem); - if (result == null) result = caseUILabel(opaqueToolItem); - if (result == null) result = caseApplicationElement(opaqueToolItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.OPAQUE_MENU_ITEM: { - MOpaqueMenuItem opaqueMenuItem = (MOpaqueMenuItem)theEObject; - T1 result = caseOpaqueMenuItem(opaqueMenuItem); - if (result == null) result = caseMenuItem(opaqueMenuItem); - if (result == null) result = caseItem(opaqueMenuItem); - if (result == null) result = caseMenuElement(opaqueMenuItem); - if (result == null) result = caseUIElement(opaqueMenuItem); - if (result == null) result = caseUILabel(opaqueMenuItem); - if (result == null) result = caseApplicationElement(opaqueMenuItem); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.OPAQUE_MENU_SEPARATOR: { - MOpaqueMenuSeparator opaqueMenuSeparator = (MOpaqueMenuSeparator)theEObject; - T1 result = caseOpaqueMenuSeparator(opaqueMenuSeparator); - if (result == null) result = caseMenuSeparator(opaqueMenuSeparator); - if (result == null) result = caseMenuElement(opaqueMenuSeparator); - if (result == null) result = caseUIElement(opaqueMenuSeparator); - if (result == null) result = caseUILabel(opaqueMenuSeparator); - if (result == null) result = caseApplicationElement(opaqueMenuSeparator); - if (result == null) result = defaultCase(theEObject); - return result; - } - case MenuPackageImpl.OPAQUE_MENU: { - MOpaqueMenu opaqueMenu = (MOpaqueMenu)theEObject; - T1 result = caseOpaqueMenu(opaqueMenu); - if (result == null) result = caseMenu(opaqueMenu); - if (result == null) result = caseMenuElement(opaqueMenu); - if (result == null) result = caseElementContainer(opaqueMenu); - if (result == null) result = caseUIElement(opaqueMenu); - if (result == null) result = caseUILabel(opaqueMenu); - if (result == null) result = caseApplicationElement(opaqueMenu); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseItem(MItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handled Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handled Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseHandledItem(MHandledItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseMenuElement(MMenuElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseMenuItem(MMenuItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Separator</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Separator</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseMenuSeparator(MMenuSeparator object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Menu</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Menu</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseMenu(MMenu object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Contribution</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Contribution</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseMenuContribution(MMenuContribution object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Popup Menu</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Popup Menu</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePopupMenu(MPopupMenu object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Direct Menu Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Direct Menu Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseDirectMenuItem(MDirectMenuItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handled Menu Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handled Menu Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseHandledMenuItem(MHandledMenuItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolItem(MToolItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Bar</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Bar</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolBar(MToolBar object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Bar Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Bar Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolBarElement(MToolBarElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Control</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Control</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolControl(MToolControl object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handled Tool Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handled Tool Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseHandledToolItem(MHandledToolItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Direct Tool Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Direct Tool Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseDirectToolItem(MDirectToolItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Bar Separator</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Bar Separator</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolBarSeparator(MToolBarSeparator object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Contributions</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Contributions</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseMenuContributions(MMenuContributions object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Rendered Menu</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Rendered Menu</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseRenderedMenu(MRenderedMenu object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Rendered Tool Bar</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Rendered Tool Bar</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseRenderedToolBar(MRenderedToolBar object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Bar Contribution</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Bar Contribution</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolBarContribution(MToolBarContribution object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Bar Contributions</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Bar Contributions</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolBarContributions(MToolBarContributions object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Trim Contribution</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Trim Contribution</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseTrimContribution(MTrimContribution object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Trim Contributions</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Trim Contributions</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseTrimContributions(MTrimContributions object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Rendered Menu Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Rendered Menu Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseRenderedMenuItem(MRenderedMenuItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Opaque Tool Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Opaque Tool Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseOpaqueToolItem(MOpaqueToolItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Opaque Menu Item</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Opaque Menu Item</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseOpaqueMenuItem(MOpaqueMenuItem object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Opaque Menu Separator</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Opaque Menu Separator</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseOpaqueMenuSeparator(MOpaqueMenuSeparator object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Opaque Menu</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Opaque Menu</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseOpaqueMenu(MOpaqueMenu object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseApplicationElement(MApplicationElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUIElement(MUIElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Label</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Label</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUILabel(MUILabel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseElementContainer(MElementContainer<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Context</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Context</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContext(MContext object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Contribution</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Contribution</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContribution(MContribution object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Trim Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Trim Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseTrimElement(MTrimElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T1 defaultCase(EObject object) { - return null; - } - -} //MenuSwitch
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/util/UiAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/util/UiAdapterFactory.java deleted file mode 100644 index b565df7..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/util/UiAdapterFactory.java +++ /dev/null
@@ -1,336 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.util; - -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.ui.*; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MCoreExpression; -import org.eclipse.e4.ui.model.application.ui.MDirtyable; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MExpression; -import org.eclipse.e4.ui.model.application.ui.MGenericStack; -import org.eclipse.e4.ui.model.application.ui.MGenericTile; -import org.eclipse.e4.ui.model.application.ui.MGenericTrimContainer; -import org.eclipse.e4.ui.model.application.ui.MInput; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl; -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.ui.model.application.ui.impl.UiPackageImpl - * @generated - */ -public class UiAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static UiPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public UiAdapterFactory() { - if (modelPackage == null) { - modelPackage = UiPackageImpl.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 UiSwitch<Adapter> modelSwitch = - new UiSwitch<Adapter>() { - @Override - public Adapter caseContext(MContext object) { - return createContextAdapter(); - } - @Override - public Adapter caseDirtyable(MDirtyable object) { - return createDirtyableAdapter(); - } - @Override - public Adapter caseInput(MInput object) { - return createInputAdapter(); - } - @Override - public Adapter caseUIElement(MUIElement object) { - return createUIElementAdapter(); - } - @Override - public Adapter caseUILabel(MUILabel object) { - return createUILabelAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseElementContainer(MElementContainer<T> object) { - return createElementContainerAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericStack(MGenericStack<T> object) { - return createGenericStackAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericTile(MGenericTile<T> object) { - return createGenericTileAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseGenericTrimContainer(MGenericTrimContainer<T> object) { - return createGenericTrimContainerAdapter(); - } - @Override - public Adapter caseExpression(MExpression object) { - return createExpressionAdapter(); - } - @Override - public Adapter caseCoreExpression(MCoreExpression object) { - return createCoreExpressionAdapter(); - } - @Override - public Adapter caseApplicationElement(MApplicationElement object) { - return createApplicationElementAdapter(); - } - @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.ui.model.application.ui.MContext <em>Context</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.ui.model.application.ui.MContext - * @generated - */ - public Adapter createContextAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MDirtyable <em>Dirtyable</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.ui.model.application.ui.MDirtyable - * @generated - */ - public Adapter createDirtyableAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MInput <em>Input</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.ui.model.application.ui.MInput - * @generated - */ - public Adapter createInputAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUIElement <em>UI Element</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.ui.model.application.ui.MUIElement - * @generated - */ - public Adapter createUIElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUILabel <em>UI 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.ui.model.application.ui.MUILabel - * @generated - */ - public Adapter createUILabelAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</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.ui.model.application.ui.MElementContainer - * @generated - */ - public Adapter createElementContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericStack <em>Generic Stack</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.ui.model.application.ui.MGenericStack - * @generated - */ - public Adapter createGenericStackAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericTile <em>Generic Tile</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.ui.model.application.ui.MGenericTile - * @generated - */ - public Adapter createGenericTileAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MGenericTrimContainer <em>Generic Trim Container</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.ui.model.application.ui.MGenericTrimContainer - * @generated - */ - public Adapter createGenericTrimContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MExpression <em>Expression</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.ui.model.application.ui.MExpression - * @generated - */ - public Adapter createExpressionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MCoreExpression <em>Core Expression</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.ui.model.application.ui.MCoreExpression - * @generated - */ - public Adapter createCoreExpressionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplicationElement <em>Element</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.ui.model.application.MApplicationElement - * @generated - */ - public Adapter createApplicationElementAdapter() { - 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; - } - -} //UiAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/util/UiSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/util/UiSwitch.java deleted file mode 100644 index b4f1aeb..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/util/UiSwitch.java +++ /dev/null
@@ -1,371 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.ui.util; - -import java.util.List; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.ui.*; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MCoreExpression; -import org.eclipse.e4.ui.model.application.ui.MDirtyable; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MExpression; -import org.eclipse.e4.ui.model.application.ui.MGenericStack; -import org.eclipse.e4.ui.model.application.ui.MGenericTile; -import org.eclipse.e4.ui.model.application.ui.MGenericTrimContainer; -import org.eclipse.e4.ui.model.application.ui.MInput; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.MUILabel; -import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl - * @generated - */ -public class UiSwitch<T1> extends Switch<T1> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static UiPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public UiSwitch() { - if (modelPackage == null) { - modelPackage = UiPackageImpl.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - @Override - protected T1 doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case UiPackageImpl.CONTEXT: { - MContext context = (MContext)theEObject; - T1 result = caseContext(context); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.DIRTYABLE: { - MDirtyable dirtyable = (MDirtyable)theEObject; - T1 result = caseDirtyable(dirtyable); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.INPUT: { - MInput input = (MInput)theEObject; - T1 result = caseInput(input); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.UI_ELEMENT: { - MUIElement uiElement = (MUIElement)theEObject; - T1 result = caseUIElement(uiElement); - if (result == null) result = caseApplicationElement(uiElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.UI_LABEL: { - MUILabel uiLabel = (MUILabel)theEObject; - T1 result = caseUILabel(uiLabel); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.ELEMENT_CONTAINER: { - MElementContainer<?> elementContainer = (MElementContainer<?>)theEObject; - T1 result = caseElementContainer(elementContainer); - if (result == null) result = caseUIElement(elementContainer); - if (result == null) result = caseApplicationElement(elementContainer); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.GENERIC_STACK: { - MGenericStack<?> genericStack = (MGenericStack<?>)theEObject; - T1 result = caseGenericStack(genericStack); - if (result == null) result = caseElementContainer(genericStack); - if (result == null) result = caseUIElement(genericStack); - if (result == null) result = caseApplicationElement(genericStack); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.GENERIC_TILE: { - MGenericTile<?> genericTile = (MGenericTile<?>)theEObject; - T1 result = caseGenericTile(genericTile); - if (result == null) result = caseElementContainer(genericTile); - if (result == null) result = caseUIElement(genericTile); - if (result == null) result = caseApplicationElement(genericTile); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.GENERIC_TRIM_CONTAINER: { - MGenericTrimContainer<?> genericTrimContainer = (MGenericTrimContainer<?>)theEObject; - T1 result = caseGenericTrimContainer(genericTrimContainer); - if (result == null) result = caseElementContainer(genericTrimContainer); - if (result == null) result = caseUIElement(genericTrimContainer); - if (result == null) result = caseApplicationElement(genericTrimContainer); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.EXPRESSION: { - MExpression expression = (MExpression)theEObject; - T1 result = caseExpression(expression); - if (result == null) result = caseApplicationElement(expression); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UiPackageImpl.CORE_EXPRESSION: { - MCoreExpression coreExpression = (MCoreExpression)theEObject; - T1 result = caseCoreExpression(coreExpression); - if (result == null) result = caseExpression(coreExpression); - if (result == null) result = caseApplicationElement(coreExpression); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Context</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Context</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContext(MContext object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Dirtyable</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Dirtyable</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseDirtyable(MDirtyable object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Input</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Input</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseInput(MInput object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUIElement(MUIElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Label</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Label</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUILabel(MUILabel object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseElementContainer(MElementContainer<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Stack</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Stack</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericStack(MGenericStack<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Tile</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Tile</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericTile(MGenericTile<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Generic Trim Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Generic Trim Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseGenericTrimContainer(MGenericTrimContainer<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Expression</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Expression</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseExpression(MExpression object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Core Expression</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Core Expression</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseCoreExpression(MCoreExpression object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseApplicationElement(MApplicationElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T1 defaultCase(EObject object) { - return null; - } - -} //UiSwitch
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/util/ApplicationAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/util/ApplicationAdapterFactory.java deleted file mode 100644 index d180c48..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/util/ApplicationAdapterFactory.java +++ /dev/null
@@ -1,393 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.util; - -import java.util.Map; -import org.eclipse.e4.ui.model.application.*; -import org.eclipse.e4.ui.model.application.MAddon; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.commands.MBindingTableContainer; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer; -import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MTrimContributions; -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.ui.model.application.impl.ApplicationPackageImpl - * @generated - */ -public class ApplicationAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static ApplicationPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ApplicationAdapterFactory() { - if (modelPackage == null) { - modelPackage = ApplicationPackageImpl.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 ApplicationSwitch<Adapter> modelSwitch = - new ApplicationSwitch<Adapter>() { - @Override - public Adapter caseStringToStringMap(Map.Entry<String, String> object) { - return createStringToStringMapAdapter(); - } - @Override - public Adapter caseApplication(MApplication object) { - return createApplicationAdapter(); - } - @Override - public Adapter caseApplicationElement(MApplicationElement object) { - return createApplicationElementAdapter(); - } - @Override - public Adapter caseContribution(MContribution object) { - return createContributionAdapter(); - } - @Override - public Adapter caseAddon(MAddon object) { - return createAddonAdapter(); - } - @Override - public Adapter caseUIElement(MUIElement object) { - return createUIElementAdapter(); - } - @Override - public <T extends MUIElement> Adapter caseElementContainer(MElementContainer<T> object) { - return createElementContainerAdapter(); - } - @Override - public Adapter caseContext(MContext object) { - return createContextAdapter(); - } - @Override - public Adapter caseHandlerContainer(MHandlerContainer object) { - return createHandlerContainerAdapter(); - } - @Override - public Adapter caseBindingTableContainer(MBindingTableContainer object) { - return createBindingTableContainerAdapter(); - } - @Override - public Adapter casePartDescriptorContainer(MPartDescriptorContainer object) { - return createPartDescriptorContainerAdapter(); - } - @Override - public Adapter caseBindings(MBindings object) { - return createBindingsAdapter(); - } - @Override - public Adapter caseMenuContributions(MMenuContributions object) { - return createMenuContributionsAdapter(); - } - @Override - public Adapter caseToolBarContributions(MToolBarContributions object) { - return createToolBarContributionsAdapter(); - } - @Override - public Adapter caseTrimContributions(MTrimContributions object) { - return createTrimContributionsAdapter(); - } - @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 java.util.Map.Entry <em>String To String Map</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 java.util.Map.Entry - * @generated - */ - public Adapter createStringToStringMapAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplication <em>Application</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.ui.model.application.MApplication - * @generated - */ - public Adapter createApplicationAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MApplicationElement <em>Element</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.ui.model.application.MApplicationElement - * @generated - */ - public Adapter createApplicationElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MContribution <em>Contribution</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.ui.model.application.MContribution - * @generated - */ - public Adapter createContributionAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.MAddon <em>Addon</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.ui.model.application.MAddon - * @generated - */ - public Adapter createAddonAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MUIElement <em>UI Element</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.ui.model.application.ui.MUIElement - * @generated - */ - public Adapter createUIElementAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</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.ui.model.application.ui.MElementContainer - * @generated - */ - public Adapter createElementContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.MContext <em>Context</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.ui.model.application.ui.MContext - * @generated - */ - public Adapter createContextAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MHandlerContainer <em>Handler Container</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.ui.model.application.commands.MHandlerContainer - * @generated - */ - public Adapter createHandlerContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MBindingTableContainer <em>Binding Table Container</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.ui.model.application.commands.MBindingTableContainer - * @generated - */ - public Adapter createBindingTableContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer <em>Part Descriptor Container</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.ui.model.application.descriptor.basic.MPartDescriptorContainer - * @generated - */ - public Adapter createPartDescriptorContainerAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.commands.MBindings <em>Bindings</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.ui.model.application.commands.MBindings - * @generated - */ - public Adapter createBindingsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MMenuContributions <em>Contributions</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.ui.model.application.ui.menu.MMenuContributions - * @generated - */ - public Adapter createMenuContributionsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MToolBarContributions <em>Tool Bar Contributions</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.ui.model.application.ui.menu.MToolBarContributions - * @generated - */ - public Adapter createToolBarContributionsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.application.ui.menu.MTrimContributions <em>Trim Contributions</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.ui.model.application.ui.menu.MTrimContributions - * @generated - */ - public Adapter createTrimContributionsAdapter() { - 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; - } - -} //ApplicationAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/util/ApplicationSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/util/ApplicationSwitch.java deleted file mode 100644 index d6af30d..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/util/ApplicationSwitch.java +++ /dev/null
@@ -1,382 +0,0 @@ -/** - * Copyright (c) 2008 IBM Corporation and others. - * 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: - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.application.util; - -import java.util.List; -import java.util.Map; -import org.eclipse.e4.ui.model.application.*; -import org.eclipse.e4.ui.model.application.MAddon; -import org.eclipse.e4.ui.model.application.MApplication; -import org.eclipse.e4.ui.model.application.MApplicationElement; -import org.eclipse.e4.ui.model.application.MContribution; -import org.eclipse.e4.ui.model.application.commands.MBindingTableContainer; -import org.eclipse.e4.ui.model.application.commands.MBindings; -import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; -import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer; -import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl; -import org.eclipse.e4.ui.model.application.ui.MContext; -import org.eclipse.e4.ui.model.application.ui.MElementContainer; -import org.eclipse.e4.ui.model.application.ui.MUIElement; -import org.eclipse.e4.ui.model.application.ui.menu.MMenuContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MToolBarContributions; -import org.eclipse.e4.ui.model.application.ui.menu.MTrimContributions; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.util.Switch; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl - * @generated - */ -public class ApplicationSwitch<T1> extends Switch<T1> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static ApplicationPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public ApplicationSwitch() { - if (modelPackage == null) { - modelPackage = ApplicationPackageImpl.eINSTANCE; - } - } - - /** - * Checks whether this is a switch for the given package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @parameter ePackage the package in question. - * @return whether this is a switch for the given package. - * @generated - */ - @Override - protected boolean isSwitchFor(EPackage ePackage) { - return ePackage == modelPackage; - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - @Override - protected T1 doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case ApplicationPackageImpl.STRING_TO_STRING_MAP: { - @SuppressWarnings("unchecked") Map.Entry<String, String> stringToStringMap = (Map.Entry<String, String>)theEObject; - T1 result = caseStringToStringMap(stringToStringMap); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackageImpl.APPLICATION: { - MApplication application = (MApplication)theEObject; - T1 result = caseApplication(application); - if (result == null) result = caseElementContainer(application); - if (result == null) result = caseContext(application); - if (result == null) result = caseHandlerContainer(application); - if (result == null) result = caseBindingTableContainer(application); - if (result == null) result = casePartDescriptorContainer(application); - if (result == null) result = caseBindings(application); - if (result == null) result = caseMenuContributions(application); - if (result == null) result = caseToolBarContributions(application); - if (result == null) result = caseTrimContributions(application); - if (result == null) result = caseUIElement(application); - if (result == null) result = caseApplicationElement(application); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackageImpl.APPLICATION_ELEMENT: { - MApplicationElement applicationElement = (MApplicationElement)theEObject; - T1 result = caseApplicationElement(applicationElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackageImpl.CONTRIBUTION: { - MContribution contribution = (MContribution)theEObject; - T1 result = caseContribution(contribution); - if (result == null) result = caseApplicationElement(contribution); - if (result == null) result = defaultCase(theEObject); - return result; - } - case ApplicationPackageImpl.ADDON: { - MAddon addon = (MAddon)theEObject; - T1 result = caseAddon(addon); - if (result == null) result = caseContribution(addon); - if (result == null) result = caseApplicationElement(addon); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>String To String Map</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>String To String Map</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseStringToStringMap(Map.Entry<String, String> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Application</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Application</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseApplication(MApplication object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseApplicationElement(MApplicationElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Contribution</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Contribution</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContribution(MContribution object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Addon</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Addon</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseAddon(MAddon object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>UI Element</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>UI Element</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseUIElement(MUIElement object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Element Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Element Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public <T extends MUIElement> T1 caseElementContainer(MElementContainer<T> object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Context</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Context</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseContext(MContext object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Handler Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseHandlerContainer(MHandlerContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Binding Table Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Binding Table Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseBindingTableContainer(MBindingTableContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Part Descriptor Container</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Part Descriptor Container</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 casePartDescriptorContainer(MPartDescriptorContainer object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Bindings</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Bindings</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseBindings(MBindings object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Contributions</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Contributions</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseMenuContributions(MMenuContributions object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Tool Bar Contributions</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Tool Bar Contributions</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseToolBarContributions(MToolBarContributions object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Trim Contributions</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Trim Contributions</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T1 caseTrimContributions(MTrimContributions object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - @Override - public T1 defaultCase(EObject object) { - return null; - } - -} //ApplicationSwitch
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/util/FragmentAdapterFactory.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/util/FragmentAdapterFactory.java deleted file mode 100644 index f474264..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/util/FragmentAdapterFactory.java +++ /dev/null
@@ -1,165 +0,0 @@ -/** - * Copyright (c) 2010 BestSolution.at and others. - * 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.fragment.util; - -import org.eclipse.e4.ui.model.fragment.MModelFragment; -import org.eclipse.e4.ui.model.fragment.MModelFragments; -import org.eclipse.e4.ui.model.fragment.MStringModelFragment; -import org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl; -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.ui.model.fragment.impl.FragmentPackageImpl - * @generated - */ -public class FragmentAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static FragmentPackageImpl modelPackage; - - /** - * Creates an instance of the adapter factory. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public FragmentAdapterFactory() { - if (modelPackage == null) { - modelPackage = FragmentPackageImpl.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 FragmentSwitch<Adapter> modelSwitch = - new FragmentSwitch<Adapter>() { - @Override - public Adapter caseModelFragments(MModelFragments object) { - return createModelFragmentsAdapter(); - } - @Override - public Adapter caseModelFragment(MModelFragment object) { - return createModelFragmentAdapter(); - } - @Override - public Adapter caseStringModelFragment(MStringModelFragment object) { - return createStringModelFragmentAdapter(); - } - @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.ui.model.fragment.MModelFragments <em>Model Fragments</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.ui.model.fragment.MModelFragments - * @generated - */ - public Adapter createModelFragmentsAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.fragment.MModelFragment <em>Model Fragment</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.ui.model.fragment.MModelFragment - * @generated - */ - public Adapter createModelFragmentAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.e4.ui.model.fragment.MStringModelFragment <em>String Model Fragment</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.ui.model.fragment.MStringModelFragment - * @generated - */ - public Adapter createStringModelFragmentAdapter() { - 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; - } - -} //FragmentAdapterFactory
diff --git a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/util/FragmentSwitch.java b/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/util/FragmentSwitch.java deleted file mode 100644 index af9b748..0000000 --- a/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/fragment/util/FragmentSwitch.java +++ /dev/null
@@ -1,179 +0,0 @@ -/** - * Copyright (c) 2010 BestSolution.at and others. - * 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: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - * IBM Corporation - initial API and implementation - */ -package org.eclipse.e4.ui.model.fragment.util; - -import java.util.List; -import org.eclipse.e4.ui.model.fragment.MModelFragment; -import org.eclipse.e4.ui.model.fragment.MModelFragments; -import org.eclipse.e4.ui.model.fragment.MStringModelFragment; -import org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -/** - * <!-- begin-user-doc --> - * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, - * starting with the actual class of the object - * and proceeding up the inheritance hierarchy - * until a non-null result is returned, - * which is the result of the switch. - * <!-- end-user-doc --> - * @see org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl - * @generated - */ -public class FragmentSwitch<T> { - /** - * The cached model package - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static FragmentPackageImpl modelPackage; - - /** - * Creates an instance of the switch. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public FragmentSwitch() { - if (modelPackage == null) { - modelPackage = FragmentPackageImpl.eINSTANCE; - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - public T doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected T doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - else { - List<EClass> eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch(eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the first non-null result returned by a <code>caseXXX</code> call. - * @generated - */ - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case FragmentPackageImpl.MODEL_FRAGMENTS: { - MModelFragments modelFragments = (MModelFragments)theEObject; - T result = caseModelFragments(modelFragments); - if (result == null) result = defaultCase(theEObject); - return result; - } - case FragmentPackageImpl.MODEL_FRAGMENT: { - MModelFragment modelFragment = (MModelFragment)theEObject; - T result = caseModelFragment(modelFragment); - if (result == null) result = defaultCase(theEObject); - return result; - } - case FragmentPackageImpl.STRING_MODEL_FRAGMENT: { - MStringModelFragment stringModelFragment = (MStringModelFragment)theEObject; - T result = caseStringModelFragment(stringModelFragment); - if (result == null) result = caseModelFragment(stringModelFragment); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Model Fragments</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Model Fragments</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModelFragments(MModelFragments object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>Model Fragment</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>Model Fragment</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseModelFragment(MModelFragment object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>String Model Fragment</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>String Model Fragment</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseStringModelFragment(MStringModelFragment object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * <!-- end-user-doc --> - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public T defaultCase(EObject object) { - return null; - } - -} //FragmentSwitch