settings.callSuper= declaringType.isClass() && !Flags.isAbstract(method.getFlags()) && !Flags.isStatic(method.getFlags()); settings.methodOverwrites= !Flags.isStatic(method.getFlags());
settings.callSuper= declaringType.isClass() && !Flags.isAbstract(flags) && !Flags.isStatic(flags); settings.methodOverwrites= !Flags.isStatic(flags); settings.methodModifiers= flags;
	protected boolean updateReplacementString(IDocument document, char trigger, int offset, ImportsStructure impStructure) throws CoreException, BadLocationException {		IType declaringType= fJavaProject.findType(fTypeName);		if (declaringType != null) {			IMethod method= JavaModelUtil.findMethod(fMethodName, fParamTypes, false, declaringType);			if (method != null) {				GenStubSettings settings= new GenStubSettings(JavaPreferencesSettings.getCodeGenerationSettings());				IType definingType= null;				if (impStructure != null) {					IJavaElement currElem= impStructure.getCompilationUnit().getElementAt(offset);					if (currElem != null) {						definingType= (IType) currElem.getAncestor(IJavaElement.TYPE);					}				}				settings.noBody= (definingType != null) && definingType.isInterface();				settings.callSuper= declaringType.isClass() && !Flags.isAbstract(method.getFlags()) && !Flags.isStatic(method.getFlags());				settings.methodOverwrites= !Flags.isStatic(method.getFlags());								String definingTypeName= (definingType != null) ? definingType.getElementName() : ""; //$NON-NLS-1$								String stub= StubUtility.genStub(fCompilationUnit, definingTypeName, method, declaringType, settings, impStructure);				// use the code formatter				String lineDelim= StubUtility.getLineDelimiterFor(document);				IRegion region= document.getLineInformationOfOffset(getReplacementOffset());				int lineStart= region.getOffset();				int indent= Strings.computeIndent(document.get(lineStart, getReplacementOffset() - lineStart), settings.tabWidth);				String replacement= CodeFormatterUtil.format(CodeFormatterUtil.K_CLASS_BODY_DECLARATIONS, stub, indent, null, lineDelim, null);								if (replacement.endsWith(lineDelim)) {					replacement= replacement.substring(0, replacement.length() - lineDelim.length());				}								setReplacementString(Strings.trimLeadingTabsAndSpaces(replacement));				return true;			}		}		return false;	}