private String createMethodTags(IDocument document, DocumentCommand command, String indentation, String lineDelimiter, IMethod method) throws CoreException, BadLocationException { IRegion partition= TextUtilities.getPartition(document, fPartitioning, command.offset, false); 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 (!isFirstComment(document, command, method, javadocComment)) return null; boolean isJavaDoc= partition.getLength() >= 3 && document.get(partition.getOffset(), 3).equals("/**"); //$NON-NLS-1$ if (javadocComment == isJavaDoc) { return prepareTemplateComment(comment, indentation, method.getJavaProject(), lineDelimiter); } } return null; }
private String createMethodTags(IDocument document, DocumentCommand command, String indentation, String lineDelimiter, IMethod method) throws CoreException, BadLocationException { IRegion partition= TextUtilities.getPartition(document, fPartitioning, command.offset, false); 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 (!isFirstComment(document, command, method, javadocComment)) return null; boolean isJavaDoc= partition.getLength() >= 3 && document.get(partition.getOffset(), 3).equals("/**"); //$NON-NLS-1$ if (javadocComment == isJavaDoc) { return prepareTemplateComment(comment, indentation, method.getJavaProject(), lineDelimiter); } } return null; }
private String createMethodTags(IDocument document, DocumentCommand command, String indentation, String lineDelimiter, IMethod method) throws CoreException, BadLocationException { IRegion partition= TextUtilities.getPartition(document, fPartitioning, command.offset, false); 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 (!isFirstComment(document, command, method, javadocComment)) return null; boolean isJavaDoc= partition.getLength() >= 3 && document.get(partition.getOffset(), 3).equals("/**"); //$NON-NLS-1$ if (javadocComment == isJavaDoc) { return prepareTemplateComment(comment, indentation, method.getJavaProject(), lineDelimiter); } } return null; }