A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.debug.ui / src / net / sourceforge / phpdt / internal / debug / ui / actions / RetargettableActionAdapterFactory.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.debug.ui.actions;
12
13 import org.eclipse.core.runtime.IAdapterFactory;
14 import org.eclipse.debug.ui.actions.IToggleBreakpointsTarget;
15
16 /**
17  * Creates adapters for retargettable actions in debug platform. Contributed via
18  * <code>org.eclipse.core.runtime.adapters</code> extension point.
19  * 
20  * @since 3.0
21  */
22 public class RetargettableActionAdapterFactory implements IAdapterFactory {
23         /*
24          * (non-Javadoc)
25          * 
26          * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object,
27          *      java.lang.Class)
28          */
29         public Object getAdapter(Object adaptableObject, Class adapterType) {
30                 // if (adapterType == IRunToLineTarget.class) {
31                 // return new RunToLineAdapter();
32                 // }
33                 if (adapterType == IToggleBreakpointsTarget.class) {
34                         return new ToggleBreakpointAdapter();
35                 }
36                 return null;
37         }
38
39         /*
40          * (non-Javadoc)
41          * 
42          * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
43          */
44         public Class[] getAdapterList() {
45                 // return new Class[]{IRunToLineTarget.class,
46                 // IToggleBreakpointsTarget.class};
47                 return new Class[] { IToggleBreakpointsTarget.class };
48         }
49 }