/** * Gets the refactoring represented by the specified proxy. * * @param scope * the synchronization scope * @param proxy * the refactoring descriptor proxy * @param set * the set of refactoring descriptor proxies */ private static void getRefactoring(final ISynchronizationScope scope, final RefactoringDescriptorProxy proxy, final Set set) { final ResourceMapping mapping= (ResourceMapping) proxy.getAdapter(ResourceMapping.class); if (mapping instanceof AbstractRefactoringDescriptorResourceMapping) { final AbstractRefactoringDescriptorResourceMapping extended= (AbstractRefactoringDescriptorResourceMapping) mapping; final IResource resource= extended.getResource(); if (resource != null && scope.contains(resource)) set.add(proxy); } }
/** * Is the specified refactoring in the scope? * * @param scope * the synchronization scope * @param proxy * the refactoring descriptor proxy * @return <code>true</code> if the refactoring is in the scope, * <code>false</code> otherwise */ private static boolean hasRefactoring(final ISynchronizationScope scope, final RefactoringDescriptorProxy proxy) { final ResourceMapping mapping= (ResourceMapping) proxy.getAdapter(ResourceMapping.class); if (mapping instanceof AbstractRefactoringDescriptorResourceMapping) { final AbstractRefactoringDescriptorResourceMapping extended= (AbstractRefactoringDescriptorResourceMapping) mapping; final IResource resource= extended.getResource(); if (resource != null) return scope.contains(resource); } return false; }