01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package org.terracotta.dso;
05:
06: import org.eclipse.core.runtime.IAdapterFactory;
07: import org.eclipse.ui.IActionFilter;
08:
09: import org.terracotta.dso.JavaElementActionFilter;
10:
11: class JavaElementAdapter implements IAdapterFactory {
12: private IActionFilter m_actionFilter = new JavaElementActionFilter();
13:
14: public Object getAdapter(Object adaptableObject, Class adapterType) {
15: if (IActionFilter.class.equals(adapterType)) {
16: return m_actionFilter;
17: }
18: return null;
19: }
20:
21: public Class[] getAdapterList() {
22: return new Class[] { IActionFilter.class };
23: }
24: }
|