/** * {@inheritDoc} */ public Object getAdapter(final Object adaptable, final Class adapter) { if (adaptable instanceof JavaModelProvider) { if (adapter == IResourceMappingMerger.class) return new JavaModelMerger((ModelProvider) adaptable); else if (adapter == ISynchronizationCompareAdapter.class) return new JavaSynchronizationCompareAdapter(); } else if (adaptable instanceof RefactoringHistory) { if (adapter == ResourceMapping.class) return new JavaRefactoringHistoryResourceMapping((RefactoringHistory) adaptable); else if (adapter == IResource.class) return new JavaRefactoringHistoryResourceMapping((RefactoringHistory) adaptable).getResource(); } else if (adaptable instanceof RefactoringDescriptorProxy) { if (adapter == ResourceMapping.class) return new JavaRefactoringDescriptorResourceMapping((RefactoringDescriptorProxy) adaptable); } return null; }
public ModelProvider getModelProvider(String modelProviderId) throws CoreException { IModelProviderDescriptor desc = getDescriptor(modelProviderId); if (desc == null) return null; return desc.getModelProvider(); }
/** * Creates a new java model merger. * * @param provider * the model provider */ public JavaModelMerger(final ModelProvider provider) { super(provider); }