1 11 package org.eclipse.ltk.internal.ui.refactoring.model; 12 13 import org.eclipse.core.runtime.IAdapterFactory; 14 15 import org.eclipse.core.resources.mapping.ResourceMapping; 16 17 import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy; 18 19 24 public final class RefactoringModelAdapterFactory implements IAdapterFactory { 25 26 29 public Object getAdapter(final Object adaptable, final Class adapter) { 30 if (adaptable instanceof RefactoringDescriptorCompareInput) { 31 final RefactoringDescriptorCompareInput input= (RefactoringDescriptorCompareInput) adaptable; 32 final RefactoringDescriptorProxy descriptor= input.getDescriptor(); 33 if (descriptor != null) 34 return descriptor.getAdapter(ResourceMapping.class); 35 } 36 return null; 37 } 38 39 42 public Class [] getAdapterList() { 43 return new Class [] { ResourceMapping.class}; 44 } 45 } 46 | Popular Tags |