| /******************************************************************************* |
| * Copyright (c) 2008 The Eclipse Foundation. |
| * 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: |
| * The Eclipse Foundation - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.articles.adapters.properties; |
| |
| import org.eclipse.articles.adapters.core.Person; |
| import org.eclipse.core.runtime.IAdapterFactory; |
| import org.eclipse.ui.views.properties.IPropertySource; |
| |
| public class PersonPropertiesSourceAdapterFactory implements IAdapterFactory { |
| public Object getAdapter(Object adaptableObject, Class adapterType) { |
| if (adapterType == IPropertySource.class) |
| return new PersonPropertySource((Person)adaptableObject); |
| return null; |
| } |
| |
| public Class[] getAdapterList() { |
| return new Class[] {IPropertySource.class}; |
| } |
| } |