if (!addedCU.exists()) { if ((kind & SimilarElementsRequestor.CLASSES) != 0) { String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createclassusingwizard.description", typeName); proposals.add(new NewCUCompletionUsingWizardProposal(label, cu, node, true, 0)); } if ((kind & SimilarElementsRequestor.INTERFACES) != 0) { String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createinterfaceusingwizard.description", typeName); proposals.add(new NewCUCompletionUsingWizardProposal(label, cu, node, false, 0)); }
node= ((QualifiedName) node).getQualifier(); typeName= ASTResolving.getSimpleName(node); if (Character.isLowerCase(typeName.charAt(kind))) { return;
	private static void addNewTypeProposals(ICompilationUnit cu, Name node, int kind, ArrayList proposals) {		String typeName= ASTResolving.getSimpleName(node);		String addedCUName= typeName + ".java"; //$NON-NLS-1$		if (!JavaConventions.validateCompilationUnitName(addedCUName).matches(IStatus.ERROR)) {			ICompilationUnit addedCU;			if (node.isSimpleName()) {				addedCU= ((IPackageFragment) cu.getParent()).getCompilationUnit(addedCUName);			} else {				IPackageFragmentRoot root= (IPackageFragmentRoot) cu.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT);				String packName= ASTResolving.getQualifier(node);				addedCU= root.getPackageFragment(packName).getCompilationUnit(addedCUName);			}			if (!addedCU.exists()) {				if ((kind & SimilarElementsRequestor.CLASSES) != 0) {					String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createclassusingwizard.description", typeName); //$NON-NLS-1$		            proposals.add(new NewCUCompletionUsingWizardProposal(label, cu, node, true, 0));				}				if ((kind & SimilarElementsRequestor.INTERFACES) != 0) {					String label= CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.createinterfaceusingwizard.description", typeName); //$NON-NLS-1$		            proposals.add(new NewCUCompletionUsingWizardProposal(label, cu, node, false, 0));				}							}		}	}