| /******************************************************************************* |
| * Copyright (c) 2016 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 and/or initial documentation |
| * ... |
| *******************************************************************************/ |
| package org.eclipse.intent.mapping.ide.tests; |
| |
| import org.eclipse.core.runtime.IAdapterFactory; |
| |
| /** |
| * Test adapter factory. |
| * |
| * @author <a href="mailto:yvan.lussaud@obeo.fr">Yvan Lussaud</a> |
| */ |
| public class AdapterFactory implements IAdapterFactory { |
| |
| @SuppressWarnings("unchecked") |
| public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) { |
| return Integer.parseInt((String)adaptableObject); |
| } |
| |
| public Class<?>[] getAdapterList() { |
| return new Class<?>[] {Integer.class }; |
| } |
| |
| } |