blob: 7b449b86ac813aa7b90f49fab6343c67848a1556 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 Tasktop Technologies and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*
* Tasktop Technologies - initial API and implementation
*******************************************************************************/
package org.eclipse.mylyn.internal.team.ccvs;
import org.eclipse.core.resources.mapping.ResourceMapping;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.team.internal.ccvs.core.mapping.ChangeSetResourceMapping;
import org.eclipse.team.internal.core.subscribers.ActiveChangeSet;
/**
* @since 3.0
*/
public class CvsChangeSetAdapterFactory implements IAdapterFactory {
@SuppressWarnings("rawtypes")
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adaptableObject instanceof ActiveChangeSet && adapterType == ResourceMapping.class) {
ActiveChangeSet cs = (ActiveChangeSet) adaptableObject;
return new ChangeSetResourceMapping(cs);
}
return null;
}
@SuppressWarnings("rawtypes")
public Class[] getAdapterList() {
return new Class[] { ResourceMapping.class };
}
}