@Override protected final void getTypesInHierarchy(IType type, List<IType> res) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { IType[] types= hierarchy.getSupertypes(type); for (int i= 0; i < types.length; i++) { res.add(types[i]); } } }
protected final void getTypesInHierarchy(IType type, List res) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { IType[] types= hierarchy.getSupertypes(type); for (int i= 0; i < types.length; i++) { res.add(types[i]); } } }
@Override protected final void getTypesInHierarchy(IType type, List<IType> res) { ITypeHierarchy hierarchy= getHierarchy(); if (hierarchy != null) { IType[] types= hierarchy.getSupertypes(type); for (int i= 0; i < types.length; i++) { res.add(types[i]); } } }
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
private void uniteWithSupertypes(IType anchor, IType type) throws JavaModelException { IType[] supertypes = fHierarchy.getSupertypes(type); for (int i = 0; i < supertypes.length; i++) { IType supertype = supertypes[i]; IType superRep = fUnionFind.find(supertype); if (superRep == null) { //Type doesn't declare method, but maybe supertypes? uniteWithSupertypes(anchor, supertype); } else { //check whether method in supertype is really overridden: IMember superMethod = fTypeToMethod.get(supertype); if (JavaModelUtil.isVisibleInHierarchy(superMethod, anchor.getPackageFragment())) { IType rep = fUnionFind.find(anchor); fUnionFind.union(rep, superRep); // current type is no root anymore fRootTypes.remove(anchor); uniteWithSupertypes(supertype, supertype); } else { //Not overridden -> overriding chain ends here. } } } }
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
private void uniteWithSupertypes(IType anchor, IType type) throws JavaModelException { IType[] supertypes= fHierarchy.getSupertypes(type); for (int i= 0; i < supertypes.length; i++) { IType supertype= supertypes[i]; IType superRep= fUnionFind.find(supertype); if (superRep == null) { //Type doesn't declare method, but maybe supertypes? uniteWithSupertypes(anchor, supertype); } else { //check whether method in supertype is really overridden: IMember superMethod= fTypeToMethod.get(supertype); if (JavaModelUtil.isVisibleInHierarchy(superMethod, anchor.getPackageFragment())) { IType rep= fUnionFind.find(anchor); fUnionFind.union(rep, superRep); // current type is no root anymore fRootTypes.remove(anchor); uniteWithSupertypes(supertype, supertype); } else { //Not overridden -> overriding chain ends here. } } } } }
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
private void uniteWithSupertypes(IType anchor, IType type) throws JavaModelException { IType[] supertypes= fHierarchy.getSupertypes(type); for (int i= 0; i < supertypes.length; i++) { IType supertype= supertypes[i]; IType superRep= fUnionFind.find(supertype); if (superRep == null) { //Type doesn't declare method, but maybe supertypes? uniteWithSupertypes(anchor, supertype); } else { //check whether method in supertype is really overridden: IMember superMethod= fTypeToMethod.get(supertype); if (JavaModelUtil.isVisibleInHierarchy(superMethod, anchor.getPackageFragment())) { IType rep= fUnionFind.find(anchor); fUnionFind.union(rep, superRep); // current type is no root anymore fRootTypes.remove(anchor); uniteWithSupertypes(supertype, supertype); } else { //Not overridden -> overriding chain ends here. } } } } }
private void uniteWithSupertypes(IType anchor, IType type) throws JavaModelException { IType[] supertypes= fHierarchy.getSupertypes(type); for (int i= 0; i < supertypes.length; i++) { IType supertype= supertypes[i]; IType superRep= fUnionFind.find(supertype); if (superRep == null) { //Type doesn't declare method, but maybe supertypes? uniteWithSupertypes(anchor, supertype); } else { //check whether method in supertype is really overridden: IMember superMethod= (IMember) fTypeToMethod.get(supertype); if (JavaModelUtil.isVisibleInHierarchy(superMethod, anchor.getPackageFragment())) { IType rep= fUnionFind.find(anchor); fUnionFind.union(rep, superRep); // current type is no root anymore fRootTypes.remove(anchor); uniteWithSupertypes(supertype, supertype); } else { //Not overridden -> overriding chain ends here. } } } } }
private void uniteWithSupertypes(IType anchor, IType type) throws JavaModelException { IType[] supertypes= fHierarchy.getSupertypes(type); for (int i= 0; i < supertypes.length; i++) { IType supertype= supertypes[i]; IType superRep= fUnionFind.find(supertype); if (superRep == null) { //Type doesn't declare method, but maybe supertypes? uniteWithSupertypes(anchor, supertype); } else { //check whether method in supertype is really overridden: IMember superMethod= fTypeToMethod.get(supertype); if (JavaModelUtil.isVisibleInHierarchy(superMethod, anchor.getPackageFragment())) { IType rep= fUnionFind.find(anchor); fUnionFind.union(rep, superRep); // current type is no root anymore fRootTypes.remove(anchor); uniteWithSupertypes(supertype, supertype); } else { //Not overridden -> overriding chain ends here. } } } } }
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {
else { final ITypeHierarchy hierarchy= getTypeHierarchy(referencing, new SubProgressMonitor(monitor, 1)); final IType[] types= hierarchy.getSupertypes(referencing); IType superType= null; for (int index= 0; index < types.length; index++) {