Java 类org.eclipse.core.resources.mapping.ModelProvider 实例源码

项目:Eclipse-Postfix-Code-Completion    文件:JavaModelAdapterFactory.java   
/**
 * {@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;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaModelAdapterFactory.java   
/**
 * {@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;
}
项目:che    文件:ModelProviderManager.java   
public ModelProvider getModelProvider(String modelProviderId) throws CoreException {
  IModelProviderDescriptor desc = getDescriptor(modelProviderId);
  if (desc == null) return null;
  return desc.getModelProvider();
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaModelMerger.java   
/**
 * Creates a new java model merger.
 *
 * @param provider
 *            the model provider
 */
public JavaModelMerger(final ModelProvider provider) {
    super(provider);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaModelMerger.java   
/**
 * Creates a new java model merger.
 *
 * @param provider
 *            the model provider
 */
public JavaModelMerger(final ModelProvider provider) {
    super(provider);
}