blob: d052b3d2ffa74d0879f5d4ef3ad8b47fea413444 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/*******************************************************************************
* Copyright (c) 2010 Wind River Systems, Inc. and others.
* 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:
* Wind River Systems - initial API and implementation
*******************************************************************************/
package org.eclipse.tm.internal.tcf.cdt.ui.disassembly;
import org.eclipse.cdt.debug.internal.ui.disassembly.dsf.IDisassemblyBackend;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.tm.internal.tcf.debug.ui.model.TCFNode;
@SuppressWarnings({"restriction", "rawtypes"})
public class TCFDisassemblyBackendFactory implements IAdapterFactory {
private static final Class<?>[] CLASSES = { IDisassemblyBackend.class };
public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adaptableObject instanceof TCFNode) {
TCFDisassemblyBackend backend = new TCFDisassemblyBackend();
if (backend.supportsDebugContext((TCFNode) adaptableObject)) {
return backend;
}
}
return null;
}
public Class[] getAdapterList() {
return CLASSES;
}
}
|