|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2000, 2005 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2015 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 11-16
Link Here
|
| 11 |
package org.eclipse.jdt.internal.debug.ui.sourcelookup; |
11 |
package org.eclipse.jdt.internal.debug.ui.sourcelookup; |
| 12 |
|
12 |
|
| 13 |
import org.eclipse.core.runtime.IAdapterFactory; |
13 |
import org.eclipse.core.runtime.IAdapterFactory; |
|
|
14 |
import org.eclipse.jdt.core.IJavaElement; |
| 14 |
import org.eclipse.ui.model.IWorkbenchAdapter; |
15 |
import org.eclipse.ui.model.IWorkbenchAdapter; |
| 15 |
|
16 |
|
| 16 |
/** |
17 |
/** |
|
Lines 22-27
Link Here
|
| 22 |
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) |
23 |
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) |
| 23 |
*/ |
24 |
*/ |
| 24 |
public Object getAdapter(Object adaptableObject, Class adapterType) { |
25 |
public Object getAdapter(Object adaptableObject, Class adapterType) { |
|
|
26 |
if (adaptableObject instanceof IJavaElement && adapterType.equals(IWorkbenchAdapter.class)) { |
| 27 |
return new JavaDebugWorkbenchAdapter(); |
| 28 |
} |
| 25 |
if (adapterType.equals(IWorkbenchAdapter.class)) { |
29 |
if (adapterType.equals(IWorkbenchAdapter.class)) { |
| 26 |
return new WorkbenchAdapter(); |
30 |
return new WorkbenchAdapter(); |
| 27 |
} |
31 |
} |