From 721f0e86b585b49a501e0ae47af5929bf564c5f7 Mon Sep 17 00:00:00 2001 From: umjammer Date: Thu, 9 May 2019 21:57:17 +0900 Subject: [PATCH] accept tags in comment, add ignored comment --- .../org/codavaj/process/docparser/ParserUtils8.java | 12 +++++++++--- src/main/native2ascii/token_ja.properties | 3 ++- src/main/resources/token.properties | 3 ++- .../codavaj/8/en/vavi/test/codavaj/Test2.java | 1 - .../codavaj/8/jp/vavi/test/codavaj/Test2.java | 1 - 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/codavaj/process/docparser/ParserUtils8.java b/src/main/java/org/codavaj/process/docparser/ParserUtils8.java index 94a9e9e..1d32b65 100644 --- a/src/main/java/org/codavaj/process/docparser/ParserUtils8.java +++ b/src/main/java/org/codavaj/process/docparser/ParserUtils8.java @@ -37,9 +37,15 @@ protected void determineComment(Type t, List allNodes, List 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("
", "").replace("
", "").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 nodes = node.selectNodes("*[name()='DT' or name()='DD']"); diff --git a/src/main/native2ascii/token_ja.properties b/src/main/native2ascii/token_ja.properties index 5587b70..4c5343c 100644 --- a/src/main/native2ascii/token_ja.properties +++ b/src/main/native2ascii/token_ja.properties @@ -31,4 +31,5 @@ token.type_parameter=型パラメータ token.see=関連項目 token.overrides=Overrides token.see.exclude.1=直列化された形式 -token.see.exclude.2=定数フィールド値 \ No newline at end of file +token.see.exclude.2=定数フィールド値 +token.comment.exclude=インタフェースからコピーされた説明 \ No newline at end of file diff --git a/src/main/resources/token.properties b/src/main/resources/token.properties index 4440bbd..103b4c5 100644 --- a/src/main/resources/token.properties +++ b/src/main/resources/token.properties @@ -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 \ No newline at end of file +token.see.exclude.2=Constant Field Values +token.comment.exclude=Description copied from interface \ No newline at end of file diff --git a/src/test/resources/codavaj/8/en/vavi/test/codavaj/Test2.java b/src/test/resources/codavaj/8/en/vavi/test/codavaj/Test2.java index 25ff61a..fecb6f5 100644 --- a/src/test/resources/codavaj/8/en/vavi/test/codavaj/Test2.java +++ b/src/test/resources/codavaj/8/en/vavi/test/codavaj/Test2.java @@ -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. */ diff --git a/src/test/resources/codavaj/8/jp/vavi/test/codavaj/Test2.java b/src/test/resources/codavaj/8/jp/vavi/test/codavaj/Test2.java index 666c117..fecb6f5 100644 --- a/src/test/resources/codavaj/8/jp/vavi/test/codavaj/Test2.java +++ b/src/test/resources/codavaj/8/jp/vavi/test/codavaj/Test2.java @@ -30,7 +30,6 @@ public vavi.test.codavaj.Test3 method1(T arg1, java.lang.String... arg2) throws } /** - * インタフェースからコピーされた説明:  * description for this method. * more description. */