Improve error reporting in the branch dialog
[egit/imyousuf.git] / org.spearce.egit.ui / src / org / spearce / egit / ui / internal / factories / GitAdapterFactory.java
blob53e303b0f3bb4106d4136772496a7f0cc9495cf3
1 /*******************************************************************************
2 * Copyright (C) 2007, Robin Rosenberg <robin.rosenberg@dewire.com>
3 * Copyright (C) 2007, Shawn O. Pearce <spearce@spearce.org>
5 * All rights reserved. This program and the accompanying materials
6 * are made available under the terms of the Eclipse Public License v1.0
7 * See LICENSE for the full license text, also available.
8 *******************************************************************************/
9 package org.spearce.egit.ui.internal.factories;
11 import org.eclipse.core.runtime.IAdapterFactory;
12 import org.eclipse.team.ui.history.IHistoryPageSource;
13 import org.spearce.egit.ui.GitHistoryPageSource;
15 /**
16 * This class is an intelligent "cast" operation for getting
17 * an instance of a suitable object from another for a specific
18 * purpose.
20 public class GitAdapterFactory implements IAdapterFactory {
22 private Object historyPageSource = new GitHistoryPageSource();
24 public Object getAdapter(Object adaptableObject, Class adapterType) {
25 if (adapterType.isAssignableFrom(IHistoryPageSource.class)) {
26 return historyPageSource;
28 return null;
31 public Class[] getAdapterList() {
32 // TODO Auto-generated method stub
33 return null;