├── Support ├── data │ ├── completions_todo.txt │ ├── ant_completions.xml │ └── ant_doc_dictionary.xml ├── bin │ ├── parse_mxmlc_out.py │ ├── htmlize_ant.py │ └── antdoc.rb ├── style │ ├── ant2html.css │ └── ant2html.xsl └── README.mdown ├── Templates └── Build File.tmTemplate │ ├── build.xml │ └── info.plist ├── Snippets └── Doc Banner.tmSnippet ├── Preferences ├── Folding.tmPreferences ├── Symbol List Macro.tmPreferences ├── Symbol List Target.tmPreferences └── Autocompletions.tmPreferences ├── Commands ├── Validate Build File.tmCommand ├── Help.tmCommand ├── Manual.tmCommand ├── Documentation for Word.tmCommand ├── View as HTML.tmCommand ├── List Targets.tmCommand ├── Run.tmCommand ├── Build.tmCommand ├── Auto Complete Tag.tmCommand └── Build (target).tmCommand ├── info.plist ├── README.mdown └── Syntaxes └── Ant.tmLanguage /Support/data/completions_todo.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Templates/Build File.tmTemplate/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Snippets/Doc Banner.tmSnippet: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | content 6 | <!-- ================================= 7 | target: $1 8 | ================================= --> 9 | keyEquivalent 10 | ^B 11 | name 12 | Insert Comment Banner 13 | scope 14 | text.xml.ant 15 | tabTrigger 16 | ban 17 | uuid 18 | 000AF780-6688-4684-95DF-DE3498B48274 19 | 20 | 21 | -------------------------------------------------------------------------------- /Preferences/Folding.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Folding 7 | scope 8 | text.xml.ant 9 | settings 10 | 11 | foldingStartMarker 12 | ^\s*(<[^!?%/](?!.+?(/>|</.+?>))|<[!%]--(?!.+?--%?>)|<%[!]?(?!.+?%>)) 13 | foldingStopMarker 14 | ^\s*(</[^>]+>|[/%]>|-->)\s*$ 15 | 16 | uuid 17 | 938741E0-56D1-481B-8EC3-881AEA9652A2 18 | 19 | 20 | -------------------------------------------------------------------------------- /Templates/Build File.tmTemplate/info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | command 6 | if [[ ! -f "$TM_NEW_FILE" ]]; then 7 | TM_YEAR=`date +%Y` \ 8 | TM_DATE=`date +%Y-%m-%d` \ 9 | perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' \ 10 | < build.xml > "$TM_NEW_FILE" 11 | fi 12 | extension 13 | ant.xml 14 | name 15 | Build File 16 | scope 17 | text.xml.ant 18 | uuid 19 | D8BB623D-E04A-4194-8D29-086F5F6B73A8 20 | 21 | 22 | -------------------------------------------------------------------------------- /Preferences/Symbol List Macro.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Macro 7 | scope 8 | meta.tag.macrodef.xml.ant 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | 15 | s/.*name="([\w-]+)".*/$1/g; # Keep macro name only. 16 | s/^/macro: /; # Add macro prefix. 17 | 18 | 19 | uuid 20 | 250EA0F3-362B-406D-8FDD-D1EF8C3F2D88 21 | 22 | 23 | -------------------------------------------------------------------------------- /Preferences/Symbol List Target.tmPreferences: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | name 6 | Symbol List: Target 7 | scope 8 | meta.tag.target.xml.ant 9 | settings 10 | 11 | showInSymbolList 12 | 1 13 | symbolTransformation 14 | 15 | s/.*name="([\w\.:-]+)".*/$1/g; # Keep target name only. 16 | s/^/target: /; # Add target prefix. 17 | 18 | 19 | uuid 20 | 6078A7B7-1947-4A1A-9669-F9448479FA65 21 | 22 | 23 | -------------------------------------------------------------------------------- /Commands/Validate Build File.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | if [[ -f "$TM_ANT_DTD_FILE" ]]; then 9 | 10 | xmllint --noout --dtdvalid "$TM_ANT_DTD_FILE" - && echo "XML syntax OK, DTD Valid"; 11 | 12 | else 13 | 14 | xmllint --noout - && echo "XML syntax OK"; 15 | 16 | fi 17 | 18 | input 19 | document 20 | keyEquivalent 21 | ^V 22 | name 23 | Validate Build File 24 | output 25 | showAsTooltip 26 | scope 27 | text.xml.ant 28 | uuid 29 | 080190AE-FCEF-47BF-86E2-6CC48C8B3E8B 30 | 31 | 32 | -------------------------------------------------------------------------------- /Commands/Help.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 12 | html_header "Apache Ant Bundle Help" "Ant" 13 | 14 | "$TM_SUPPORT_PATH/lib/markdown_to_help.rb" < "$TM_BUNDLE_SUPPORT/README.mdown" 15 | 16 | html_footer 17 | input 18 | none 19 | inputFormat 20 | text 21 | name 22 | Help 23 | outputCaret 24 | afterOutput 25 | outputFormat 26 | html 27 | outputLocation 28 | newWindow 29 | scope 30 | text.xml.ant 31 | uuid 32 | B34D55F6-17C3-4698-973F-FDE059BEB675 33 | version 34 | 2 35 | 36 | 37 | -------------------------------------------------------------------------------- /Commands/Manual.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | # Where there is no manual path specified try the one default location Apple may have installed the manual at, otherwise fall back to the ant.apache.org site. 9 | if [[ "$TM_ANT_MANUAL_PATH" == "" ]]; then 10 | TM_ANT_MANUAL_PATH="/Developer/Java/Ant/docs/manual" 11 | fi 12 | 13 | if [[ -f "$TM_ANT_MANUAL_PATH/index.html" ]]; then 14 | 15 | echo "<meta http-equiv=\"refresh\" content=\"0; file://$TM_ANT_MANUAL_PATH/index.html\">" 16 | 17 | else 18 | 19 | echo "<meta http-equiv=\"refresh\" content=\"0; http://ant.apache.org/manual/index.html\" >" 20 | 21 | fi 22 | input 23 | none 24 | name 25 | Manual 26 | output 27 | showAsHTML 28 | scope 29 | text.xml.ant 30 | uuid 31 | DADF5411-0178-43B9-A4E1-4FAADA22DF16 32 | 33 | 34 | -------------------------------------------------------------------------------- /Support/bin/parse_mxmlc_out.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys, os.path, re, os, atexit, signal 4 | 5 | matcher = re.compile(r'(/.*?)(\(([0-9]+)\)|):.*(Error|Warning):\s*(.*)$') 6 | 7 | sys.stdout.flush() 8 | line = sys.stdin.readline() 9 | errs = 0 10 | 11 | def exitSignal(): 12 | global errs 13 | if ( errs == 0 ): 14 | sys.exit(0)._exit(); 15 | else: 16 | sys.exit(1)._exit(); 17 | 18 | atexit.register( exitSignal ) 19 | 20 | build_message="" 21 | 22 | while line: 23 | line = line.rstrip() 24 | #This line strips the formatting added by ant. 25 | line = line.replace( "[exec] ", "", 1 ) 26 | match = matcher.search(line) 27 | if match: 28 | errs = errs + 1 29 | f = match.group(1) 30 | l = match.group(3) 31 | e = match.group(5) 32 | print '
File: %s
Line: %s
Error: %s
' % (f, l, f, l, e ) 33 | elif (line[0:1] != " "): 34 | print '%s
' % line 35 | #end_if 36 | sys.stdout.flush() 37 | line = sys.stdin.readline() 38 | #end_while 39 | 40 | print '
Build complete, %s error(s) occured.
' % errs 41 | -------------------------------------------------------------------------------- /Commands/Documentation for Word.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | antdoc.rb; 12 | fallbackInput 13 | word 14 | input 15 | selection 16 | inputFormat 17 | text 18 | keyEquivalent 19 | ^h 20 | name 21 | Documentation for Word / Selection 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | text 26 | outputLocation 27 | discard 28 | scope 29 | text.xml.ant 30 | semanticClass 31 | lookup.define.ant 32 | uuid 33 | 464D4A8B-64A9-4C9E-BC94-65DBD5D16117 34 | version 35 | 2 36 | 37 | 38 | -------------------------------------------------------------------------------- /Support/style/ant2html.css: -------------------------------------------------------------------------------- 1 | body { 2 | height:100%; 3 | margin:10px 10px 10px 10px; 4 | font-family: Verdana, Arial, Helvetica, sans-serif; 5 | color: #999999; 6 | font-size: 11pt; 7 | font-weight: normal; 8 | } 9 | table { 10 | padding-bottom: 20px; 11 | } 12 | .mainHr { 13 | border: none 0; 14 | border-top: 1px solid #000; 15 | width: 80%; 16 | height: 1px; 17 | } 18 | hr { 19 | border: none 0; 20 | border-top: 1px dashed #000; 21 | width: 80%; 22 | height: 1px; 23 | } 24 | .startTarget { 25 | padding-top: 5px; 26 | } 27 | .tocList { 28 | width:20%; 29 | background-color:#E4E4E4; 30 | padding-top: 20px; 31 | padding-right: 20px; 32 | padding-left: 20px; 33 | vertical-align: top; 34 | } 35 | .mainContent { 36 | width:80%; 37 | padding-left:10px; 38 | vertical-align:top; 39 | } 40 | .tasksHeader { 41 | vertical-align: top; 42 | } 43 | a{ 44 | text-decoration:none; 45 | color:#999999; 46 | font-size: 12; 47 | } 48 | a:link{ 49 | color:#878787; 50 | } 51 | a:visited{ 52 | color:#999999; 53 | } 54 | a:active{ 55 | color:#ff0000; 56 | } 57 | a:hover{ 58 | color:#666666; 59 | } 60 | big { 61 | color:black; 62 | font-size:11pt; 63 | } 64 | h1 { 65 | font-size:14pt; 66 | color:black; 67 | } 68 | h2 { 69 | font-size:12pt; 70 | color:black; 71 | } 72 | b { 73 | font-size:11pt; 74 | } 75 | pre { 76 | font-family: Monaco, Verdana, sans-serif; 77 | } -------------------------------------------------------------------------------- /Commands/View as HTML.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | 10 | # NOTE: We output to tmp as the document doesn't render when piped directly to "Show as HTML" 11 | tmp_build_uri = "/tmp/tm_ant_build.xml" 12 | 13 | doc_arr = STDIN.read 14 | doc_arr = doc_arr.split( "\n" ) 15 | doc_arr.unshift('<?xml version="1.0"?>') if doc_arr[0] !~ /<?xml\s+version/ 16 | doc_arr.insert( 1, '<?xml-stylesheet type="text/xsl" href="' + ENV['TM_BUNDLE_SUPPORT'] + '/style/ant2html.xsl"?>' ) 17 | tmp_build_xml = File.open( tmp_build_uri, "w" ) 18 | doc_arr.each { |line| tmp_build_xml.puts line } 19 | tmp_build_xml.close() 20 | 21 | `cp "$TM_BUNDLE_SUPPORT/style/ant2html.css" "/tmp/ant2html.css"` 22 | 23 | puts "<meta http-equiv=\"refresh\" content=\"0; file://#{tmp_build_uri}\">" 24 | 25 | input 26 | document 27 | name 28 | View as HTML 29 | output 30 | showAsHTML 31 | scope 32 | text.xml.ant 33 | uuid 34 | 62CAE21C-2269-489F-B5AB-3E652AE6E51F 35 | 36 | 37 | -------------------------------------------------------------------------------- /Commands/List Targets.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | if [ "$TM_FILEPATH" == "" ]; then 12 | exit_show_tool_tip "Please open an ant file to scan for ant targets."; 13 | fi 14 | 15 | "${TM_ANT:-ant}" -p -f "$TM_FILEPATH" 16 | input 17 | none 18 | inputFormat 19 | text 20 | name 21 | List Targets 22 | outputCaret 23 | afterOutput 24 | outputFormat 25 | text 26 | outputLocation 27 | toolTip 28 | requiredCommands 29 | 30 | 31 | command 32 | ant 33 | locations 34 | 35 | /opt/local/bin/ant 36 | /usr/local/bin/ant 37 | 38 | variable 39 | TM_ANT 40 | 41 | 42 | scope 43 | text.xml.ant 44 | uuid 45 | 9BF3D042-E77C-4E89-9E8C-18A81AE3923B 46 | version 47 | 2 48 | 49 | 50 | -------------------------------------------------------------------------------- /Commands/Run.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | saveActiveFile 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 12 | 13 | html_header "Ant Run" 14 | 15 | if [[ "$TM_ANT_BUILD_PARSER" == "" ]]; then 16 | TM_ANT_BUILD_PARSER=pre 17 | fi 18 | 19 | "${TM_ANT:-ant}" -buildfile "$TM_FILEPATH" | "$TM_ANT_BUILD_PARSER" 20 | input 21 | none 22 | inputFormat 23 | text 24 | keyEquivalent 25 | @r 26 | name 27 | Run 28 | outputCaret 29 | afterOutput 30 | outputFormat 31 | html 32 | outputLocation 33 | newWindow 34 | requiredCommands 35 | 36 | 37 | command 38 | ant 39 | locations 40 | 41 | /opt/local/bin/ant 42 | /usr/local/bin/ant 43 | 44 | variable 45 | TM_ANT 46 | 47 | 48 | scope 49 | text.xml.ant 50 | semanticClass 51 | process.run.ant 52 | uuid 53 | 7B5E4852-8B66-461F-A32A-A820625256A5 54 | version 55 | 2 56 | 57 | 58 | -------------------------------------------------------------------------------- /Support/bin/htmlize_ant.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys, os.path, re, os 4 | 5 | matcher = re.compile( 6 | r'(/.*?):(\d+):\s*(.*)$' 7 | ) 8 | 9 | buildfile = None 10 | proj_dir = None 11 | 12 | print """ 13 | 14 | 15 | 16 | 17 | 18 | 19 | """ % (os.environ['TM_BUNDLE_SUPPORT']) 20 | 21 | sys.stdout.flush() 22 | 23 | ## read all data from stdin 24 | lastLine = None 25 | line = sys.stdin.readline() 26 | while line: 27 | line = line.rstrip() 28 | 29 | ## find the buildfile, and from that, the project directory 30 | if line.startswith("Buildfile"): 31 | buildfile = line[(line.find(":") + 2):] 32 | proj_dir = os.path.dirname(buildfile) + "/" 33 | 34 | match = matcher.search(line) 35 | 36 | print "
"
37 | 
38 |     if not match:
39 |         print line
40 |     else:
41 |         fn = match.group(1)
42 | 
43 |         if proj_dir and fn.startswith(proj_dir):
44 |             short_name = fn[len(proj_dir):]
45 |         else:
46 |             short_name = fn
47 | 
48 |         colInd = 0
49 |         ## if lastLine:
50 |         ##     if lastLine[-1] == "^":
51 |         ##         # print lastLine
52 |         ##         brktInd = lastLine.find("]")
53 |         ## 
54 |         ##         if lastLine != -1:
55 |         ##             colInd = len(lastLine[(brktInd + 2):])
56 |         ##             # print lastLine[(brktInd + 2):], colInd
57 |         
58 |         
59 |         print line[:match.start()].rstrip(),
60 |         print '%s:%s: %s' % (
61 |             fn, match.group(2), colInd, short_name, match.group(2), match.group(3)
62 |         ),
63 |         print line[match.end():]
64 | 
65 |     print "
" 66 | sys.stdout.flush() 67 | 68 | ## read next line 69 | lastLine = line 70 | line = sys.stdin.readline() 71 | 72 | print """ 73 | 74 | 75 | """ 76 | -------------------------------------------------------------------------------- /Commands/Build.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env bash 9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" 10 | 11 | . "$TM_SUPPORT_PATH/lib/webpreview.sh" 12 | 13 | html_header "Ant Build" 14 | 15 | TM_PROJECT_DIR=`dirname "$TM_PROJECT_FILEPATH"`; 16 | 17 | #TM_ANT_BUILD_PARSER=htmlize_ant.py 18 | 19 | if [[ "$TM_ANT_BUILD_PARSER" == "" ]]; then 20 | TM_ANT_BUILD_PARSER=pre 21 | fi 22 | 23 | if [[ -f "$TM_PROJECT_DIR/$TM_ANT_BUILD_FILE" ]]; then 24 | 25 | "${TM_ANT:-ant}" -buildfile "$TM_PROJECT_DIR/$TM_ANT_BUILD_FILE" | "$TM_ANT_BUILD_PARSER" 26 | 27 | elif [[ -f "$TM_ANT_BUILD_FILE" ]]; then 28 | 29 | "${TM_ANT:-ant}" -buildfile "$TM_ANT_BUILD_FILE" | "$TM_ANT_BUILD_PARSER" 30 | 31 | else 32 | 33 | "${TM_ANT:-ant}" -find build.xml | "$TM_ANT_BUILD_PARSER" 34 | 35 | fi 36 | 37 | input 38 | none 39 | inputFormat 40 | text 41 | keyEquivalent 42 | @b 43 | name 44 | Build 45 | outputCaret 46 | afterOutput 47 | outputFormat 48 | html 49 | outputLocation 50 | newWindow 51 | requiredCommands 52 | 53 | 54 | command 55 | ant 56 | locations 57 | 58 | /opt/local/bin/ant 59 | /usr/local/bin/ant 60 | 61 | variable 62 | TM_ANT 63 | 64 | 65 | scope 66 | attr.project.ant - (text dyn.selection) 67 | semanticClass 68 | process.build.ant 69 | uuid 70 | C7888301-C304-4EF2-A15F-5681A7D6D13C 71 | version 72 | 2 73 | 74 | 75 | -------------------------------------------------------------------------------- /Support/bin/antdoc.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby18 2 | 3 | SUPPORT = ENV['TM_SUPPORT_PATH'] 4 | 5 | require "rexml/document" 6 | require SUPPORT + '/lib/exit_codes' 7 | require SUPPORT + "/lib/web_preview" 8 | 9 | ANT_HELP_DICT = ENV['TM_BUNDLE_SUPPORT'] + '/data/ant_doc_dictionary.xml' 10 | 11 | # Work out what uri to use for the manual 12 | # If the user has specified the path use it, 13 | # otherwise fall back on the default apple 14 | # developer tools install location, then onto 15 | # the apache website. 16 | 17 | ant_manual_path = "/Developer/Java/Ant/docs/manual" if !ENV['TM_ANT_MANUAL_PATH'] 18 | ant_manual_uri = "http://ant.apache.org/manual" 19 | ant_manual_uri = "file://" + ant_manual_path if File.directory? ant_manual_path 20 | ant_manual_uri = ant_manual_uri.gsub( /\/$/, '' ) 21 | 22 | WORD = STDIN.read.strip 23 | 24 | if WORD.empty? 25 | 26 | puts html_head( :title => "Error", :sub_title => "Ant Documentation" ) 27 | puts "

Please specify a search term.

" 28 | puts "

Ant Manual

" 29 | html_footer 30 | TextMate.exit_show_html 31 | 32 | end 33 | 34 | puts html_head( :title => "Ant Documentation Search", :sub_title => "Apache Ant" ) 35 | puts "

Results for ‘#{WORD}’

" 36 | 37 | # Open the ANT_HELP_DICT xml file and 38 | # collect matching results. 39 | 40 | search_results = []; 41 | ant_doc = REXML::Document.new File.new(ANT_HELP_DICT) 42 | ant_doc.elements.each( "dict/a" ) do |tag| 43 | 44 | e = tag[0].to_s 45 | if e[/#{WORD}/i] 46 | href = tag.attributes["href"] 47 | tag.attributes["href"] = ant_manual_uri + "/" + href; 48 | tag.attributes["title"] = href.split(/\/|\#/).join( " > " ).sub( ".html", ""); 49 | search_results.push( tag ) 50 | end 51 | 52 | end 53 | 54 | if search_results.size == 1 55 | 56 | puts "

Redirecting:

" 60 | 61 | elsif search_results.size > 0 62 | 63 | puts "

" 66 | 67 | else 68 | 69 | puts "

" 70 | 71 | end 72 | 73 | puts "Ant Manual" 74 | 75 | html_footer 76 | TextMate.exit_show_html 77 | -------------------------------------------------------------------------------- /Commands/Auto Complete Tag.tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 -wKU 9 | 10 | SUPPORT = ENV['TM_SUPPORT_PATH'] 11 | COMP_XML = ENV['TM_BUNDLE_PATH']+"/support/data/ant_completions.xml" 12 | 13 | require "rexml/document" 14 | require SUPPORT + '/lib/escape' 15 | require SUPPORT + '/lib/exit_codes' 16 | require SUPPORT + '/lib/osx/plist' 17 | 18 | word = STDIN.read.strip 19 | TextMate.exit_show_tool_tip("Please select a term to complete.") if word.empty? 20 | 21 | search_results = []; 22 | ant_doc = REXML::Document.new File.new(COMP_XML) 23 | ant_doc.elements.each( "completion_list/*" ) do |tag| 24 | 25 | n = tag.local_name 26 | 27 | if n[/^#{word}/i] 28 | 29 | snip_num = 1; 30 | tag.attributes.each do |name, value| 31 | tag.attributes[name] = '${' + snip_num.to_s + ':' + value + '}' 32 | snip_num = snip_num + 1 33 | end 34 | 35 | unless tag.text == nil 36 | if tag.text == " " 37 | tag.text = "$0" 38 | else 39 | tag.text = '${' + snip_num.to_s + ':' + tag.text + '}' 40 | end 41 | end 42 | 43 | search_results.push( { 'title' => n , 'data' => tag.to_s.gsub( "'", '"' ) } ) 44 | 45 | end 46 | 47 | end 48 | 49 | TextMate.exit_show_tool_tip( "No completion found." ) if search_results.empty? 50 | 51 | if search_results.size > 1 52 | 53 | plist = { 'menuItems' => search_results }.to_plist 54 | res = OSX::PropertyList::load( `#{e_sh ENV['DIALOG']} -up #{e_sh plist}` ) 55 | 56 | TextMate.exit_discard() unless res.has_key? 'selectedMenuItem' 57 | choice = res['selectedMenuItem']['data'] 58 | 59 | else 60 | 61 | choice = search_results.pop['data'] 62 | 63 | end 64 | 65 | print choice 66 | fallbackInput 67 | word 68 | input 69 | selection 70 | keyEquivalent 71 | ~ 72 | name 73 | Auto Complete Tag 74 | output 75 | insertAsSnippet 76 | scope 77 | text.xml.ant 78 | uuid 79 | 4BCBC20D-A418-412D-AD95-1CBB62AF1760 80 | 81 | 82 | -------------------------------------------------------------------------------- /info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | contactEmailRot13 6 | ohaqyrf@uryirpgbe.bet 7 | contactName 8 | Simon Gregory 9 | description 10 | <a href="http://ant.apache.org/">Ant</a> is a Java-based build tool. 11 | mainMenu 12 | 13 | items 14 | 15 | 7B5E4852-8B66-461F-A32A-A820625256A5 16 | C7888301-C304-4EF2-A15F-5681A7D6D13C 17 | 05BC9A24-B64E-42D6-8177-326518E65EE0 18 | ------------------------------------ 19 | 4BCBC20D-A418-412D-AD95-1CBB62AF1760 20 | 080190AE-FCEF-47BF-86E2-6CC48C8B3E8B 21 | ------------------------------------ 22 | B34D55F6-17C3-4698-973F-FDE059BEB675 23 | DADF5411-0178-43B9-A4E1-4FAADA22DF16 24 | 464D4A8B-64A9-4C9E-BC94-65DBD5D16117 25 | ------------------------------------ 26 | 9BF3D042-E77C-4E89-9E8C-18A81AE3923B 27 | 62CAE21C-2269-489F-B5AB-3E652AE6E51F 28 | 29 | submenus 30 | 31 | 32 | name 33 | Ant 34 | ordering 35 | 36 | E1B78601-E584-4A7F-B011-A61710BFE035 37 | 4BCBC20D-A418-412D-AD95-1CBB62AF1760 38 | C7888301-C304-4EF2-A15F-5681A7D6D13C 39 | 05BC9A24-B64E-42D6-8177-326518E65EE0 40 | D8BB623D-E04A-4194-8D29-086F5F6B73A8 41 | AE288C48-081B-4615-A8B6-03041B92652B 42 | 000AF780-6688-4684-95DF-DE3498B48274 43 | 464D4A8B-64A9-4C9E-BC94-65DBD5D16117 44 | B34D55F6-17C3-4698-973F-FDE059BEB675 45 | 9BF3D042-E77C-4E89-9E8C-18A81AE3923B 46 | DADF5411-0178-43B9-A4E1-4FAADA22DF16 47 | 7B5E4852-8B66-461F-A32A-A820625256A5 48 | 250EA0F3-362B-406D-8FDD-D1EF8C3F2D88 49 | 6078A7B7-1947-4A1A-9669-F9448479FA65 50 | 080190AE-FCEF-47BF-86E2-6CC48C8B3E8B 51 | 62CAE21C-2269-489F-B5AB-3E652AE6E51F 52 | 53 | uuid 54 | 2BF448A1-9742-4137-80D2-C7AD8D7A0064 55 | 56 | 57 | -------------------------------------------------------------------------------- /Commands/Build (target).tmCommand: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | beforeRunningCommand 6 | nop 7 | command 8 | #!/usr/bin/env ruby18 9 | 10 | SUPPORT = ENV['TM_SUPPORT_PATH'] 11 | 12 | require SUPPORT + '/lib/exit_codes' 13 | require SUPPORT + '/lib/escape' 14 | require SUPPORT + '/lib/textmate' 15 | require SUPPORT + '/lib/ui' 16 | require SUPPORT + '/lib/tm/process' 17 | require SUPPORT + '/lib/web_preview' 18 | require 'rexml/document' 19 | 20 | STDOUT.sync = true 21 | 22 | tm_ant = (ENV['TM_ANT'] == nil) ? 'ant' : ENV['TM_ANT'] 23 | 24 | puts html_head( :window_title => "Ant Build (target)", :page_title => "Build (target)" ); 25 | 26 | base_dir = "" 27 | ant_build_file = "" 28 | ant_build_file = ENV['TM_ANT_BUILD_FILE'] if ENV['TM_ANT_BUILD_FILE'] != nil 29 | project_base_path = File.dirname( ENV['TM_PROJECT_FILEPATH'] ) if ENV['TM_PROJECT_FILEPATH'] != nil 30 | ant_build_file = project_base_path + "/" + ant_build_file if ant_build_file != "" 31 | 32 | if File.exists?( ant_build_file ) 33 | source = REXML::Document.new( File.open( ant_build_file, "r")) 34 | else 35 | source = REXML::Document.new(STDIN.read) 36 | ant_build_file = ENV['TM_FILEPATH'] 37 | end 38 | 39 | if source.root.attributes['default'] 40 | default_target = source.root.attributes['default'] 41 | end 42 | 43 | # Creates a menu item for the UI.menu. 44 | def menu_item targ 45 | { 'title' => targ.attributes['name'], 'description' => targ.attributes['description'].to_s } 46 | end 47 | 48 | ant_targets = [] 49 | source.each_element('//target'){ |targ| 50 | if targ.attributes['name'] == default_target 51 | default_target = menu_item(targ) 52 | else 53 | ant_targets << menu_item(targ) 54 | end 55 | } 56 | 57 | if ant_targets.empty? and default_target == nil 58 | TextMate.exit_show_html( "<h1>No targets found.</h1>") 59 | end 60 | 61 | ant_targets = ant_targets.sort {| a,b | a['title'] <=> b['title'] } 62 | 63 | if default_target 64 | ant_targets = ant_targets.unshift({'title' => '-'}) if ant_targets.size > 0 65 | ant_targets = ant_targets.unshift(default_target) 66 | end 67 | 68 | res = TextMate::UI.menu(ant_targets) 69 | TextMate.exit_discard() if res == nil 70 | selected_target = res['title'] 71 | selected_desc = res['description'] 72 | 73 | puts "<h1>#{selected_target}:</h1><p>#{selected_desc}</p><pre>" 74 | 75 | TextMate::Process.run("#{tm_ant} -buildfile #{ant_build_file} #{selected_target}", :interactive_input => false) do |str| 76 | STDOUT << htmlize(str, :no_newline_after_br => true) 77 | end 78 | 79 | puts "</pre>" 80 | html_footer 81 | 82 | 83 | fallbackInput 84 | document 85 | input 86 | selection 87 | inputFormat 88 | text 89 | keyEquivalent 90 | ~@b 91 | name 92 | Build Target… 93 | outputCaret 94 | afterOutput 95 | outputFormat 96 | html 97 | outputLocation 98 | newWindow 99 | requiredCommands 100 | 101 | 102 | command 103 | ant 104 | locations 105 | 106 | /opt/local/bin/ant 107 | /usr/local/bin/ant 108 | 109 | variable 110 | TM_ANT 111 | 112 | 113 | scope 114 | attr.project.ant 115 | semanticClass 116 | process.alternate.build.target.ant 117 | uuid 118 | 05BC9A24-B64E-42D6-8177-326518E65EE0 119 | version 120 | 2 121 | 122 | 123 | -------------------------------------------------------------------------------- /README.mdown: -------------------------------------------------------------------------------- 1 | TextMate Ant Bundle 2 | =================== 3 | 4 | Provides TextMate support for [Apache Ant][apache_ant], the most recent version of Ant can be [downloaded here][ant_download]. Alternatively Ant can be found on the Apple Developer Tools Install Disk, but this version may be out of date. 5 | 6 | Installation 7 | ------------ 8 | 9 | Via download: 10 | 11 | * Open this [link][ant_bundle_zip] 12 | * Unzip the download 13 | * Rename the folder to Ant.tmbundle 14 | * Double-click 15 | * TextMate handles the rest! 16 | 17 | To install via Git: 18 | 19 | cd ~/"Library/Application Support/TextMate/Bundles/" 20 | git clone git://github.com/textmate/ant.tmbundle.git "Ant.tmbundle" 21 | osascript -e 'tell app "TextMate" to reload bundles' 22 | 23 | Optionally set the TM_ANT variable to point to your installation of Ant (ie /usr/local/bin/ant) in TextMate, preferences, advanced tab, shell variables. 24 | 25 | Usage 26 | ----- 27 | 28 | As Ant files are XML TextMate won't automatically distinguish them, to achieve this you can suffix your files with `ant.xml` or include `` on the first line. 29 | 30 | Adding extra scopes to commands (Build and Build Target for example) Scope Selector field will allow access to them from files other than ant.xml. 31 | 32 | ### Autocomplete Tag (⌥⎋) 33 | 34 | Takes the current word or selection and presents a matching list of known Ant tags. The full list was created using the documentation in version 1.7.0 of Ant. 35 | 36 | ### Build ( ⌘B) 37 | Uses `TM_ANT_BUILD_FILE` if set, otherwise attempts to locate a build file and execute it. 38 | 39 | ### Build Target ( ⌥⌘B) 40 | Uses `TM_ANT_BUILD_FILE` if set, otherwise parses the current document for build targets from which you can select which one to execute. 41 | 42 | ### Run ( ⌘R) 43 | Executes the current document. 44 | 45 | ### Validate Build File (⌃⇧V) 46 | Validates the current document as valid XML. When the `TM_ANT_DTD_FILE` [environmental variable][tm_env_vars] has been set the document is also validated against the requested `ant.dtd`. 47 | 48 | ### Configuration Options 49 | 50 | These environment variables allow you to define or customise the behaviour of certain commands. For help on setting them up please see [TextMate help][tm_env_vars]. 51 | 52 | * `TM_ANT` (default: `ant`) 53 | The path to your ant executable. 54 | 55 | * `TM_ANT_BUILD_FILE` 56 | The location of the ant build file you wish to target by default. This can be either the full path, or relative to the current project. 57 | 58 | * `TM_ANT_BUILD_PARSER` 59 | This is Experimental - The location of a script to format the output of ant. Scripts are available to prettify the output for Java and Flex - in their respective bundles. If this variable is not set the output is wrapped in `pre` tags. 60 | 61 | * `TM_ANT_DTD_FILE` 62 | The location of a custom `ant.dtd` against which, in addition to verifying that the XML is well-formed, the _Validate Build File_ command can check the document conforms. It is possible to generate an `ant.dtd` by running a `` with the following contents: ``. 63 | 64 | * `TM_ANT_MANUAL_PATH` 65 | If you have installed your own version of Ant, you can set this variable to the location of its manual. For example if you installed it via MacPorts then set it to `/opt/local/share/java/apache-ant/docs/manual`. The default is to use the manual included with Apple’s developer tools with the [online version](http://ant.apache.org/manual/index.html) as a fallback. 66 | 67 | Support 68 | ------- 69 | 70 | * [Issue tracker][issue_tracker] 71 | * [Repository][repo] 72 | 73 | For general questions please use the [TextMate Users mailing list][tm_mailing_list]. 74 | Bugs and issues should be reported via the [issue tracker][issue_tracker]. 75 | Source can be viewed and forked via the [GitHub repository][repo]. 76 | 77 | Conventions 78 | ----------- 79 | 80 | The bundle uses the suggestions made by the [Ant style guide][ant_style_guide]. 81 | Bundle authorship uses the [TextMate conventions][tm_conventions]. 82 | 83 | Maintainer 84 | ---------- 85 | 86 | [Simon Gregory][sg_blog] 87 | 88 | License 89 | ------- 90 | 91 | If not otherwise specified (see below), files in this project fall under the following license: 92 | 93 | Copyright 2009-2010 Simon Gregory 94 | 95 | Permission is hereby granted, free of charge, to any person obtaining a copy 96 | of this software and associated documentation files (the "Software"), to deal 97 | in the Software without restriction, including without limitation the rights 98 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 99 | copies of the Software, and to permit persons to whom the Software is 100 | furnished to do so, subject to the following conditions: 101 | 102 | The above copyright notice and this permission notice shall be included in 103 | all copies or substantial portions of the Software. 104 | 105 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 106 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 107 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 108 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 109 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 110 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 111 | THE SOFTWARE. 112 | 113 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. 114 | 115 | [ant_bundle_zip]: http://github.com/textmate/ant.tmbundle/zipball/master 116 | [ant_download]: http://ant.apache.org/bindownload.cgi 117 | [ant_style_guide]: http://wiki.apache.org/ant/TheElementsOfAntStyle 118 | [ant_wiki]: http://wiki.apache.org/ant/FrontPage 119 | [apache_ant]: http://ant.apache.org/ 120 | [issue_tracker]: http://github.com/textmate/ant.tmbundle/issues 121 | [repo]: http://github.com/textmate/ant.tmbundle/ 122 | [sg_blog]: http://blog.simonregory.com 123 | [tm_conventions]: http://svn.textmate.org/trunk/Conventions.txt 124 | [tm_mailing_list]: http://lists.macromates.com/listinfo/textmate 125 | [tm_env_vars]: http://manual.macromates.com/en/environment_variables 126 | 127 | -------------------------------------------------------------------------------- /Support/README.mdown: -------------------------------------------------------------------------------- 1 | TextMate Ant Bundle 2 | =================== 3 | 4 | Provides TextMate support for [Apache Ant][apache_ant], the most recent version of Ant can be [downloaded here][ant_download]. Alternatively Ant can be found on the Apple Developer Tools Install Disk, but this version may be out of date. 5 | 6 | Installation 7 | ------------ 8 | 9 | Via download: 10 | 11 | * Open this [link][ant_bundle_zip] 12 | * Unzip the download 13 | * Rename the folder to Ant.tmbundle 14 | * Double-click 15 | * TextMate handles the rest! 16 | 17 | To install via Git: 18 | 19 | cd ~/"Library/Application Support/TextMate/Bundles/" 20 | git clone git://github.com/textmate/ant.tmbundle.git "Ant.tmbundle" 21 | osascript -e 'tell app "TextMate" to reload bundles' 22 | 23 | Optionally set the TM_ANT variable to point to your installation of Ant (ie /usr/local/bin/ant) in TextMate, preferences, advanced tab, shell variables. 24 | 25 | Usage 26 | ----- 27 | 28 | As Ant files are XML TextMate won't automatically distinguish them, to achieve this you can suffix your files with `ant.xml` or include `` on the first line. 29 | 30 | Adding extra scopes to commands (Build and Build Target for example) Scope Selector field will allow access to them from files other than ant.xml. 31 | 32 | ### Autocomplete Tag (⌥⎋) 33 | 34 | Takes the current word or selection and presents a matching list of known Ant tags. The full list was created using the documentation in version 1.7.0 of Ant. 35 | 36 | ### Build ( ⌘B) 37 | Uses `TM_ANT_BUILD_FILE` if set, otherwise attempts to locate a build file and execute it. 38 | 39 | ### Build Target ( ⌥⌘B) 40 | Uses `TM_ANT_BUILD_FILE` if set, otherwise parses the current document for build targets from which you can select which one to execute. 41 | 42 | ### Run ( ⌘R) 43 | Executes the current document. 44 | 45 | ### Validate Build File (⌃⇧V) 46 | Validates the current document as valid XML. When the `TM_ANT_DTD_FILE` [environmental variable][tm_env_vars] has been set the document is also validated against the requested `ant.dtd`. 47 | 48 | ### Configuration Options 49 | 50 | These environment variables allow you to define or customise the behaviour of certain commands. For help on setting them up please see [TextMate help][tm_env_vars]. 51 | 52 | * `TM_ANT` (default: `ant`) 53 | The path to your ant executable. 54 | 55 | * `TM_ANT_BUILD_FILE` 56 | The location of the ant build file you wish to target by default. This can be either the full path, or relative to the current project. 57 | 58 | * `TM_ANT_BUILD_PARSER` 59 | This is Experimental - The location of a script to format the output of ant. Scripts are available to prettify the output for Java and Flex - in their respective bundles. If this variable is not set the output is wrapped in `pre` tags. 60 | 61 | * `TM_ANT_DTD_FILE` 62 | The location of a custom `ant.dtd` against which, in addition to verifying that the XML is well-formed, the _Validate Build File_ command can check the document conforms. It is possible to generate an `ant.dtd` by running a `` with the following contents: ``. 63 | 64 | * `TM_ANT_MANUAL_PATH` 65 | If you have installed your own version of Ant, you can set this variable to the location of its manual. For example if you installed it via MacPorts then set it to `/opt/local/share/java/apache-ant/docs/manual`. The default is to use the manual included with Apple’s developer tools with the [online version](http://ant.apache.org/manual/index.html) as a fallback. 66 | 67 | Support 68 | ------- 69 | 70 | * [Issue tracker][issue_tracker] 71 | * [Repository][repo] 72 | 73 | For general questions please use the [TextMate Users mailing list][tm_mailing_list]. 74 | Bugs and issues should be reported via the [issue tracker][issue_tracker]. 75 | Source can be viewed and forked via the [GitHub repository][repo]. 76 | 77 | Conventions 78 | ----------- 79 | 80 | The bundle uses the suggestions made by the [Ant style guide][ant_style_guide]. 81 | Bundle authorship uses the [TextMate conventions][tm_conventions]. 82 | 83 | Maintainer 84 | ---------- 85 | 86 | [Simon Gregory][sg_blog] 87 | 88 | License 89 | ------- 90 | 91 | If not otherwise specified (see below), files in this project fall under the following license: 92 | 93 | Copyright 2009-2010 Simon Gregory 94 | 95 | Permission is hereby granted, free of charge, to any person obtaining a copy 96 | of this software and associated documentation files (the "Software"), to deal 97 | in the Software without restriction, including without limitation the rights 98 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 99 | copies of the Software, and to permit persons to whom the Software is 100 | furnished to do so, subject to the following conditions: 101 | 102 | The above copyright notice and this permission notice shall be included in 103 | all copies or substantial portions of the Software. 104 | 105 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 106 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 107 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 108 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 109 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 110 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 111 | THE SOFTWARE. 112 | 113 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. 114 | 115 | [ant_bundle_zip]: http://github.com/textmate/ant.tmbundle/zipball/master 116 | [ant_download]: http://ant.apache.org/bindownload.cgi 117 | [ant_style_guide]: http://wiki.apache.org/ant/TheElementsOfAntStyle 118 | [ant_wiki]: http://wiki.apache.org/ant/FrontPage 119 | [apache_ant]: http://ant.apache.org/ 120 | [issue_tracker]: http://github.com/textmate/ant.tmbundle/issues 121 | [repo]: http://github.com/textmate/ant.tmbundle/ 122 | [sg_blog]: http://blog.simonregory.com 123 | [tm_conventions]: http://svn.textmate.org/trunk/Conventions.txt 124 | [tm_mailing_list]: http://lists.macromates.com/listinfo/textmate 125 | [tm_env_vars]: http://manual.macromates.com/en/environment_variables 126 | 127 | -------------------------------------------------------------------------------- /Syntaxes/Ant.tmLanguage: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fileTypes 6 | 7 | ant.xml 8 | build.xml 9 | 10 | firstLineMatch 11 | <\!--\s*ant\s*--> 12 | keyEquivalent 13 | ^~A 14 | name 15 | Ant 16 | patterns 17 | 18 | 19 | begin 20 | <[!%]-- 21 | captures 22 | 23 | 0 24 | 25 | name 26 | punctuation.definition.comment.xml.ant 27 | 28 | 29 | end 30 | --%?> 31 | name 32 | comment.block.xml.ant 33 | 34 | 35 | begin 36 | (<target)\b 37 | captures 38 | 39 | 1 40 | 41 | name 42 | entity.name.tag.target.xml.ant 43 | 44 | 45 | end 46 | (/?>) 47 | name 48 | meta.tag.target.xml.ant 49 | patterns 50 | 51 | 52 | include 53 | #tagStuff 54 | 55 | 56 | 57 | 58 | begin 59 | (<macrodef)\b 60 | captures 61 | 62 | 1 63 | 64 | name 65 | entity.name.tag.macrodef.xml.ant 66 | 67 | 68 | end 69 | (/?>) 70 | name 71 | meta.tag.macrodef.xml.ant 72 | patterns 73 | 74 | 75 | include 76 | #tagStuff 77 | 78 | 79 | 80 | 81 | begin 82 | (</?)(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+) 83 | captures 84 | 85 | 1 86 | 87 | name 88 | punctuation.definition.tag.xml.ant 89 | 90 | 2 91 | 92 | name 93 | entity.name.tag.namespace.xml.ant 94 | 95 | 3 96 | 97 | name 98 | entity.name.tag.xml.ant 99 | 100 | 4 101 | 102 | name 103 | punctuation.separator.namespace.xml.ant 104 | 105 | 5 106 | 107 | name 108 | entity.name.tag.localname.xml.ant 109 | 110 | 111 | end 112 | (/?>) 113 | name 114 | meta.tag.xml.ant 115 | patterns 116 | 117 | 118 | include 119 | #tagStuff 120 | 121 | 122 | 123 | 124 | include 125 | text.xml 126 | 127 | 128 | include 129 | #javaProperties 130 | 131 | 132 | include 133 | #javaAttributes 134 | 135 | 136 | repository 137 | 138 | doublequotedString 139 | 140 | begin 141 | " 142 | beginCaptures 143 | 144 | 0 145 | 146 | name 147 | punctuation.definition.string.begin.xml.ant 148 | 149 | 150 | end 151 | " 152 | endCaptures 153 | 154 | 0 155 | 156 | name 157 | punctuation.definition.string.end.xml.ant 158 | 159 | 160 | name 161 | string.quoted.double.xml.ant 162 | patterns 163 | 164 | 165 | include 166 | #javaAttributes 167 | 168 | 169 | include 170 | #javaProperties 171 | 172 | 173 | 174 | javaAttributes 175 | 176 | begin 177 | @\{ 178 | beginCaptures 179 | 180 | 0 181 | 182 | name 183 | punctuation.section.embedded.begin.ant 184 | 185 | 186 | contentName 187 | source.java 188 | end 189 | (\}) 190 | endCaptures 191 | 192 | 0 193 | 194 | name 195 | punctuation.section.embedded.end.ant 196 | 197 | 1 198 | 199 | name 200 | source.java 201 | 202 | 203 | name 204 | meta.embedded.line.java 205 | 206 | javaProperties 207 | 208 | begin 209 | \$\{ 210 | beginCaptures 211 | 212 | 0 213 | 214 | name 215 | punctuation.section.embedded.begin.ant 216 | 217 | 218 | contentName 219 | source.java-props 220 | end 221 | (\}) 222 | endCaptures 223 | 224 | 0 225 | 226 | name 227 | punctuation.section.embedded.end.ant 228 | 229 | 1 230 | 231 | name 232 | source.java-props 233 | 234 | 235 | name 236 | meta.embedded.line.java-props 237 | 238 | singlequotedString 239 | 240 | begin 241 | ' 242 | beginCaptures 243 | 244 | 0 245 | 246 | name 247 | punctuation.definition.string.begin.xml.ant 248 | 249 | 250 | end 251 | ' 252 | endCaptures 253 | 254 | 0 255 | 256 | name 257 | punctuation.definition.string.end.xml.ant 258 | 259 | 260 | name 261 | string.quoted.single.xml.ant 262 | patterns 263 | 264 | 265 | include 266 | #javaAttributes 267 | 268 | 269 | include 270 | #javaProperties 271 | 272 | 273 | 274 | tagStuff 275 | 276 | patterns 277 | 278 | 279 | captures 280 | 281 | 1 282 | 283 | name 284 | entity.other.attribute-name.namespace.xml.ant 285 | 286 | 2 287 | 288 | name 289 | entity.other.attribute-name.xml.ant 290 | 291 | 3 292 | 293 | name 294 | punctuation.separator.namespace.xml.ant 295 | 296 | 4 297 | 298 | name 299 | entity.other.attribute-name.localname.xml.ant 300 | 301 | 302 | match 303 | (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)= 304 | 305 | 306 | include 307 | #doublequotedString 308 | 309 | 310 | include 311 | #singlequotedString 312 | 313 | 314 | 315 | 316 | scopeName 317 | text.xml.ant 318 | uuid 319 | E1B78601-E584-4A7F-B011-A61710BFE035 320 | 321 | 322 | -------------------------------------------------------------------------------- /Support/data/ant_completions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |