Skip to content

Commit

Permalink
accept tags in comment, add ignored comment
Browse files Browse the repository at this point in the history
  • Loading branch information
umjammer committed May 9, 2019
1 parent 8f67af9 commit 721f0e8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
12 changes: 9 additions & 3 deletions src/main/java/org/codavaj/process/docparser/ParserUtils8.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ protected void determineComment(Type t, List<?> allNodes, List<String> commentTe

if (node.getNodeType() == Node.ELEMENT_NODE) {
if ("DIV".equals(node.getName())) {
String[] lines = node.getText().split("\\n");
for (String line : lines) {
commentText.add(line.trim());
// TODO {@link} a tag
String text = node.asXML().replace("<DIV>", "").replace("</DIV>", "").trim();
if (!text.contains(rb.getString("token.comment.exclude"))) {
String[] lines = text.split("\\n");
for (String line : lines) {
commentText.add(line.trim());
}
} else {
System.err.println("ignore: " + text);
}
} else if ("DL".equals(node.getName())) {
List<Node> nodes = node.selectNodes("*[name()='DT' or name()='DD']");
Expand Down
3 changes: 2 additions & 1 deletion src/main/native2ascii/token_ja.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ token.type_parameter=型パラメータ
token.see=関連項目
token.overrides=Overrides
token.see.exclude.1=直列化された形式
token.see.exclude.2=定数フィールド値
token.see.exclude.2=定数フィールド値
token.comment.exclude=インタフェースからコピーされた説明
3 changes: 2 additions & 1 deletion src/main/resources/token.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ token.type_parameter=Type Parameters
token.see=See Also
token.overrides=Overrides
token.see.exclude.1=Serialized Form
token.see.exclude.2=Constant Field Values
token.see.exclude.2=Constant Field Values
token.comment.exclude=Description copied from interface
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public vavi.test.codavaj.Test3 method1(T arg1, java.lang.String... arg2) throws
}

/**
* Description copied from interface: 
* description for this method.
* more description.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public vavi.test.codavaj.Test3 method1(T arg1, java.lang.String... arg2) throws
}

/**
* インタフェースからコピーされた説明: 
* description for this method.
* more description.
*/
Expand Down

0 comments on commit 721f0e8

Please sign in to comment.