KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > ui > threadgroups > JavaModelProxyFactory


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.debug.ui.threadgroups;
12
13 import org.eclipse.debug.core.model.IDebugTarget;
14 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxy;
15 import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
16 import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
17 import org.eclipse.debug.ui.IDebugUIConstants;
18 import org.eclipse.jdt.debug.core.IJavaDebugTarget;
19
20 /**
21  * @since 3.2
22  *
23  */

24 public class JavaModelProxyFactory implements IModelProxyFactory {
25
26     /* (non-Javadoc)
27      * @see org.eclipse.debug.internal.ui.viewers.IModelProxyFactory#createModelProxy(java.lang.Object, org.eclipse.debug.internal.ui.viewers.IPresentationContext)
28      */

29     public IModelProxy createModelProxy(Object JavaDoc element, IPresentationContext context) {
30         if (IDebugUIConstants.ID_DEBUG_VIEW.equals(context.getId())) {
31             if (element instanceof IJavaDebugTarget) {
32                 return new JavaDebugTargetProxy((IDebugTarget) element);
33             }
34         }
35         return null;
36     }
37
38 }
39
Popular Tags