private HashMap<String, IBinding> getPotentialRemoves(List<SimpleName> removedRefs) { HashMap<String, IBinding>potentialRemoves= new HashMap<>(); for (Iterator<SimpleName> iterator= removedRefs.iterator(); iterator.hasNext();) { SimpleName name= iterator.next(); if (fAddedImports.contains(name.getIdentifier()) || hasAddedStaticImport(name)) continue; IBinding binding= name.resolveBinding(); if (binding != null) potentialRemoves.put(name.getIdentifier(), binding); } return potentialRemoves; }
private HashMap getPotentialRemoves(List removedRefs) { HashMap/* <String, IBinding> */potentialRemoves= new HashMap(); for (Iterator iterator= removedRefs.iterator(); iterator.hasNext();) { SimpleName name= (SimpleName) iterator.next(); if (fAddedImports.contains(name.getIdentifier()) || hasAddedStaticImport(name)) continue; IBinding binding= name.resolveBinding(); if (binding != null) potentialRemoves.put(name.getIdentifier(), binding); } return potentialRemoves; }
private HashMap<String, IBinding> getPotentialRemoves(List<SimpleName> removedRefs) { HashMap<String, IBinding>potentialRemoves= new HashMap<>(); for (Iterator<SimpleName> iterator= removedRefs.iterator(); iterator.hasNext();) { SimpleName name= iterator.next(); if (fAddedImports.contains(name.getIdentifier()) || hasAddedStaticImport(name)) continue; IBinding binding= name.resolveBinding(); if (binding != null) potentialRemoves.put(name.getIdentifier(), binding); } return potentialRemoves; }
private boolean hasAddedStaticImport(SimpleName name) { IBinding binding= name.resolveBinding(); if (binding instanceof IVariableBinding) { IVariableBinding variable= (IVariableBinding) binding; return hasAddedStaticImport(variable.getDeclaringClass().getQualifiedName(), variable.getName(), true); } else if (binding instanceof IMethodBinding) { IMethodBinding method= (IMethodBinding) binding; return hasAddedStaticImport(method.getDeclaringClass().getQualifiedName(), method.getName(), false); } return false; }
private boolean hasAddedStaticImport(SimpleName name) { IBinding binding= name.resolveBinding(); if (binding instanceof IVariableBinding) { IVariableBinding variable= (IVariableBinding) binding; return hasAddedStaticImport(variable.getDeclaringClass().getQualifiedName(), variable.getName(), true); } else if (binding instanceof IMethodBinding) { IMethodBinding method= (IMethodBinding) binding; return hasAddedStaticImport(method.getDeclaringClass().getQualifiedName(), method.getName(), false); } return false; }
private boolean hasAddedStaticImport(SimpleName name) { IBinding binding= name.resolveBinding(); if (binding instanceof IVariableBinding) { IVariableBinding variable= (IVariableBinding) binding; return hasAddedStaticImport(variable.getDeclaringClass().getQualifiedName(), variable.getName(), true); } else if (binding instanceof IMethodBinding) { IMethodBinding method= (IMethodBinding) binding; return hasAddedStaticImport(method.getDeclaringClass().getQualifiedName(), method.getName(), false); } return false; }