diff --git a/Commands/Compile & Run (with args).tmCommand b/Commands/Compile & Run (with args).tmCommand
index d56017d..a1457d1 100644
--- a/Commands/Compile & Run (with args).tmCommand
+++ b/Commands/Compile & Run (with args).tmCommand
@@ -5,18 +5,53 @@
beforeRunningCommand
saveActiveFile
command
- TM_JAVAMATE_GET_ARGS=1 javamate_bootstrap.sh
+ #!/bin/sh
+TM_JAVAMATE_GET_ARGS=1 "$TM_BUNDLE_SUPPORT/bin/javamate.rb"
+
input
document
+ inputFormat
+ text
keyEquivalent
~@r
name
Compile & Run (with args)
- output
- showAsHTML
+ outputCaret
+ afterOutput
+ outputFormat
+ html
+ outputLocation
+ newWindow
+ requiredCommands
+
+
+ command
+ java
+ locations
+
+ /usr/bin/java
+
+ variable
+ TM_JAVA
+
+
+ command
+ javac
+ locations
+
+ /usr/bin/javac
+
+ variable
+ TM_JAVAC
+
+
scope
source.java
+ semanticClass
+ process.build-and-run.java
uuid
4BC99514-9BF7-4F4F-BD84-7AD07EB81AC3
+ version
+ 2
diff --git a/Commands/Compile & Run.tmCommand b/Commands/Compile & Run.tmCommand
index d65e0a5..1c73468 100644
--- a/Commands/Compile & Run.tmCommand
+++ b/Commands/Compile & Run.tmCommand
@@ -5,18 +5,53 @@
beforeRunningCommand
saveActiveFile
command
- javamate_bootstrap.sh
+ #!/bin/sh
+"$TM_BUNDLE_SUPPORT/bin/javamate.rb"
+
input
document
+ inputFormat
+ text
keyEquivalent
@r
name
Compile & Run
- output
- showAsHTML
+ outputCaret
+ afterOutput
+ outputFormat
+ html
+ outputLocation
+ newWindow
+ requiredCommands
+
+
+ command
+ java
+ locations
+
+ /usr/bin/java
+
+ variable
+ TM_JAVA
+
+
+ command
+ javac
+ locations
+
+ /usr/bin/javac
+
+ variable
+ TM_JAVAC
+
+
scope
source.java
+ semanticClass
+ process.build-and-run.java
uuid
752A2A98-EB02-4A4D-A3D4-522485DBF491
+ version
+ 2
diff --git a/Commands/Copy Fully Qualified Class Name.tmCommand b/Commands/Copy Fully Qualified Class Name.tmCommand
index 7d70418..10ffc4e 100644
--- a/Commands/Copy Fully Qualified Class Name.tmCommand
+++ b/Commands/Copy Fully Qualified Class Name.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- #!/usr/bin/env ruby -w
+ #!/usr/bin/env ruby18 -w
# Copies the fully qualified class name to the paste/clip board.
# Used to add the class as an import.
#
@@ -14,7 +14,7 @@ package, class_name = nil, nil
STDIN.each do |line|
if line =~ /\s*package ([^;]+);/
package = $1
- elsif !(line =~ /^\s*\/\*/) && line =~ /\b(?:class|interface)\b ([A-Z][^ ]+) /
+ elsif !(line =~ /^\s*\/\*/) && line =~ /\b(?:class|interface|enum)\b ([A-Z][^ ]+) /
class_name = $1
end
diff --git a/Commands/Create Package Declaration.tmCommand b/Commands/Create Package Declaration.tmCommand
index dc9a7b6..80b3167 100644
--- a/Commands/Create Package Declaration.tmCommand
+++ b/Commands/Create Package Declaration.tmCommand
@@ -5,18 +5,20 @@
beforeRunningCommand
nop
command
- #!/usr/bin/env ruby -w
+ #!/usr/bin/env ruby18 -w
# Generates a package statement based on conventions for the name of the source directory.
# If the root source folder name isn't matched either log a bug to get it added to the
# default list or define an environment variable named TM_JAVA_SOURCE_FOLDER_REGEX with
# a value of the regex to use to match folder names.
#
+require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
+
package = []
-package_regex = /$(src|tst)$/ # common source folder names
+package_regex = /^(src|tst)$/ # common source folder names
package_regex = /^(#{ENV['TM_JAVA_SOURCE_FOLDER_REGEX']})$/ if ENV['TM_JAVA_SOURCE_FOLDER_REGEX']
-
-Dir.getwd.split(File::SEPARATOR).reverse.each do |folder|
+dir = ENV['TM_DIRECTORY'] || Dir.getwd
+dir.split(File::SEPARATOR).reverse.each do |folder|
if folder !~ package_regex
package << folder
else
@@ -29,15 +31,23 @@ if !package.empty?
end
input
none
+ inputFormat
+ text
name
Create Package Declaration
- output
- afterSelectedText
+ outputCaret
+ afterOutput
+ outputFormat
+ text
+ outputLocation
+ atCaret
scope
source.java
tabTrigger
pa
uuid
CBFE854E-917E-4ED5-BDBC-950C6B25B816
+ version
+ 2
diff --git a/Commands/Documentation For Word.plist b/Commands/Documentation For Word.plist
index 3058e1e..22eb65d 100644
--- a/Commands/Documentation For Word.plist
+++ b/Commands/Documentation For Word.plist
@@ -1,11 +1,14 @@
-
+
beforeRunningCommand
nop
command
- echo "<!-- gotAPI.com search widget v2 begin -->
+ #!/usr/bin/env bash
+[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
+
+echo "<!-- gotAPI.com search widget v2 begin -->
<body onload=\"init();\">
<DIV>
<STYLE>
@@ -37,15 +40,25 @@ then
fi
input
none
+ inputFormat
+ text
keyEquivalent
^h
name
Documentation For Word
- output
- showAsHTML
+ outputCaret
+ afterOutput
+ outputFormat
+ html
+ outputLocation
+ newWindow
scope
source.java
+ semanticClass
+ lookup.define.java
uuid
CE007C8C-9A0B-43B8-AEAF-45613BCD3DF7
+ version
+ 2
diff --git a/Commands/Go To Stackframe Source.tmCommand b/Commands/Go To Stackframe Source.tmCommand
index 1279167..f6e7ce2 100644
--- a/Commands/Go To Stackframe Source.tmCommand
+++ b/Commands/Go To Stackframe Source.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
nop
command
- #!/usr/bin/env ruby
+ #!/usr/bin/env ruby18
require 'find'
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
@@ -47,7 +47,7 @@ end
keyEquivalent
^~@
name
- Go to stackframe source
+ Go to Stackframe Source
output
showAsTooltip
uuid
diff --git a/Commands/Organize Imports.tmCommand b/Commands/Organize Imports.tmCommand
index 83a238b..e07447f 100644
--- a/Commands/Organize Imports.tmCommand
+++ b/Commands/Organize Imports.tmCommand
@@ -5,7 +5,7 @@
beforeRunningCommand
saveActiveFile
command
- #!/usr/bin/env ruby -w
+ #!/usr/bin/env ruby18 -w
#
# WARNING: This script modifies the source of your file!!! No one but
# yourself is responsible for it losing code.
@@ -21,8 +21,6 @@
#
# TODO add proper support for /* */ comments. Since these can be part of the line we can't ignore these lines
-require 'pp'
-
before, imports, after, all = [], [], [], []
class_defined = false
@@ -30,7 +28,7 @@ class_defined = false
STDIN.each do |line|
all << line
- if line =~ / (class|interface) / && !(line =~ %r{^\s*(//|\*)})
+ if line =~ / (class|(@)?interface) / && !(line =~ %r{^\s*(//|\*)})
class_defined = true
after << line
@@ -72,10 +70,10 @@ after.each do |line|
end
# Based upon the classes found in the file determine the used imports
-other_imports, static_imports, array = [], [], nil
+non_static_imports, static_imports = [], []
classes.each_pair do |name, class_info|
if class_info[:used]
- other_imports << "import #{class_info[:package]}.#{name};"
+ non_static_imports << "import #{class_info[:package]}.#{name};"
end
end
@@ -84,8 +82,7 @@ imports.each do |import|
if import =~ /^import static/
static_imports << import
elsif import =~ /\.\*\s*;/
- array = (import =~ / java[x]?\./) ? java_imports : other_imports
- array << import
+ non_static_imports << import
end
end
@@ -94,7 +91,7 @@ last_line_was_empty, import_lines = before.last.strip.empty?, []
unless static_imports.empty?
import_lines << '' unless last_line_was_empty
- import_lines.push(*static_imports)
+ import_lines.push(*static_imports.uniq)
last_line_was_empty = false
end
@@ -107,7 +104,7 @@ sort_order = [
[/^import java\./, 0],
]
-sorted = other_imports.sort do |a, b|
+sorted = non_static_imports.uniq.sort do |a, b|
a_group, b_group = sort_order[0][1], sort_order[0][1]
sort_order.each do |x|
@@ -148,7 +145,7 @@ end
input
selection
keyEquivalent
- @O
+ ^#
name
Organize Imports
output
diff --git a/Preferences/Folding - JSP.tmPreferences b/Preferences/Folding - JSP.tmPreferences
new file mode 100644
index 0000000..9e73e3a
--- /dev/null
+++ b/Preferences/Folding - JSP.tmPreferences
@@ -0,0 +1,19 @@
+
+
+
+
+ name
+ Folding (JSP)
+ scope
+ text.html.jsp
+ settings
+
+ foldingStartMarker
+ /\*\*|\{\s*$
+ foldingStopMarker
+ \*\*/|^\s*\}
+
+ uuid
+ 2C5379EE-F0E8-410F-8E5F-362D5A85FDEE
+
+
diff --git a/Preferences/Folding - JUnit.tmPreferences b/Preferences/Folding - JUnit.tmPreferences
new file mode 100644
index 0000000..3719582
--- /dev/null
+++ b/Preferences/Folding - JUnit.tmPreferences
@@ -0,0 +1,19 @@
+
+
+
+
+ name
+ Folding (JUnit)
+ scope
+ text.junit-test-report
+ settings
+
+ foldingStartMarker
+ (\{\s*(//.*)?$|^\s*// \{\{\{)
+ foldingStopMarker
+ ^\s*(\}|// \}\}\}$)
+
+ uuid
+ D542DC17-5A9E-4DDF-B825-EC5C04F847B4
+
+
diff --git a/Preferences/Folding - Java.tmPreferences b/Preferences/Folding - Java.tmPreferences
new file mode 100644
index 0000000..11542a5
--- /dev/null
+++ b/Preferences/Folding - Java.tmPreferences
@@ -0,0 +1,19 @@
+
+
+
+
+ name
+ Folding (Java)
+ scope
+ source.java
+ settings
+
+ foldingStartMarker
+ (\{\s*(//.*)?$|^\s*// \{\{\{)
+ foldingStopMarker
+ ^\s*(\}|// \}\}\}$)
+
+ uuid
+ 6DF65B4B-D1A2-4B9C-9821-8B81EC3DA8FA
+
+
diff --git a/Preferences/Indentation Rules - Java Properties.tmPreferences b/Preferences/Indentation Rules - Java Properties.tmPreferences
new file mode 100644
index 0000000..b665680
--- /dev/null
+++ b/Preferences/Indentation Rules - Java Properties.tmPreferences
@@ -0,0 +1,17 @@
+
+
+
+
+ name
+ Indentation Rules - Properties File
+ scope
+ source.java-properties
+ settings
+
+ disableIndentCorrections
+
+
+ uuid
+ BB1257BA-0871-4B9F-B637-240F884E81E5
+
+
diff --git a/Preferences/Indentation Rules.tmPreferences b/Preferences/Indentation Rules.tmPreferences
index 05eb196..6f590ed 100644
--- a/Preferences/Indentation Rules.tmPreferences
+++ b/Preferences/Indentation Rules.tmPreferences
@@ -1,5 +1,5 @@
-
+
name
@@ -9,11 +9,11 @@
settings
decreaseIndentPattern
- ^(.*\*/)?\s*\}([^}{"']*\{)?[;\s]*(//.*|/\*.*\*/\s*)?$|^\s*(public|private|protected):\s*$
+ ^(.*\*/)?\s*\}|^\s*(public|private|protected):\s*$
increaseIndentPattern
- ^.*\{[^}"']*$|^\s*(public|private|protected):\s*$
+ ^.*\{(\}|[^}"']*)$|^\s*(public|private|protected):\s*$
indentNextLinePattern
- ^(?!(.*[};:])?\s*(//|/\*.*\*/\s*$)).*[^\s;:{}]\s*$
+ ^(?!\s*@\w+(\(|\s*$)|(.*[};:])?\s*(//|/\*.*\*/\s*$)).*[^\s;:{}]\s*$
uuid
20E93106-18CF-4BA3-9DA3-8F0C955DB774
diff --git a/Preferences/Java Properties Comments.tmPreferences b/Preferences/Java Properties Comments.tmPreferences
index 5d69ce7..43ac7d1 100644
--- a/Preferences/Java Properties Comments.tmPreferences
+++ b/Preferences/Java Properties Comments.tmPreferences
@@ -3,9 +3,9 @@
name
- Java Properties Comments
+ Comments: Properties File
scope
- source.java-props
+ source.java-properties
settings
shellVariables
diff --git a/README.mdown b/README.mdown
new file mode 100644
index 0000000..c0577f3
--- /dev/null
+++ b/README.mdown
@@ -0,0 +1,29 @@
+# Installation
+
+You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.
+
+# Settings
+
+If you have Java installed and TextMate does not find your JDK and shows the error message `No Java runtime present, requesting install`, you have to tell TextMate where to find the `java` and `javac` executables. Go to the *Preferences*, open the *Variables* section and add two entries using the `+` button: `TM_JAVA`, which points to your `java` executable and `TM_JAVAC`, which points to your `javac` executable. Example:
+
+| | Variable Name | Value |
+| - | -------------- | ----- |
+| :white_check_mark: | TM_JAVA | /Users/*«yourname»*/jdk1.8.0/bin/java |
+| :white_check_mark: | TM_JAVAC | /Users/*«yourname»*/jdk1.8.0/bin/javac |
+
+# General
+
+* [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_
+* [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_
+* [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_
+
+# License
+
+If not otherwise specified (see below), files in this repository fall under the following license:
+
+ Permission to copy, use, modify, sell and distribute this
+ software is granted. This software is provided "as is" without
+ express or implied warranty, and with no claim as to its
+ suitability for any purpose.
+
+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. For example “tidy” is accompanied by “tidy-license.txt”.
\ No newline at end of file
diff --git a/Snippets/constant string.tmSnippet b/Snippets/constant string.tmSnippet
index 4cd730d..0df149c 100644
--- a/Snippets/constant string.tmSnippet
+++ b/Snippets/constant string.tmSnippet
@@ -3,7 +3,7 @@
content
- static public final String ${1:var} = "$2";$0
+ public static final String ${1:var} = "$2";$0
name
constant string
scope
diff --git a/Snippets/constant.tmSnippet b/Snippets/constant.tmSnippet
index 4f963c3..4da2872 100644
--- a/Snippets/constant.tmSnippet
+++ b/Snippets/constant.tmSnippet
@@ -3,7 +3,7 @@
content
- static public final ${1:String} ${2:var} = $3;$0
+ public static final ${1:String} ${2:var} = $3;$0
name
constant
scope
diff --git a/Support/bin/java_compile_and_run.sh b/Support/bin/java_compile_and_run.sh
index 88dbf47..5eac25c 100755
--- a/Support/bin/java_compile_and_run.sh
+++ b/Support/bin/java_compile_and_run.sh
@@ -1,5 +1,8 @@
#!/usr/bin/env bash
+: ${TM_JAVA:=java}
+: ${TM_JAVAC:=javac}
+
if [ "$1" = "--version" ]
then
"$TM_JAVA" -version 2>&1 | head -1
@@ -33,5 +36,5 @@ then
CLASS="$TM_JAVA_PACKAGE.$CLASS"
fi
-CLASSPATH="$output:$CLASSPATH" "$TM_JAVA" -Dfile.encoding=utf-8 "$CLASS" $@;
+CLASSPATH="$output:$CLASSPATH" "$TM_JAVA" -Dfile.encoding=utf-8 "$CLASS" "$@";
exit $?;
diff --git a/Support/bin/javamate.rb b/Support/bin/javamate.rb
index dff0fe2..740079c 100755
--- a/Support/bin/javamate.rb
+++ b/Support/bin/javamate.rb
@@ -1,4 +1,4 @@
-#!/usr/bin/env ruby
+#!/usr/bin/env ruby18
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/executor"
require ENV["TM_SUPPORT_PATH"] + "/lib/tm/save_current_document"
@@ -17,10 +17,9 @@ def self.set(key,value)
end
end
-TextMate.save_current_document
TextMate::Executor.make_project_master_current_document
-cmd = ["java_compile_and_run.sh"]
+cmd = ["#{ENV['TM_BUNDLE_SUPPORT']}/bin/java_compile_and_run.sh"]
cmd << ENV['TM_FILEPATH']
script_args = []
if ENV.include? 'TM_JAVAMATE_GET_ARGS'
@@ -44,19 +43,4 @@ def self.set(key,value)
#cmd << package if package
ENV["TM_JAVA_PACKAGE"] = package
-TextMate::Executor.run(cmd, :version_args => ["--version"], :script_args => script_args) do |line, type|
- case type
- when :err
- line.chomp!
- if line =~ /(.+\.java):(\d+):(.*)$/
- path = Pathname.new($1)
- line_no = $2
- error = $3
- abs_path = Pathname.new(path.realpath)
- line = "#{htmlize((path.to_s =~ /^\.\//) ? path : abs_path.relative_path_from(cwd))}:#{line_no}:#{htmlize(error)}";
- else
- line = htmlize(line)
- end
- line = "#{line}
"
- end
-end
\ No newline at end of file
+TextMate::Executor.run(cmd, :version_args => ["--version"], :script_args => script_args)
diff --git a/Support/bin/javamate_bootstrap.sh b/Support/bin/javamate_bootstrap.sh
deleted file mode 100755
index ef1a41e..0000000
--- a/Support/bin/javamate_bootstrap.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-source "$TM_SUPPORT_PATH/lib/bash_init.sh"
-
-export TM_JAVA=${TM_JAVA:-java}
-export TM_JAVAC=${TM_JAVAC:-javac}
-
-require_cmd "$TM_JAVA" "If you have installed java, then you need to either update your PATH or set the TM_JAVA shell variable (e.g. in Preferences / Advanced)"
-
-require_cmd "$TM_JAVAC" "If you have installed javac, then you need to either update your PATH or set the TM_JAVAC shell variable (e.g. in Preferences / Advanced)"
-
-javamate.rb
\ No newline at end of file
diff --git a/Syntaxes/JUnit Test Report.tmLanguage b/Syntaxes/JUnit Test Report.tmLanguage
index 913e556..132a52e 100644
--- a/Syntaxes/JUnit Test Report.tmLanguage
+++ b/Syntaxes/JUnit Test Report.tmLanguage
@@ -4,10 +4,6 @@
firstLineMatch
^Testsuite:
- foldingStartMarker
- Testcase:
- foldingStopMarker
- (?=Testcase:)
keyEquivalent
^~J
name
diff --git a/Syntaxes/Java Server Pages (JSP).tmLanguage b/Syntaxes/Java Server Pages (JSP).tmLanguage
index b829659..19c41b1 100644
--- a/Syntaxes/Java Server Pages (JSP).tmLanguage
+++ b/Syntaxes/Java Server Pages (JSP).tmLanguage
@@ -5,17 +5,89 @@
fileTypes
jsp
+ jspf
+ tag
- foldingStartMarker
- /\*\*|\{\s*$
- foldingStopMarker
- \*\*/|^\s*\}
+ injections
+
+ text.html.jsp - (meta.embedded.block.jsp | meta.embedded.line.jsp | meta.tag | comment), meta.tag string.quoted
+
+ patterns
+
+
+ include
+ #comment
+
+
+ include
+ #declaration
+
+
+ include
+ #expression
+
+
+ include
+ #el_expression
+
+
+ include
+ #tags
+
+
+ begin
+ (^\s*)(?=<%(?=\s))
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.whitespace.embedded.leading.erb
+
+
+ end
+ (?!\G)(\s*$\n)?
+ endCaptures
+
+ 0
+
+ name
+ punctuation.whitespace.embedded.trailing.erb
+
+
+ patterns
+
+
+ include
+ #scriptlet
+
+
+
+
+ include
+ #scriptlet
+
+
+
+
keyEquivalent
^~J
name
- Java Server Page (JSP)
+ JavaServer Pages
patterns
+
+ include
+ #xml_tags
+
+
+ include
+ text.html.basic
+
+
+ repository
+
+ comment
begin
<%--
@@ -32,222 +104,1808 @@
name
comment.block.jsp
+ declaration
begin
- <%@
- captures
+ <%!
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.embedded.begin.jsp
+
+
+ contentName
+ source.java
+ end
+ (%)>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.section.embedded.end.jsp
+
+ 1
+
+ name
+ source.java
+
+
+ name
+ meta.embedded.line.declaration.jsp
+ patterns
+
+
+ include
+ source.java
+
+
+
+ el_expression
+
+ begin
+ \$\{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.embedded.begin.jsp
+
+
+ contentName
+ source.java
+ end
+ (\})
+ endCaptures
+
+ 0
+
+ name
+ punctuation.section.embedded.end.jsp
+
+ 1
+
+ name
+ source.java
+
+
+ name
+ meta.embedded.line.el_expression.jsp
+ patterns
+
+
+ include
+ source.java
+
+
+
+ expression
+
+ begin
+ <%=
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.embedded.begin.jsp
+
+
+ contentName
+ source.java
+ end
+ (%)>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.section.embedded.end.jsp
+
+ 1
+
+ name
+ source.java
+
+
+ name
+ meta.embedded.line.expression.jsp
+ patterns
+
+
+ include
+ source.java
+
+
+
+ scriptlet
+
+ begin
+ <%
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.embedded.begin.jsp
+
+
+ contentName
+ source.java
+ end
+ (%)>
+ endCaptures
0
name
- punctuation.section.directive.jsp
+ punctuation.section.embedded.end.jsp
+
+ 1
+
+ name
+ source.java
+
+
+ name
+ meta.embedded.block.scriptlet.jsp
+ patterns
+
+
+ match
+ \{
+ name
+ punctuation.section.scope.begin.java
+
+
+ match
+ \}
+ name
+ punctuation.section.scope.end.java
+
+
+ include
+ source.java
+
+
+
+ tags
+
+ begin
+ (<%@)\s*(?=(attribute|include|page|tag|taglib|variable)\s)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
end
%>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
name
- meta.directive.jsp
+ meta.tag.template.include.jsp
patterns
begin
- \w+
- beginCaptures
+ \G(attribute)(?=\s)
+ captures
- 0
+ 1
+
+ name
+ keyword.control.attribute.jsp
+
+
+ end
+ (?=%>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name|required|fragment|rtexprvalue|type|description)(=)((")[^"]*("))
+
+
+
+
+ begin
+ \G(include)(?=\s)
+ captures
+
+ 1
+
+ name
+ keyword.control.include.jsp
+
+
+ end
+ (?=%>)
+ patterns
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (file)(=)((")[^"]*("))
+
+
+
+
+ begin
+ \G(page)(?=\s)
+ captures
+
+ 1
+
+ name
+ keyword.control.page.jsp
+
+
+ end
+ (?=%>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (language|extends|import|session|buffer|autoFlush|isThreadSafe|info|errorPage|isErrorPage|contentType|pageEncoding|isElIgnored)(=)((")[^"]*("))
+
+
+
+
+ begin
+ \G(tag)(?=\s)
+ captures
+
+ 1
+
+ name
+ keyword.control.tag.jsp
+
+
+ end
+ (?=%>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (display-name|body-content|dynamic-attributes|small-icon|large-icon|description|example|language|import|pageEncoding|isELIgnored)(=)((")[^"]*("))
+
+
+
+
+ begin
+ \G(taglib)(?=\s)
+ captures
+
+ 1
+
+ name
+ keyword.control.taglib.jsp
+
+
+ end
+ (?=%>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (uri|tagdir|prefix)(=)((")[^"]*("))
+
+
+
+
+ begin
+ \G(variable)(?=\s)
+ captures
+
+ 1
+
+ name
+ keyword.control.variable.jsp
+
+
+ end
+ (?=%>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name-given|alias|variable-class|declare|scope|description)(=)((")[^"]*("))
+
+
+
+
+
+ xml_tags
+
+ patterns
+
+
+ begin
+ (^\s*)(?=<jsp:(declaration|expression|scriptlet)>)
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.whitespace.embedded.leading.erb
+
+
+ end
+ (?!\G)(\s*$\n)?
+ endCaptures
+
+ 0
+
+ name
+ punctuation.whitespace.embedded.trailing.erb
+
+
+ patterns
+
+
+ include
+ #embedded
+
+
+
+
+ include
+ #embedded
+
+
+ include
+ #directive
+
+
+ include
+ #actions
+
+
+ repository
+
+ actions
+
+ patterns
+
+
+ begin
+ (</?)(jsp:attribute)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.attribute.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name|trim)(=)((")[^"]*("))
+
+
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+ 3
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ match
+ (</?)(jsp:body)(>)
+ name
+ meta.tag.template.body.jsp
+
+
+ begin
+ (</?)(jsp:element)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.element.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (<)(jsp:doBody)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ />
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.dobody.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (var|varReader|scope)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (</?)(jsp:forward)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.forward.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (page)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (<)(jsp:param)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ />
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.param.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name|value)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (<)(jsp:getProperty)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ />
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.getproperty.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name|property)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (</?)(jsp:include)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ /?>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.include.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (page|flush)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (<)(jsp:invoke)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ />
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.invoke.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (fragment|var|varReader|scope)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (<)(jsp:output)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ />
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.tag.template.output.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (omit-xml-declaration|doctype-root-element|doctype-system|doctype-public)(=)((")[^"]*("))
+
+
+
+
+ begin
+ (</?)(jsp:plugin)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
name
- keyword.other.directive.jsp
+ meta.tag.template.plugin.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (type|code|codebase|name|archive|align|height|hspace|jreversion|nspluginurl|iepluginurl)(=)((")[^"]*("))
+
+
-
- end
- (?=%>)
- patterns
-
+ captures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+ 3
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ end
+ >
match
- \w+
+ (</?)(jsp:fallback)(>)
name
- constant.other.directive.attribute.jsp
+ meta.tag.template.fallback.jsp
- match
- =
+ begin
+ (</?)(jsp:root)\b
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ >
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
name
- keyword.operator.assignment.jsp
+ meta.tag.template.root.jsp
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (xmlns|version|xmlns:taglibPrefix)(=)((")[^"]*("))
+
+
begin
- "
+ (<)(jsp:setProperty)\b
beginCaptures
- 0
+ 1
name
- punctuation.definition.string.begin.jsp
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
end
- "
+ />
endCaptures
0
name
- punctuation.definition.string.end.jsp
+ punctuation.definition.tag.end.jsp
name
- string.quoted.double.jsp
+ meta.tag.template.setproperty.jsp
patterns
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
match
- \\.
- name
- constant.character.escape.jsp
+ (name|property|value)(=)((")[^"]*("))
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+ 3
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ end
+ >
+ match
+ (</?)(jsp:text)(>)
+ name
+ meta.tag.template.text.jsp
+
begin
- '
+ (</?)(jsp:useBean)\b
beginCaptures
- 0
+ 1
name
- punctuation.definition.string.begin.jsp
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
end
- '
+ /?>
endCaptures
0
name
- punctuation.definition.string.end.jsp
+ punctuation.definition.tag.end.jsp
name
- string.quoted.single.jsp
+ meta.tag.template.usebean.jsp
patterns
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
match
- \\.
- name
- constant.character.escape.jsp
+ (id|scope|class|type|beanName)(=)((")[^"]*("))
-
-
-
- begin
- (<%[!=]?)|(<jsp:scriptlet>|<jsp:expression>|<jsp:declaration>)
- beginCaptures
-
- 1
-
- name
- punctuation.section.embedded.jsp
-
- 2
-
- name
- meta.tag.block.jsp
-
-
- end
- (?<=</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>|%>)
- patterns
-
+ directive
- captures
+ begin
+ (<)(jsp:directive\.(?=(attribute|include|page|tag|variable)\s))
+ beginCaptures
1
name
- meta.tag.block.jsp
+ punctuation.definition.tag.begin.jsp
2
name
- punctuation.section.embedded.jsp
+ entity.name.tag.jsp
- match
- (</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>)|(%>)
-
-
- begin
- (?<!\n)(?!</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>|%>|\{|\})
end
- (?=</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>|%>|\{|\})|\n
+ />
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
name
- source.java.embedded.html
+ meta.tag.template.$3.jsp
patterns
- include
- source.java
+ begin
+ \G(attribute)(?=\s)
+ captures
+
+ 1
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ (?=/>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name|required|fragment|rtexprvalue|type|description)(=)((")[^"]*("))
+
+
-
-
-
- begin
- {
- end
- }
- patterns
-
begin
- (</jsp:scriptlet>|</jsp:expression>|</jsp:declaration>)|(%>)
+ \G(include)(?=\s)
captures
1
name
- meta.tag.block.jsp
+ entity.name.tag.jsp
- 2
+
+ end
+ (?=/>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (file)(=)((")[^"]*("))
+
+
+
+
+ begin
+ \G(page)(?=\s)
+ captures
+
+ 1
name
- punctuation.section.embedded.jsp
+ entity.name.tag.jsp
end
- (<jsp:scriptlet>|<jsp:expression>|<jsp:declaration>)|(<%[!=]?)
+ (?=/>)
patterns
- include
- text.html.jsp
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (language|extends|import|session|buffer|autoFlush|isThreadSafe|info|errorPage|isErrorPage|contentType|pageEncoding|isElIgnored)(=)((")[^"]*("))
- include
- source.java
+ begin
+ \G(tag)(?=\s)
+ captures
+
+ 1
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ (?=/>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (display-name|body-content|dynamic-attributes|small-icon|large-icon|description|example|language|import|pageEncoding|isELIgnored)(=)((")[^"]*("))
+
+
+
+
+ begin
+ \G(variable)(?=\s)
+ captures
+
+ 1
+
+ name
+ entity.name.tag.jsp
+
+
+ end
+ (?=/>)
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.jsp
+
+ 2
+
+ name
+ punctuation.separator.key-value.jsp
+
+ 3
+
+ name
+ string.quoted.double.jsp
+
+ 4
+
+ name
+ punctuation.definition.string.begin.jsp
+
+ 5
+
+ name
+ punctuation.definition.string.end.jsp
+
+
+ match
+ (name-given|alias|variable-class|declare|scope|description)(=)((")[^"]*("))
+
+
+ embedded
- include
+ begin
+ (<)(jsp:(declaration|expression|scriptlet))(>)
+ beginCaptures
+
+ 0
+
+ name
+ meta.tag.template.$3.jsp
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ entity.name.tag.jsp
+
+ 4
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ contentName
source.java
+ end
+ ((<)/)(jsp:\3)(>)
+ endCaptures
+
+ 0
+
+ name
+ meta.tag.template.$4.jsp
+
+ 1
+
+ name
+ punctuation.definition.tag.begin.jsp
+
+ 2
+
+ name
+ source.java
+
+ 3
+
+ name
+ entity.name.tag.jsp
+
+ 4
+
+ name
+ punctuation.definition.tag.end.jsp
+
+
+ name
+ meta.embedded.block.jsp
+ patterns
+
+
+ include
+ source.java
+
+
-
-
-
- include
- text.html.basic
+
-
+
scopeName
text.html.jsp
uuid
diff --git a/Syntaxes/Java.plist b/Syntaxes/Java.plist
index e89dfa4..76d02ef 100644
--- a/Syntaxes/Java.plist
+++ b/Syntaxes/Java.plist
@@ -7,10 +7,6 @@
java
bsh
- foldingStartMarker
- (\{\s*(//.*)?$|^\s*// \{\{\{)
- foldingStopMarker
- ^\s*(\}|// \}\}\}$)
keyEquivalent
^~J
name
@@ -42,13 +38,23 @@
meta.package.java
- captures
+ begin
+ (import static)\b\s*
+ beginCaptures
1
name
keyword.other.import.static.java
+
+ captures
+
+ 1
+
+ name
+ keyword.other.import.java
+
2
name
@@ -60,12 +66,47 @@
punctuation.terminator.java
- match
- ^\s*(import static)\b(?:\s*([^ ;$]+)\s*(;)?)?
+ contentName
+ storage.modifier.import.java
+ end
+ \s*(?:$|(;))
+ endCaptures
+
+ 1
+
+ name
+ punctuation.terminator.java
+
+
name
- meta.import.static.java
+ meta.import.java
+ patterns
+
+
+ match
+ \.
+ name
+ punctuation.separator.java
+
+
+ match
+ \s
+ name
+ invalid.illegal.character_not_allowed_here.java
+
+
+ begin
+ (import)\b\s*
+ beginCaptures
+
+ 1
+
+ name
+ keyword.other.import.java
+
+
captures
1
@@ -84,10 +125,35 @@
punctuation.terminator.java
- match
- ^\s*(import)\b(?:\s*([^ ;$]+)\s*(;)?)?
+ contentName
+ storage.modifier.import.java
+ end
+ \s*(?:$|(;))
+ endCaptures
+
+ 1
+
+ name
+ punctuation.terminator.java
+
+
name
meta.import.java
+ patterns
+
+
+ match
+ \.
+ name
+ punctuation.separator.java
+
+
+ match
+ \s
+ name
+ invalid.illegal.character_not_allowed_here.java
+
+
include
@@ -173,7 +239,7 @@
match
,
name
- punctuation.seperator.property.java
+ punctuation.separator.property.java
@@ -213,7 +279,15 @@
end
- }|(?=\s*(?:,|;|\)))
+ (})|(?=\s*(?:,|;|\)))
+ endCaptures
+
+ 1
+
+ name
+ punctuation.section.block.end.java
+
+
patterns
@@ -232,6 +306,14 @@
begin
{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.block.begin.java
+
+
end
(?=})
patterns
@@ -281,8 +363,24 @@
begin
{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.inner-class.begin.java
+
+
end
}
+ endCaptures
+
+ 0
+
+ name
+ punctuation.section.inner-class.end.java
+
+
name
meta.inner-class.java
patterns
@@ -432,6 +530,14 @@
begin
{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.class.begin.java
+
+
end
(?=})
name
@@ -499,8 +605,24 @@
begin
{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.block.begin.java
+
+
end
}
+ endCaptures
+
+ 0
+
+ name
+ punctuation.section.block.end.java
+
+
patterns
@@ -525,6 +647,10 @@
include
#anonymous-classes-and-new
+
+ include
+ #annotations
+
include
#keywords
@@ -596,21 +722,37 @@
comment.block.java
- captures
+ begin
+ (^[ \t]+)?(?=//)
+ beginCaptures
1
name
- comment.line.double-slash.java
+ punctuation.whitespace.comment.leading.java
- 2
+
+ end
+ (?!\G)
+ patterns
+
+ begin
+ //
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.java
+
+
+ end
+ \n
name
- punctuation.definition.comment.java
+ comment.line.double-slash.java
-
- match
- \s*((//).*$\n?)
+
@@ -632,9 +774,75 @@
match
- \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\b
+ \b0[xX][0-9A-Fa-f]([0-9A-Fa-f_]*[0-9A-Fa-f])?[lL]?(?!\w|\.)
+ name
+ constant.numeric.hex.java
+
+
+ match
+ \b0[0-7_]*[0-7][lL]?\b
+ name
+ constant.numeric.octal.java
+
+
+ match
+ \b0[bB][01]([01_]*[01])?[lL]?\b
+ name
+ constant.numeric.binary.java
+
+
+ match
+ \b(0|[1-9]([0-9_]*[0-9])?)[lL]?(?!\w|\.)
+ name
+ constant.numeric.integer.java
+
+
+ match
+ (?x)
+ (?<!\w) # Ensure word boundry
+ (?>
+ 0[xX] # Start literal
+ ([0-9A-Fa-f]([0-9A-Fa-f_]*[0-9A-Fa-f])?)? # Optional Number
+ (
+ (?<=[0-9A-Fa-f])\. # A number must exist on
+ | \.(?=[0-9A-Fa-f]) # one side of the decimal
+ | (?<=[0-9A-Fa-f]) # Decimal not required
+ )
+ ([0-9A-Fa-f]([0-9A-Fa-f_]*[0-9A-Fa-f])?)? # Optional Number
+ [pP] # Exponent Indicator
+ [+-]?(0|[1-9]([0-9_]*[0-9])?) # Signed Integer
+ [fFdD]? # Float Type Suffix
+ )
+ (?!\w) # Ensure word boundry
+
name
- constant.numeric.java
+ constant.numeric.hex-float.java
+
+
+ match
+ (?x)
+ (?<!\w) # Ensure word boundry
+ (?>
+ (
+ (0|[1-9]([0-9_]*[0-9])?) # Leading digits
+ (?=[eEfFdD.]) # Allow for numbers without .
+ )?
+ (
+ (?<=[0-9])(?=[eEfFdD]) # Allow for numbers without .
+ | \.
+ )
+ (
+ [0-9]([0-9_]*[0-9])? # Numbers after .
+ )?
+ (
+ [eE][+-]?(0|[1-9]([0-9_]*[0-9])?) # Exponent
+ )?
+ [fFdD]? # Float Type Suffix
+ )
+ (?!\w) # Ensure word boundry
+
+ name
+ constant.numeric.float.java
captures
@@ -684,8 +892,24 @@
begin
{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.enum.begin.java
+
+
end
}
+ endCaptures
+
+ 0
+
+ name
+ punctuation.section.enum.end.java
+
+
patterns
@@ -696,6 +920,14 @@
+
+ include
+ #comments
+
+
+ include
+ #annotations
+
keywords
@@ -840,9 +1072,17 @@
methods
begin
- (?!new)(?=[\w<].*\s+)(?=[^=]+\()
+ (?!new)(?=[\w<].*\s+)(?=([^=/]|/(?!/))+\()
end
- }|(?=;)
+ (})|(?=;)
+ endCaptures
+
+ 1
+
+ name
+ punctuation.section.method.end.java
+
+
name
meta.method.java
patterns
@@ -872,6 +1112,10 @@
include
#parameters
+
+ include
+ #comments
+
@@ -912,6 +1156,10 @@
include
#all-types
+
+ include
+ #comments
+
@@ -921,6 +1169,14 @@
begin
{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.section.method.begin.java
+
+
end
(?=})
name
@@ -933,6 +1189,10 @@
+
+ include
+ #comments
+
object-types
@@ -1115,7 +1375,7 @@
match
- \b(?:void|boolean|byte|char|short|int|float|long|double)\b
+ \b(?:void|var|boolean|byte|char|short|int|float|long|double)\b
name
storage.type.primitive.java
@@ -1132,7 +1392,7 @@
match
- \b(public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient)\b
+ \b(public|private|protected|static|final|native|synchronized|volatile|abstract|threadsafe|transient)\b
strings
@@ -1258,7 +1518,7 @@
begin
(?x:(?=
(?:
- (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier
+ (?:private|protected|public|native|synchronized|volatile|abstract|threadsafe|transient|static|final) # visibility/modifier
|
(?:def)
|
@@ -1267,10 +1527,11 @@
(?:(?:[a-z]\w*\.)*[A-Z]+\w*) # object type
)
\s+
- [\w\d_<>\[\],\s\?]+
+ (?!private|protected|public|native|synchronized|volatile|abstract|threadsafe|transient|static|final|def|void|boolean|byte|char|short|int|float|long|double)
+ [\w\d_<>\[\],\?][\w\d_<>\[\],\? \t]*
(?:=|$)
- ))
+ ))
end
(?=;)
name
@@ -1287,7 +1548,7 @@
1
name
- constant.variable.java
+ constant.other.variable.java
match
diff --git a/Syntaxes/JavaProperties.plist b/Syntaxes/JavaProperties.plist
index cb333fc..bf25ce8 100644
--- a/Syntaxes/JavaProperties.plist
+++ b/Syntaxes/JavaProperties.plist
@@ -2,10 +2,6 @@
- scopeName
- source.java.properties
- keyEquivalent
- ^~J
fileTypes
properties
@@ -16,93 +12,148 @@
foldingStopMarker
^(.*(?<!\)
)
+ keyEquivalent
+ ^~J
name
Java Properties
patterns
- name
- comment.line.properties
+ comment
+ Ignore blank lines
match
- ^(#.*)(
-|$)
+ ^\s*$
+
+
+ include
+ #comment-line
+
+
+ include
+ #property-name
+
+
+ include
+ #property-definition
+
+
+ repository
+
+ comment-line
+
captures
1
name
- comment.definition.comment.java-props
+ punctuation.whitespace.comment.leading.java-properties
+
+ 2
+
+ name
+ punctuation.definition.comment.java-properties
+ match
+ ^(\s*)([#!])(.+)?$\n?
+ name
+ comment.line.java-properties
+ property-definition
- name
- kvp.singleline.properties
- match
- ^(?#KEY)(?:[ ])*([a-zA-Z][^<>/][a-zA-Z0-9-_.]*)(=)(?#VALUE)(.*
-)
- captures
+ begin
+ ^(\s*)((?:\\[ \t]|\\:|\\=|[^:=\s])+)(?:\s*([:=]))?\s*
+ beginCaptures
1
name
- markup.heading.kvp.key.java.properties
+ punctuation.whitespace.leading.java-properties
2
name
- markup.deleted.kvp.key.java.properties
+ support.constant.java-properties
+ patterns
+
+
+ match
+ \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4})
+ name
+ constant.character.escape.java-properties
+
+
3
name
- string.kvp.value.java.properties
+ punctuation.separator.key-value.java-properties
-
-
+ contentName
+ string.unquoted.java-properties
+ end
+ (?<!\\{1})$\n
name
- kvp.dangling.space.between.key.and.equalsign.properties
- match
- ^(?#KEY)(?:[ ])*([a-zA-Z][^<>/][a-zA-Z0-9-_.]*)([ ]+=)(?#VALUE)(.*
-)
- captures
-
- 1
+ meta.key-value.java-properties
+ patterns
+
+ comment
+ Leading space on a continued line is ignored
+ match
+ ^\s*
name
- meta.line.error.logfile.dangling.key.properties
+ punctuation.whitespace.leading.java-properties
- 2
+ match
+ (\\{1})(?=$\n)
name
- invalid.illegal.dangling.equalsign.properties
+ punctuation.separator.continuation.java-properties
- 3
+ match
+ \\(?:[\\ntfr\"']|u[0-9A-Fa-f]{4})
name
- invalid.deprecated.dangling.value.properties
+ constant.character.escape.java-properties
-
+
+ property-name
- name
- kvp.multiline.properties
- match
- ^((?:[ ])*[^#].*\
-|(?:[ ])*\
-|(?:[ ])*[^#](?<!=).*
-)
captures
1
name
- string.kvp.multiline.properties
+ punctuation.whitespace.comment.leading.java-properties
+
+ 2
+
+ name
+ support.constant.java-properties
+ patterns
+
+
+ match
+ \\(?:[ \t:=\\ntfr\"']|u[0-9A-Fa-f]{4})
+ name
+ constant.character.escape.java-properties
+
+
+ comment
+ A property name with no value
+ match
+ ^(\s*)((?:\\[ \t]|\\:|\\=|[^:=\s])+)(?:\s*([:=]))?\s*$\n
+ name
+ meta.key-value.java-properties
-
+
+ scopeName
+ source.java-properties
uuid
D364E829-7643-4AFF-948D-3C0D6B4EA8A4
diff --git a/Tests/Numeric Literals.java b/Tests/Numeric Literals.java
new file mode 100644
index 0000000..7c4e912
--- /dev/null
+++ b/Tests/Numeric Literals.java
@@ -0,0 +1,69 @@
+// Integer
+
+foo = 0;
+foo = 123;
+foo = 123_456_789;
+foo = 123____456;
+foo = 0L;
+foo = 123L;
+
+
+// Floating-Point
+
+foo = 42.00;
+foo = 0.5;
+foo = .5;
+foo = 42f;
+foo = 3.59e0;
+foo = 3.59e-1701D;
+
+
+// Hexadecimal
+
+foo = 0x48454c5021;
+foo = 0x4927_4d;
+foo = 0x54_524150504544;
+foo = 0x494E;
+foo = 0x48455245L;
+
+
+// Octal
+
+foo = 3301_8;
+foo = 3301_8L;
+
+
+// Binary
+
+foo = 0b1;
+foo = 0b1;
+foo = 0b10;
+foo = 0b11;
+foo = 0b101;
+foo = 0b0001;
+foo = 0b1101;
+
+
+// Hexadecimal Floating-Point
+
+foo = 0x2.P1;
+foo = 0x1729p2;
+foo = 0x87539319P-3;
+foo = 0x6_963_472_309_248P+4;
+
+
+// Invalid
+
+foo = 08; // Zero can't start an integer
+
+foo = 42_.00F; // Underscore can't start or end number section
+foo = 42._00F;
+foo = _42;
+foo = 42_;
+foo = 042_;
+foo = 0x42_;
+
+foo = 123a; // Word boundary test
+foo = 3.59e-1701Da;
+foo = 0x1729p2a;
+foo = 0b1101a;
diff --git a/info.plist b/info.plist
index 8a738c6..5a4c36b 100644
--- a/info.plist
+++ b/info.plist
@@ -6,16 +6,6 @@
yq@yqnyrl.pbz
contactName
Luke Daley
- deleted
-
- 923B569C-8B6A-49B6-AB91-3D35609F01E4
- FC40FDBA-EEB6-43FD-9D58-A1D0F116CEC1
- 2D3EC03E-6DFB-11D9-91EB-000D93589AF6
- 2D3EF41B-6DFB-11D9-91EB-000D93589AF6
- 3DF1A808-53F2-4F48-BD56-1F2D20A0BFE5
- CE7A14F3-025B-4334-8F40-881CF820A9EE
- F2C18E05-A7E7-4898-8CB5-CC7E6020AAFE
-
description
A bundle for the <a href="http://java.sun.com/">Java</a> programming language.
mainMenu
@@ -24,8 +14,10 @@
752A2A98-EB02-4A4D-A3D4-522485DBF491
4BC99514-9BF7-4F4F-BD84-7AD07EB81AC3
+ ------------------------------------
BED53D9E-7A4D-42A7-8A3F-E633973A6D14
E330E2EF-0057-4920-9364-01604C67E664
+ 0642B880-F94F-4892-A761-AEF833C3B869
------------------------------------
CE007C8C-9A0B-43B8-AEAF-45613BCD3DF7
------------------------------------
@@ -57,6 +49,8 @@
items
+ CBFE854E-917E-4ED5-BDBC-950C6B25B816
+ ------------------------------------
E9ED01EA-E83B-4322-BD9D-39C88FB8C237
B8E49466-FCBE-4053-AEC3-4ABBE0FF2FEF
16D51B5E-56BC-4ED0-84FB-FCC68479BE8E
@@ -124,14 +118,16 @@
BC9380F7-43F1-4304-91CD-4C490B0A6037
8B84EAD3-F93D-407A-8BB1-4FEF8B0C71D7
------------------------------------
- F0C15D98-790E-4755-A04E-B8903D50F5C6
+ 7FB7C9A7-08BB-410F-B012-40D99ED8A60E
CE3059F1-EBFE-426B-A98A-7D935580F915
+ 2556E4C9-353C-4D34-A48D-7718A3739F40
+ F0C15D98-790E-4755-A04E-B8903D50F5C6
+ E0D61777-04FC-416F-82A7-7B54C446A00B
------------------------------------
2D2F53B7-E41C-4AEE-8A5E-2A5BB7B42E65
7396532C-3567-4BDA-9C10-51454A2F2F6D
E4DACBFB-F029-4EC3-BB0D-BEF0D5369DA7
F050CAEB-56AB-40A7-846B-E5DB70FA0A90
- ------------------------------------
name
Control
@@ -140,71 +136,6 @@
name
Java
- ordering
-
- 2B449DF6-6B1D-11D9-94EC-000D93589AF6
- D364E829-7643-4AFF-948D-3C0D6B4EA8A4
- ACB58B55-9437-4AE6-AF42-854995CF51DF
- 752A2A98-EB02-4A4D-A3D4-522485DBF491
- 4BC99514-9BF7-4F4F-BD84-7AD07EB81AC3
- BED53D9E-7A4D-42A7-8A3F-E633973A6D14
- CBFE854E-917E-4ED5-BDBC-950C6B25B816
- CE007C8C-9A0B-43B8-AEAF-45613BCD3DF7
- E330E2EF-0057-4920-9364-01604C67E664
- BD7A6DBE-0180-4E1A-A428-14D44BD88F88
- 56C938B4-22B8-45F4-8E09-5BB4DE4633B0
- 8E765795-CC9D-46D7-8602-7E2DBB7026B2
- C0525A43-EEF4-4F59-AC09-84D263888433
- F53E8BF9-4911-4131-B31F-8B4DEE47E421
- E54D7A3C-107A-426E-91E8-D066A978BC5E
- E9ED01EA-E83B-4322-BD9D-39C88FB8C237
- B8E49466-FCBE-4053-AEC3-4ABBE0FF2FEF
- 16D51B5E-56BC-4ED0-84FB-FCC68479BE8E
- 3621828B-39DB-4B56-8300-DD5C76333868
- 8CD02FE6-B5EE-4335-AFDF-7CC02C969563
- 4876099F-502E-471F-9D0D-916C7EF2E353
- BF745BD9-E345-4CFB-82B1-2CC2195BEFA8
- A30E90E6-FFBF-4899-AB97-7CAA00D0B824
- 476E26EB-5A53-45B3-A497-B22B12815C7F
- 5A7786EE-5F23-422E-A6EC-69778ED7C8FC
- 4C07C9CB-4306-417B-B152-653E93C987B5
- 755B1EB0-934C-49C6-AD08-B461C2205C46
- BC9380F7-43F1-4304-91CD-4C490B0A6037
- 8B84EAD3-F93D-407A-8BB1-4FEF8B0C71D7
- 2D2F53B7-E41C-4AEE-8A5E-2A5BB7B42E65
- 7396532C-3567-4BDA-9C10-51454A2F2F6D
- E4DACBFB-F029-4EC3-BB0D-BEF0D5369DA7
- F050CAEB-56AB-40A7-846B-E5DB70FA0A90
- CE3059F1-EBFE-426B-A98A-7D935580F915
- 7FB7C9A7-08BB-410F-B012-40D99ED8A60E
- 2556E4C9-353C-4D34-A48D-7718A3739F40
- F0C15D98-790E-4755-A04E-B8903D50F5C6
- E0D61777-04FC-416F-82A7-7B54C446A00B
- 96251D07-2F30-4610-9F0F-65DE730CC0B5
- 097F4236-D7A4-412F-A078-11ABFCAFC7BA
- D3D659F5-5318-4D0A-85E2-9A03902A1668
- 8B285F69-5A6A-46B4-BB31-B5F10DCB5719
- D8E7B79D-ADEC-437D-BFDE-F20D5362D892
- 97DC6637-998E-493C-9765-C8CFB29AC18C
- 2887D1D3-A714-41B6-9211-4DEC12417889
- 5EEDE297-9489-41C8-A7AF-BDB5EABEF41F
- 94C09B88-AC93-4045-86D1-206639D582D0
- 592F2823-7A2B-4881-99A4-7A18D3623902
- FBA964F9-EA31-44D1-A5FD-AE8AB3FF8954
- CD9D5650-7188-498F-9305-1BA9D8D8D27F
- 20E93106-18CF-4BA3-9DA3-8F0C955DB774
- FA4CD3FA-A79B-43E3-A432-DA53DA4A060D
- 11D7DA6F-1AE7-4BC7-BB5E-8DF05984FEEE
- FD0CE2DC-6D44-4E22-B4E5-C47C57F5B677
- 22E489AE-989E-4A76-9C18-89944CF5013D
- 7A55A2BC-CD9D-4EBF-ABF4-3401AA64B7B3
- C80430E0-F37F-448F-ACAE-D590C96C4EAD
- 90A0278A-56B2-465B-B629-A01DF6524FEA
- DFD7AE0D-D5CC-4FFF-B37D-EA7ACC8E34DF
- 5F390B93-6A28-4EED-B04A-D213640B9DAF
- 0642B880-F94F-4892-A761-AEF833C3B869
- 6F20804D-4BF2-42A7-BC64-A8CD83B7DE0F
-
uuid
4677FEB2-6227-11D9-BFB1-000D93589AF6