author | Eugene Ostroukhov <eugeneo@symbian.org> |
Thu, 18 Mar 2010 11:56:59 -0700 | |
changeset 276 | f2f4a1259de8 |
parent 52 | f577ea64429e |
permissions | -rw-r--r-- |
2 | 1 |
// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 |
// Use of this source code is governed by a BSD-style license that can be |
|
3 |
// found in the LICENSE file. |
|
4 |
||
5 |
package org.chromium.debug.core.model; |
|
6 |
||
7 |
import org.eclipse.core.runtime.PlatformObject; |
|
8 |
import org.eclipse.debug.core.ILaunch; |
|
9 |
import org.eclipse.debug.core.model.IDebugElement; |
|
10 |
||
11 |
/** |
|
12 |
* A generic IDebugElement implementation. |
|
13 |
*/ |
|
14 |
public class DebugElementImpl extends PlatformObject implements IDebugElement { |
|
15 |
||
52
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
16 |
/** |
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
17 |
* Instance of {@link DebugTargetImpl} or {@code null} if this is {@link DebugTargetImpl}. |
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
18 |
* TODO(peter.rybin): Do we really need this null value? |
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
19 |
*/ |
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
20 |
private final DebugTargetImpl debugTarget; |
2 | 21 |
|
52
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
22 |
public DebugElementImpl(DebugTargetImpl debugTarget) { |
2 | 23 |
this.debugTarget = debugTarget; |
24 |
} |
|
25 |
||
52
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
26 |
public DebugTargetImpl getDebugTarget() { |
2 | 27 |
return debugTarget; |
28 |
} |
|
29 |
||
30 |
public ILaunch getLaunch() { |
|
31 |
return getDebugTarget().getLaunch(); |
|
32 |
} |
|
33 |
||
34 |
public String getModelIdentifier() { |
|
52
f577ea64429e
Migrated to unmodified Chromium Development Tools version
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
2
diff
changeset
|
35 |
return getDebugTarget().getChromiumModelIdentifier(); |
2 | 36 |
} |
37 |
||
38 |
@Override |
|
39 |
@SuppressWarnings("unchecked") |
|
40 |
public Object getAdapter(Class adapter) { |
|
41 |
if (adapter == IDebugElement.class) { |
|
42 |
return this; |
|
43 |
} |
|
44 |
return super.getAdapter(adapter); |
|
45 |
} |
|
46 |
||
47 |
} |