@Override public boolean hasChildren(final Object element) { if (element instanceof ICompilationUnit || element instanceof IFile || element instanceof RefactoringDescriptorProxy || element instanceof RefactoringDescriptor) return false; return super.hasChildren(element); }
/** * Since the this content provider overrides the resource content provider, * this method is only invoked when the resource content provider is * disabled. In this case, we still want the Java projects to appear at the * root of the view. * * {@inheritDoc} */ public Object[] getElements(Object parent) { if (parent instanceof ISynchronizationContext) // Put the resource projects directly under the context parent= getModelRoot(); return super.getElements(parent); }
@Override protected Object[] getChildrenInContext(final ISynchronizationContext context, final Object parent, final Object[] children) { final Object[] elements= super.getChildrenInContext(context, parent, children); if (parent instanceof IPackageFragment) return getPackageFragmentChildren(context, parent, elements); else if (parent instanceof IPackageFragmentRoot) return getPackageFragmentRootChildren(context, parent, elements); else if (parent instanceof IJavaProject) return getJavaProjectChildren(context, parent, elements); else if (parent instanceof RefactoringHistory) return ((RefactoringHistory) parent).getDescriptors(); // It may be the case that the elements are folders that have a corresponding // source folder in which case they should be filtered out return getFilteredElements(parent, elements); }
if (!isVisible(new RefactoringDescriptorDiff(proxy, IDiff.CHANGE, proxy.getDirection()))) result.remove(proxy);
/** * Since the this content provider overrides the resource content provider, * this method is only invoked when the resource content provider is * disabled. In this case, we still want the Java projects to appear at the * root of the view. * * {@inheritDoc} */ @Override public Object[] getElements(Object parent) { if (parent instanceof ISynchronizationContext) // Put the resource projects directly under the context parent= getModelRoot(); return super.getElements(parent); }
/** * {@inheritDoc} */ protected Object[] getChildrenInContext(final ISynchronizationContext context, final Object parent, final Object[] children) { final Object[] elements= super.getChildrenInContext(context, parent, children); if (parent instanceof IPackageFragment) return getPackageFragmentChildren(context, parent, elements); else if (parent instanceof IPackageFragmentRoot) return getPackageFragmentRootChildren(context, parent, elements); else if (parent instanceof IJavaProject) return getJavaProjectChildren(context, parent, elements); else if (parent instanceof RefactoringHistory) return ((RefactoringHistory) parent).getDescriptors(); // It may be the case that the elements are folders that have a corresponding // source folder in which case they should be filtered out return getFilteredElements(parent, elements); }
/** * {@inheritDoc} */ public boolean hasChildren(final Object element) { if (element instanceof ICompilationUnit || element instanceof IFile || element instanceof RefactoringDescriptorProxy || element instanceof RefactoringDescriptor) return false; return super.hasChildren(element); }
/** * Since the this content provider overrides the resource content provider, * this method is only invoked when the resource content provider is * disabled. In this case, we still want the Java projects to appear at the * root of the view. * * {@inheritDoc} */ @Override public Object[] getElements(Object parent) { if (parent instanceof ISynchronizationContext) // Put the resource projects directly under the context parent= getModelRoot(); return super.getElements(parent); }
@Override protected Object[] getChildrenInContext(final ISynchronizationContext context, final Object parent, final Object[] children) { final Object[] elements= super.getChildrenInContext(context, parent, children); if (parent instanceof IPackageFragment) return getPackageFragmentChildren(context, parent, elements); else if (parent instanceof IPackageFragmentRoot) return getPackageFragmentRootChildren(context, parent, elements); else if (parent instanceof IJavaProject) return getJavaProjectChildren(context, parent, elements); else if (parent instanceof RefactoringHistory) return ((RefactoringHistory) parent).getDescriptors(); // It may be the case that the elements are folders that have a corresponding // source folder in which case they should be filtered out return getFilteredElements(parent, elements); }
@Override public boolean hasChildren(final Object element) { if (element instanceof ICompilationUnit || element instanceof IFile || element instanceof RefactoringDescriptorProxy || element instanceof RefactoringDescriptor) return false; return super.hasChildren(element); }