genStubSetting.methodModifiers= curr.getFlags();
	public void run(IProgressMonitor monitor) throws CoreException, OperationCanceledException {		try {			if (monitor == null) {				monitor= new NullProgressMonitor();			}						monitor.setTaskName(CodeGenerationMessages.getString("AddMethodStubOperation.description")); //$NON-NLS-1$			monitor.beginTask("", fMethods.length + 2); //$NON-NLS-1$			fOverrideAll= (fOverrideQuery == null);			fReplaceAll= (fReplaceQuery == null);			IMethod[] existingMethods= fType.getMethods();						ArrayList createdMethods= new ArrayList();						ImportsStructure imports= new ImportsStructure(fType.getCompilationUnit(), fSettings.importOrder, fSettings.importThreshold, true);						String lineDelim= StubUtility.getLineDelimiterUsed(fType);			int indent= StubUtility.getIndentUsed(fType) + 1;						StubUtility.GenStubSettings genStubSetting= new StubUtility.GenStubSettings(fSettings);						ICompilationUnit cu= fType.getCompilationUnit();			String typeName= fType.getElementName();						ITypeHierarchy typeHierarchy= fType.newSupertypeHierarchy(new SubProgressMonitor(monitor, 1));						for (int i= 0; i < fMethods.length; i++) {				try {					String content;					IMethod curr= fMethods[i];					for (int k= 0; k < createdMethods.size(); k++) {						IMethod meth= (IMethod) createdMethods.get(k);						if (JavaModelUtil.isSameMethodSignature(meth.getElementName(), meth.getParameterTypes(), meth.isConstructor(), curr)) {							// ignore duplicated methods							continue;						}					}			 											IMethod overwrittenMethod= JavaModelUtil.findMethodImplementationInHierarchy(typeHierarchy, fType, curr.getElementName(), curr.getParameterTypes(), curr.isConstructor());					if (overwrittenMethod == null) {						// create method without super call, no overwrite						genStubSetting.callSuper= false;						genStubSetting.methodOverwrites= false;						genStubSetting.noBody= fType.isInterface();												content= StubUtility.genStub(cu, typeName, curr, fType, genStubSetting, imports);					} else {						int flags= overwrittenMethod.getFlags();						if (Flags.isFinal(flags) || Flags.isPrivate(flags)) {							// ask before overwriting final methods							if (!queryOverrideFinalMethods(overwrittenMethod)) {								continue;							}						}						genStubSetting.callSuper= true;						genStubSetting.methodOverwrites= true;											IMethod declaration= JavaModelUtil.findMethodDeclarationInHierarchy(typeHierarchy, fType, curr.getElementName(), curr.getParameterTypes(), curr.isConstructor());						content= StubUtility.genStub(cu, typeName, overwrittenMethod, declaration.getDeclaringType(), genStubSetting, imports);						}					IJavaElement sibling= null;					IMethod existing= JavaModelUtil.findMethod(curr.getElementName(), curr.getParameterTypes(), curr.isConstructor(), existingMethods);					if (existing != null) {						// ask before replacing a method						if (!queryReplaceMethods(existing)) {							continue;						}							sibling= StubUtility.findNextSibling(existing);						existing.delete(false, null);					} else if (curr.isConstructor() && existingMethods.length > 0) {						// add constructors at the beginning						sibling= existingMethods[0];					}										String formattedContent= CodeFormatterUtil.format(CodeFormatterUtil.K_CLASS_BODY_DECLARATIONS, content, indent, null, lineDelim, null) + lineDelim;						IMethod newMethod= fType.createMethod(formattedContent, sibling, true, null);					createdMethods.add(newMethod);				} finally {					monitor.worked(1);					if (monitor.isCanceled()) {						throw new OperationCanceledException();					}				}			}						int nCreated= createdMethods.size();			if (nCreated > 0) {				imports.create(fDoSave, null);				monitor.worked(1);				fCreatedMethods= (IMethod[]) createdMethods.toArray(new IMethod[nCreated]);			}		} finally {			monitor.done();		}			}