blob: f1904f71e7a28fca62087ef948d41851219ec410 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2008, 2012 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.emf.eef.eefnr.navigation.providers;
import org.eclipse.emf.eef.eefnr.navigation.parts.NamingViewsRepository;
import org.eclipse.emf.eef.eefnr.navigation.parts.forms.EventPropertiesEditionPartForm;
import org.eclipse.emf.eef.eefnr.navigation.parts.impl.EventPropertiesEditionPartImpl;
import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent;
import org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart;
import org.eclipse.emf.eef.runtime.api.providers.IPropertiesEditionPartProvider;
/**
* @author <a href="mailto:nathalie.lepine@obeo.fr">Nathalie Lepine</a>
*
*/
public class NamingPropertiesEditionPartProvider implements IPropertiesEditionPartProvider {
/**
* {@inheritDoc}
* @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#provides(java.lang.Object)
*
*/
public boolean provides(Object key) {
return key == NamingViewsRepository.class;
}
/**
* {@inheritDoc}
* @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPartProvider#getPropertiesEditionPart(java.lang.Object, int, org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent)
*
*/
public IPropertiesEditionPart getPropertiesEditionPart(Object key, int kind, IPropertiesEditionComponent component) {
if (key == NamingViewsRepository.Event.class) {
if (kind == NamingViewsRepository.SWT_KIND)
return new EventPropertiesEditionPartImpl(component);
if (kind == NamingViewsRepository.FORM_KIND)
return new EventPropertiesEditionPartForm(component);
}
return null;
}
}