From 0b5670218942b43509418aec5ac682a3ca93c46e Mon Sep 17 00:00:00 2001 From: Luke Daley Date: Mon, 14 Apr 2008 11:01:55 +0000 Subject: [PATCH] Moving javadoc to separate bundle. git-svn-id: http://svn.textmate.org/trunk/Review/Bundles/JavaDoc.tmbundle@9384 dfb7d73b-c2ec-0310-8fea-fb051d288c6d --- Snippets/author.tmSnippet | 16 + Snippets/code.tmSnippet | 16 + Snippets/deprecated.tmSnippet | 16 + Snippets/docRoot.tmSnippet | 16 + Snippets/inheritDoc.tmSnippet | 16 + Snippets/link.tmSnippet | 16 + Snippets/linkplain.tmSnippet | 16 + Snippets/literal.tmSnippet | 16 + Snippets/param.tmSnippet | 16 + Snippets/return.tmSnippet | 16 + Snippets/see.tmSnippet | 16 + Snippets/serial.tmSnippet | 16 + Snippets/serialData.tmSnippet | 16 + Snippets/serialField.tmSnippet | 16 + Snippets/since.tmSnippet | 16 + Snippets/throws.tmSnippet | 16 + Snippets/value.tmSnippet | 16 + Snippets/version.tmSnippet | 16 + Syntaxes/JavaDoc.tmLanguage | 737 +++++++++++++++++++++++++++++++++ 19 files changed, 1025 insertions(+) create mode 100644 Snippets/author.tmSnippet create mode 100644 Snippets/code.tmSnippet create mode 100644 Snippets/deprecated.tmSnippet create mode 100644 Snippets/docRoot.tmSnippet create mode 100644 Snippets/inheritDoc.tmSnippet create mode 100644 Snippets/link.tmSnippet create mode 100644 Snippets/linkplain.tmSnippet create mode 100644 Snippets/literal.tmSnippet create mode 100644 Snippets/param.tmSnippet create mode 100644 Snippets/return.tmSnippet create mode 100644 Snippets/see.tmSnippet create mode 100644 Snippets/serial.tmSnippet create mode 100644 Snippets/serialData.tmSnippet create mode 100644 Snippets/serialField.tmSnippet create mode 100644 Snippets/since.tmSnippet create mode 100644 Snippets/throws.tmSnippet create mode 100644 Snippets/value.tmSnippet create mode 100644 Snippets/version.tmSnippet create mode 100644 Syntaxes/JavaDoc.tmLanguage diff --git a/Snippets/author.tmSnippet b/Snippets/author.tmSnippet new file mode 100644 index 0000000..4d1f3ba --- /dev/null +++ b/Snippets/author.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @author ${0:$TM_FULLNAME} + name + author + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + 6CBBA65F-4DE1-4B59-B016-0D8CE3FFA2AD + + diff --git a/Snippets/code.tmSnippet b/Snippets/code.tmSnippet new file mode 100644 index 0000000..6ad25de --- /dev/null +++ b/Snippets/code.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + {@code $0 + name + code + scope + comment.block.documentation.javadoc + tabTrigger + { + uuid + 38CD567C-0950-4CA1-90B7-DD267F55B162 + + diff --git a/Snippets/deprecated.tmSnippet b/Snippets/deprecated.tmSnippet new file mode 100644 index 0000000..5fa5785 --- /dev/null +++ b/Snippets/deprecated.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @deprecated ${0:description} + name + deprecated + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + D89917BE-DC05-4319-8FD2-001C37CD831B + + diff --git a/Snippets/docRoot.tmSnippet b/Snippets/docRoot.tmSnippet new file mode 100644 index 0000000..8baefbb --- /dev/null +++ b/Snippets/docRoot.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + {@docRoot + name + docRoot + scope + comment.block.documentation.javadoc + tabTrigger + { + uuid + 9139ACF5-11D8-431E-9578-4A8497B09FCD + + diff --git a/Snippets/inheritDoc.tmSnippet b/Snippets/inheritDoc.tmSnippet new file mode 100644 index 0000000..ffc5fb0 --- /dev/null +++ b/Snippets/inheritDoc.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + {@inheritDoc + name + inheritDoc + scope + comment.block.documentation.javadoc + tabTrigger + { + uuid + 8F0674CE-8433-4DA7-8F1A-06D081870573 + + diff --git a/Snippets/link.tmSnippet b/Snippets/link.tmSnippet new file mode 100644 index 0000000..e55dd54 --- /dev/null +++ b/Snippets/link.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + {@link ${1:target} ${0:label} + name + link + scope + comment.block.documentation.javadoc + tabTrigger + { + uuid + 67E0098B-8231-4EEF-AC3B-57F7E67878A2 + + diff --git a/Snippets/linkplain.tmSnippet b/Snippets/linkplain.tmSnippet new file mode 100644 index 0000000..08ea6bd --- /dev/null +++ b/Snippets/linkplain.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + {@linkplain ${1:target} ${0:label} + name + linkplain + scope + comment.block.documentation.javadoc + tabTrigger + { + uuid + 42AE205D-3DD6-4B21-8DD9-C6D94CC8A6BC + + diff --git a/Snippets/literal.tmSnippet b/Snippets/literal.tmSnippet new file mode 100644 index 0000000..983933b --- /dev/null +++ b/Snippets/literal.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + {@literal $0 + name + literal + scope + comment.block.documentation.javadoc + tabTrigger + { + uuid + D260D1B4-5327-4FEC-B4EB-68B9634A14B0 + + diff --git a/Snippets/param.tmSnippet b/Snippets/param.tmSnippet new file mode 100644 index 0000000..bd0de1b --- /dev/null +++ b/Snippets/param.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @param ${1:var} ${0:description} + name + param + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + A0F1CF90-D2AC-4F52-90A2-BCEC410B26B7 + + diff --git a/Snippets/return.tmSnippet b/Snippets/return.tmSnippet new file mode 100644 index 0000000..713cf16 --- /dev/null +++ b/Snippets/return.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @return ${0:description} + name + return + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + 01870B8C-D2C7-486D-9946-41D302C4AE7B + + diff --git a/Snippets/see.tmSnippet b/Snippets/see.tmSnippet new file mode 100644 index 0000000..e07bffe --- /dev/null +++ b/Snippets/see.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @see ${0:reference} + name + see + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + 3F96FB16-B2CB-421D-A18E-4E9FAF0D9577 + + diff --git a/Snippets/serial.tmSnippet b/Snippets/serial.tmSnippet new file mode 100644 index 0000000..c3ac1b3 --- /dev/null +++ b/Snippets/serial.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @serial ${0:description} + name + serial + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + 3AEE39A5-710C-495F-AA7B-9328FF69DA60 + + diff --git a/Snippets/serialData.tmSnippet b/Snippets/serialData.tmSnippet new file mode 100644 index 0000000..c408328 --- /dev/null +++ b/Snippets/serialData.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @serialField ${0:description} + name + serialData + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + EC8D16AB-CF3B-485A-9A34-AF6C4B8D3F2D + + diff --git a/Snippets/serialField.tmSnippet b/Snippets/serialField.tmSnippet new file mode 100644 index 0000000..9817164 --- /dev/null +++ b/Snippets/serialField.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @serialField ${1:name} ${2:type} ${0:description} + name + serialField + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + C2338573-C4C0-4A47-A6BC-0744E01DD359 + + diff --git a/Snippets/since.tmSnippet b/Snippets/since.tmSnippet new file mode 100644 index 0000000..677b607 --- /dev/null +++ b/Snippets/since.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @since ${0:version} + name + since + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + 8C789B6F-ACFD-4848-9D71-10BD2365698A + + diff --git a/Snippets/throws.tmSnippet b/Snippets/throws.tmSnippet new file mode 100644 index 0000000..b0d6fe4 --- /dev/null +++ b/Snippets/throws.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @throws ${1:class} ${0:description} + name + throws + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + 040A5386-1DE7-4A68-877D-CD4BFEF7A05B + + diff --git a/Snippets/value.tmSnippet b/Snippets/value.tmSnippet new file mode 100644 index 0000000..27f4898 --- /dev/null +++ b/Snippets/value.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + {@value $0 + name + value + scope + comment.block.documentation.javadoc + tabTrigger + { + uuid + AD26BB26-F3C3-40CB-938D-218851375811 + + diff --git a/Snippets/version.tmSnippet b/Snippets/version.tmSnippet new file mode 100644 index 0000000..622ebb7 --- /dev/null +++ b/Snippets/version.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + @version ${0:version} + name + version + scope + comment.block.documentation.javadoc + tabTrigger + @ + uuid + A54F1BB7-9FB9-438A-8737-F3E8D858AA70 + + diff --git a/Syntaxes/JavaDoc.tmLanguage b/Syntaxes/JavaDoc.tmLanguage new file mode 100644 index 0000000..dc572e5 --- /dev/null +++ b/Syntaxes/JavaDoc.tmLanguage @@ -0,0 +1,737 @@ + + + + + fileTypes + + foldingStartMarker + /\*\* + foldingStopMarker + \*\*/ + name + JavaDoc + patterns + + + begin + (/\*\*)\s*$ + beginCaptures + + 1 + + name + punctuation.definition.comment.begin.javadoc + + + end + \*/ + endCaptures + + 0 + + name + punctuation.definition.comment.javadoc + + + name + comment.block.documentation.javadoc + patterns + + + include + #invalid + + + begin + \*\s*(?=\w) + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.comment.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)param) + beginCaptures + + 1 + + name + keyword.other.documentation.param.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.param.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)return) + beginCaptures + + 1 + + name + keyword.other.documentation.return.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.return.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)throws) + beginCaptures + + 1 + + name + keyword.other.documentation.throws.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.throws.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)exception) + beginCaptures + + 1 + + name + keyword.other.documentation.exception.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.exception.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)author) + beginCaptures + + 1 + + name + keyword.other.documentation.author.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.author.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)version) + beginCaptures + + 1 + + name + keyword.other.documentation.version.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.version.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)see) + beginCaptures + + 1 + + name + keyword.other.documentation.see.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.see.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)since) + beginCaptures + + 1 + + name + keyword.other.documentation.since.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.since.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)serial) + beginCaptures + + 1 + + name + keyword.other.documentation.serial.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.serial.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)serialField) + beginCaptures + + 1 + + name + keyword.other.documentation.serialField.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.serialField.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)serialData) + beginCaptures + + 1 + + name + keyword.other.documentation.serialData.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.serialData.javadoc + patterns + + + include + #inline + + + + + begin + \*\s*((\@)deprecated) + beginCaptures + + 1 + + name + keyword.other.documentation.deprecated.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + contentName + text.html + end + (?=\s*\*\s*@)|(?=\s*\*\s*/) + name + meta.documentation.tag.deprecated.javadoc + patterns + + + include + #inline + + + + + captures + + 1 + + name + keyword.other.documentation.custom.javadoc + + 2 + + name + punctuation.definition.keyword.javadoc + + + match + \*\s*((\@)\S+)\s + + + + + repository + + inline + + patterns + + + include + #invalid + + + include + #inline-formatting + + + include + text.html.basic + + + match + ((https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:]) + name + markup.underline.link + + + + inline-formatting + + patterns + + + begin + (\{)((\@)code) + beginCaptures + + 1 + + name + punctuation.definition.directive.begin.javadoc + + 2 + + name + keyword.other.documentation.directive.code.javadoc + + 3 + + name + punctuation.definition.keyword.javadoc + + + contentName + markup.raw.code.javadoc + end + \} + endCaptures + + 0 + + name + punctuation.definition.directive.end.javadoc + + + name + meta.directive.code.javadoc + patterns + + + + begin + (\{)((\@)literal) + beginCaptures + + 1 + + name + punctuation.definition.directive.begin.javadoc + + 2 + + name + keyword.other.documentation.directive.literal.javadoc + + 3 + + name + punctuation.definition.keyword.javadoc + + + contentName + markup.raw.literal.javadoc + end + \} + endCaptures + + 0 + + name + punctuation.definition.directive.end.javadoc + + + name + meta.directive.literal.javadoc + patterns + + + + captures + + 1 + + name + punctuation.definition.directive.begin.javadoc + + 2 + + name + keyword.other.documentation.directive.docRoot.javadoc + + 3 + + name + punctuation.definition.keyword.javadoc + + 4 + + name + punctuation.definition.directive.end.javadoc + + + match + (\{)((\@)docRoot)(\}) + name + meta.directive.docRoot.javadoc + + + captures + + 1 + + name + punctuation.definition.directive.begin.javadoc + + 2 + + name + keyword.other.documentation.directive.inheritDoc.javadoc + + 3 + + name + punctuation.definition.keyword.javadoc + + 4 + + name + punctuation.definition.directive.end.javadoc + + + match + (\{)((\@)inheritDoc)(\}) + name + meta.directive.inheritDoc.javadoc + + + captures + + 1 + + name + punctuation.definition.directive.begin.javadoc + + 2 + + name + keyword.other.documentation.directive.link.javadoc + + 3 + + name + punctuation.definition.keyword.javadoc + + 4 + + name + markup.underline.link.javadoc + + 5 + + name + string.other.link.title.javadoc + + 6 + + name + punctuation.definition.directive.end.javadoc + + + match + (\{)((\@)link)(?:\s+(\S+?))?(?:\s+(.+?))?\s*(\}) + name + meta.directive.link.javadoc + + + captures + + 1 + + name + punctuation.definition.directive.begin.javadoc + + 2 + + name + keyword.other.documentation.directive.linkplain.javadoc + + 3 + + name + punctuation.definition.keyword.javadoc + + 4 + + name + markup.underline.linkplain.javadoc + + 5 + + name + string.other.link.title.javadoc + + 6 + + name + punctuation.definition.directive.end.javadoc + + + match + (\{)((\@)linkplain)(?:\s+(\S+?))?(?:\s+(.+?))?\s*(\}) + name + meta.directive.linkplain.javadoc + + + captures + + 1 + + name + punctuation.definition.directive.begin.javadoc + + 2 + + name + keyword.other.documentation.directive.value.javadoc + + 3 + + name + punctuation.definition.keyword.javadoc + + 4 + + name + variable.other.javadoc + + 5 + + name + punctuation.definition.directive.end.javadoc + + + match + (\{)((\@)value)\s*(\S+?)?\s*(\}) + name + meta.directive.value.javadoc + + + + invalid + + patterns + + + match + ^(?!\s*\*).*$\n? + name + invalid.illegal.missing-asterisk.javadoc + + + + + scopeName + text.html.javadoc + uuid + 64BB98A4-59D4-474E-9091-C1E1D04BDD03 + +