ASTNode typeDecl= ASTResolving.findParentType(selectedNode); if (typeDecl instanceof TypeDeclaration) { ITypeBinding typeBinding= ((TypeDeclaration) typeDecl).resolveBinding(); if (typeBinding != null) { targetBinding= typeBinding.getSuperclass(); arguments= ((SuperConstructorInvocation) selectedNode).arguments(); }
ITypeBinding typeBinding= ASTResolving.getBindingOfParentType(selectedNode); if (typeBinding != null && !typeBinding.isAnonymous()) { targetBinding= typeBinding.getSuperclass(); arguments= ((SuperConstructorInvocation) selectedNode).arguments();
	public static void getConstructorProposals(ProblemPosition problemPos, ArrayList proposals) throws CoreException {		ICompilationUnit cu= problemPos.getCompilationUnit();				CompilationUnit astRoot= AST.parseCompilationUnit(cu, true);		ASTNode selectedNode= ASTResolving.findCoveringNode(astRoot, problemPos.getOffset(), problemPos.getLength());		if (selectedNode == null) {			return;		}				ITypeBinding targetBinding= null;		List arguments= null;				int type= selectedNode.getNodeType();		if (type == ASTNode.CLASS_INSTANCE_CREATION) {			ClassInstanceCreation creation= (ClassInstanceCreation) selectedNode;						IBinding binding= creation.getName().resolveBinding();			if (binding instanceof ITypeBinding) {				targetBinding= (ITypeBinding) binding;				arguments= creation.arguments();					}		} else if (type == ASTNode.SUPER_CONSTRUCTOR_INVOCATION) {			ASTNode typeDecl= ASTResolving.findParentType(selectedNode);			if (typeDecl instanceof TypeDeclaration) {				ITypeBinding typeBinding= ((TypeDeclaration) typeDecl).resolveBinding();				if (typeBinding != null) {					targetBinding= typeBinding.getSuperclass();					arguments= ((SuperConstructorInvocation) selectedNode).arguments();				}			}		} else if (type == ASTNode.CONSTRUCTOR_INVOCATION) {			ASTNode typeDecl= ASTResolving.findParentType(selectedNode);			if (typeDecl instanceof TypeDeclaration) {				targetBinding= ((TypeDeclaration) typeDecl).resolveBinding();				arguments= ((ConstructorInvocation) selectedNode).arguments();			}					}		if (targetBinding != null && targetBinding.isFromSource()) {			ICompilationUnit targetCU= getCompilationUnit(targetBinding, cu, astRoot);			if (targetCU != null) {				String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createconstructor.description", targetBinding.getName()); //$NON-NLS-1$				Image image= JavaPluginImages.get(JavaPluginImages.IMG_MISC_PUBLIC);				proposals.add(new NewMethodCompletionProposal(label, targetCU, selectedNode, arguments, targetBinding, 1, image));			}		}	}