/******************************************************************************* * Copyright (c) 2010, 2011 Obeo. * 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: * Obeo - initial API and implementation *******************************************************************************/ package org.eclipse.mylyn.docs.intent.markup.markup.util; 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; import org.eclipse.mylyn.docs.intent.markup.markup.Annotations; import org.eclipse.mylyn.docs.intent.markup.markup.Block; import org.eclipse.mylyn.docs.intent.markup.markup.BlockContent; import org.eclipse.mylyn.docs.intent.markup.markup.Code; import org.eclipse.mylyn.docs.intent.markup.markup.Container; import org.eclipse.mylyn.docs.intent.markup.markup.Div; import org.eclipse.mylyn.docs.intent.markup.markup.Document; import org.eclipse.mylyn.docs.intent.markup.markup.Entity; import org.eclipse.mylyn.docs.intent.markup.markup.FootNote; import org.eclipse.mylyn.docs.intent.markup.markup.HasAttributes; import org.eclipse.mylyn.docs.intent.markup.markup.Image; import org.eclipse.mylyn.docs.intent.markup.markup.Information; import org.eclipse.mylyn.docs.intent.markup.markup.Link; import org.eclipse.mylyn.docs.intent.markup.markup.List; import org.eclipse.mylyn.docs.intent.markup.markup.ListItem; import org.eclipse.mylyn.docs.intent.markup.markup.MarkupPackage; import org.eclipse.mylyn.docs.intent.markup.markup.Note; import org.eclipse.mylyn.docs.intent.markup.markup.Panel; import org.eclipse.mylyn.docs.intent.markup.markup.Paragraph; import org.eclipse.mylyn.docs.intent.markup.markup.Preformatted; import org.eclipse.mylyn.docs.intent.markup.markup.Quote; import org.eclipse.mylyn.docs.intent.markup.markup.Section; import org.eclipse.mylyn.docs.intent.markup.markup.SimpleContainer; import org.eclipse.mylyn.docs.intent.markup.markup.StructureElement; import org.eclipse.mylyn.docs.intent.markup.markup.Table; import org.eclipse.mylyn.docs.intent.markup.markup.TableCell; import org.eclipse.mylyn.docs.intent.markup.markup.TableRow; import org.eclipse.mylyn.docs.intent.markup.markup.Text; import org.eclipse.mylyn.docs.intent.markup.markup.Tip; import org.eclipse.mylyn.docs.intent.markup.markup.Warning; /** * <!-- 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.mylyn.docs.intent.markup.markup.MarkupPackage * @generated */ public class MarkupAdapterFactory extends AdapterFactoryImpl { /** * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ protected static MarkupPackage modelPackage; /** * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ public MarkupAdapterFactory() { if (modelPackage == null) { modelPackage = MarkupPackage.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 MarkupSwitch<Adapter> modelSwitch = new MarkupSwitch<Adapter>() { @Override public Adapter caseDocument(Document object) { return createDocumentAdapter(); } @Override public Adapter caseSimpleContainer(SimpleContainer object) { return createSimpleContainerAdapter(); } @Override public Adapter caseStructureElement(StructureElement object) { return createStructureElementAdapter(); } @Override public Adapter caseSection(Section object) { return createSectionAdapter(); } @Override public Adapter caseContainer(Container object) { return createContainerAdapter(); } @Override public Adapter caseImage(Image object) { return createImageAdapter(); } @Override public Adapter caseEntity(Entity object) { return createEntityAdapter(); } @Override public Adapter caseText(Text object) { return createTextAdapter(); } @Override public Adapter caseLink(Link object) { return createLinkAdapter(); } @Override public Adapter caseBlock(Block object) { return createBlockAdapter(); } @Override public Adapter caseAnnotations(Annotations object) { return createAnnotationsAdapter(); } @Override public Adapter caseHasAttributes(HasAttributes object) { return createHasAttributesAdapter(); } @Override public Adapter caseBlockContent(BlockContent object) { return createBlockContentAdapter(); } @Override public Adapter caseParagraph(Paragraph object) { return createParagraphAdapter(); } @Override public Adapter caseTip(Tip object) { return createTipAdapter(); } @Override public Adapter caseWarning(Warning object) { return createWarningAdapter(); } @Override public Adapter caseInformation(Information object) { return createInformationAdapter(); } @Override public Adapter caseNote(Note object) { return createNoteAdapter(); } @Override public Adapter casePanel(Panel object) { return createPanelAdapter(); } @Override public Adapter caseDiv(Div object) { return createDivAdapter(); } @Override public Adapter caseFootNote(FootNote object) { return createFootNoteAdapter(); } @Override public Adapter caseQuote(Quote object) { return createQuoteAdapter(); } @Override public Adapter casePreformatted(Preformatted object) { return createPreformattedAdapter(); } @Override public Adapter caseCode(Code object) { return createCodeAdapter(); } @Override public Adapter caseList(List object) { return createListAdapter(); } @Override public Adapter caseListItem(ListItem object) { return createListItemAdapter(); } @Override public Adapter caseTable(Table object) { return createTableAdapter(); } @Override public Adapter caseTableRow(TableRow object) { return createTableRowAdapter(); } @Override public Adapter caseTableCell(TableCell object) { return createTableCellAdapter(); } @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.mylyn.docs.intent.markup.markup.Document <em>Document</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.mylyn.docs.intent.markup.markup.Document * @generated */ public Adapter createDocumentAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.SimpleContainer <em>Simple 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.mylyn.docs.intent.markup.markup.SimpleContainer * @generated */ public Adapter createSimpleContainerAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.StructureElement <em>Structure 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.mylyn.docs.intent.markup.markup.StructureElement * @generated */ public Adapter createStructureElementAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Section <em>Section</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.mylyn.docs.intent.markup.markup.Section * @generated */ public Adapter createSectionAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Container <em>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.mylyn.docs.intent.markup.markup.Container * @generated */ public Adapter createContainerAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Image * <em>Image</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.mylyn.docs.intent.markup.markup.Image * @generated */ public Adapter createImageAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Entity <em>Entity</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.mylyn.docs.intent.markup.markup.Entity * @generated */ public Adapter createEntityAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Text * <em>Text</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- * end-user-doc --> * * @return the new adapter. * @see org.eclipse.mylyn.docs.intent.markup.markup.Text * @generated */ public Adapter createTextAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Link * <em>Link</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.mylyn.docs.intent.markup.markup.Link * @generated */ public Adapter createLinkAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Block * <em>Block</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.mylyn.docs.intent.markup.markup.Block * @generated */ public Adapter createBlockAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Annotations <em>Annotations</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.mylyn.docs.intent.markup.markup.Annotations * @generated */ public Adapter createAnnotationsAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.HasAttributes <em>Has Attributes</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.mylyn.docs.intent.markup.markup.HasAttributes * @generated */ public Adapter createHasAttributesAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.BlockContent <em>Block Content</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.mylyn.docs.intent.markup.markup.BlockContent * @generated */ public Adapter createBlockContentAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Paragraph <em>Paragraph</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.mylyn.docs.intent.markup.markup.Paragraph * @generated */ public Adapter createParagraphAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Tip * <em>Tip</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.mylyn.docs.intent.markup.markup.Tip * @generated */ public Adapter createTipAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Warning <em>Warning</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.mylyn.docs.intent.markup.markup.Warning * @generated */ public Adapter createWarningAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Information <em>Information</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.mylyn.docs.intent.markup.markup.Information * @generated */ public Adapter createInformationAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Note * <em>Note</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.mylyn.docs.intent.markup.markup.Note * @generated */ public Adapter createNoteAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Panel * <em>Panel</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.mylyn.docs.intent.markup.markup.Panel * @generated */ public Adapter createPanelAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Div * <em>Div</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.mylyn.docs.intent.markup.markup.Div * @generated */ public Adapter createDivAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.FootNote <em>Foot Note</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.mylyn.docs.intent.markup.markup.FootNote * @generated */ public Adapter createFootNoteAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Quote * <em>Quote</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.mylyn.docs.intent.markup.markup.Quote * @generated */ public Adapter createQuoteAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.Preformatted <em>Preformatted</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.mylyn.docs.intent.markup.markup.Preformatted * @generated */ public Adapter createPreformattedAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Code * <em>Code</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.mylyn.docs.intent.markup.markup.Code * @generated */ public Adapter createCodeAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.List * <em>List</em>}'. <!-- begin-user-doc --> This default implementation returns null so that we can easily * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. <!-- * end-user-doc --> * * @return the new adapter. * @see org.eclipse.mylyn.docs.intent.markup.markup.List * @generated */ public Adapter createListAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.ListItem <em>List 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.mylyn.docs.intent.markup.markup.ListItem * @generated */ public Adapter createListItemAdapter() { return null; } /** * Creates a new adapter for an object of class '{@link org.eclipse.mylyn.docs.intent.markup.markup.Table * <em>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.mylyn.docs.intent.markup.markup.Table * @generated */ public Adapter createTableAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.TableRow <em>Table Row</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.mylyn.docs.intent.markup.markup.TableRow * @generated */ public Adapter createTableRowAdapter() { return null; } /** * Creates a new adapter for an object of class ' * {@link org.eclipse.mylyn.docs.intent.markup.markup.TableCell <em>Table Cell</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.mylyn.docs.intent.markup.markup.TableCell * @generated */ public Adapter createTableCellAdapter() { 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; } } // MarkupAdapterFactory