/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
*/
public Object getAdapter(Object adaptableObject, Class adapterType) {
IWorkbenchAdapter adapter = null;
if (adapterType.equals(IWorkbenchAdapter.class)) {
if (adaptableObject instanceof NodeEditPart) {
final IDOMNode node = ((NodeEditPart)adaptableObject).getIDOMNode();
if (node != null) {
final IDOMModel model = node.getModel();
if (model != null) {
final IFile file = StructuredModelUtil.getFileFor(model);
if (file != null) {
adapter = new IWorkbenchAdapter() {
public Object[] getChildren(Object object) {
return new Object[0];
}
public ImageDescriptor getImageDescriptor(Object object) {
return null;