Skip to content

Commit

Permalink
fix(#38): Remove parameter type hints in Java methods in generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Aug 26, 2019
1 parent c9f2db8 commit a095438
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions ftplugin/java.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ call add(b:doge_patterns, {
\ 'match': '\m\%(\([[:alnum:]_]\+\)\%(<[[:alnum:][:space:]_,]\+>\)\?\)\%(\s\+[.]\{3}\s\+\|\s\+[.]\{3}\|[.]\{3}\s\+\|\s\+\)\([[:alnum:]_]\+\)',
\ 'match_group_names': ['type', 'name'],
\ 'format': {
\ 'javadoc': '@param {type} {name} !description',
\ 'javadoc': '@param {name} !description',
\ },
\ },
\ 'comment': {
Expand All @@ -51,7 +51,7 @@ call add(b:doge_patterns, {
\ '/**',
\ ' * !description',
\ '%(parameters| * {parameters})%',
\ '%(returnType| * @return {returnType} !description)%',
\ '%(returnType| * @return !description)%',
\ ' */',
\ ],
\ },
Expand Down
22 changes: 11 additions & 11 deletions test/filetypes/java/class-methods.vader
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Expect java (method with 'TODO' and a @return tag):
class Test {
/**
* [TODO:description]
* @return List [TODO:description]
* @return [TODO:description]
*/
List<Element> createSortedList() {}

Expand Down Expand Up @@ -68,19 +68,19 @@ Expect java (generated comments with @param and @return tags):
class Test {
/**
* [TODO:description]
* @param String p1 [TODO:description]
* @param int p2 [TODO:description]
* @param Boolean params [TODO:description]
* @return MstRelation [TODO:description]
* @param p1 [TODO:description]
* @param p2 [TODO:description]
* @param params [TODO:description]
* @return [TODO:description]
*/
private static MstRelation MyParameterizedMethod(String p1, int p2, Boolean ...params) {}

/**
* [TODO:description]
* @param String p1 [TODO:description]
* @param int p2 [TODO:description]
* @param Boolean params [TODO:description]
* @return ListResultBean [TODO:description]
* @param p1 [TODO:description]
* @param p2 [TODO:description]
* @param params [TODO:description]
* @return [TODO:description]
*/
ListResultBean<MstRelation> MyParameterizedMethod(String p1, int p2, Boolean... params) {}
}
Expand All @@ -102,8 +102,8 @@ Expect java (generated comments with @param and @return tags inserted above the
class Test {
/**
* [TODO:description]
* @param String p1 [TODO:description]
* @param int p2 [TODO:description]
* @param p1 [TODO:description]
* @param p2 [TODO:description]
*/
@Override
protected void MyParameterizedMethod(String p1, int p2) {}
Expand Down

0 comments on commit a095438

Please sign in to comment.