private String createMethodTags(IDocument document, int offset, String indentation, String lineDelimiter, IMethod method) throws CoreException, BadLocationException {
if (!accept(offset, method)) {
return null;
}
IMethod inheritedMethod = getInheritedMethod(method);
String comment = CodeGeneration.getMethodComment(method, inheritedMethod, lineDelimiter);
if (comment != null) {
comment = comment.trim();
boolean javadocComment = comment.startsWith("/**");
if (javadocComment) {
return prepareTemplateComment(comment, indentation, method.getJavaProject(), lineDelimiter);
}
}
return null;
}