}
if(current!=root){
TypeDeclaration classDecl = (TypeDeclaration) current;
//the Binding representing the Type
ITypeBinding classBinding = classDecl.resolveBinding();
//the name of the class
String name = classBinding.getName();
//the Package that class is declared in
packageBinding = classBinding.getPackage();
//calculate the fields and methods of the class
IVariableBinding[] vb = classBinding.getDeclaredFields();
IMethodBinding[] mb = classBinding.getDeclaredMethods();
//insert the fields and methods into the Lists
for (int i=0; i<vb.length;i++){
fields.add(new VarProposal(vb[i], name));
}
for (int i=0; i<mb.length;i++){
methods.add(new MethProposal(mb[i], name));
}
//calculate the global fields and methods of the super classes
ITypeBinding parent= classBinding.getSuperclass();
fields.addAll(getGlobalFields(parent, true));
methods.addAll(getGlobalMethods(parent, true));
}
ArrayList[] result = {fields, methods, locals};