if (!JavaModelUtil.isVisibleInHierarchy((IMember) (type.getJavaElement()), (IPackageFragment) cu.getParent())) { return false;
if (!JavaModelUtil.isVisibleInHierarchy((IMember) (type.getJavaElement()), (IPackageFragment) cu.getParent())) { return false;
protected boolean hasFocusMethod(IType type) { if (fFocus == null) { return true; } if (type.equals(fFocus.getDeclaringType())) { return true; } try { IMethod method= findMethod(fFocus, type); if (method != null) { // check visibility IPackageFragment pack= (IPackageFragment) fFocus.getAncestor(IJavaElement.PACKAGE_FRAGMENT); if (JavaModelUtil.isVisibleInHierarchy(method, pack)) { return true; } } } catch (JavaModelException e) { // ignore JavaPlugin.log(e); } return false; }
protected boolean hasFocusMethod(IType type) { if (fFocus == null) { return true; } if (type.equals(fFocus.getDeclaringType())) { return true; } try { IMethod method= findMethod(fFocus, type); if (method != null) { // check visibility IPackageFragment pack= (IPackageFragment) fFocus.getAncestor(IJavaElement.PACKAGE_FRAGMENT); if (JavaModelUtil.isVisibleInHierarchy(method, pack)) { return true; } } } catch (JavaModelException e) { // ignore JavaPlugin.log(e); } return false; }
protected boolean hasFocusMethod(IType type) { if (fFocus == null) { return true; } if (type.equals(fFocus.getDeclaringType())) { return true; } try { IMethod method= findMethod(fFocus, type); if (method != null) { // check visibility IPackageFragment pack= (IPackageFragment) fFocus.getAncestor(IJavaElement.PACKAGE_FRAGMENT); if (JavaModelUtil.isVisibleInHierarchy(method, pack)) { return true; } } } catch (JavaModelException e) { // ignore JavaPlugin.log(e); } return false; }
IType subtype= allSubtypes[i]; if (relatedSubTypes.contains(subtype)) { if (JavaModelUtil.isVisibleInHierarchy(alienMethod, subtype.getPackageFragment())) { marriedAlienTypeReps.add(fUnionFind.find(alienType)); } else {
IType subtype = allSubtypes[i]; if (relatedSubTypes.contains(subtype)) { if (JavaModelUtil.isVisibleInHierarchy(alienMethod, subtype.getPackageFragment())) { marriedAlienTypeReps.add(fUnionFind.find(alienType)); } else {
IType subtype= allSubtypes[i]; if (relatedSubTypes.contains(subtype)) { if (JavaModelUtil.isVisibleInHierarchy(alienMethod, subtype.getPackageFragment())) { marriedAlienTypeReps.add(fUnionFind.find(alienType)); } else {
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. } } } }
IType subtype= allSubtypes[i]; if (relatedSubTypes.contains(subtype)) { if (JavaModelUtil.isVisibleInHierarchy(alienMethod, subtype.getPackageFragment())) { marriedAlienTypeReps.add(fUnionFind.find(alienType)); } else {
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= 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. } } } } }
if (superClass != null) { IMethod res= JavaModelUtil.findMethodInHierarchy(hierarchy, superClass, name, paramTypes, false); if (res != null && !Flags.isPrivate(res.getFlags()) && JavaModelUtil.isVisibleInHierarchy(res, type.getPackageFragment())) { if (JdtFlags.isAbstract(res)) { return JavaElementImageDescriptor.IMPLEMENTS;
if (superClass != null) { IMethod res= JavaModelUtil.findMethodInHierarchy(hierarchy, superClass, name, paramTypes, false); if (res != null && !Flags.isPrivate(res.getFlags()) && JavaModelUtil.isVisibleInHierarchy(res, type.getPackageFragment())) { if (JdtFlags.isAbstract(res)) { return JavaElementImageDescriptor.IMPLEMENTS;
if (superClass != null) { IMethod res= JavaModelUtil.findMethodInHierarchy(hierarchy, superClass, name, paramTypes, false); if (res != null && !Flags.isPrivate(res.getFlags()) && JavaModelUtil.isVisibleInHierarchy(res, type.getPackageFragment())) { if (JdtFlags.isAbstract(res)) { return JavaElementImageDescriptor.IMPLEMENTS;
IMethod res= findOverriddenMethodInHierarchy(superClass, overriding); if (res != null) { if (!testVisibility || JavaModelUtil.isVisibleInHierarchy(res, type.getPackageFragment())) { return res;
IMethod res= findOverriddenMethodInHierarchy(superClass, overriding); if (res != null) { if (!testVisibility || JavaModelUtil.isVisibleInHierarchy(res, type.getPackageFragment())) { return res;
IMethod res= findOverriddenMethodInHierarchy(superClass, overriding); if (res != null && !Flags.isPrivate(res.getFlags())) { if (!testVisibility || JavaModelUtil.isVisibleInHierarchy(res, type.getPackageFragment())) { return res;