OverrideMethodQuery selectionQuery= fDeclaringType.isClass() ? new OverrideMethodQuery(JavaPlugin.getActiveWorkbenchShell(), true) : null; String[] unimplemented= StubUtility.evalUnimplementedMethods(fDeclaringType, hierarchy, true, settings, selectionQuery, imports);
IType type = fDeclaringType; IMethod[] inheritedMethods= StubUtility.getOverridableMethods(type, hierarchy, true);  List toImplement= new ArrayList(); for (int i1= 0; i1 < inheritedMethods.length; i1++) { IMethod curr= inheritedMethods[i1]; if (JdtFlags.isAbstract(curr)) { toImplement.add(curr); } } IMethod[] toImplementArray= (IMethod[]) toImplement.toArray(new IMethod[toImplement.size()]); if (fDeclaringType.isClass()) { Shell shell= JavaPlugin.getActiveWorkbenchShell(); OverrideTreeSelectionDialog selectionDialog= newOverrideTreeSelectionDialog(shell, inheritedMethods, toImplementArray, hierarchy); int selectionResult= selectionDialog.open(); if (selectionResult == OverrideTreeSelectionDialog.OK) { Object[] checkedElements= selectionDialog.getResult(); if (checkedElements != null) { ArrayList result= new ArrayList(checkedElements.length); for (int i= 0; i < checkedElements.length; i++) { Object curr= checkedElements[i]; if (curr instanceof IMethod) { result.add(curr); } } toImplementArray= (IMethod[]) result.toArray(new IMethod[result.size()]); } } settings.createComments= selectionDialog.getGenerateComment(); }  String[] unimplemented= StubUtility.genOverrideStubs(toImplementArray, type, hierarchy, settings, imports);
	private boolean createStubs(StringBuffer buf, ImportsStructure imports) throws CoreException {		if (fDeclaringType == null) {			return true;		}		CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings();		settings.createComments= false;		ITypeHierarchy hierarchy= fDeclaringType.newSupertypeHierarchy(null);		OverrideMethodQuery selectionQuery= fDeclaringType.isClass() ? new OverrideMethodQuery(JavaPlugin.getActiveWorkbenchShell(), true) : null;		String[] unimplemented= StubUtility.evalUnimplementedMethods(fDeclaringType, hierarchy, true, settings, selectionQuery, imports);		if (unimplemented != null) {			for (int i= 0; i < unimplemented.length; i++) {				buf.append(unimplemented[i]);				if (i < unimplemented.length - 1) {					buf.append('\n');				}			}			return true;		}		return false;	}