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("/**"); //$NON-NLS-1$ if (javadocComment) { return prepareTemplateComment(comment, indentation, method.getJavaProject(), lineDelimiter); } } return null; }
private String createTypeTags(IDocument document, int offset, String indentation, String lineDelimiter, IType type) throws CoreException, BadLocationException { if (!accept(offset, type)) { return null; } String[] typeParamNames = StubUtility.getTypeParameterNames(type.getTypeParameters()); String comment = CodeGeneration.getTypeComment(type.getCompilationUnit(), type.getTypeQualifiedName('.'), typeParamNames, lineDelimiter); if (comment != null) { return prepareTemplateComment(comment.trim(), indentation, type.getJavaProject(), lineDelimiter); } return null; }