protected void getRootTypes(List res) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { IType input= hierarchy.getType(); if (input != null) { res.add(input); } // opened on a region: dont show } }
@Override public Object[] getElements(Object element) { if (element instanceof ITypeHierarchy) return getChildren(((ITypeHierarchy) element).getType()); return new Object[0]; }
public Object[] getElements(Object element) { if (element instanceof ITypeHierarchy) return getChildren(((ITypeHierarchy) element).getType()); return new Object[0]; }
private static Set<IType> computeTypesToShow(final ITypeHierarchy hierarchy, final Map<IType, IMember[]> typeToMemberArray) { final Set<IType> typesToShow= new HashSet<>(); typesToShow.add(hierarchy.getType()); typesToShow.addAll(computeShowableSubtypesOfMainType(hierarchy, typeToMemberArray)); return typesToShow; }
private static Set computeTypesToShow(final ITypeHierarchy hierarchy, final Map typeToMemberArray) { final Set typesToShow= new HashSet(); typesToShow.add(hierarchy.getType()); typesToShow.addAll(computeShowableSubtypesOfMainType(hierarchy, typeToMemberArray)); return typesToShow; }
@Override public Object[] getElements(final Object inputElement) { Assert.isTrue(inputElement == null || inputElement instanceof ITypeHierarchy); return new IType[] { fHierarchy.getType()}; }
@Override public Object[] getElements(final Object inputElement) { Assert.isTrue(inputElement == null || inputElement instanceof ITypeHierarchy); return new IType[] { fHierarchy.getType()}; }
private static Set<IType> computeShowableSubtypesOfMainType(final ITypeHierarchy hierarchy, final Map<IType, IMember[]> typeToMemberArray) { final Set<IType> result= new HashSet<>(); final IType[] subtypes= hierarchy.getAllSubtypes(hierarchy.getType()); for (int i= 0; i < subtypes.length; i++) { final IType subtype= subtypes[i]; if (canBeShown(subtype, typeToMemberArray, hierarchy)) result.add(subtype); } return result; }
private static Set computeShowableSubtypesOfMainType(final ITypeHierarchy hierarchy, final Map typeToMemberArray) { final Set result= new HashSet(); final IType[] subtypes= hierarchy.getAllSubtypes(hierarchy.getType()); for (int i= 0; i < subtypes.length; i++) { final IType subtype= subtypes[i]; if (canBeShown(subtype, typeToMemberArray, hierarchy)) result.add(subtype); } return result; }
private static Set<IType> computeShowableSubtypesOfMainType(final ITypeHierarchy hierarchy, final Map<IType, IMember[]> typeToMemberArray) { final Set<IType> result= new HashSet<>(); final IType[] subtypes= hierarchy.getAllSubtypes(hierarchy.getType()); for (int i= 0; i < subtypes.length; i++) { final IType subtype= subtypes[i]; if (canBeShown(subtype, typeToMemberArray, hierarchy)) result.add(subtype); } return result; }
private ITypeHierarchy getCachedHierarchy(IType declaring, IProgressMonitor monitor) throws JavaModelException { if (fCachedHierarchy != null && declaring.equals(fCachedHierarchy.getType())) { return fCachedHierarchy; } fCachedHierarchy= declaring.newTypeHierarchy(new SubProgressMonitor(monitor, 1)); return fCachedHierarchy; }
private ITypeHierarchy getCachedHierarchy(IType declaring, IProgressMonitor monitor) throws JavaModelException { if (fCachedHierarchy != null && declaring.equals(fCachedHierarchy.getType())) return fCachedHierarchy; fCachedHierarchy= declaring.newTypeHierarchy(new SubProgressMonitor(monitor, 1)); return fCachedHierarchy; }
private ITypeHierarchy getCachedHierarchy(IType declaring, IProgressMonitor monitor) throws JavaModelException { if (fCachedHierarchy != null && declaring.equals(fCachedHierarchy.getType())) return fCachedHierarchy; fCachedHierarchy= declaring.newTypeHierarchy(new SubProgressMonitor(monitor, 1)); return fCachedHierarchy; }
public int getExpandLevel() { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { IType input= hierarchy.getType(); if (input != null) { return getDepth(hierarchy, input) + 2; } else { return 5; } } return 2; }
public ITypeHierarchy getDestinationTypeHierarchy(final IProgressMonitor monitor) throws JavaModelException { try { if (fCachedDestinationTypeHierarchy != null && fCachedDestinationTypeHierarchy.getType().equals(getDestinationType())) return fCachedDestinationTypeHierarchy; fCachedDestinationTypeHierarchy= getDestinationType().newTypeHierarchy(fOwner, monitor); return fCachedDestinationTypeHierarchy; } finally { monitor.done(); } }
public int getExpandLevel() { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { IType input= hierarchy.getType(); if (input != null) { return getDepth(hierarchy, input) + 2; } else { return 5; } } return 2; }
public ITypeHierarchy getDestinationTypeHierarchy(final IProgressMonitor monitor) throws JavaModelException { try { if (fCachedDestinationTypeHierarchy != null && fCachedDestinationTypeHierarchy.getType().equals(getDestinationType())) return fCachedDestinationTypeHierarchy; fCachedDestinationTypeHierarchy= getDestinationType().newTypeHierarchy(fOwner, monitor); return fCachedDestinationTypeHierarchy; } finally { monitor.done(); } }
private void checkAllParents(final IType parent) { final ITypeHierarchy th= getTreeInput(); final IType root= getTreeInput().getType(); IType type= parent; while (!root.equals(type)) { fTreeViewer.setChecked(type, true); type= th.getSuperclass(type); } fTreeViewer.setChecked(root, true); }
private void checkAllParents(final IType parent) { final ITypeHierarchy th= getTreeInput(); final IType root= getTreeInput().getType(); IType type= parent; while (!root.equals(type)) { fTreeViewer.setChecked(type, true); type= th.getSuperclass(type); } fTreeViewer.setChecked(root, true); }
private void checkAllParents(final IType parent) { final ITypeHierarchy th= getTreeInput(); final IType root= getTreeInput().getType(); IType type= parent; while (!root.equals(type)) { fTreeViewer.setChecked(type, true); type= th.getSuperclass(type); } fTreeViewer.setChecked(root, true); }