diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..6bb66b660
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,45 @@
+# based on https://github.com/alexkaratarakis/gitattributes/
+
+# Handle line endings automatically for files detected as text
+# and leave all files detected as binary untouched.
+* text=auto
+
+#
+# The above will handle all files NOT found below
+#
+# These files are text and should be normalized (Convert crlf => lf)
+*.gitattributes text
+.gitignore text
+*.bash text eol=lf
+*.bat text eol=crlf
+*.cmd text eol=crlf
+*.css text diff=css
+*.exsd text
+*.htm text diff=html
+*.html text diff=html
+*.ini text
+*.md text diff=markdown
+*.java text diff=java
+*.js text
+*.json text
+*.properties text
+*.sh text
+*.tmLanguage text
+*.ts text
+*.txt text
+*.xsd text
+*.xml text
+*.yaml text
+*.yml text
+MANIFEST.MF text
+Dockerfile text eol=lf
+Jenkinsfile text
+LICENSE text
+
+# These files are binary and should be left untouched
+# (binary is a macro for -text -diff)
+*.gif binary
+*.ico binary
+*.jpeg binary
+*.jpg binary
+*.png binary
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index f71fb86bf..a795f29a6 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,7 +1,20 @@
+# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
+- package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: daily
+ commit-message:
+ prefix: fix
+ prefix-development: chore
+ include: scope
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
- open-pull-requests-limit: 10
\ No newline at end of file
+ commit-message:
+ prefix: fix
+ prefix-development: chore
+ include: scope
+ open-pull-requests-limit: 10
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 000000000..34022d8b3
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,87 @@
+# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
+name: Build
+
+on:
+ push:
+ branches: # build all branches
+ - '**'
+ tags-ignore: # but don't build tags
+ - '**'
+ paths-ignore:
+ - '**/*.md'
+ - '.github/*.yml'
+ pull_request:
+ workflow_dispatch:
+ # https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
+ inputs:
+ additional_maven_args:
+ description: 'Additional Maven Args'
+ required: false
+ default: ''
+
+defaults:
+ run:
+ shell: bash
+
+jobs:
+
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Git Checkout
+ uses: actions/checkout@v3 #https://github.com/actions/checkout
+
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3 # https://github.com/actions/setup-java
+ with:
+ distribution: 'zulu'
+ java-version: 11
+
+ - name: Install xvfb
+ run: sudo apt-get install -o Acquire::Retries=3 --no-install-recommends -y xvfb
+
+ - name: "Cache: Local Maven Repository"
+ uses: actions/cache@v3
+ with:
+ path: |
+ ~/.m2/repository
+ !~/.m2/**/*SNAPSHOT*
+ key: ${{ runner.os }}-mvnrepo-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('**/target-platform/tm4e-target.target') }}
+ restore-keys: |
+ ${{ runner.os }}-mvnrepo-
+
+ - name: Set up Maven
+ uses: stCarolas/setup-maven@v4.3
+ with:
+ maven-version: 3.8.5
+
+
+ - name: Build with Maven
+ id: maven-build
+ run: |
+ set -eu
+
+ MAVEN_OPTS="${MAVEN_OPTS:-}"
+ MAVEN_OPTS="$MAVEN_OPTS -XX:+TieredCompilation -XX:TieredStopAtLevel=1" # https://zeroturnaround.com/rebellabs/your-maven-build-is-slow-speed-it-up/
+ MAVEN_OPTS="$MAVEN_OPTS -Djava.security.egd=file:/dev/./urandom" # https://stackoverflow.com/questions/58991966/what-java-security-egd-option-is-for/59097932#59097932
+ MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS" # https://stackoverflow.com/questions/5120470/how-to-time-the-different-stages-of-maven-execution/49494561#49494561
+ MAVEN_OPTS="$MAVEN_OPTS -Xmx1024m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dhttps.protocols=TLSv1.2"
+ echo " -> MAVEN_OPTS: $MAVEN_OPTS"
+ export MAVEN_OPTS
+
+ # prevent "org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]"
+ xvfb-run mvn \
+ --errors \
+ --update-snapshots \
+ --batch-mode \
+ --show-version \
+ --no-transfer-progress \
+ ${{ github.event.inputs.additional_maven_args }} \
+ clean verify
+
+ - name: "Delete intermediate build artifacts"
+ uses: geekyeggo/delete-artifact@1-glob-support # https://github.com/GeekyEggo/delete-artifact/
+ with:
+ name: "*"
+ useGlob: true
+ failOnError: false
diff --git a/.github/workflows/licensecheck.yml b/.github/workflows/licensecheck.yml
new file mode 100644
index 000000000..bfde8fa5f
--- /dev/null
+++ b/.github/workflows/licensecheck.yml
@@ -0,0 +1,35 @@
+# This workflow will build a Java project with Maven
+# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+
+name: License check
+
+on:
+ push:
+ branches:
+ - '*'
+ pull_request:
+ branches:
+ - '*'
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: '11'
+ distribution: 'adopt'
+ - name: Cache local Maven repository
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: License check
+ run: |
+ mvn -U -V -e -B -ntp org.eclipse.dash:license-tool-plugin:license-check --file pom.xml -Ddash.fail=true
diff --git a/.gitignore b/.gitignore
index 3d081ef4e..6a06219e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,21 @@
-.settings
+# Eclipse
/bin
-/.project
-target
\ No newline at end of file
+/*/bin
+**/.settings/*
+!**/.settings/org.eclipse.core.resoures.prefs
+!**/.settings/org.eclipse.jdt.core.prefs
+!**/.settings/org.eclipse.pde.core.prefs
+
+# Eclipse GFM Viewer
+*.md.html
+
+# Maven
+/target
+/*/target
+
+# OSX
+.DS_Store
+
+# Vim
+*.swo
+*.swp
diff --git a/.project b/.project
new file mode 100644
index 000000000..1548310c4
--- /dev/null
+++ b/.project
@@ -0,0 +1,17 @@
+
+
+ tm4e
+
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/Jenkinsfile b/Jenkinsfile
index 7992cda8b..91891ef14 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -10,12 +10,25 @@ pipeline {
buildDiscarder(logRotator(numToKeepStr:'10'))
}
stages {
+ stage('initialize PGP') {
+ steps {
+ withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) {
+ sh 'gpg --batch --import "${KEYRING}"'
+ sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done'
+ }
+ }
+ }
stage('Build') {
steps {
withMaven(maven:'apache-maven-latest', mavenLocalRepo: '$WORKSPACE/.m2') {
- wrap([$class: 'Xvnc', useXauthority: true]) {
- sh 'mvn clean verify -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true -PpackAndSign'
- }
+ withCredentials([string(credentialsId: 'gpg-passphrase', variable: 'KEYRING_PASSPHRASE')]) {
+ wrap([$class: 'Xvnc', useXauthority: true]) {
+ sh 'mvn clean verify \
+ -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true \
+ -Psign -Dgpg.passphrase="${KEYRING_PASSPHRASE}"'
+
+ }
+ }
}
}
post {
diff --git a/README.md b/README.md
index d0b6e7172..aa76a23b2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,9 @@
# Eclipse tm4e - TextMate and language-configuration support for Java and in Eclipse IDE
-TM4E brings Java API to tokenize textual documents according to TextMate grammars with an Eclipse IDE client that can do syntax highlighting according to this tokenization; and Eclipse IDE client for VSCode [Language Configuration](https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributeslanguages) to support matching bracket, auto close, on enter support.
+[](https://github.com/eclipse/tm4e/actions/workflows/build.yml)
+[](LICENSE)
+
+TM4E brings Java API to tokenize textual documents according to TextMate grammars with an Eclipse IDE client that can do syntax highlighting according to this tokenization; and Eclipse IDE client for VSCode [Language Configuration](https://code.visualstudio.com/api/references/contribution-points#contributes.languages) to support matching bracket, auto close, on enter support.
`tm4e` is an [official Eclipse.org project](https://projects.eclipse.org/projects/technology.tm4e) so it conforms to typical Eclipse.org requirements and guarantees.
@@ -8,7 +11,7 @@ TM4E brings Java API to tokenize textual documents according to TextMate grammar
### in Eclipse IDE or RCP applications
-You can install `tm4e` with the update site [http://download.eclipse.org/tm4e/snapshots/](http://download.eclipse.org/tm4e/snapshots/). TM4E is usually installed together with its consumers, so end-user should usually not need to directly install it.
+You can install `tm4e` with the update site [https://download.eclipse.org/tm4e/snapshots/](https://download.eclipse.org/tm4e/snapshots/). TM4E is usually installed together with its consumers, so end-user should usually not need to directly install it.
### as a Java API with Maven
@@ -24,35 +27,36 @@ The following class and modules should be used as entry point provides:
* [org.eclipse.tm4e.ui](https://github.com/eclipse/tm4e/tree/master/org.eclipse.tm4e.ui) provides the Eclipse **org.eclipse.jface.text.presentation.IPresentationReconciler** [TMPresentationReconciler](https://github.com/eclipse/tm4e/blob/master/org.eclipse.tm4e.ui/src/main/java/org/eclipse/tm4e/ui/text/TMPresentationReconciler.java) which is able to tokenize an editor content by using a given JSON, PList TextMate grammar and do syntax coloration. See [UI](https://github.com/eclipse/tm4e/wiki/UI) section for more information.
- * [org.eclipse.tm4e.languageconfiguration](https://github.com/eclipse/tm4e/tree/master/org.eclipse.tm4e.languageconfiguration) provides the VSCode [Language Configuration](https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributeslanguages) to support matching bracket, auto close, on enter support with a simple **language-configuration.json**.
-
+ * [org.eclipse.tm4e.languageconfiguration](https://github.com/eclipse/tm4e/tree/master/org.eclipse.tm4e.languageconfiguration) provides the VSCode [Language Configuration](https://code.visualstudio.com/api/references/contribution-points#contributes.languages) to support matching bracket, auto close, on enter support with a simple **language-configuration.json**.
+
Here a sample with TypeScript:
-
+
## 👪 Who is using tm4e?
Here are some projects that use tm4e:
* Eclipse IDE languages and frameworks integrations
- * [Eclipse Corrosion](https://github.com/eclipse/corrosion) Rust development tools in Eclipse IDE.
- * [Eclipse aCute](https://github.com/eclipse/aCute) C# edition in Eclipse IDE.
- * [Eclipse Wild Web Developer](https://github.com/eclipse/wildwebdeveloper) a simple and productive Web Development Tools in the Eclipse IDE.
- * [Eclipse ShellWax](https://github.com/eclipse/shellwax) is a rich Bash script editor in the Eclipse IDE.
- * [LiClipseText](http://www.liclipse.com/text/) enables Eclipse to be used as a general-purpose text editor, providing support for several languages out of the box.
- * [typescript.java](https://github.com/angelozerr/typescript.java) (Deprecated) TypeScript IDE for Eclipse with JSDT & tsserver.
- * [EditorConfig for Eclipse](https://github.com/angelozerr/ec4e) EditorConfig for Eclipse with GenericEditor.
- * [Phaser Editor 2D](https://phasereditor2d.com) An IDE for the creation of HTML5 games.
- * [Solargraph](https://github.com/PyvesB/eclipse-solargraph) Ruby edition in Eclipse IDE.
- * [Dartboard](https://github.com/eclipse/dartboard) Dart language support in the Eclipse IDE.
-* [Apache NetBeans](https://github.com/apache/netbeans) is a multi-language IDE written in Java and uses TM4E core parts to support syntax highlighting based on TextMate grammars
-
+ * [Eclipse Corrosion](https://github.com/eclipse/corrosion) - Rust development tools in Eclipse IDE.
+ * [Eclipse aCute](https://github.com/eclipse/aCute) - C# edition in Eclipse IDE.
+ * [Eclipse Wild Web Developer](https://github.com/eclipse/wildwebdeveloper) - Simple and productive Web Development Tools in the Eclipse IDE.
+ * [Eclipse ShellWax](https://github.com/eclipse/shellwax) - A shell script development plugin for the Eclipse IDE, providing a rich edition experience through integration with the [Bash Language Server](https://github.com/bash-lsp/bash-language-server).
+ * [LiClipseText](https://www.liclipse.com/text/) - An editor which enables Eclipse to be used as a general-purpose text editor, providing support for multiple languages out of the box.
+ * [typescript.java](https://github.com/angelozerr/typescript.java) *(Deprecated)* - TypeScript IDE for Eclipse with JSDT & tsserver.
+ * [EditorConfig for Eclipse](https://github.com/angelozerr/ec4e) - EditorConfig for Eclipse with GenericEditor.
+ * [Phaser Editor 2D](https://phasereditor2d.com) - An IDE for the creation of HTML5 games.
+ * [Solargraph](https://github.com/PyvesB/eclipse-solargraph) - Ruby development tools for Eclipse.
+ * [Dartboard](https://github.com/eclipse/dartboard) - Dart language support in the Eclipse IDE.
+ * [haxe4e](https://github.com/haxe4e/haxe4e) - [Haxe](https://haxe.org/) programming language support for the Eclipse IDE.
+* [Apache NetBeans](https://github.com/apache/netbeans) - A multi-language IDE written in Java that uses TM4E core parts to support syntax highlighting based on TextMate grammars.
+
## 👷 Get support and contribute
-* **License and community**: `tm4e` is a community open-source project licensed under the Eclipse Public License 1.0.
-* **Support:** You can ask (and answer!) questions, report bugs, and request features using [GitHub issues](http://github.com/eclipse/tm4e/issues).
+* **License and community**: `tm4e` is a community open-source project licensed under the [Eclipse Public License 2.0](LICENSE).
+* **Support**: You can ask (and answer!) questions, report bugs, and request features using [GitHub issues](https://github.com/eclipse/tm4e/issues).
* **Git**: This `eclipse/tm4e` repository is the reference repository to contribute to `tm4e`
-* **Build**: build can be performed with a simple `mvn clean verify`, continuous integration and deployment is performed by CI jobs at https://hudson.eclipse.org/tm4e
-* **Continuous testing, integration and deployment** is performed by CI jobs at https://hudson.eclipse.org/tm4e
+* **Build**: build can be performed with a simple `mvn clean verify`, continuous integration and deployment is performed by CI jobs at https://ci.eclipse.org/tm4e/
+* **Continuous testing, integration and deployment** is performed by CI jobs at https://ci.eclipse.org/tm4e/ and https://github.com/eclipse/tm4e/actions
* **Developers mailing-list**: Contributors are also expected to subscribe the [tm4e-dev mailing-list](https://dev.eclipse.org/mailman/listinfo/tm4e-dev).
* **Becoming a committer**: as usual with Eclipse.org projects, anyone who's made significant contributions and who's upheld quality standards alongside good judgement and open-mindedness.
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index cfb94193e..a47433fda 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -4,13 +4,45 @@ This page describes the noteworthy improvements provided by each release of Ecli
### Next release...
-## 0.4.3
+## 0.4.5
* 📅 Release Date (tentative): ?
-* All changes: https://github.com/eclipse/tm4e/compare/0.4.2...0.4.3
+* All changes: https://github.com/eclipse/tm4e/compare/0.4.4...master
### Latest release
+## 0.4.4
+
+* 📅 Release Date: May 11th 2022
+* All changes: https://github.com/eclipse/tm4e/compare/0.4.3...0.4.4
+
+
+* Many many many... code improvements
+* Dependency updates
+* Bugfixes in file detection and compare editor
+
+## 0.4.3
+
+* 📅 Release Date: 19th November 2021
+* All changes: https://github.com/eclipse/tm4e/compare/0.4.2...0.4.3
+
+#### Support locations outside a local file system
+
+This allows to have syntax highlighting for buffers that are not backed by a filesystem locations.
+
+#### Compatible with viewers that are not IProjectionViewer
+
+Avoid an exception making TM4E incompatible with most simple ITextViewer in some case.
+
+#### Fix content-type detection
+
+Parent content-type are taken into account and allow to enable syntax highlighting for the children of content-types which are bound to a grammar/scope as well, without extra configuration.
+
+#### Choose default theme according to background color of the widget
+
+By default, TM4E now decides of the best theme to use according to the background color of the text widget. This allows to get a better text theme when mixing dark global them with light background or editor, or light global theme with dark background in editor.
+
+
## 0.4.2
* 📅 Release Date (tentative): 6th September 2021
diff --git a/org.eclipse.tm4e.core.tests/.classpath b/org.eclipse.tm4e.core.tests/.classpath
index d3fc9157f..71f21812a 100644
--- a/org.eclipse.tm4e.core.tests/.classpath
+++ b/org.eclipse.tm4e.core.tests/.classpath
@@ -6,14 +6,21 @@
-
+
-
+
+
+
+
+
+
+
+
-
+
-
+
diff --git a/org.eclipse.tm4e.core.tests/.gitignore b/org.eclipse.tm4e.core.tests/.gitignore
deleted file mode 100644
index 934e0e06f..000000000
--- a/org.eclipse.tm4e.core.tests/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/target
diff --git a/org.eclipse.tm4e.core.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f648802b5
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,518 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
+org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=info
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=info
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=enabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
+org.eclipse.jdt.core.formatter.align_with_spaces=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assertion_message=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_record_components=16
+org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
+org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=true
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.indent_tag_description=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.text_block_indentation=0
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/org.eclipse.tm4e.core.tests/pom.xml b/org.eclipse.tm4e.core.tests/pom.xml
index 3af55b267..d2ad9fb95 100644
--- a/org.eclipse.tm4e.core.tests/pom.xml
+++ b/org.eclipse.tm4e.core.tests/pom.xml
@@ -1,11 +1,29 @@
-
- 4.0.0
- org.eclipse.tm4e.core.tests
- eclipse-test-plugin
- 0.4.1-SNAPSHOT
-
- org.eclipse
- org.eclipse.tm4e
- 0.3.2-SNAPSHOT
-
+
+ 4.0.0
+ org.eclipse.tm4e.core.tests
+ eclipse-test-plugin
+ 0.4.1-SNAPSHOT
+
+ org.eclipse
+ org.eclipse.tm4e
+ 0.3.2-SNAPSHOT
+
+
+
+
+
+
+ org.eclipse.tycho
+ tycho-compiler-plugin
+
+
+
+ test-cases/**/*.java
+
+
+
+
+
+
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/GrammarSuiteTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/GrammarSuiteTest.java
index 34205c120..29ec11aa7 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/GrammarSuiteTest.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/GrammarSuiteTest.java
@@ -1,92 +1,94 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.grammar;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.tm4e.core.grammar.internal.MatcherTestImpl;
-import org.eclipse.tm4e.core.grammar.internal.RawTestImpl;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.DynamicTest;
-import org.junit.jupiter.api.TestFactory;
-
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonIOException;
-import com.google.gson.JsonSyntaxException;
-import com.google.gson.reflect.TypeToken;
-
-/**
- * VSCode TextMate grammar tests which uses same vscode-textmate tests located
- * at src\test\resources\test-cases
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/tests/tests.ts
- *
- */
-public class GrammarSuiteTest {
-
- private static final File REPO_ROOT = new File("src/test/resources");
-
- // TODO: fix thoses tests:
- // It seems that problem comes from with encoding. OnigString should support UTF-16 like https://github.com/atom/node-oniguruma/blob/master/src/onig-string.cc
- private static final List IGNORE_TESTS = List.of("TEST #24", "TEST #66");
-
- @TestFactory @DisplayName("Tokenization /first-mate/")
- Collection firstMate() throws Exception {
- return createVSCodeTestSuite(new File(REPO_ROOT, "test-cases/first-mate/tests.json"));
- }
-
- @TestFactory @DisplayName("Tokenization /suite1/ tests.json")
- Collection testsJSon() throws Exception {
- return createVSCodeTestSuite(new File(REPO_ROOT, "test-cases/suite1/tests.json"));
- }
-
- @TestFactory @DisplayName("Tokenization /suite1/ whileTests.json")
- Collection whileTests() throws Exception {
- return createVSCodeTestSuite(new File(REPO_ROOT, "test-cases/suite1/whileTests.json"));
- }
-
-
- private List createVSCodeTestSuite(File testLocation) throws Exception {
- Type listType = new TypeToken>() {
- }.getType();
- List tests = new GsonBuilder().create().fromJson(new FileReader(testLocation), listType);
- List dynamicTests = new ArrayList<>();
- for (RawTestImpl test : tests) {
- if (!IGNORE_TESTS.contains(test.getDesc())) {
- test.setTestLocation(testLocation);
- dynamicTests.add(DynamicTest.dynamicTest(test.getDesc(), () -> test.executeTest()));
- }
- }
- return dynamicTests;
- }
-
- @TestFactory @DisplayName("Matcher tests")
- Collection dynamicTestsWithCollection() throws JsonIOException, JsonSyntaxException, FileNotFoundException {
- Type listType = new TypeToken>() {
- }.getType();
- List tests = new GsonBuilder().create()
- .fromJson(new FileReader(new File(REPO_ROOT, "matcher-tests.json")), listType);
- List dynamicTests = new ArrayList<>();
- int i = 0;
- for (MatcherTestImpl test : tests) {
- dynamicTests.add(DynamicTest.dynamicTest("Test #" + (i++), () -> test.executeTest()));
- }
- return dynamicTests;
- }
-
-}
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core.grammar;
+
+import java.io.File;
+import java.io.FileReader;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.tm4e.core.grammar.internal.MatcherTestImpl;
+import org.eclipse.tm4e.core.grammar.internal.RawTestImpl;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.DynamicTest;
+import org.junit.jupiter.api.TestFactory;
+
+import com.google.gson.GsonBuilder;
+import com.google.gson.reflect.TypeToken;
+
+/**
+ * VSCode TextMate grammar tests which uses same vscode-textmate tests located at src\test\resources\test-cases
+ *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/tests/tests.ts
+ */
+public class GrammarSuiteTest {
+
+ private static final File REPO_ROOT = new File("src/main/resources");
+
+ // TODO: fix thoses tests:
+ // It seems that problem comes from with encoding. OnigString should support UTF-16 like
+ // https://github.com/atom/node-oniguruma/blob/master/src/onig-string.cc
+ private static final List IGNORE_TESTS = List.of("TEST #24", "TEST #66");
+
+ @TestFactory
+ @DisplayName("Tokenization /first-mate/")
+ Collection firstMate() throws Exception {
+ return createVSCodeTestSuite(new File(REPO_ROOT, "test-cases/first-mate/tests.json"));
+ }
+
+ @TestFactory
+ @DisplayName("Tokenization /suite1/ tests.json")
+ Collection testsJSon() throws Exception {
+ return createVSCodeTestSuite(new File(REPO_ROOT, "test-cases/suite1/tests.json"));
+ }
+
+ @TestFactory
+ @DisplayName("Tokenization /suite1/ whileTests.json")
+ Collection whileTests() throws Exception {
+ return createVSCodeTestSuite(new File(REPO_ROOT, "test-cases/suite1/whileTests.json"));
+ }
+
+ private List createVSCodeTestSuite(final File testLocation) throws Exception {
+ try (var fileReader = new FileReader(testLocation)) {
+ final Type listType = new TypeToken>() {
+ }.getType();
+ final List tests = new GsonBuilder().create().fromJson(fileReader, listType);
+ final var dynamicTests = new ArrayList();
+ for (final RawTestImpl test : tests) {
+ if (!IGNORE_TESTS.contains(test.getDesc())) {
+ test.setTestLocation(testLocation);
+ dynamicTests.add(DynamicTest.dynamicTest(test.getDesc(), test::executeTest));
+ }
+ }
+ return dynamicTests;
+ }
+ }
+
+ @TestFactory
+ @DisplayName("Matcher tests")
+ Collection dynamicTestsWithCollection() throws Exception {
+ try (var fileReader = new FileReader(new File(REPO_ROOT, "matcher-tests.json"))) {
+ final Type listType = new TypeToken>() {
+ }.getType();
+ final List tests = new GsonBuilder().create().fromJson(fileReader, listType);
+ final var dynamicTests = new ArrayList();
+ int i = 0;
+ for (final MatcherTestImpl test : tests) {
+ dynamicTests.add(DynamicTest.dynamicTest("Test #" + (i++), test::executeTest));
+ }
+ return dynamicTests;
+ }
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/GrammarTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/GrammarTest.java
deleted file mode 100644
index 2e90abc3d..000000000
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/GrammarTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.grammar;
-
-import org.eclipse.tm4e.core.internal.grammar.StackElementMetadata;
-import org.eclipse.tm4e.core.internal.grammar.StandardTokenType;
-import org.eclipse.tm4e.core.theme.FontStyle;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-
-/**
- * {@link StackElementMetadata} tests same than vscode-textmate.
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/tests/grammar.test.ts
- *
- */
-public class GrammarTest {
-
- @Test
- public void testWorks() {
- int value = StackElementMetadata.set(0, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101,
- 102);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 102);
- }
-
- @Test
- public void testCanOverwriteLanguageId() {
- int value = StackElementMetadata.set(0, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101,
- 102);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 102);
-
- value = StackElementMetadata.set(value, 2, StandardTokenType.Other, FontStyle.NotSet, 0, 0);
- assertEquals(value, 2, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 102);
- }
-
- @Test
- public void testCanOverwriteTokenType() {
- int value = StackElementMetadata.set(0, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101,
- 102);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 102);
-
- value = StackElementMetadata.set(value, 0, StandardTokenType.Comment, FontStyle.NotSet, 0, 0);
- assertEquals(value, 1, StandardTokenType.Comment, FontStyle.Underline | FontStyle.Bold, 101, 102);
- }
-
- @Test
- public void testCanOverwriteFontStyle() {
- int value = StackElementMetadata.set(0, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101,
- 102);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 102);
-
- value = StackElementMetadata.set(value, 0, StandardTokenType.Other, FontStyle.None, 0, 0);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.None, 101, 102);
- }
-
- @Test
- public void testCanOverwriteForeground() {
- int value = StackElementMetadata.set(0, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101,
- 102);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 102);
-
- value = StackElementMetadata.set(value, 0, StandardTokenType.Other, FontStyle.NotSet, 5, 0);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 5, 102);
- }
-
- @Test
- public void testCanOverwriteBackground() {
- int value = StackElementMetadata.set(0, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101,
- 102);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 102);
-
- value = StackElementMetadata.set(value, 0, StandardTokenType.Other, FontStyle.NotSet, 0, 7);
- assertEquals(value, 1, StandardTokenType.RegEx, FontStyle.Underline | FontStyle.Bold, 101, 7);
- }
-
- @Test
- public void testCanWorkAtMaxValues() {
- int maxLangId = 255;
- int maxTokenType = StandardTokenType.Comment | StandardTokenType.Other | StandardTokenType.RegEx
- | StandardTokenType.String;
- int maxFontStyle = FontStyle.Bold | FontStyle.Italic | FontStyle.Underline;
- int maxForeground = 511;
- int maxBackground = 511;
-
- int value = StackElementMetadata.set(0, maxLangId, maxTokenType, maxFontStyle, maxForeground, maxBackground);
- assertEquals(value, maxLangId, maxTokenType, maxFontStyle, maxForeground, maxBackground);
- }
-
- private static void assertEquals(int metadata, int languageId, int tokenType, int fontStyle, int foreground, int background) {
- String actual = "{\n" +
- "languageId: " + StackElementMetadata.getLanguageId(metadata) + ",\n" +
- "tokenType: " + StackElementMetadata.getTokenType(metadata) + ",\n" +
- "fontStyle: " + StackElementMetadata.getFontStyle(metadata) + ",\n" +
- "foreground: " + StackElementMetadata.getForeground(metadata) + ",\n" +
- "background: " + StackElementMetadata.getBackground(metadata) + ",\n" +
- "}";
-
- String expected = "{\n" +
- "languageId: " + languageId + ",\n" +
- "tokenType: " + tokenType + ",\n" +
- "fontStyle: " + fontStyle + ",\n" +
- "foreground: " + foreground + ",\n" +
- "background: " + background + ",\n" +
- "}";
-
- Assertions.assertEquals(expected, actual, "equals for " + StackElementMetadata.toBinaryStr(metadata));
- }
-}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/MatcherTestImpl.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/MatcherTestImpl.java
index 4bedf4fd2..813720055 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/MatcherTestImpl.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/MatcherTestImpl.java
@@ -1,38 +1,38 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.grammar.internal;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.tm4e.core.internal.matcher.Matcher;
-import org.eclipse.tm4e.core.internal.matcher.MatcherWithPriority;
-
-public class MatcherTestImpl {
-
- private String expression;
- private List input;
- private boolean result;
-
- public MatcherTestImpl() {
- }
-
-
- public void executeTest() {
- Collection>> matcher = Matcher.createMatchers(expression);
- boolean result = matcher.stream().anyMatch(m -> m.matcher.test(input));
- assertEquals(result, this.result);
- }
-
-}
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core.grammar.internal;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.tm4e.core.internal.matcher.Matcher;
+import org.eclipse.tm4e.core.internal.matcher.MatcherWithPriority;
+
+public class MatcherTestImpl {
+
+ private String expression;
+ private List input;
+ private boolean result;
+
+ public MatcherTestImpl() {
+ }
+
+
+ public void executeTest() {
+ Collection>> matcher = Matcher.createMatchers(expression);
+ boolean result = matcher.stream().anyMatch(m -> m.matcher.matches(input));
+ assertEquals(result, this.result);
+ }
+
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java
index 90189bb06..8685757f6 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestImpl.java
@@ -1,160 +1,169 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.grammar.internal;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import org.eclipse.tm4e.core.grammar.IGrammar;
-import org.eclipse.tm4e.core.grammar.IToken;
-import org.eclipse.tm4e.core.grammar.ITokenizeLineResult;
-import org.eclipse.tm4e.core.grammar.StackElement;
-import org.eclipse.tm4e.core.registry.IRegistryOptions;
-import org.eclipse.tm4e.core.registry.Registry;
-
-public class RawTestImpl {
-
- private String desc;
- private List grammars;
- private String grammarPath;
- private String grammarScopeName;
- private List grammarInjections;
- private List lines;
- private File testLocation;
-
- public String getDesc() {
- return desc;
- }
-
- public List getGrammars() {
- return grammars;
- }
-
- public String getGrammarPath() {
- return grammarPath;
- }
-
- public String getGrammarScopeName() {
- return grammarScopeName;
- }
-
- public List getGrammarInjections() {
- return grammarInjections;
- }
-
- public List getLines() {
- return lines;
- }
-
- public void executeTest() throws Exception {
- IRegistryOptions locator = new IRegistryOptions() {
-
- @Override
- public String getFilePath(String scopeName) {
- return null;
- }
-
- @Override
- public InputStream getInputStream(String scopeName) throws IOException {
- return null;
- }
-
- @Override
- public Collection getInjections(String scopeName) {
- if (scopeName.equals(getGrammarScopeName())) {
- return getGrammarInjections();
- }
- return null;
- }
- };
-
- Registry registry = new Registry(locator);
- IGrammar grammar = getGrammar(registry, testLocation.getParentFile());
-
- if (getGrammarScopeName() != null) {
- grammar = registry.grammarForScopeName(getGrammarScopeName());
- }
-
- if (grammar == null) {
- throw new Exception("I HAVE NO GRAMMAR FOR TEST");
- }
-
- StackElement prevState = null;
- for (RawTestLine testLine : getLines()) {
- prevState = assertLineTokenization(grammar, testLine, prevState);
- }
- }
-
- private IGrammar getGrammar(Registry registry, File testLocation) throws Exception {
- IGrammar grammar = null;
- for (String grammarPath : getGrammars()) {
- IGrammar tmpGrammar = registry.loadGrammarFromPathSync(new File(testLocation, grammarPath));
- if (grammarPath.equals(getGrammarPath())) {
- grammar = tmpGrammar;
- }
- }
- return grammar;
- }
-
- private static StackElement assertLineTokenization(IGrammar grammar, RawTestLine testCase, StackElement prevState) {
- ITokenizeLineResult actual = grammar.tokenizeLine(testCase.getLine(), prevState);
-
- List actualTokens = getActualTokens(actual.getTokens(), testCase);
-
- List expectedTokens = testCase.getTokens();
- // // TODO@Alex: fix tests instead of working around
- if (testCase.getLine().length() > 0) {
- // Remove empty tokens...
- expectedTokens = testCase.getTokens().stream().filter(token -> token.getValue().length() > 0)
- .collect(Collectors.toList());
- }
- deepEqual(actualTokens, expectedTokens, "Tokenizing line '" + testCase.getLine() + "'");
-
- return actual.getRuleStack();
- }
-
- private static void deepEqual(List actualTokens, List expextedTokens, String message) {
- // compare collection size
- assertEquals(expextedTokens.size(), actualTokens.size(), message + " (collection size problem)");
- // compare item
- for (int i = 0; i < expextedTokens.size(); i++) {
- RawToken expected = expextedTokens.get(i);
- RawToken actual = actualTokens.get(i);
- assertEquals(expected.getValue(), actual.getValue(), message + " (value of item '" + i + "' problem)");
- assertEquals(expected.getScopes(), actual.getScopes(), message + " (tokens of item '" + i + "' problem)");
- }
-
- }
-
- private static List getActualTokens(IToken[] tokens, RawTestLine testCase) {
- List actualTokens = new ArrayList<>();
- for (IToken token : tokens) {
- String value = testCase.getLine().substring(token.getStartIndex(),
- token.getEndIndex() < testCase.getLine().length() ? token.getEndIndex()
- : testCase.getLine().length());
- actualTokens.add(new RawToken(value, token.getScopes()));
- }
- return actualTokens;
- }
-
- public void setTestLocation(File testLocation) {
- this.testLocation = testLocation;
- }
-
-}
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core.grammar.internal;
+
+import static java.util.stream.Collectors.*;
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.tm4e.core.grammar.IGrammar;
+import org.eclipse.tm4e.core.grammar.IStackElement;
+import org.eclipse.tm4e.core.registry.IRegistryOptions;
+import org.eclipse.tm4e.core.registry.Registry;
+
+/**
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/tests/tokenization.tests.ts
+ */
+public class RawTestImpl {
+
+ private static final class RawTestLine {
+ String line;
+ List tokens;
+ }
+
+ private String desc;
+ private List grammars;
+ private String grammarPath;
+ private String grammarScopeName;
+ private List grammarInjections;
+ private List lines;
+ private File testLocation;
+
+ public String getDesc() {
+ return desc;
+ }
+
+ public List getGrammars() {
+ return grammars;
+ }
+
+ public String getGrammarPath() {
+ return grammarPath;
+ }
+
+ public String getGrammarScopeName() {
+ return grammarScopeName;
+ }
+
+ public List getGrammarInjections() {
+ return grammarInjections;
+ }
+
+ public List getLines() {
+ return lines;
+ }
+
+ public void executeTest() throws Exception {
+ final var options = new IRegistryOptions() {
+
+ @Override
+ public String getFilePath(final String scopeName) {
+ return null;
+ }
+
+ @Override
+ public InputStream getInputStream(final String scopeName) throws IOException {
+ return null;
+ }
+
+ @Override
+ public Collection getInjections(final String scopeName) {
+ if (scopeName.equals(getGrammarScopeName())) {
+ return getGrammarInjections();
+ }
+ return null;
+ }
+ };
+
+ final Registry registry = new Registry(options);
+ IGrammar grammar = getGrammar(registry, testLocation.getParentFile());
+ if (getGrammarScopeName() != null) {
+ grammar = registry.grammarForScopeName(getGrammarScopeName());
+ }
+ if (grammar == null) {
+ throw new Exception("I HAVE NO GRAMMAR FOR TEST");
+ }
+
+ IStackElement prevState = null;
+ for (final var testLine : lines) {
+ prevState = assertLineTokenization(grammar, testLine, prevState);
+ }
+ }
+
+ private IGrammar getGrammar(final Registry registry, final File testLocation) throws Exception {
+ IGrammar grammar = null;
+ for (final String grammarPath : getGrammars()) {
+ final IGrammar tmpGrammar = registry.loadGrammarFromPathSync(new File(testLocation, grammarPath));
+ if (grammarPath.equals(getGrammarPath())) {
+ grammar = tmpGrammar;
+ }
+ }
+ return grammar;
+ }
+
+ private static IStackElement assertLineTokenization(final IGrammar grammar, final RawTestLine testCase,
+ final IStackElement prevState) {
+ final var line = testCase.line;
+ final var actual = grammar.tokenizeLine(line, prevState);
+
+ final var actualTokens = Arrays.stream(actual.getTokens())
+ .map(token -> new RawToken(
+ line.substring(
+ token.getStartIndex(),
+ Math.min(token.getEndIndex(), line.length())), // TODO Math.min not required in upstream why?
+ token.getScopes()))
+ .collect(toList());
+
+ // TODO@Alex: fix tests instead of working around
+ if (!line.isEmpty()) {
+ // Remove empty tokens...
+ testCase.tokens = testCase.tokens.stream().filter(token -> !token.getValue().isEmpty()).collect(toList());
+ }
+
+ deepEqual(actualTokens, testCase.tokens, "Tokenizing line '" + line + "'");
+
+ return actual.getRuleStack();
+ }
+
+ private static void deepEqual(final List actualTokens, final List expextedTokens,
+ final String message) {
+
+ // compare collection size
+ if (expextedTokens.size() != actualTokens.size()) {
+ final var actualTokensStr = actualTokens.stream().map(Object::toString).collect(joining("\n"));
+ final var expextedTokensStr = expextedTokens.stream().map(Object::toString).collect(joining("\n"));
+
+ assertEquals(expextedTokensStr, actualTokensStr,
+ message + " (collection size problem: actual=" + actualTokens.size() + " expected="
+ + expextedTokens.size() + ")");
+ }
+
+ // compare item
+ for (int i = 0; i < expextedTokens.size(); i++) {
+ final var expected = expextedTokens.get(i);
+ final var actual = actualTokens.get(i);
+ assertEquals(expected.getValue(), actual.getValue(), message + " (value of item '" + i + "' problem)");
+ assertEquals(expected.getScopes(), actual.getScopes(), message + " (tokens of item '" + i + "' problem)");
+ }
+ }
+
+ public void setTestLocation(final File testLocation) {
+ this.testLocation = testLocation;
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestLine.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestLine.java
deleted file mode 100644
index ea02dec23..000000000
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawTestLine.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.grammar.internal;
-
-import java.util.List;
-
-public class RawTestLine {
-
- private String line;
- private List tokens;
-
- public String getLine() {
- return line;
- }
-
- public List getTokens() {
- return tokens;
- }
-}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawToken.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawToken.java
index 7934f68f8..211c3550a 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawToken.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/grammar/internal/RawToken.java
@@ -1,48 +1,62 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.grammar.internal;
-
-import java.util.List;
-
-public class RawToken {
-
- private String value;
- private List scopes;
-
- public RawToken() {
- }
-
- public RawToken(String value, List scopes) {
- this.value = value;
- this.scopes = scopes;
- }
-
- public String getValue() {
- return value;
- }
-
- public List getScopes() {
- return scopes;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof RawToken)) {
- return false;
- }
- RawToken other = (RawToken) obj;
- if (!(this.value.equals(other.value))) {
- return false;
- }
- return this.scopes.equals(other.scopes);
- }
-}
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core.grammar.internal;
+
+import java.util.List;
+
+public class RawToken {
+
+ private String value;
+ private List scopes;
+
+ public RawToken() {
+ }
+
+ public RawToken(String value, List scopes) {
+ this.value = value;
+ this.scopes = scopes;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public List getScopes() {
+ return scopes;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof RawToken)) {
+ return false;
+ }
+ RawToken other = (RawToken) obj;
+ if (!(this.value.equals(other.value))) {
+ return false;
+ }
+ return this.scopes.equals(other.scopes);
+ }
+
+ @Override
+ public int hashCode() {
+ final var prime = 31;
+ var result = 1;
+ result = prime * result + (scopes == null ? 0 : scopes.hashCode());
+ result = prime * result + (value == null ? 0 : value.hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "RawToken{\n value:" + value + "\n scopes:" + scopes + "\n}";
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeMatchingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java
similarity index 91%
rename from org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeMatchingTest.java
rename to org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java
index c7bc7b632..b763b5dbd 100644
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeMatchingTest.java
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeMatchingTest.java
@@ -1,275 +1,274 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.theme;
-
-import static org.junit.jupiter.api.Assertions.assertArrayEquals;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.io.ByteArrayInputStream;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.tm4e.core.internal.grammar.ScopeListElement;
-import org.eclipse.tm4e.core.internal.grammar.ScopeMetadata;
-import org.eclipse.tm4e.core.internal.grammar.StackElementMetadata;
-import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader;
-import org.junit.jupiter.api.Test;
-
-/**
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
- *
- */
-class ThemeMatchingTest {
-
- @Test
- void testGivesHigherPriorityToDeeperMatches() throws Exception {
- Theme theme = loadTheme("{" +
- "\"settings\": ["+
- "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+
- "{ \"scope\": \"punctuation.definition.string.begin.html\", \"settings\": { \"foreground\": \"#300000\" } },"+
- "{ \"scope\": \"meta.tag punctuation.definition.string\", \"settings\": { \"foreground\": \"#400000\" } }"+
- "]"+
- "}");
-
-
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#100000");
- int _B = colorMap.getId("#200000");
- int _C = colorMap.getId("#400000");
- int _D = colorMap.getId("#300000");
-
- List actual = theme.match("punctuation.definition.string.begin.html");
-
- assertArrayEquals(
- new ThemeTrieElementRule[] { new ThemeTrieElementRule(5, null, FontStyle.NotSet, _D, _NOT_SET),
- new ThemeTrieElementRule(3, Arrays.asList("meta.tag"), FontStyle.NotSet, _C, _NOT_SET) },
- actual.toArray());
- }
-
- @Test
- void testGivesHigherPriorityToParentMatches1() throws Exception {
- Theme theme = loadTheme("{" +
- "\"settings\": ["+
- "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+
- "{ \"scope\": \"c a\", \"settings\": { \"foreground\": \"#300000\" } },"+
- "{ \"scope\": \"d a.b\", \"settings\": { \"foreground\": \"#400000\" } },"+
- "{ \"scope\": \"a\", \"settings\": { \"foreground\": \"#500000\" } }"+
- "]"+
- "}");
-
-
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#100000");
- int _B = colorMap.getId("#200000");
- int _C = colorMap.getId("#500000");
- int _D = colorMap.getId("#300000");
- int _E = colorMap.getId("#400000");
-
- List actual = theme.match("a.b");
-
- assertArrayEquals(new ThemeTrieElementRule[] {
- new ThemeTrieElementRule(2, Arrays.asList("d"), FontStyle.NotSet, _E, _NOT_SET),
- new ThemeTrieElementRule(1, Arrays.asList("c"), FontStyle.NotSet, _D, _NOT_SET),
- new ThemeTrieElementRule(1, null, FontStyle.NotSet, _C, _NOT_SET) }, actual.toArray());
- }
-
- @Test
- void testGivesHigherPriorityToParentMatches2() throws Exception {
- Theme theme = loadTheme("{" +
- "\"settings\": ["+
- "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+
- "{ \"scope\": \"meta.tag entity\", \"settings\": { \"foreground\": \"#300000\" } },"+
- "{ \"scope\": \"meta.selector.css entity.name.tag\", \"settings\": { \"foreground\": \"#400000\" } },"+
- "{ \"scope\": \"entity\", \"settings\": { \"foreground\": \"#500000\" } }"+
- "]"+
- "}");
-
-
- ScopeListElement root = new ScopeListElement(null, "text.html.cshtml", 0);
- ScopeListElement parent = new ScopeListElement(root, "meta.tag.structure.any.html", 0);
- int r = ScopeListElement.mergeMetadata(0, parent, new ScopeMetadata("entity.name.tag.structure.any.html", 0, 0,
- theme.match("entity.name.tag.structure.any.html")));
- String color = theme.getColor(StackElementMetadata.getForeground(r));
- assertEquals("#300000", color);
- }
-
- @Test
- void testCanMatch() throws Exception {
- Theme theme = loadTheme("{" +
- "\"settings\": ["+
- "{ \"settings\": { \"foreground\": \"#F8F8F2\", \"background\": \"#272822\" } },"+
- "{ \"scope\": \"source, something\", \"settings\": { \"background\": \"#100000\" } },"+
- "{ \"scope\": [\"bar\", \"baz\"], \"settings\": { \"background\": \"#200000\" } },"+
- "{ \"scope\": \"source.css selector bar\", \"settings\": { \"fontStyle\": \"bold\" } },"+
- "{ \"scope\": \"constant\", \"settings\": { \"fontStyle\": \"italic\", \"foreground\": \"#300000\" } },"+
- "{ \"scope\": \"constant.numeric\", \"settings\": { \"foreground\": \"#400000\" } },"+
- "{ \"scope\": \"constant.numeric.hex\", \"settings\": { \"fontStyle\": \"bold\" } },"+
- "{ \"scope\": \"constant.numeric.oct\", \"settings\": { \"fontStyle\": \"bold italic underline\" } },"+
- "{ \"scope\": \"constant.numeric.dec\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#500000\" } },"+
- "{ \"scope\": \"storage.object.bar\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#600000\" } }"+
- "]"+
- "}");
-
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#F8F8F2");
- int _B = colorMap.getId("#272822");
- int _C = colorMap.getId("#200000");
- int _D = colorMap.getId("#300000");
- int _E = colorMap.getId("#400000");
- int _F = colorMap.getId("#500000");
- int _G = colorMap.getId("#100000");
- int _H = colorMap.getId("#600000");
-
- // matches defaults
- assertNoMatch(theme, "");
- assertNoMatch(theme, "bazz");
- assertNoMatch(theme, "asdfg");
-
- // matches source
- assertSimpleMatch(theme, "source", 1, FontStyle.NotSet, _NOT_SET, _G);
- assertSimpleMatch(theme, "source.ts", 1, FontStyle.NotSet, _NOT_SET, _G);
- assertSimpleMatch(theme, "source.tss", 1, FontStyle.NotSet, _NOT_SET, _G);
-
- // matches something
- assertSimpleMatch(theme, "something", 1, FontStyle.NotSet, _NOT_SET, _G);
- assertSimpleMatch(theme, "something.ts", 1, FontStyle.NotSet, _NOT_SET, _G);
- assertSimpleMatch(theme, "something.tss", 1, FontStyle.NotSet, _NOT_SET, _G);
-
- // matches baz
- assertSimpleMatch(theme, "baz", 1, FontStyle.NotSet, _NOT_SET, _C);
- assertSimpleMatch(theme, "baz.ts", 1, FontStyle.NotSet, _NOT_SET, _C);
- assertSimpleMatch(theme, "baz.tss", 1, FontStyle.NotSet, _NOT_SET, _C);
-
- // matches constant
- assertSimpleMatch(theme, "constant", 1, FontStyle.Italic, _D, _NOT_SET);
- assertSimpleMatch(theme, "constant.string", 1, FontStyle.Italic, _D, _NOT_SET);
- assertSimpleMatch(theme, "constant.hex", 1, FontStyle.Italic, _D, _NOT_SET);
-
- // matches constant.numeric
- assertSimpleMatch(theme, "constant.numeric", 2, FontStyle.Italic, _E, _NOT_SET);
- assertSimpleMatch(theme, "constant.numeric.baz", 2, FontStyle.Italic, _E, _NOT_SET);
-
- // matches constant.numeric.hex
- assertSimpleMatch(theme, "constant.numeric.hex", 3, FontStyle.Bold, _E, _NOT_SET);
- assertSimpleMatch(theme, "constant.numeric.hex.baz", 3, FontStyle.Bold, _E, _NOT_SET);
-
- // matches constant.numeric.oct
- assertSimpleMatch(theme, "constant.numeric.oct", 3, FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, _E,
- _NOT_SET);
- assertSimpleMatch(theme, "constant.numeric.oct.baz", 3, FontStyle.Bold | FontStyle.Italic | FontStyle.Underline,
- _E, _NOT_SET);
-
- // matches constant.numeric.dec
- assertSimpleMatch(theme, "constant.numeric.dec", 3, FontStyle.None, _F, _NOT_SET);
- assertSimpleMatch(theme, "constant.numeric.dec.baz", 3, FontStyle.None, _F, _NOT_SET);
-
- // matches storage.object.bar
- assertSimpleMatch(theme, "storage.object.bar", 3, FontStyle.None, _H, _NOT_SET);
- assertSimpleMatch(theme, "storage.object.bar.baz", 3, FontStyle.None, _H, _NOT_SET);
-
- // does not match storage.object.bar
- assertSimpleMatch(theme, "storage.object.bart", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET);
- assertSimpleMatch(theme, "storage.object", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET);
- assertSimpleMatch(theme, "storage", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET);
-
- assertMatch(theme, "bar",
- new ThemeTrieElementRule[] { new ThemeTrieElementRule(1, Arrays.asList("selector", "source.css"),
- FontStyle.Bold, _NOT_SET, _C),
- new ThemeTrieElementRule(1, null, FontStyle.NotSet, _NOT_SET, _C) });
- }
-
- @Test
- void testMicrosoft_vscode_23460() throws Exception {
- Theme theme = loadTheme("{" +
- "\"settings\": ["+
- "{" +
- "\"settings\": {"+
- "\"foreground\": \"#aec2e0\","+
- "\"background\": \"#14191f\""+
- "}"+
- "}, {"+
- "\"name\": \"JSON String\","+
- "\"scope\": \"meta.structure.dictionary.json string.quoted.double.json\","+
- "\"settings\": {"+
- "\"foreground\": \"#FF410D\""+
- "}"+
- "}, {"+
- "\"scope\": \"meta.structure.dictionary.json string.quoted.double.json\","+
- "\"settings\": {"+
- "\"foreground\": \"#ffffff\""+
- "}"+
- "},"+
- "{"+
- "\"scope\": \"meta.structure.dictionary.value.json string.quoted.double.json\","+
- "\"settings\": {"+
- "\"foreground\": \"#FF410D\""+
- "}"+
- "}"+
- "]"+
- "}");
-
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#aec2e0");
- int _B = colorMap.getId("#14191f");
- int _C = colorMap.getId("#FF410D");
- int _D = colorMap.getId("#ffffff");
-
-
- // string.quoted.double.json
- // meta.structure.dictionary.value.json
- // meta.structure.dictionary.json
- // source.json
- assertMatch(theme, "string.quoted.double.json", new ThemeTrieElementRule[] {
- new ThemeTrieElementRule(4, Arrays.asList("meta.structure.dictionary.value.json"), FontStyle.NotSet, _C, _NOT_SET),
- new ThemeTrieElementRule(4, Arrays.asList("meta.structure.dictionary.json"), FontStyle.NotSet, _D, _NOT_SET),
- new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)
- });
-
- ScopeListElement parent3 = new ScopeListElement(null, "source.json", 0);
- ScopeListElement parent2 = new ScopeListElement(parent3, "meta.structure.dictionary.json", 0);
- ScopeListElement parent1 = new ScopeListElement(parent2, "meta.structure.dictionary.value.json", 0);
-
- int r = ScopeListElement.mergeMetadata(
- 0,
- parent1,
- new ScopeMetadata("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json"))
- );
- String color = theme.getColor(StackElementMetadata.getForeground(r));
- assertEquals("#FF410D", color);
- }
-
- private void assertMatch(Theme theme, String scopeName, ThemeTrieElementRule[] expected) {
- List actual = theme.match(scopeName);
- assertArrayEquals(expected, actual.toArray(), "when matching <<" + scopeName + ">>");
- }
-
- private void assertSimpleMatch(Theme theme, String scopeName, int scopeDepth, int fontStyle, int foreground, int background) {
- assertMatch(theme, scopeName, new ThemeTrieElementRule [] {
- new ThemeTrieElementRule(scopeDepth, null, fontStyle, foreground, background)
- });
- }
-
- private void assertNoMatch(Theme theme, String scopeName) {
- assertMatch(theme, scopeName, new ThemeTrieElementRule [] {
- new ThemeTrieElementRule(0, null, FontStyle.NotSet, 0, 0 /*_NOT_SET, _NOT_SET*/)
- });
- }
-
- private Theme loadTheme(String theme) throws Exception {
- return Theme.createFromRawTheme(ThemeReader.JSON_PARSER.parse(new ByteArrayInputStream(theme.getBytes())));
- }
-}
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core.internal.theme;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.io.ByteArrayInputStream;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.tm4e.core.internal.grammar.ScopeListElement;
+import org.eclipse.tm4e.core.internal.grammar.ScopeMetadata;
+import org.eclipse.tm4e.core.internal.grammar.StackElementMetadata;
+import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader;
+import org.junit.jupiter.api.Test;
+
+/**
+ *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
+ *
+ */
+class ThemeMatchingTest {
+
+ @Test
+ void testGivesHigherPriorityToDeeperMatches() throws Exception {
+ Theme theme = loadTheme("{" +
+ "\"settings\": ["+
+ "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+
+ "{ \"scope\": \"punctuation.definition.string.begin.html\", \"settings\": { \"foreground\": \"#300000\" } },"+
+ "{ \"scope\": \"meta.tag punctuation.definition.string\", \"settings\": { \"foreground\": \"#400000\" } }"+
+ "]"+
+ "}");
+
+
+ ColorMap colorMap = new ColorMap();
+ int _NOT_SET = 0;
+ int _A = colorMap.getId("#100000");
+ int _B = colorMap.getId("#200000");
+ int _C = colorMap.getId("#400000");
+ int _D = colorMap.getId("#300000");
+
+ List actual = theme.match("punctuation.definition.string.begin.html");
+
+ assertArrayEquals(
+ new ThemeTrieElementRule[] { new ThemeTrieElementRule(5, null, FontStyle.NotSet, _D, _NOT_SET),
+ new ThemeTrieElementRule(3, Arrays.asList("meta.tag"), FontStyle.NotSet, _C, _NOT_SET) },
+ actual.toArray());
+ }
+
+ @Test
+ void testGivesHigherPriorityToParentMatches1() throws Exception {
+ Theme theme = loadTheme("{" +
+ "\"settings\": ["+
+ "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+
+ "{ \"scope\": \"c a\", \"settings\": { \"foreground\": \"#300000\" } },"+
+ "{ \"scope\": \"d a.b\", \"settings\": { \"foreground\": \"#400000\" } },"+
+ "{ \"scope\": \"a\", \"settings\": { \"foreground\": \"#500000\" } }"+
+ "]"+
+ "}");
+
+
+ ColorMap colorMap = new ColorMap();
+ int _NOT_SET = 0;
+ int _A = colorMap.getId("#100000");
+ int _B = colorMap.getId("#200000");
+ int _C = colorMap.getId("#500000");
+ int _D = colorMap.getId("#300000");
+ int _E = colorMap.getId("#400000");
+
+ List actual = theme.match("a.b");
+
+ assertArrayEquals(new ThemeTrieElementRule[] {
+ new ThemeTrieElementRule(2, Arrays.asList("d"), FontStyle.NotSet, _E, _NOT_SET),
+ new ThemeTrieElementRule(1, Arrays.asList("c"), FontStyle.NotSet, _D, _NOT_SET),
+ new ThemeTrieElementRule(1, null, FontStyle.NotSet, _C, _NOT_SET) }, actual.toArray());
+ }
+
+ @Test
+ void testGivesHigherPriorityToParentMatches2() throws Exception {
+ Theme theme = loadTheme("{" +
+ "\"settings\": ["+
+ "{ \"settings\": { \"foreground\": \"#100000\", \"background\": \"#200000\" } },"+
+ "{ \"scope\": \"meta.tag entity\", \"settings\": { \"foreground\": \"#300000\" } },"+
+ "{ \"scope\": \"meta.selector.css entity.name.tag\", \"settings\": { \"foreground\": \"#400000\" } },"+
+ "{ \"scope\": \"entity\", \"settings\": { \"foreground\": \"#500000\" } }"+
+ "]"+
+ "}");
+
+
+ ScopeListElement root = new ScopeListElement(null, "text.html.cshtml", 0);
+ ScopeListElement parent = new ScopeListElement(root, "meta.tag.structure.any.html", 0);
+ int r = ScopeListElement.mergeMetadata(0, parent, new ScopeMetadata("entity.name.tag.structure.any.html", 0, 0,
+ theme.match("entity.name.tag.structure.any.html")));
+ String color = theme.getColor(StackElementMetadata.getForeground(r));
+ assertEquals("#300000", color);
+ }
+
+ @Test
+ void testCanMatch() throws Exception {
+ Theme theme = loadTheme("{" +
+ "\"settings\": ["+
+ "{ \"settings\": { \"foreground\": \"#F8F8F2\", \"background\": \"#272822\" } },"+
+ "{ \"scope\": \"source, something\", \"settings\": { \"background\": \"#100000\" } },"+
+ "{ \"scope\": [\"bar\", \"baz\"], \"settings\": { \"background\": \"#200000\" } },"+
+ "{ \"scope\": \"source.css selector bar\", \"settings\": { \"fontStyle\": \"bold\" } },"+
+ "{ \"scope\": \"constant\", \"settings\": { \"fontStyle\": \"italic\", \"foreground\": \"#300000\" } },"+
+ "{ \"scope\": \"constant.numeric\", \"settings\": { \"foreground\": \"#400000\" } },"+
+ "{ \"scope\": \"constant.numeric.hex\", \"settings\": { \"fontStyle\": \"bold\" } },"+
+ "{ \"scope\": \"constant.numeric.oct\", \"settings\": { \"fontStyle\": \"bold italic underline\" } },"+
+ "{ \"scope\": \"constant.numeric.dec\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#500000\" } },"+
+ "{ \"scope\": \"storage.object.bar\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#600000\" } }"+
+ "]"+
+ "}");
+
+ ColorMap colorMap = new ColorMap();
+ int _NOT_SET = 0;
+ int _A = colorMap.getId("#F8F8F2");
+ int _B = colorMap.getId("#272822");
+ int _C = colorMap.getId("#200000");
+ int _D = colorMap.getId("#300000");
+ int _E = colorMap.getId("#400000");
+ int _F = colorMap.getId("#500000");
+ int _G = colorMap.getId("#100000");
+ int _H = colorMap.getId("#600000");
+
+ // matches defaults
+ assertNoMatch(theme, "");
+ assertNoMatch(theme, "bazz");
+ assertNoMatch(theme, "asdfg");
+
+ // matches source
+ assertSimpleMatch(theme, "source", 1, FontStyle.NotSet, _NOT_SET, _G);
+ assertSimpleMatch(theme, "source.ts", 1, FontStyle.NotSet, _NOT_SET, _G);
+ assertSimpleMatch(theme, "source.tss", 1, FontStyle.NotSet, _NOT_SET, _G);
+
+ // matches something
+ assertSimpleMatch(theme, "something", 1, FontStyle.NotSet, _NOT_SET, _G);
+ assertSimpleMatch(theme, "something.ts", 1, FontStyle.NotSet, _NOT_SET, _G);
+ assertSimpleMatch(theme, "something.tss", 1, FontStyle.NotSet, _NOT_SET, _G);
+
+ // matches baz
+ assertSimpleMatch(theme, "baz", 1, FontStyle.NotSet, _NOT_SET, _C);
+ assertSimpleMatch(theme, "baz.ts", 1, FontStyle.NotSet, _NOT_SET, _C);
+ assertSimpleMatch(theme, "baz.tss", 1, FontStyle.NotSet, _NOT_SET, _C);
+
+ // matches constant
+ assertSimpleMatch(theme, "constant", 1, FontStyle.Italic, _D, _NOT_SET);
+ assertSimpleMatch(theme, "constant.string", 1, FontStyle.Italic, _D, _NOT_SET);
+ assertSimpleMatch(theme, "constant.hex", 1, FontStyle.Italic, _D, _NOT_SET);
+
+ // matches constant.numeric
+ assertSimpleMatch(theme, "constant.numeric", 2, FontStyle.Italic, _E, _NOT_SET);
+ assertSimpleMatch(theme, "constant.numeric.baz", 2, FontStyle.Italic, _E, _NOT_SET);
+
+ // matches constant.numeric.hex
+ assertSimpleMatch(theme, "constant.numeric.hex", 3, FontStyle.Bold, _E, _NOT_SET);
+ assertSimpleMatch(theme, "constant.numeric.hex.baz", 3, FontStyle.Bold, _E, _NOT_SET);
+
+ // matches constant.numeric.oct
+ assertSimpleMatch(theme, "constant.numeric.oct", 3, FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, _E,
+ _NOT_SET);
+ assertSimpleMatch(theme, "constant.numeric.oct.baz", 3, FontStyle.Bold | FontStyle.Italic | FontStyle.Underline,
+ _E, _NOT_SET);
+
+ // matches constant.numeric.dec
+ assertSimpleMatch(theme, "constant.numeric.dec", 3, FontStyle.None, _F, _NOT_SET);
+ assertSimpleMatch(theme, "constant.numeric.dec.baz", 3, FontStyle.None, _F, _NOT_SET);
+
+ // matches storage.object.bar
+ assertSimpleMatch(theme, "storage.object.bar", 3, FontStyle.None, _H, _NOT_SET);
+ assertSimpleMatch(theme, "storage.object.bar.baz", 3, FontStyle.None, _H, _NOT_SET);
+
+ // does not match storage.object.bar
+ assertSimpleMatch(theme, "storage.object.bart", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET);
+ assertSimpleMatch(theme, "storage.object", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET);
+ assertSimpleMatch(theme, "storage", 0, FontStyle.NotSet, _NOT_SET, _NOT_SET);
+
+ assertMatch(theme, "bar",
+ new ThemeTrieElementRule[] { new ThemeTrieElementRule(1, Arrays.asList("selector", "source.css"),
+ FontStyle.Bold, _NOT_SET, _C),
+ new ThemeTrieElementRule(1, null, FontStyle.NotSet, _NOT_SET, _C) });
+ }
+
+ @Test
+ void testMicrosoft_vscode_23460() throws Exception {
+ Theme theme = loadTheme("{" +
+ "\"settings\": ["+
+ "{" +
+ "\"settings\": {"+
+ "\"foreground\": \"#aec2e0\","+
+ "\"background\": \"#14191f\""+
+ "}"+
+ "}, {"+
+ "\"name\": \"JSON String\","+
+ "\"scope\": \"meta.structure.dictionary.json string.quoted.double.json\","+
+ "\"settings\": {"+
+ "\"foreground\": \"#FF410D\""+
+ "}"+
+ "}, {"+
+ "\"scope\": \"meta.structure.dictionary.json string.quoted.double.json\","+
+ "\"settings\": {"+
+ "\"foreground\": \"#ffffff\""+
+ "}"+
+ "},"+
+ "{"+
+ "\"scope\": \"meta.structure.dictionary.value.json string.quoted.double.json\","+
+ "\"settings\": {"+
+ "\"foreground\": \"#FF410D\""+
+ "}"+
+ "}"+
+ "]"+
+ "}");
+
+ ColorMap colorMap = new ColorMap();
+ int _NOT_SET = 0;
+ int _A = colorMap.getId("#aec2e0");
+ int _B = colorMap.getId("#14191f");
+ int _C = colorMap.getId("#FF410D");
+ int _D = colorMap.getId("#ffffff");
+
+ // string.quoted.double.json
+ // meta.structure.dictionary.value.json
+ // meta.structure.dictionary.json
+ // source.json
+ assertMatch(theme, "string.quoted.double.json", new ThemeTrieElementRule[] {
+ new ThemeTrieElementRule(4, Arrays.asList("meta.structure.dictionary.value.json"), FontStyle.NotSet, _C, _NOT_SET),
+ new ThemeTrieElementRule(4, Arrays.asList("meta.structure.dictionary.json"), FontStyle.NotSet, _D, _NOT_SET),
+ new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)
+ });
+
+ ScopeListElement parent3 = new ScopeListElement(null, "source.json", 0);
+ ScopeListElement parent2 = new ScopeListElement(parent3, "meta.structure.dictionary.json", 0);
+ ScopeListElement parent1 = new ScopeListElement(parent2, "meta.structure.dictionary.value.json", 0);
+
+ int r = ScopeListElement.mergeMetadata(
+ 0,
+ parent1,
+ new ScopeMetadata("string.quoted.double.json", 0, 0, theme.match("string.quoted.double.json"))
+ );
+ String color = theme.getColor(StackElementMetadata.getForeground(r));
+ assertEquals("#FF410D", color);
+ }
+
+ private void assertMatch(Theme theme, String scopeName, ThemeTrieElementRule[] expected) {
+ List actual = theme.match(scopeName);
+ assertArrayEquals(expected, actual.toArray(), "when matching <<" + scopeName + ">>");
+ }
+
+ private void assertSimpleMatch(Theme theme, String scopeName, int scopeDepth, int fontStyle, int foreground, int background) {
+ assertMatch(theme, scopeName, new ThemeTrieElementRule [] {
+ new ThemeTrieElementRule(scopeDepth, null, fontStyle, foreground, background)
+ });
+ }
+
+ private void assertNoMatch(Theme theme, String scopeName) {
+ assertMatch(theme, scopeName, new ThemeTrieElementRule [] {
+ new ThemeTrieElementRule(0, null, FontStyle.NotSet, 0, 0 /*_NOT_SET, _NOT_SET*/)
+ });
+ }
+
+ private Theme loadTheme(String theme) throws Exception {
+ return Theme.createFromRawTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes())), null);
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java
new file mode 100644
index 000000000..12c364ad3
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeParsingTest.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core.internal.theme;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.io.ByteArrayInputStream;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader;
+import org.junit.jupiter.api.Test;
+
+/**
+ *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
+ *
+ */
+public class ThemeParsingTest {
+
+ @Test
+ public void testCanParse() throws Exception {
+ final var actual = parseTheme(("{'settings': [" +
+ "{ 'settings': { 'foreground': '#F8F8F2', 'background': '#272822' } }," +
+ "{ 'scope': 'source, something', 'settings': { 'background': '#100000' } }," +
+ "{ 'scope': ['bar', 'baz'], 'settings': { 'background': '#010000' } }," +
+ "{ 'scope': 'source.css selector bar', 'settings': { 'fontStyle': 'bold' } }," +
+ "{ 'scope': 'constant', 'settings': { 'fontStyle': 'italic', 'foreground': '#ff0000' } }," +
+ "{ 'scope': 'constant.numeric', 'settings': { 'foreground': '#00ff00' } }," +
+ "{ 'scope': 'constant.numeric.hex', 'settings': { 'fontStyle': 'bold' } }," +
+ "{ 'scope': 'constant.numeric.oct', 'settings': { 'fontStyle': 'bold italic underline' } }," +
+ "{ 'scope': 'constant.numeric.bin', 'settings': { 'fontStyle': 'bold strikethrough' } }," +
+ "{ 'scope': 'constant.numeric.dec', 'settings': { 'fontStyle': '', 'foreground': '#0000ff' } }," +
+ "{ 'scope': 'foo', 'settings': { 'fontStyle': '', 'foreground': '#CFA' } }" +
+ "]}").replace('\'', '"'));
+
+ final var expected = new ParsedThemeRule[] {
+ new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#F8F8F2", "#272822"),
+ new ParsedThemeRule("source", null, 1, FontStyle.NotSet, null, "#100000"),
+ new ParsedThemeRule("something", null, 1, FontStyle.NotSet, null, "#100000"),
+ new ParsedThemeRule("bar", null, 2, FontStyle.NotSet, null, "#010000"),
+ new ParsedThemeRule("baz", null, 2, FontStyle.NotSet, null, "#010000"),
+ new ParsedThemeRule("bar", Arrays.asList("selector", "source.css"), 3, FontStyle.Bold, null, null),
+ new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#ff0000", null),
+ new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#00ff00", null),
+ new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null),
+ new ParsedThemeRule("constant.numeric.oct", null, 7,
+ FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null),
+ new ParsedThemeRule("constant.numeric.bin", null, 8, FontStyle.Bold | FontStyle.Strikethrough, null,
+ null),
+ new ParsedThemeRule("constant.numeric.dec", null, 9, FontStyle.None, "#0000ff", null),
+ new ParsedThemeRule("foo", null, 10, FontStyle.None, "#CFA", null), };
+
+ assertArrayEquals(expected, actual.toArray());
+ }
+
+ private List parseTheme(String theme) throws Exception {
+ return Theme.parseTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes())));
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java
new file mode 100644
index 000000000..d24d57fb8
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/internal/theme/ThemeResolvingTest.java
@@ -0,0 +1,433 @@
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core.internal.theme;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.io.ByteArrayInputStream;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader;
+import org.eclipse.tm4e.core.internal.utils.CompareUtils;
+import org.junit.jupiter.api.Test;
+
+/**
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
+ */
+public class ThemeResolvingTest {
+
+ private static final int NOT_SET = 0;
+ private static final ThemeTrieElementRule NOTSET_THEME_TRIE_ELEMENT_RULE = new ThemeTrieElementRule(0, null,
+ FontStyle.NotSet, NOT_SET, NOT_SET);
+ private static final ThemeTrieElement NOTSET_THEME_TRIE_ELEMENT = new ThemeTrieElement(
+ NOTSET_THEME_TRIE_ELEMENT_RULE);
+
+ private static void assertStrArrCmp(String testCase, List a, List b, int expected) {
+ assertEquals(expected, CompareUtils.strArrCmp(a, b), testCase);
+ }
+
+ private static Theme createTheme(ParsedThemeRule... rules) {
+ return Theme.createFromParsedTheme(List.of(rules), null);
+ }
+
+ private static List parseTheme(String theme) throws Exception {
+ return Theme.parseTheme(ThemeReader.readThemeSync("theme.json", new ByteArrayInputStream(theme.getBytes())));
+ }
+
+ @Test
+ public void testThemeParsingCanParse() throws Exception {
+ var actual = parseTheme(("{" +
+ "'settings': [" +
+ "{ 'settings': { 'foreground': '#F8F8F2', 'background': '#272822' } }," +
+ "{ 'scope': 'source, something', 'settings': { 'background': '#100000' } }," +
+ "{ 'scope': ['bar', 'baz'], 'settings': { 'background': '#010000' } }," +
+ "{ 'scope': 'source.css selector bar', 'settings': { 'fontStyle': 'bold' } }," +
+ "{ 'scope': 'constant', 'settings': { 'fontStyle': 'italic', 'foreground': '#ff0000' } }," +
+ "{ 'scope': 'constant.numeric', 'settings': { 'foreground': '#00ff00' } }," +
+ "{ 'scope': 'constant.numeric.hex', 'settings': { 'fontStyle': 'bold' } }," +
+ "{ 'scope': 'constant.numeric.oct', 'settings': { 'fontStyle': 'bold italic underline' } }," +
+ "{ 'scope': 'constant.numeric.bin', 'settings': { 'fontStyle': 'bold strikethrough' } }," +
+ "{ 'scope': 'constant.numeric.dec', 'settings': { 'fontStyle': '', 'foreground': '#0000ff' } }," +
+ "{ 'scope': 'foo', 'settings': { 'fontStyle': '', 'foreground': '#CFA' } }" +
+ "]" +
+ "}").replace('\'', '"'));
+
+ var expected = List.of(
+ new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#F8F8F2", "#272822"),
+ new ParsedThemeRule("source", null, 1, FontStyle.NotSet, null, "#100000"),
+ new ParsedThemeRule("something", null, 1, FontStyle.NotSet, null, "#100000"),
+ new ParsedThemeRule("bar", null, 2, FontStyle.NotSet, null, "#010000"),
+ new ParsedThemeRule("baz", null, 2, FontStyle.NotSet, null, "#010000"),
+ new ParsedThemeRule("bar", List.of("selector", "source.css"), 3, FontStyle.Bold, null, null),
+ new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#ff0000", null),
+ new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#00ff00", null),
+ new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null),
+ new ParsedThemeRule("constant.numeric.oct", null, 7,
+ FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null),
+ new ParsedThemeRule("constant.numeric.bin", null, 8, FontStyle.Bold | FontStyle.Strikethrough, null,
+ null),
+ new ParsedThemeRule("constant.numeric.dec", null, 9, FontStyle.None, "#0000ff", null),
+ new ParsedThemeRule("foo", null, 10, FontStyle.None, "#CFA", null));
+
+ assertArrayEquals(expected.toArray(), actual.toArray());
+ }
+
+ @Test
+ public void testStrcmpWorks() {
+ var actual = Arrays.asList("bar", "z", "zu", "a", "ab", "");
+ actual.sort(CompareUtils::strcmp);
+
+ var expected = List.of("", "a", "ab", "bar", "z", "zu");
+ assertArrayEquals(expected.toArray(), actual.toArray());
+ }
+
+ @Test
+ public void testStrArrCmpWorks() {
+ assertStrArrCmp("001", null, null, 0);
+ assertStrArrCmp("002", null, Collections.emptyList(), -1);
+ assertStrArrCmp("003", null, List.of("a"), -1);
+ assertStrArrCmp("004", Collections.emptyList(), null, 1);
+ assertStrArrCmp("005", List.of("a"), null, 1);
+ assertStrArrCmp("006", Collections.emptyList(), Collections.emptyList(), 0);
+ assertStrArrCmp("007", Collections.emptyList(), List.of("a"), -1);
+ assertStrArrCmp("008", List.of("a"), Collections.emptyList(), 1);
+ assertStrArrCmp("009", List.of("a"), List.of("a"), 0);
+ assertStrArrCmp("010", List.of("a", "b"), List.of("a"), 1);
+ assertStrArrCmp("011", List.of("a"), List.of("a", "b"), -1);
+ assertStrArrCmp("012", List.of("a", "b"), List.of("a", "b"), 0);
+ assertStrArrCmp("013", List.of("a", "b"), List.of("a", "c"), -1);
+ assertStrArrCmp("014", List.of("a", "c"), List.of("a", "b"), 1);
+ }
+
+ @Test
+ public void testAlwaysHasDefaults() {
+ var actual = createTheme();
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#000000");
+ int _B = colorMap.getId("#ffffff");
+ var expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), NOTSET_THEME_TRIE_ELEMENT);
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRespectsIncomingDefaults1() {
+ var actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#000000");
+ int _B = colorMap.getId("#ffffff");
+ var expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), NOTSET_THEME_TRIE_ELEMENT);
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRespectsIncomingDefaults2() {
+ Theme actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.None, null, null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#000000");
+ int _B = colorMap.getId("#ffffff");
+ Theme expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B), NOTSET_THEME_TRIE_ELEMENT);
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRespectsIncomingDefaults3() {
+ var actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#000000");
+ int _B = colorMap.getId("#ffffff");
+ var expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B), NOTSET_THEME_TRIE_ELEMENT);
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRespectsIncomingDefaults4() {
+ var actual = createTheme(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#ff0000", null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#ff0000");
+ int _B = colorMap.getId("#ffffff");
+ var expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
+ NOTSET_THEME_TRIE_ELEMENT);
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRespectsIncomingDefaults5() {
+ var actual = createTheme(
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, "#ff0000"),
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#00ff00", null),
+ new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#00ff00");
+ int _B = colorMap.getId("#ff0000");
+ var expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B),
+ NOTSET_THEME_TRIE_ELEMENT);
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testCanMergeIncomingDefaults() {
+ var actual = createTheme(
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, "#ff0000"),
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#00ff00", null),
+ new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#00ff00");
+ int _B = colorMap.getId("#ff0000");
+ var expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B),
+ NOTSET_THEME_TRIE_ELEMENT);
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testDefaultsAreInherited() {
+ Theme actual = createTheme(
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
+ new ParsedThemeRule("var", null, -1, FontStyle.NotSet, "#ff0000", null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#F8F8F2");
+ int _B = colorMap.getId("#272822");
+ int _C = colorMap.getId("#ff0000");
+
+ var map = new HashMap();
+ map.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.NotSet, _C, NOT_SET)));
+
+ Theme expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
+ new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), map));
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testSameRulesGetMerged() {
+ var actual = createTheme(
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
+ new ParsedThemeRule("var", null, 1, FontStyle.Bold, null, null),
+ new ParsedThemeRule("var", null, 0, FontStyle.NotSet, "#ff0000", null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#F8F8F2");
+ int _B = colorMap.getId("#272822");
+ int _C = colorMap.getId("#ff0000");
+
+ var map = new HashMap();
+ map.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, NOT_SET)));
+
+ var expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
+ new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), map));
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRulesAreInherited1() {
+ var actual = createTheme(
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
+ new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#ff0000", null),
+ new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#00ff00", null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#F8F8F2");
+ int _B = colorMap.getId("#272822");
+ int _C = colorMap.getId("#ff0000");
+ int _D = colorMap.getId("#00ff00");
+
+ var map1_1 = new HashMap();
+ map1_1.put("identifier", new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _D, NOT_SET)));
+ var map1 = new HashMap();
+ map1.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, NOT_SET),
+ Collections.emptyList(), map1_1));
+
+ var expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
+ new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), map1));
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRulesAreInherited2() {
+ var actual = createTheme(
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
+ new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#ff0000", null),
+ new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#00ff00", null),
+ new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#100000", null),
+ new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#200000", null),
+ new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null),
+ new ParsedThemeRule("constant.numeric.oct", null, 7,
+ FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null),
+ new ParsedThemeRule("constant.numeric.dec", null, 8, FontStyle.None, "#300000", null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#F8F8F2");
+ int _B = colorMap.getId("#272822");
+ int _C = colorMap.getId("#100000");
+ int _D = colorMap.getId("#200000");
+ int _E = colorMap.getId("#300000");
+ int _F = colorMap.getId("#ff0000");
+ int _G = colorMap.getId("#00ff00");
+
+ var mapOfVar = new HashMap();
+ mapOfVar.put("identifier",
+ new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _G, NOT_SET)));
+
+ var mapOfNumeric = new HashMap();
+ mapOfNumeric.put("hex", new ThemeTrieElement(new ThemeTrieElementRule(3, null, FontStyle.Bold, _D, NOT_SET)));
+ mapOfNumeric.put("oct", new ThemeTrieElement(new ThemeTrieElementRule(3, null,
+ FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, _D, NOT_SET)));
+ mapOfNumeric.put("dec", new ThemeTrieElement(new ThemeTrieElementRule(3, null, FontStyle.None, _E, NOT_SET)));
+
+ var mapOfConstant = new HashMap();
+ mapOfConstant.put("numeric", new ThemeTrieElement(new ThemeTrieElementRule(2, null,
+ FontStyle.Italic, _D, NOT_SET), Collections.emptyList(), mapOfNumeric));
+
+ var mapRoot = new HashMap();
+ mapRoot.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null,
+ FontStyle.Bold, _F, NOT_SET), Collections.emptyList(), mapOfVar));
+ mapRoot.put("constant", new ThemeTrieElement(new ThemeTrieElementRule(1, null,
+ FontStyle.Italic, _C, NOT_SET), Collections.emptyList(), mapOfConstant));
+
+ var expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
+ new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), mapRoot));
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testRulesWithParentScopes() {
+ var actual = createTheme(
+ new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
+ new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#100000", null),
+ new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#200000", null),
+ new ParsedThemeRule("var", List.of("source.css"), 1, FontStyle.Italic, "#300000", null),
+ new ParsedThemeRule("var", List.of("source.css"), 2, FontStyle.Underline, null, null));
+ var colorMap = new ColorMap();
+ int _A = colorMap.getId("#F8F8F2");
+ int _B = colorMap.getId("#272822");
+ int _C = colorMap.getId("#100000");
+ int _D = colorMap.getId("#300000");
+ int _E = colorMap.getId("#200000");
+
+ var mapOfVar = new HashMap();
+ mapOfVar.put("identifier",
+ new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _E, NOT_SET), List.of(
+ new ThemeTrieElementRule(1, List.of("source.css"), FontStyle.Underline, _D, NOT_SET))));
+
+ var mapRoot = new HashMap();
+ mapRoot.put("var",
+ new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, NOT_SET), List.of(
+ new ThemeTrieElementRule(1, List.of("source.css"), FontStyle.Underline, _D, NOT_SET)),
+ mapOfVar));
+
+ var expected = new Theme(colorMap,
+ new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
+ new ThemeTrieElement(NOTSET_THEME_TRIE_ELEMENT_RULE, Collections.emptyList(), mapRoot));
+ assertEquals(actual, expected);
+ }
+
+ @Test
+ public void testIssue_38_ignores_rules_with_invalid_colors() throws Exception {
+ var actual = parseTheme(("{" +
+ "'settings': [{" +
+ " 'settings': {" +
+ " 'background': '#222222'," +
+ " 'foreground': '#cccccc'" +
+ " }" +
+ "}, {" +
+ " 'name': 'Variable'," +
+ " 'scope': 'variable'," +
+ " 'settings': {" +
+ " 'fontStyle': ''" +
+ " }" +
+ "}, {" +
+ " 'name': 'Function argument'," +
+ " 'scope': 'variable.parameter'," +
+ " 'settings': {" +
+ " 'fontStyle': 'italic'," +
+ " 'foreground': ''" +
+ " }" +
+ "}, {" +
+ " 'name': 'Library variable'," +
+ " 'scope': 'support.other.variable'," +
+ " 'settings': {" +
+ " 'fontStyle': ''" +
+ " }" +
+ "}, {" +
+ " 'name': 'Function argument'," +
+ " 'scope': 'variable.other'," +
+ " 'settings': {" +
+ " 'foreground': ''," +
+ " 'fontStyle': 'normal'" +
+ " }" +
+ "}, {" +
+ " 'name': 'Coffeescript Function argument'," +
+ " 'scope': 'variable.parameter.function.coffee'," +
+ " 'settings': {" +
+ " 'foreground': '#F9D423'," +
+ " 'fontStyle': 'italic'" +
+ " }" +
+ "}]" +
+ "}").replace('\'', '"'));
+
+ var expected = List.of(
+ new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#cccccc", "#222222"),
+ new ParsedThemeRule("variable", null, 1, FontStyle.None, null, null),
+ new ParsedThemeRule("variable.parameter", null, 2, FontStyle.Italic, null, null),
+ new ParsedThemeRule("support.other.variable", null, 3, FontStyle.None, null, null),
+ new ParsedThemeRule("variable.other", null, 4, FontStyle.None, null, null),
+ new ParsedThemeRule("variable.parameter.function.coffee", null, 5, FontStyle.Italic, "#F9D423", null));
+
+ assertArrayEquals(expected.toArray(), actual.toArray());
+ }
+
+ @Test
+ public void testIssue_35_Trailing_comma_in_a_tmTheme_scope_selector() throws Exception {
+ var actual = parseTheme(("{" +
+ "'settings': [{" +
+ " 'settings': {" +
+ " 'background': '#25292C'," +
+ " 'foreground': '#EFEFEF'" +
+ " }" +
+ "}, {" +
+ " 'name': 'CSS at-rule keyword control'," +
+ " 'scope': '" +
+ " meta.at-rule.return.scss,\n" +
+ " meta.at-rule.return.scss punctuation.definition,\n" +
+ " meta.at-rule.else.scss,\n" +
+ " meta.at-rule.else.scss punctuation.definition,\n" +
+ " meta.at-rule.if.scss,\n" +
+ " meta.at-rule.if.scss punctuation.definition\n" +
+ " '," +
+ " 'settings': {" +
+ " 'foreground': '#CC7832'" +
+ " }" +
+ "}]" +
+ "}").replace('\'', '"'));
+
+ var expected = List.of(
+ new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#EFEFEF", "#25292C"),
+ new ParsedThemeRule("meta.at-rule.return.scss", null, 1, FontStyle.NotSet, "#CC7832", null),
+ new ParsedThemeRule("punctuation.definition", List.of("meta.at-rule.return.scss"), 1,
+ FontStyle.NotSet, "#CC7832", null),
+ new ParsedThemeRule("meta.at-rule.else.scss", null, 1, FontStyle.NotSet, "#CC7832", null),
+ new ParsedThemeRule("punctuation.definition", List.of("meta.at-rule.else.scss"), 1,
+ FontStyle.NotSet, "#CC7832", null),
+ new ParsedThemeRule("meta.at-rule.if.scss", null, 1, FontStyle.NotSet, "#CC7832", null),
+ new ParsedThemeRule("punctuation.definition", List.of("meta.at-rule.if.scss"), 1,
+ FontStyle.NotSet, "#CC7832", null));
+
+ assertArrayEquals(expected.toArray(), actual.toArray());
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeParsingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeParsingTest.java
deleted file mode 100644
index 574232682..000000000
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeParsingTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.theme;
-
-import static org.junit.jupiter.api.Assertions.assertArrayEquals;
-
-import java.io.ByteArrayInputStream;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader;
-import org.junit.jupiter.api.Test;
-
-/**
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
- *
- */
-public class ThemeParsingTest {
-
- @Test
- public void testCanParse() throws Exception {
- List actual = parseTheme("{" +
- "\"settings\": [" +
- "{ \"settings\": { \"foreground\": \"#F8F8F2\", \"background\": \"#272822\" } }," +
- "{ \"scope\": \"source, something\", \"settings\": { \"background\": \"#100000\" } }," +
- "{ \"scope\": [\"bar\", \"baz\"], \"settings\": { \"background\": \"#010000\" } }," +
- "{ \"scope\": \"source.css selector bar\", \"settings\": { \"fontStyle\": \"bold\" } }," +
- "{ \"scope\": \"constant\", \"settings\": { \"fontStyle\": \"italic\", \"foreground\": \"#ff0000\" } }," +
- "{ \"scope\": \"constant.numeric\", \"settings\": { \"foreground\": \"#00ff00\" } }," +
- "{ \"scope\": \"constant.numeric.hex\", \"settings\": { \"fontStyle\": \"bold\" } }," +
- "{ \"scope\": \"constant.numeric.oct\", \"settings\": { \"fontStyle\": \"bold italic underline\" } }," +
- "{ \"scope\": \"constant.numeric.dec\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#0000ff\" } }," +
- "{ \"scope\": \"foo\", \"settings\": { \"fontStyle\": \"\", \"foreground\": \"#CFA\" } }" +
- "]" +
- "}");
-
-
- ParsedThemeRule[] expected = new ParsedThemeRule[] {
- new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#F8F8F2", "#272822"),
- new ParsedThemeRule("source", null, 1, FontStyle.NotSet, null, "#100000"),
- new ParsedThemeRule("something", null, 1, FontStyle.NotSet, null, "#100000"),
- new ParsedThemeRule("bar", null, 2, FontStyle.NotSet, null, "#010000"),
- new ParsedThemeRule("baz", null, 2, FontStyle.NotSet, null, "#010000"),
- new ParsedThemeRule("bar", Arrays.asList("selector", "source.css"), 3, FontStyle.Bold, null, null),
- new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#ff0000", null),
- new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#00ff00", null),
- new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null),
- new ParsedThemeRule("constant.numeric.oct", null, 7,
- FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null),
- new ParsedThemeRule("constant.numeric.dec", null, 8, FontStyle.None, "#0000ff", null),
- new ParsedThemeRule("foo", null, 9, FontStyle.None, "#CFA", null), };
-
- assertArrayEquals(expected, actual.toArray());
- }
-
- private List parseTheme(String theme) throws Exception {
- return Theme.parseTheme(ThemeReader.JSON_PARSER.parse(new ByteArrayInputStream(theme.getBytes())));
- }
-}
diff --git a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeResolvingTest.java b/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeResolvingTest.java
deleted file mode 100644
index cd1a51ebc..000000000
--- a/org.eclipse.tm4e.core.tests/src/main/java/org/eclipse/tm4e/core/theme/ThemeResolvingTest.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.theme;
-
-import static org.junit.jupiter.api.Assertions.assertArrayEquals;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.tm4e.core.internal.theme.reader.ThemeReader;
-import org.eclipse.tm4e.core.internal.utils.CompareUtils;
-import org.junit.jupiter.api.Test;
-
-/**
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/tests/themes.test.ts
- *
- */
-public class ThemeResolvingTest {
-
- @Test
- public void testStrcmpWorks() {
- List actual = Arrays.asList("bar", "z", "zu", "a", "ab", "");
- actual.sort(CompareUtils::strcmp);
-
- List expected = Arrays.asList("", "a", "ab", "bar", "z", "zu");
- assertArrayEquals(expected.toArray(), actual.toArray());
- }
-
- @Test
- public void testStrArrCmpWorks() {
- assertStrArrCmp("001", null, null, 0);
- assertStrArrCmp("002", null, Collections.emptyList(), -1);
- assertStrArrCmp("003", null, Arrays.asList("a"), -1);
- assertStrArrCmp("004", Collections.emptyList(), null, 1);
- assertStrArrCmp("005", Arrays.asList("a"), null, 1);
- assertStrArrCmp("006", Collections.emptyList(), Collections.emptyList(), 0);
- assertStrArrCmp("007", Collections.emptyList(), Arrays.asList("a"), -1);
- assertStrArrCmp("008", Arrays.asList("a"), Collections.emptyList(), 1);
- assertStrArrCmp("009", Arrays.asList("a"), Arrays.asList("a"), 0);
- assertStrArrCmp("010", Arrays.asList("a", "b"), Arrays.asList("a"), 1);
- assertStrArrCmp("011", Arrays.asList("a"), Arrays.asList("a", "b"), -1);
- assertStrArrCmp("012", Arrays.asList("a", "b"), Arrays.asList("a", "b"), 0);
- assertStrArrCmp("013", Arrays.asList("a", "b"), Arrays.asList("a", "c"), -1);
- assertStrArrCmp("014", Arrays.asList("a", "c"), Arrays.asList("a", "b"), 1);
- }
-
- @Test
- public void testAlwaysHasDefaults() {
- Theme actual = Theme.createFromParsedTheme(Collections.emptyList());
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#000000");
- int _B = colorMap.getId("#ffffff");
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRespectsIncomingDefaults1() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#000000");
- int _B = colorMap.getId("#ffffff");
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRespectsIncomingDefaults2() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.None, null, null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#000000");
- int _B = colorMap.getId("#ffffff");
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRespectsIncomingDefaults3() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#000000");
- int _B = colorMap.getId("#ffffff");
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRespectsIncomingDefaults4() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#ff0000", null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#ff0000");
- int _B = colorMap.getId("#ffffff");
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRespectsIncomingDefaults5() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, "#ff0000"),
- new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#00ff00", null),
- new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#00ff00");
- int _B = colorMap.getId("#ff0000");
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testCanMergeIncomingDefaults() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, null, "#ff0000"),
- new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#00ff00", null),
- new ParsedThemeRule("", null, -1, FontStyle.Bold, null, null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#00ff00");
- int _B = colorMap.getId("#ff0000");
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.Bold, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET)));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testDefaultsAreInherited() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
- new ParsedThemeRule("var", null, -1, FontStyle.NotSet, "#ff0000", null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#F8F8F2");
- int _B = colorMap.getId("#272822");
- int _C = colorMap.getId("#ff0000");
-
- Map map = new HashMap<>();
- map.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.NotSet, _C, _NOT_SET)));
-
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET),
- Collections.emptyList(), map));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testSameRulesGetMerged() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
- new ParsedThemeRule("var", null, 1, FontStyle.Bold, null, null),
- new ParsedThemeRule("var", null, 0, FontStyle.NotSet, "#ff0000", null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#F8F8F2");
- int _B = colorMap.getId("#272822");
- int _C = colorMap.getId("#ff0000");
-
- Map map = new HashMap<>();
- map.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, _NOT_SET)));
-
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET),
- Collections.emptyList(), map));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRulesAreInherited1() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
- new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#ff0000", null),
- new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#00ff00", null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#F8F8F2");
- int _B = colorMap.getId("#272822");
- int _C = colorMap.getId("#ff0000");
- int _D = colorMap.getId("#00ff00");
-
- Map map1_1 = new HashMap<>();
- map1_1.put("identifier", new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _D, _NOT_SET)));
- Map map1 = new HashMap<>();
- map1.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, _NOT_SET),
- Collections.emptyList(), map1_1));
-
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET),
- Collections.emptyList(), map1));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRulesAreInherited2() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
- new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#ff0000", null),
- new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#00ff00", null),
- new ParsedThemeRule("constant", null, 4, FontStyle.Italic, "#100000", null),
- new ParsedThemeRule("constant.numeric", null, 5, FontStyle.NotSet, "#200000", null),
- new ParsedThemeRule("constant.numeric.hex", null, 6, FontStyle.Bold, null, null),
- new ParsedThemeRule("constant.numeric.oct", null, 7,
- FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, null, null),
- new ParsedThemeRule("constant.numeric.dec", null, 8, FontStyle.None, "#300000", null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#F8F8F2");
- int _B = colorMap.getId("#272822");
- int _C = colorMap.getId("#100000");
- int _D = colorMap.getId("#200000");
- int _E = colorMap.getId("#300000");
- int _F = colorMap.getId("#ff0000");
- int _G = colorMap.getId("#00ff00");
-
- Map mapOfVar = new HashMap<>();
- mapOfVar.put("identifier",
- new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _G, _NOT_SET)));
-
- Map mapOfNumeric = new HashMap<>();
- mapOfNumeric.put("hex", new ThemeTrieElement(new ThemeTrieElementRule(3, null, FontStyle.Bold, _D, _NOT_SET)));
- mapOfNumeric.put("oct", new ThemeTrieElement(new ThemeTrieElementRule(3, null,
- FontStyle.Bold | FontStyle.Italic | FontStyle.Underline, _D, _NOT_SET)));
- mapOfNumeric.put("dec", new ThemeTrieElement(new ThemeTrieElementRule(3, null, FontStyle.None, _E, _NOT_SET)));
-
- Map mapOfConstant = new HashMap<>();
- mapOfConstant.put("numeric",
- new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Italic, _D, _NOT_SET),
- Collections.emptyList(), mapOfNumeric));
-
- Map mapRoot = new HashMap<>();
- mapRoot.put("var", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _F, _NOT_SET),
- Collections.emptyList(), mapOfVar));
- mapRoot.put("constant", new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Italic, _C, _NOT_SET),
- Collections.emptyList(), mapOfConstant));
-
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET),
- Collections.emptyList(), mapRoot));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testRulesWithParentScopes() {
- Theme actual = Theme.createFromParsedTheme(
- new ArrayList<>(Arrays.asList(new ParsedThemeRule("", null, -1, FontStyle.NotSet, "#F8F8F2", "#272822"),
- new ParsedThemeRule("var", null, -1, FontStyle.Bold, "#100000", null),
- new ParsedThemeRule("var.identifier", null, -1, FontStyle.NotSet, "#200000", null),
- new ParsedThemeRule("var", Arrays.asList("source.css"), 1, FontStyle.Italic, "#300000", null),
- new ParsedThemeRule("var", Arrays.asList("source.css"), 2, FontStyle.Underline, null, null))));
- ColorMap colorMap = new ColorMap();
- int _NOT_SET = 0;
- int _A = colorMap.getId("#F8F8F2");
- int _B = colorMap.getId("#272822");
- int _C = colorMap.getId("#100000");
- int _D = colorMap.getId("#300000");
- int _E = colorMap.getId("#200000");
-
- Map mapOfVar = new HashMap<>();
- mapOfVar.put("identifier",
- new ThemeTrieElement(new ThemeTrieElementRule(2, null, FontStyle.Bold, _E, _NOT_SET), Arrays.asList(
- new ThemeTrieElementRule(1, Arrays.asList("source.css"), FontStyle.Underline, _D, _NOT_SET))));
-
- Map mapRoot = new HashMap<>();
- mapRoot.put("var",
- new ThemeTrieElement(new ThemeTrieElementRule(1, null, FontStyle.Bold, _C, _NOT_SET), Arrays.asList(
- new ThemeTrieElementRule(1, Arrays.asList("source.css"), FontStyle.Underline, _D, _NOT_SET)),
- mapOfVar));
-
- Theme expected = new Theme(colorMap, new ThemeTrieElementRule(0, null, FontStyle.None, _A, _B),
- new ThemeTrieElement(new ThemeTrieElementRule(0, null, FontStyle.NotSet, _NOT_SET, _NOT_SET),
- Collections.emptyList(), mapRoot));
- assertEquals(actual, expected);
- }
-
- @Test
- public void testIssue_38_ignores_rules_with_invalid_colors() throws Exception {
- List actual = parseTheme("{" +
- "\"settings\": [{"+
- " \"settings\": {"+
- " \"background\": \"#222222\","+
- " \"foreground\": \"#cccccc\""+
- " }"+
- "}, {"+
- " \"name\": \"Variable\","+
- " \"scope\": \"variable\","+
- " \"settings\": {"+
- " \"fontStyle\": \"\""+
- " }"+
- "}, {"+
- " \"name\": \"Function argument\","+
- " \"scope\": \"variable.parameter\","+
- " \"settings\": {"+
- " \"fontStyle\": \"italic\","+
- " \"foreground\": \"\""+
- " }"+
- "}, {"+
- " \"name\": \"Library variable\","+
- " \"scope\": \"support.other.variable\","+
- " \"settings\": {"+
- " \"fontStyle\": \"\""+
- " }"+
- "}, {"+
- " \"name\": \"Function argument\","+
- " \"scope\": \"variable.other\","+
- " \"settings\": {"+
- " \"foreground\": \"\","+
- " \"fontStyle\": \"normal\""+
- " }"+
- "}, {"+
- " \"name\": \"Coffeescript Function argument\","+
- " \"scope\": \"variable.parameter.function.coffee\","+
- " \"settings\": {"+
- " \"foreground\": \"#F9D423\","+
- " \"fontStyle\": \"italic\""+
- " }"+
- "}]"+
- "}");
-
- List expected = Arrays.asList(
- new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#cccccc", "#222222"),
- new ParsedThemeRule("variable", null, 1, FontStyle.None, null, null),
- new ParsedThemeRule("variable.parameter", null, 2, FontStyle.Italic, null, null),
- new ParsedThemeRule("support.other.variable", null, 3, FontStyle.None, null, null),
- new ParsedThemeRule("variable.other", null, 4, FontStyle.None, null, null),
- new ParsedThemeRule("variable.parameter.function.coffee", null, 5, FontStyle.Italic, "#F9D423", null)
- );
-
- assertArrayEquals(expected.toArray(), actual.toArray());
- }
-
- @Test
- public void testIssue_35_Trailing_comma_in_a_tmTheme_scope_selector() throws Exception {
- List actual = parseTheme("{" +
- "\"settings\": [{"+
- " \"settings\": {"+
- " \"background\": \"#25292C\","+
- " \"foreground\": \"#EFEFEF\""+
- " }"+
- "}, {"+
- " \"name\": \"CSS at-rule keyword control\","+
- " \"scope\": \""+
- " meta.at-rule.return.scss,\n"+
- " meta.at-rule.return.scss punctuation.definition,\n"+
- " meta.at-rule.else.scss,\n"+
- " meta.at-rule.else.scss punctuation.definition,\n"+
- " meta.at-rule.if.scss,\n"+
- " meta.at-rule.if.scss punctuation.definition\n"+
- " \","+
- " \"settings\": {"+
- " \"foreground\": \"#CC7832\""+
- " }"+
- "}]"+
- "}");
-
- List expected = Arrays.asList(
- new ParsedThemeRule("", null, 0, FontStyle.NotSet, "#EFEFEF", "#25292C"),
- new ParsedThemeRule("meta.at-rule.return.scss", null, 1, FontStyle.NotSet, "#CC7832", null),
- new ParsedThemeRule("punctuation.definition", Arrays.asList("meta.at-rule.return.scss"), 1, FontStyle.NotSet, "#CC7832", null),
- new ParsedThemeRule("meta.at-rule.else.scss", null, 1, FontStyle.NotSet, "#CC7832", null),
- new ParsedThemeRule("punctuation.definition", Arrays.asList("meta.at-rule.else.scss"), 1, FontStyle.NotSet, "#CC7832", null),
- new ParsedThemeRule("meta.at-rule.if.scss", null, 1, FontStyle.NotSet, "#CC7832", null),
- new ParsedThemeRule("punctuation.definition", Arrays.asList("meta.at-rule.if.scss"), 1, FontStyle.NotSet, "#CC7832", null)
- );
-
- assertArrayEquals(expected.toArray(), actual.toArray());
- }
-
- private void assertStrArrCmp(String testCase, List a, List b, int expected) {
- assertEquals(expected, CompareUtils.strArrCmp(a, b), testCase);
- }
-
- private List parseTheme(String theme) throws Exception {
- return Theme.parseTheme(ThemeReader.JSON_PARSER.parse(new ByteArrayInputStream(theme.getBytes())));
- }
-}
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/matcher-tests.json b/org.eclipse.tm4e.core.tests/src/main/resources/matcher-tests.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/matcher-tests.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/matcher-tests.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/README.md b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/README.md
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/README.md
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/README.md
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/apply-end-pattern-last.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/apply-end-pattern-last.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/apply-end-pattern-last.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/apply-end-pattern-last.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/c-plus-plus.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/c-plus-plus.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/c-plus-plus.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/c-plus-plus.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/c.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/c.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/c.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/c.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/coffee-script.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/coffee-script.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/coffee-script.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/coffee-script.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/content-name.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/content-name.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/content-name.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/content-name.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/css.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/css.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/css.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/css.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/forever.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/forever.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/forever.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/forever.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/git-commit.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/git-commit.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/git-commit.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/git-commit.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/hello.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/hello.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/hello.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/hello.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/html-erb.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/html-erb.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/html-erb.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/html-erb.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/html-rails.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/html-rails.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/html-rails.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/html-rails.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/html.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/html.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/html.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/html.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/hyperlink.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/hyperlink.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/hyperlink.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/hyperlink.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/imaginary.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/imaginary.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/imaginary.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/imaginary.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/include-external-repository-rule.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/include-external-repository-rule.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/include-external-repository-rule.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/include-external-repository-rule.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/infinite-loop.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/infinite-loop.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/infinite-loop.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/infinite-loop.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/java.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/java.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/java.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/java.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/javascript-regex.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/javascript-regex.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/javascript-regex.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/javascript-regex.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/javascript.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/javascript.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/javascript.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/javascript.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/json.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/json.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/json.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/json.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/latex.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/latex.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/latex.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/latex.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/loops.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/loops.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/loops.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/loops.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/makefile.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/makefile.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/makefile.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/makefile.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/multiline.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/multiline.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/multiline.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/multiline.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/nested-captures.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/nested-captures.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/nested-captures.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/nested-captures.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/objective-c-plus-plus.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/objective-c-plus-plus.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/objective-c-plus-plus.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/objective-c-plus-plus.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/objective-c.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/objective-c.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/objective-c.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/objective-c.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/php.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/php.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/php.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/php.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/python-regex.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/python-regex.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/python-regex.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/python-regex.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/python.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/python.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/python.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/python.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/ruby-on-rails.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/ruby-on-rails.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/ruby-on-rails.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/ruby-on-rails.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/ruby.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/ruby.json
similarity index 99%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/ruby.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/ruby.json
index 17e49e19c..dfc6c8cbb 100644
--- a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/ruby.json
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/ruby.json
@@ -219,7 +219,7 @@
"name": "variable.other.constant.ruby"
},
{
- "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ",
+ "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the opening parenthesis for arguments\n\t\t\t ",
"beginCaptures": {
"1": {
"name": "keyword.control.def.ruby"
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/scss.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/scss.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/scss.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/scss.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/sql.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/sql.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/sql.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/sql.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/text.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/text.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/text.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/text.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/thrift.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/thrift.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/thrift.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/thrift.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/todo.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/todo.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/fixtures/todo.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/fixtures/todo.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/tests.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/tests.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/first-mate/tests.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/first-mate/tests.json
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/105.grammarA.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/105.grammarA.json
new file mode 100644
index 000000000..8d74b8c63
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/105.grammarA.json
@@ -0,0 +1,20 @@
+{
+ "scopeName": "source.test",
+ "patterns": [{ "include": "#test" }, { "include": "#embedded" }],
+ "repository": {
+ "test": {
+ "begin": "testStart",
+ "end": "testEnd",
+ "patterns": [{ "include": "#test2" }]
+ },
+ "test2": {
+ "match": "some test pattern",
+ "name": "test.name"
+ },
+ "embedded": {
+ "begin": "embedStart",
+ "end": "embedEnd",
+ "patterns": [{ "include": "source.test.embedded" }]
+ }
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/105.grammarB.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/105.grammarB.json
new file mode 100644
index 000000000..d08bbf2d1
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/105.grammarB.json
@@ -0,0 +1,14 @@
+{
+ "scopeName": "source.test.embedded",
+ "patterns": [{ "include": "#test" }],
+ "repository": {
+ "test": {
+ "begin": "testStart",
+ "end": "testEnd",
+ "patterns": [{ "include": "#test2" }]
+ },
+ "test2": {
+ "include": "source.test#test2"
+ }
+ }
+}
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/147.grammar.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/147.grammar.json
new file mode 100644
index 000000000..7f214d731
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/147.grammar.json
@@ -0,0 +1,9 @@
+{
+ "scopeName": "source.test",
+ "patterns": [
+ {
+ "match": "\\b(?i:function)\\b",
+ "name": "storage.type.$0 keyword.declaration.$0"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/66.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/66.plist
new file mode 100644
index 000000000..0e22924a4
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/66.plist
@@ -0,0 +1,21 @@
+
+
+
+
+ scopeName
+ text.test
+
+ patterns
+
+
+ begin^.
+ namecomment
+
+
+
+ begin.
+ nameinvalid
+
+
+
+
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Jade.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Jade.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Jade.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Jade.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Jade.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Jade.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Jade.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Jade.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Jade.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Jade22.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Jade.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Jade22.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Makefile.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Makefile.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Makefile.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Makefile.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Markdown.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Markdown.tmLanguage
similarity index 96%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Markdown.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Markdown.tmLanguage
index fa056f47a..9a5ca66b5 100644
--- a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Markdown.tmLanguage
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Markdown.tmLanguage
@@ -1,1108 +1,1108 @@
-
-
-
-
- fileTypes
-
- md
- mdown
- markdown
- markdn
-
- keyEquivalent
- ^~M
- name
- Markdown
- patterns
-
-
- include
- #block
-
-
- repository
-
- block
-
- patterns
-
-
- include
- #separator
-
-
- include
- #heading
-
-
- include
- #blockquote
-
-
- include
- #lists
-
-
- include
- #raw_block
-
-
- include
- #link-def
-
-
- include
- #html
-
-
- include
- #paragraph
-
-
- repository
-
- blockquote
-
- begin
- (^|\G)(>) ?
- captures
-
- 2
-
- name
- punctuation.definition.quote.markdown
-
-
- name
- markup.quote.markdown
- patterns
-
-
- include
- #block
-
-
- while
- (^|\G)(>) ?
-
- heading
-
- begin
- (?:^|\G)(#{1,6})\s*(?=[\S[^#]])
- captures
-
- 1
-
- name
- punctuation.definition.heading.markdown
-
-
- contentName
- entity.name.section.markdown
- end
- \s*(#{1,6})?$\n?
- name
- markup.heading.markdown
- patterns
-
-
- include
- #inline
-
-
-
- heading-setext
-
- patterns
-
-
- match
- ^(={3,})(?=[ \t]*$\n?)
- name
- markup.heading.setext.1.markdown
-
-
- match
- ^(-{3,})(?=[ \t]*$\n?)
- name
- markup.heading.setext.2.markdown
-
-
-
- html
-
- patterns
-
-
- begin
- (?i)(^|\G)(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del).*</\2\s*>\s*$)
- end
- $
- patterns
-
-
- include
- text.html.basic
-
-
-
-
- begin
- (?i)(^|\G)(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del))
- patterns
-
-
- include
- text.html.basic
-
-
- while
- \G(?!</\2\s*>)
-
-
-
- link-def
-
- captures
-
- 1
-
- name
- punctuation.definition.constant.markdown
-
- 10
-
- name
- punctuation.definition.string.end.markdown
-
- 11
-
- name
- string.other.link.description.title.markdown
-
- 12
-
- name
- punctuation.definition.string.begin.markdown
-
- 13
-
- name
- punctuation.definition.string.end.markdown
-
- 2
-
- name
- constant.other.reference.link.markdown
-
- 3
-
- name
- punctuation.definition.constant.markdown
-
- 4
-
- name
- punctuation.separator.key-value.markdown
-
- 5
-
- name
- punctuation.definition.link.markdown
-
- 6
-
- name
- markup.underline.link.markdown
-
- 7
-
- name
- punctuation.definition.link.markdown
-
- 8
-
- name
- string.other.link.description.title.markdown
-
- 9
-
- name
- punctuation.definition.string.begin.markdown
-
-
- match
- ^(?x:
- \s* # Leading whitespace
- (\[)(.+?)(\])(:) # Reference name
- [ \t]* # Optional whitespace
- (<?)(\S+?)(>?) # The url
- [ \t]* # Optional whitespace
- (?:
- ((\().+?(\))) # Match title in quotes…
- | ((").+?(")) # or in parens.
- )? # Title is optional
- \s* # Optional whitespace
- $
- )
- name
- meta.link.reference.def.markdown
-
- list_paragraph
-
- begin
- (^|\G)(?=\S)(?![*+-]\s|[0-9]+\.\s)
- name
- meta.paragraph.markdown
- patterns
-
-
- include
- #inline
-
-
- include
- text.html.basic
-
-
- include
- #heading-setext
-
-
- while
- (^|\G)(?!\s*$|#|[ ]{0,3}([-*_][ ]{2,}){3,}[ \t]*$\n?|>|[ ]{0,3}[*+-]|[ ]{0,3}[0-9]+\.)
-
- lists
-
- patterns
-
-
- begin
- (^|\G)([ ]{0,3})([*+-])([ ]{1,3}|\t)
- beginCaptures
-
- 3
-
- name
- punctuation.definition.list.markdown
-
-
- comment
- Currently does not support un-indented second lines.
- name
- markup.list.unnumbered.markdown
- patterns
-
-
- include
- #list_paragraph
-
-
- include
- #block
-
-
- while
- \G([ ]{4}|\t|$)
-
-
- begin
- (^|\G)([ ]{0,3})([0-9]+\.)([ ]{1,3}|\t)
- beginCaptures
-
- 3
-
- name
- punctuation.definition.list.markdown
-
-
- name
- markup.list.numbered.markdown
- patterns
-
-
- include
- #list_paragraph
-
-
- include
- #block
-
-
- while
- \G([ ]{4}|\t|$)
-
-
-
- paragraph
-
- begin
- (^|\G)(?=\S)
- name
- meta.paragraph.markdown
- patterns
-
-
- include
- #inline
-
-
- include
- text.html.basic
-
-
- include
- #heading-setext
-
-
- while
- (^|\G)(?!\s*$|#|[ ]{0,3}([-*_][ ]{2,}){3,}[ \t]*$\n?|\s*\[.+?\]:|>)
-
- raw_block
-
- begin
- (^|\G)([ ]{4}|\t)
- name
- markup.raw.block.markdown
- while
- (^|\G)([ ]{4}|\t)
-
- separator
-
- match
- (^|\G)[ ]{0,3}([-*_])([ ]{0,2}\2){2,}[ \t]*$\n?
- name
- meta.separator.markdown
-
-
-
- inline
-
- patterns
-
-
- include
- #ampersand
-
-
- include
- #bracket
-
-
- include
- #bold
-
-
- include
- #italic
-
-
- include
- #raw
-
-
- include
- #escape
-
-
- include
- #image-inline
-
-
- include
- #image-ref
-
-
- include
- #link-email
-
-
- include
- #link-inet
-
-
- include
- #link-inline
-
-
- include
- #link-ref
-
-
- include
- #link-ref-literal
-
-
- repository
-
- ampersand
-
- comment
-
- Markdown will convert this for us. We match it so that the
- HTML grammar will not mark it up as invalid.
-
- match
- &(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)
- name
- meta.other.valid-ampersand.markdown
-
- bold
-
- begin
- (?x)
- (\*\*|__)(?=\S) # Open
- (?=
- (
- <[^>]*+> # HTML tags
- | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw>
- # Raw
- | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes
- | \[
- (
- (?<square> # Named group
- [^\[\]\\] # Match most chars
- | \\. # Escaped chars
- | \[ \g<square>*+ \] # Nested brackets
- )*+
- \]
- (
- ( # Reference Link
- [ ]? # Optional space
- \[[^\]]*+\] # Ref name
- )
- | ( # Inline Link
- \( # Opening paren
- [ \t]*+ # Optional whtiespace
- <?(.*?)>? # URL
- [ \t]*+ # Optional whtiespace
- ( # Optional Title
- (?<title>['"])
- (.*?)
- \k<title>
- )?
- \)
- )
- )
- )
- | (?!(?<=\S)\1). # Everything besides
- # style closer
- )++
- (?<=\S)\1 # Close
- )
-
- captures
-
- 1
-
- name
- punctuation.definition.bold.markdown
-
-
- end
- (?<=\S)(\1)
- name
- markup.bold.markdown
- patterns
-
-
- applyEndPatternLast
- 1
- begin
- (?=<[^>]*?>)
- end
- (?<=>)
- patterns
-
-
- include
- text.html.basic
-
-
-
-
- include
- #escape
-
-
- include
- #ampersand
-
-
- include
- #bracket
-
-
- include
- #raw
-
-
- include
- #italic
-
-
- include
- #image-inline
-
-
- include
- #link-inline
-
-
- include
- #link-inet
-
-
- include
- #link-email
-
-
- include
- #image-ref
-
-
- include
- #link-ref-literal
-
-
- include
- #link-ref
-
-
-
- bracket
-
- comment
-
- Markdown will convert this for us. We match it so that the
- HTML grammar will not mark it up as invalid.
-
- match
- <(?![a-z/?\$!])
- name
- meta.other.valid-bracket.markdown
-
- escape
-
- match
- \\[-`*_#+.!(){}\[\]\\>]
- name
- constant.character.escape.markdown
-
- image-inline
-
- captures
-
- 1
-
- name
- punctuation.definition.string.begin.markdown
-
- 10
-
- name
- string.other.link.description.title.markdown
-
- 11
-
- name
- punctuation.definition.string.markdown
-
- 12
-
- name
- punctuation.definition.string.markdown
-
- 13
-
- name
- string.other.link.description.title.markdown
-
- 14
-
- name
- punctuation.definition.string.markdown
-
- 15
-
- name
- punctuation.definition.string.markdown
-
- 16
-
- name
- punctuation.definition.metadata.markdown
-
- 2
-
- name
- string.other.link.description.markdown
-
- 4
-
- name
- punctuation.definition.string.end.markdown
-
- 5
-
- name
- invalid.illegal.whitespace.markdown
-
- 6
-
- name
- punctuation.definition.metadata.markdown
-
- 7
-
- name
- punctuation.definition.link.markdown
-
- 8
-
- name
- markup.underline.link.image.markdown
-
- 9
-
- name
- punctuation.definition.link.markdown
-
-
- match
- (?x:
- \! # Images start with !
- (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])
- # Match the link text.
- ([ ])? # Space not allowed
- (\() # Opening paren for url
- (<?)(\S+?)(>?) # The url
- [ \t]* # Optional whitespace
- (?:
- ((\().+?(\))) # Match title in parens…
- | ((").+?(")) # or in quotes.
- )? # Title is optional
- \s* # Optional whitespace
- (\))
- )
- name
- meta.image.inline.markdown
-
- image-ref
-
- captures
-
- 1
-
- name
- punctuation.definition.string.begin.markdown
-
- 2
-
- name
- string.other.link.description.markdown
-
- 4
-
- name
- punctuation.definition.string.begin.markdown
-
- 5
-
- name
- punctuation.definition.constant.markdown
-
- 6
-
- name
- constant.other.reference.link.markdown
-
- 7
-
- name
- punctuation.definition.constant.markdown
-
-
- match
- \!(\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(.*?)(\])
- name
- meta.image.reference.markdown
-
- italic
-
- begin
- (?x)
- (\*|_)(?=\S) # Open
- (?=
- (
- <[^>]*+> # HTML tags
- | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw>
- # Raw
- | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes
- | \[
- (
- (?<square> # Named group
- [^\[\]\\] # Match most chars
- | \\. # Escaped chars
- | \[ \g<square>*+ \] # Nested brackets
- )*+
- \]
- (
- ( # Reference Link
- [ ]? # Optional space
- \[[^\]]*+\] # Ref name
- )
- | ( # Inline Link
- \( # Opening paren
- [ \t]*+ # Optional whtiespace
- <?(.*?)>? # URL
- [ \t]*+ # Optional whtiespace
- ( # Optional Title
- (?<title>['"])
- (.*?)
- \k<title>
- )?
- \)
- )
- )
- )
- | \1\1 # Must be bold closer
- | (?!(?<=\S)\1). # Everything besides
- # style closer
- )++
- (?<=\S)\1 # Close
- )
-
- captures
-
- 1
-
- name
- punctuation.definition.italic.markdown
-
-
- end
- (?<=\S)(\1)((?!\1)|(?=\1\1))
- name
- markup.italic.markdown
- patterns
-
-
- applyEndPatternLast
- 1
- begin
- (?=<[^>]*?>)
- end
- (?<=>)
- patterns
-
-
- include
- text.html.basic
-
-
-
-
- include
- #escape
-
-
- include
- #ampersand
-
-
- include
- #bracket
-
-
- include
- #raw
-
-
- include
- #bold
-
-
- include
- #image-inline
-
-
- include
- #link-inline
-
-
- include
- #link-inet
-
-
- include
- #link-email
-
-
- include
- #image-ref
-
-
- include
- #link-ref-literal
-
-
- include
- #link-ref
-
-
-
- link-email
-
- captures
-
- 1
-
- name
- punctuation.definition.link.markdown
-
- 2
-
- name
- markup.underline.link.markdown
-
- 4
-
- name
- punctuation.definition.link.markdown
-
-
- match
- (<)((?:mailto:)?[-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(>)
- name
- meta.link.email.lt-gt.markdown
-
- link-inet
-
- captures
-
- 1
-
- name
- punctuation.definition.link.markdown
-
- 2
-
- name
- markup.underline.link.markdown
-
- 3
-
- name
- punctuation.definition.link.markdown
-
-
- match
- (<)((?:https?|ftp)://.*?)(>)
- name
- meta.link.inet.markdown
-
- link-inline
-
- captures
-
- 1
-
- name
- punctuation.definition.string.begin.markdown
-
- 10
-
- name
- string.other.link.description.title.markdown
-
- 11
-
- name
- punctuation.definition.string.begin.markdown
-
- 12
-
- name
- punctuation.definition.string.end.markdown
-
- 13
-
- name
- string.other.link.description.title.markdown
-
- 14
-
- name
- punctuation.definition.string.begin.markdown
-
- 15
-
- name
- punctuation.definition.string.end.markdown
-
- 16
-
- name
- punctuation.definition.metadata.markdown
-
- 2
-
- name
- string.other.link.title.markdown
-
- 4
-
- name
- punctuation.definition.string.end.markdown
-
- 5
-
- name
- invalid.illegal.whitespace.markdown
-
- 6
-
- name
- punctuation.definition.metadata.markdown
-
- 7
-
- name
- punctuation.definition.link.markdown
-
- 8
-
- name
- markup.underline.link.markdown
-
- 9
-
- name
- punctuation.definition.link.markdown
-
-
- match
- (?x:
- (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])
- # Match the link text.
- ([ ])? # Space not allowed
- (\() # Opening paren for url
- (<?)(.*?)(>?) # The url
- [ \t]* # Optional whitespace
- (?:
- ((\().+?(\))) # Match title in parens…
- | ((").+?(")) # or in quotes.
- )? # Title is optional
- \s* # Optional whitespace
- (\))
- )
- name
- meta.link.inline.markdown
-
- link-ref
-
- captures
-
- 1
-
- name
- punctuation.definition.string.begin.markdown
-
- 2
-
- name
- string.other.link.title.markdown
-
- 4
-
- name
- punctuation.definition.string.end.markdown
-
- 5
-
- name
- punctuation.definition.constant.begin.markdown
-
- 6
-
- name
- constant.other.reference.link.markdown
-
- 7
-
- name
- punctuation.definition.constant.end.markdown
-
-
- match
- (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)([^\]]*+)(\])
- name
- meta.link.reference.markdown
-
- link-ref-literal
-
- captures
-
- 1
-
- name
- punctuation.definition.string.begin.markdown
-
- 2
-
- name
- string.other.link.title.markdown
-
- 4
-
- name
- punctuation.definition.string.end.markdown
-
- 5
-
- name
- punctuation.definition.constant.begin.markdown
-
- 6
-
- name
- punctuation.definition.constant.end.markdown
-
-
- match
- (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(\])
- name
- meta.link.reference.literal.markdown
-
- raw
-
- captures
-
- 1
-
- name
- punctuation.definition.raw.markdown
-
- 2
-
- 3
-
- name
- punctuation.definition.raw.markdown
-
-
- match
- (`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1)
- name
- markup.raw.inline.markdown
-
-
-
-
- scopeName
- text.html.markdown
- uuid
- 0A1D9874-B448-11D9-BD50-000D93B6E43C
-
+
+
+
+
+ fileTypes
+
+ md
+ mdown
+ markdown
+ markdn
+
+ keyEquivalent
+ ^~M
+ name
+ Markdown
+ patterns
+
+
+ include
+ #block
+
+
+ repository
+
+ block
+
+ patterns
+
+
+ include
+ #separator
+
+
+ include
+ #heading
+
+
+ include
+ #blockquote
+
+
+ include
+ #lists
+
+
+ include
+ #raw_block
+
+
+ include
+ #link-def
+
+
+ include
+ #html
+
+
+ include
+ #paragraph
+
+
+ repository
+
+ blockquote
+
+ begin
+ (^|\G)(>) ?
+ captures
+
+ 2
+
+ name
+ punctuation.definition.quote.markdown
+
+
+ name
+ markup.quote.markdown
+ patterns
+
+
+ include
+ #block
+
+
+ while
+ (^|\G)(>) ?
+
+ heading
+
+ begin
+ (?:^|\G)(#{1,6})\s*(?=[\S[^#]])
+ captures
+
+ 1
+
+ name
+ punctuation.definition.heading.markdown
+
+
+ contentName
+ entity.name.section.markdown
+ end
+ \s*(#{1,6})?$\n?
+ name
+ markup.heading.markdown
+ patterns
+
+
+ include
+ #inline
+
+
+
+ heading-setext
+
+ patterns
+
+
+ match
+ ^(={3,})(?=[ \t]*$\n?)
+ name
+ markup.heading.setext.1.markdown
+
+
+ match
+ ^(-{3,})(?=[ \t]*$\n?)
+ name
+ markup.heading.setext.2.markdown
+
+
+
+ html
+
+ patterns
+
+
+ begin
+ (?i)(^|\G)(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del).*</\2\s*>\s*$)
+ end
+ $
+ patterns
+
+
+ include
+ text.html.basic
+
+
+
+
+ begin
+ (?i)(^|\G)(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del))
+ patterns
+
+
+ include
+ text.html.basic
+
+
+ while
+ \G(?!</\2\s*>)
+
+
+
+ link-def
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.constant.markdown
+
+ 10
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 11
+
+ name
+ string.other.link.description.title.markdown
+
+ 12
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 13
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 2
+
+ name
+ constant.other.reference.link.markdown
+
+ 3
+
+ name
+ punctuation.definition.constant.markdown
+
+ 4
+
+ name
+ punctuation.separator.key-value.markdown
+
+ 5
+
+ name
+ punctuation.definition.link.markdown
+
+ 6
+
+ name
+ markup.underline.link.markdown
+
+ 7
+
+ name
+ punctuation.definition.link.markdown
+
+ 8
+
+ name
+ string.other.link.description.title.markdown
+
+ 9
+
+ name
+ punctuation.definition.string.begin.markdown
+
+
+ match
+ ^(?x:
+ \s* # Leading whitespace
+ (\[)(.+?)(\])(:) # Reference name
+ [ \t]* # Optional whitespace
+ (<?)(\S+?)(>?) # The url
+ [ \t]* # Optional whitespace
+ (?:
+ ((\().+?(\))) # Match title in quotes…
+ | ((").+?(")) # or in parens.
+ )? # Title is optional
+ \s* # Optional whitespace
+ $
+ )
+ name
+ meta.link.reference.def.markdown
+
+ list_paragraph
+
+ begin
+ (^|\G)(?=\S)(?![*+-]\s|[0-9]+\.\s)
+ name
+ meta.paragraph.markdown
+ patterns
+
+
+ include
+ #inline
+
+
+ include
+ text.html.basic
+
+
+ include
+ #heading-setext
+
+
+ while
+ (^|\G)(?!\s*$|#|[ ]{0,3}([-*_][ ]{2,}){3,}[ \t]*$\n?|>|[ ]{0,3}[*+-]|[ ]{0,3}[0-9]+\.)
+
+ lists
+
+ patterns
+
+
+ begin
+ (^|\G)([ ]{0,3})([*+-])([ ]{1,3}|\t)
+ beginCaptures
+
+ 3
+
+ name
+ punctuation.definition.list.markdown
+
+
+ comment
+ Currently does not support un-indented second lines.
+ name
+ markup.list.unnumbered.markdown
+ patterns
+
+
+ include
+ #list_paragraph
+
+
+ include
+ #block
+
+
+ while
+ \G([ ]{4}|\t|$)
+
+
+ begin
+ (^|\G)([ ]{0,3})([0-9]+\.)([ ]{1,3}|\t)
+ beginCaptures
+
+ 3
+
+ name
+ punctuation.definition.list.markdown
+
+
+ name
+ markup.list.numbered.markdown
+ patterns
+
+
+ include
+ #list_paragraph
+
+
+ include
+ #block
+
+
+ while
+ \G([ ]{4}|\t|$)
+
+
+
+ paragraph
+
+ begin
+ (^|\G)(?=\S)
+ name
+ meta.paragraph.markdown
+ patterns
+
+
+ include
+ #inline
+
+
+ include
+ text.html.basic
+
+
+ include
+ #heading-setext
+
+
+ while
+ (^|\G)(?!\s*$|#|[ ]{0,3}([-*_][ ]{2,}){3,}[ \t]*$\n?|\s*\[.+?\]:|>)
+
+ raw_block
+
+ begin
+ (^|\G)([ ]{4}|\t)
+ name
+ markup.raw.block.markdown
+ while
+ (^|\G)([ ]{4}|\t)
+
+ separator
+
+ match
+ (^|\G)[ ]{0,3}([-*_])([ ]{0,2}\2){2,}[ \t]*$\n?
+ name
+ meta.separator.markdown
+
+
+
+ inline
+
+ patterns
+
+
+ include
+ #ampersand
+
+
+ include
+ #bracket
+
+
+ include
+ #bold
+
+
+ include
+ #italic
+
+
+ include
+ #raw
+
+
+ include
+ #escape
+
+
+ include
+ #image-inline
+
+
+ include
+ #image-ref
+
+
+ include
+ #link-email
+
+
+ include
+ #link-inet
+
+
+ include
+ #link-inline
+
+
+ include
+ #link-ref
+
+
+ include
+ #link-ref-literal
+
+
+ repository
+
+ ampersand
+
+ comment
+
+ Markdown will convert this for us. We match it so that the
+ HTML grammar will not mark it up as invalid.
+
+ match
+ &(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);)
+ name
+ meta.other.valid-ampersand.markdown
+
+ bold
+
+ begin
+ (?x)
+ (\*\*|__)(?=\S) # Open
+ (?=
+ (
+ <[^>]*+> # HTML tags
+ | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw>
+ # Raw
+ | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes
+ | \[
+ (
+ (?<square> # Named group
+ [^\[\]\\] # Match most chars
+ | \\. # Escaped chars
+ | \[ \g<square>*+ \] # Nested brackets
+ )*+
+ \]
+ (
+ ( # Reference Link
+ [ ]? # Optional space
+ \[[^\]]*+\] # Ref name
+ )
+ | ( # Inline Link
+ \( # Opening paren
+ [ \t]*+ # Optional whtiespace
+ <?(.*?)>? # URL
+ [ \t]*+ # Optional whtiespace
+ ( # Optional Title
+ (?<title>['"])
+ (.*?)
+ \k<title>
+ )?
+ \)
+ )
+ )
+ )
+ | (?!(?<=\S)\1). # Everything besides
+ # style closer
+ )++
+ (?<=\S)\1 # Close
+ )
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.bold.markdown
+
+
+ end
+ (?<=\S)(\1)
+ name
+ markup.bold.markdown
+ patterns
+
+
+ applyEndPatternLast
+ 1
+ begin
+ (?=<[^>]*?>)
+ end
+ (?<=>)
+ patterns
+
+
+ include
+ text.html.basic
+
+
+
+
+ include
+ #escape
+
+
+ include
+ #ampersand
+
+
+ include
+ #bracket
+
+
+ include
+ #raw
+
+
+ include
+ #italic
+
+
+ include
+ #image-inline
+
+
+ include
+ #link-inline
+
+
+ include
+ #link-inet
+
+
+ include
+ #link-email
+
+
+ include
+ #image-ref
+
+
+ include
+ #link-ref-literal
+
+
+ include
+ #link-ref
+
+
+
+ bracket
+
+ comment
+
+ Markdown will convert this for us. We match it so that the
+ HTML grammar will not mark it up as invalid.
+
+ match
+ <(?![a-z/?\$!])
+ name
+ meta.other.valid-bracket.markdown
+
+ escape
+
+ match
+ \\[-`*_#+.!(){}\[\]\\>]
+ name
+ constant.character.escape.markdown
+
+ image-inline
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 10
+
+ name
+ string.other.link.description.title.markdown
+
+ 11
+
+ name
+ punctuation.definition.string.markdown
+
+ 12
+
+ name
+ punctuation.definition.string.markdown
+
+ 13
+
+ name
+ string.other.link.description.title.markdown
+
+ 14
+
+ name
+ punctuation.definition.string.markdown
+
+ 15
+
+ name
+ punctuation.definition.string.markdown
+
+ 16
+
+ name
+ punctuation.definition.metadata.markdown
+
+ 2
+
+ name
+ string.other.link.description.markdown
+
+ 4
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 5
+
+ name
+ invalid.illegal.whitespace.markdown
+
+ 6
+
+ name
+ punctuation.definition.metadata.markdown
+
+ 7
+
+ name
+ punctuation.definition.link.markdown
+
+ 8
+
+ name
+ markup.underline.link.image.markdown
+
+ 9
+
+ name
+ punctuation.definition.link.markdown
+
+
+ match
+ (?x:
+ \! # Images start with !
+ (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])
+ # Match the link text.
+ ([ ])? # Space not allowed
+ (\() # Opening paren for url
+ (<?)(\S+?)(>?) # The url
+ [ \t]* # Optional whitespace
+ (?:
+ ((\().+?(\))) # Match title in parens…
+ | ((").+?(")) # or in quotes.
+ )? # Title is optional
+ \s* # Optional whitespace
+ (\))
+ )
+ name
+ meta.image.inline.markdown
+
+ image-ref
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 2
+
+ name
+ string.other.link.description.markdown
+
+ 4
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 5
+
+ name
+ punctuation.definition.constant.markdown
+
+ 6
+
+ name
+ constant.other.reference.link.markdown
+
+ 7
+
+ name
+ punctuation.definition.constant.markdown
+
+
+ match
+ \!(\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(.*?)(\])
+ name
+ meta.image.reference.markdown
+
+ italic
+
+ begin
+ (?x)
+ (\*|_)(?=\S) # Open
+ (?=
+ (
+ <[^>]*+> # HTML tags
+ | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw>
+ # Raw
+ | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes
+ | \[
+ (
+ (?<square> # Named group
+ [^\[\]\\] # Match most chars
+ | \\. # Escaped chars
+ | \[ \g<square>*+ \] # Nested brackets
+ )*+
+ \]
+ (
+ ( # Reference Link
+ [ ]? # Optional space
+ \[[^\]]*+\] # Ref name
+ )
+ | ( # Inline Link
+ \( # Opening paren
+ [ \t]*+ # Optional whtiespace
+ <?(.*?)>? # URL
+ [ \t]*+ # Optional whtiespace
+ ( # Optional Title
+ (?<title>['"])
+ (.*?)
+ \k<title>
+ )?
+ \)
+ )
+ )
+ )
+ | \1\1 # Must be bold closer
+ | (?!(?<=\S)\1). # Everything besides
+ # style closer
+ )++
+ (?<=\S)\1 # Close
+ )
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.italic.markdown
+
+
+ end
+ (?<=\S)(\1)((?!\1)|(?=\1\1))
+ name
+ markup.italic.markdown
+ patterns
+
+
+ applyEndPatternLast
+ 1
+ begin
+ (?=<[^>]*?>)
+ end
+ (?<=>)
+ patterns
+
+
+ include
+ text.html.basic
+
+
+
+
+ include
+ #escape
+
+
+ include
+ #ampersand
+
+
+ include
+ #bracket
+
+
+ include
+ #raw
+
+
+ include
+ #bold
+
+
+ include
+ #image-inline
+
+
+ include
+ #link-inline
+
+
+ include
+ #link-inet
+
+
+ include
+ #link-email
+
+
+ include
+ #image-ref
+
+
+ include
+ #link-ref-literal
+
+
+ include
+ #link-ref
+
+
+
+ link-email
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.link.markdown
+
+ 2
+
+ name
+ markup.underline.link.markdown
+
+ 4
+
+ name
+ punctuation.definition.link.markdown
+
+
+ match
+ (<)((?:mailto:)?[-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(>)
+ name
+ meta.link.email.lt-gt.markdown
+
+ link-inet
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.link.markdown
+
+ 2
+
+ name
+ markup.underline.link.markdown
+
+ 3
+
+ name
+ punctuation.definition.link.markdown
+
+
+ match
+ (<)((?:https?|ftp)://.*?)(>)
+ name
+ meta.link.inet.markdown
+
+ link-inline
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 10
+
+ name
+ string.other.link.description.title.markdown
+
+ 11
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 12
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 13
+
+ name
+ string.other.link.description.title.markdown
+
+ 14
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 15
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 16
+
+ name
+ punctuation.definition.metadata.markdown
+
+ 2
+
+ name
+ string.other.link.title.markdown
+
+ 4
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 5
+
+ name
+ invalid.illegal.whitespace.markdown
+
+ 6
+
+ name
+ punctuation.definition.metadata.markdown
+
+ 7
+
+ name
+ punctuation.definition.link.markdown
+
+ 8
+
+ name
+ markup.underline.link.markdown
+
+ 9
+
+ name
+ punctuation.definition.link.markdown
+
+
+ match
+ (?x:
+ (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])
+ # Match the link text.
+ ([ ])? # Space not allowed
+ (\() # Opening paren for url
+ (<?)(.*?)(>?) # The url
+ [ \t]* # Optional whitespace
+ (?:
+ ((\().+?(\))) # Match title in parens…
+ | ((").+?(")) # or in quotes.
+ )? # Title is optional
+ \s* # Optional whitespace
+ (\))
+ )
+ name
+ meta.link.inline.markdown
+
+ link-ref
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 2
+
+ name
+ string.other.link.title.markdown
+
+ 4
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 5
+
+ name
+ punctuation.definition.constant.begin.markdown
+
+ 6
+
+ name
+ constant.other.reference.link.markdown
+
+ 7
+
+ name
+ punctuation.definition.constant.end.markdown
+
+
+ match
+ (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)([^\]]*+)(\])
+ name
+ meta.link.reference.markdown
+
+ link-ref-literal
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.begin.markdown
+
+ 2
+
+ name
+ string.other.link.title.markdown
+
+ 4
+
+ name
+ punctuation.definition.string.end.markdown
+
+ 5
+
+ name
+ punctuation.definition.constant.begin.markdown
+
+ 6
+
+ name
+ punctuation.definition.constant.end.markdown
+
+
+ match
+ (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(\])
+ name
+ meta.link.reference.literal.markdown
+
+ raw
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.raw.markdown
+
+ 2
+
+ 3
+
+ name
+ punctuation.definition.raw.markdown
+
+
+ match
+ (`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1)
+ name
+ markup.raw.inline.markdown
+
+
+
+
+ scopeName
+ text.html.markdown
+ uuid
+ 0A1D9874-B448-11D9-BD50-000D93B6E43C
+
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Perl.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Perl.plist
similarity index 95%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Perl.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Perl.plist
index d259fcb9c..beab27aad 100644
--- a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Perl.plist
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Perl.plist
@@ -1,3690 +1,3690 @@
-
-
-
-
- comment
-
- TODO: Include RegExp syntax
-
- fileTypes
-
- pl
- pm
- pod
- t
- PL
- psgi
-
- firstLineMatch
- ^#!.*\bperl\b
- keyEquivalent
- ^~P
- name
- Perl
- patterns
-
-
- include
- #line_comment
-
-
- begin
- ^=
- captures
-
- 0
-
- name
- punctuation.definition.comment.perl
-
-
- end
- ^=cut
- name
- comment.block.documentation.perl
-
-
- include
- #variable
-
-
- applyEndPatternLast
- 1
- begin
- \b(?=qr\s*[^\s\w])
- comment
- string.regexp.compile.perl
- end
- ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))
- endCaptures
-
- 1
-
- name
- string.regexp.compile.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
- 3
-
- name
- keyword.control.regexp-option.perl
-
-
- patterns
-
-
- begin
- (qr)\s*\{
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \}
- name
- string.regexp.compile.nested_braces.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_braces_interpolated
-
-
-
-
- begin
- (qr)\s*\[
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \]
- name
- string.regexp.compile.nested_brackets.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_brackets_interpolated
-
-
-
-
- begin
- (qr)\s*<
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- >
- name
- string.regexp.compile.nested_ltgt.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_ltgt_interpolated
-
-
-
-
- begin
- (qr)\s*\(
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \)
- name
- string.regexp.compile.nested_parens.perl
- patterns
-
-
- comment
- This is to prevent thinks like qr/foo$/ to treat $/ as a variable
- match
- \$(?=[^\s\w\\'\{\[\(\<])
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_parens_interpolated
-
-
-
-
- begin
- (qr)\s*'
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- '
- name
- string.regexp.compile.single-quote.perl
- patterns
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (qr)\s*([^\s\w'\{\[\(\<])
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \2
- name
- string.regexp.compile.simple-delimiter.perl
- patterns
-
-
- comment
- This is to prevent thinks like qr/foo$/ to treat $/ as a variable
- match
- \$(?=[^\s\w'\{\[\(\<])
- name
- keyword.control.anchor.perl
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_parens_interpolated
-
-
-
-
-
-
- applyEndPatternLast
- 1
- begin
- \b(?=m\s*[^\sa-zA-Z0-9])
- comment
- string.regexp.find-m.perl
- end
- ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))
- endCaptures
-
- 1
-
- name
- string.regexp.find-m.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
- 3
-
- name
- keyword.control.regexp-option.perl
-
-
- patterns
-
-
- begin
- (m)\s*\{
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \}
- name
- string.regexp.find-m.nested_braces.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_braces_interpolated
-
-
-
-
- begin
- (m)\s*\[
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \]
- name
- string.regexp.find-m.nested_brackets.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_brackets_interpolated
-
-
-
-
- begin
- (m)\s*<
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- >
- name
- string.regexp.find-m.nested_ltgt.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_ltgt_interpolated
-
-
-
-
- begin
- (m)\s*\(
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \)
- name
- string.regexp.find-m.nested_parens.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_parens_interpolated
-
-
-
-
- begin
- (m)\s*'
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- '
- name
- string.regexp.find-m.single-quote.perl
- patterns
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (m)\s*([^\sa-zA-Z0-9'\{\[\(\<])
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \2
- name
- string.regexp.find-m.simple-delimiter.perl
- patterns
-
-
- comment
- This is to prevent thinks like qr/foo$/ to treat $/ as a variable
- match
- \$(?=[^\sa-zA-Z0-9'\{\[\(\<])
- name
- keyword.control.anchor.perl
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- begin
- \[
- beginCaptures
-
- 1
-
- name
- punctuation.definition.character-class.begin.perl
-
-
- end
- \]
- endCaptures
-
- 1
-
- name
- punctuation.definition.character-class.end.perl
-
-
- name
- constant.other.character-class.set.perl
- patterns
-
-
- comment
- This is to prevent thinks like qr/foo$/ to treat $/ as a variable
- match
- \$(?=[^\s\w'\{\[\(\<])
- name
- keyword.control.anchor.perl
-
-
- include
- #escaped_char
-
-
-
-
- include
- #nested_parens_interpolated
-
-
-
-
-
-
- applyEndPatternLast
- 1
- begin
- \b(?=(?<!\&)(s)(\s+\S|\s*[;\,\#\{\}\(\)\[<]|$))
- comment
- string.regexp.replace.perl
- end
- ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)\]>]|$))
- endCaptures
-
- 1
-
- name
- string.regexp.replace.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
- 3
-
- name
- keyword.control.regexp-option.perl
-
-
- patterns
-
-
- begin
- (s)\s*\{
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \}
- name
- string.regexp.nested_braces.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_braces
-
-
-
-
- begin
- (s)\s*\[
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \]
- name
- string.regexp.nested_brackets.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_brackets
-
-
-
-
- begin
- (s)\s*<
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- >
- name
- string.regexp.nested_ltgt.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_ltgt
-
-
-
-
- begin
- (s)\s*\(
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- \)
- name
- string.regexp.nested_parens.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_parens
-
-
-
-
- begin
- \{
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- \}
- name
- string.regexp.format.nested_braces.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_braces_interpolated
-
-
-
-
- begin
- \[
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- \]
- name
- string.regexp.format.nested_brackets.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_brackets_interpolated
-
-
-
-
- begin
- <
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- >
- name
- string.regexp.format.nested_ltgt.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_ltgt_interpolated
-
-
-
-
- begin
- \(
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- \)
- name
- string.regexp.format.nested_parens.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_parens_interpolated
-
-
-
-
- begin
- '
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- '
- name
- string.regexp.format.single_quote.perl
- patterns
-
-
- match
- \\['\\]
- name
- constant.character.escape.perl
-
-
-
-
- begin
- ([^\s\w\[({<;])
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- \1
- name
- string.regexp.format.simple_delimiter.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- match
- \s+
-
-
-
-
- begin
- \b(?=s([^\sa-zA-Z0-9\[({<]).*\1([egimosxradlupc]*)([\}\)\;\,]|\s+))
- comment
- string.regexp.replaceXXX
- end
- ((([egimosxradlupc]*)))(?=([\}\)\;\,]|\s+|$))
- endCaptures
-
- 1
-
- name
- string.regexp.replace.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
- 3
-
- name
- keyword.control.regexp-option.perl
-
-
- patterns
-
-
- begin
- (s\s*)([^\sa-zA-Z0-9\[({<])
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- (?=\2)
- name
- string.regexp.replaceXXX.simple_delimiter.perl
- patterns
-
-
- include
- #escaped_char
-
-
-
-
- begin
- '
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- '
- name
- string.regexp.replaceXXX.format.single_quote.perl
- patterns
-
-
- match
- \\['\\]
- name
- constant.character.escape.perl.perl
-
-
-
-
- begin
- ([^\sa-zA-Z0-9\[({<])
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- \1
- name
- string.regexp.replaceXXX.format.simple_delimiter.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
-
-
- begin
- \b(?=(?<!\\)s\s*([^\s\w\[({<>]))
- comment
- string.regexp.replace.extended
- end
- \2((([egimosradlupc]*x[egimosradlupc]*)))\b
- endCaptures
-
- 1
-
- name
- string.regexp.replace.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
- 3
-
- name
- keyword.control.regexp-option.perl
-
-
- patterns
-
-
- begin
- (s)\s*(.)
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
- 1
-
- name
- support.function.perl
-
-
- end
- (?=\2)
- name
- string.regexp.replace.extended.simple_delimiter.perl
- patterns
-
-
- include
- #escaped_char
-
-
-
-
- begin
- '
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- '(?=[egimosradlupc]*x[egimosradlupc]*)\b
- name
- string.regexp.replace.extended.simple_delimiter.perl
- patterns
-
-
- include
- #escaped_char
-
-
-
-
- begin
- (.)
- captures
-
- 0
-
- name
- punctuation.definition.string.perl
-
-
- end
- \1(?=[egimosradlupc]*x[egimosradlupc]*)\b
- name
- string.regexp.replace.extended.simple_delimiter.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
-
-
- begin
- (?<=\(|\{|~|&)\s*((\/))
- beginCaptures
-
- 1
-
- name
- string.regexp.find.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
-
- contentName
- string.regexp.find.perl
- end
- ((\1([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))
- endCaptures
-
- 1
-
- name
- string.regexp.find.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
- 3
-
- name
- keyword.control.regexp-option.perl
-
-
- patterns
-
-
- comment
- This is to prevent thinks like /foo$/ to treat $/ as a variable
- match
- \$(?=\/)
- name
- keyword.control.anchor.perl
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- captures
-
- 1
-
- name
- constant.other.key.perl
-
-
- match
- \b(\w+)\s*(?==>)
-
-
- match
- (?<={)\s*\w+\s*(?=})
- name
- constant.other.bareword.perl
-
-
- captures
-
- 1
-
- name
- keyword.control.perl
-
- 2
-
- name
- entity.name.type.class.perl
-
-
- match
- ^\s*(package)\s+([^\s;]+)
- name
- meta.class.perl
-
-
- captures
-
- 1
-
- name
- storage.type.sub.perl
-
- 2
-
- name
- entity.name.function.perl
-
- 3
-
- name
- storage.type.method.perl
-
-
- match
- \b(sub)(?:\s+([-a-zA-Z0-9_]+))?\s*(?:\([\$\@\*;]*\))?[^\w\{]
- name
- meta.function.perl
-
-
- captures
-
- 1
-
- name
- entity.name.function.perl
-
- 2
-
- name
- punctuation.definition.parameters.perl
-
- 3
-
- name
- variable.parameter.function.perl
-
-
- match
- ^\s*(BEGIN|UNITCHECK|CHECK|INIT|END|DESTROY)\b
- name
- meta.function.perl
-
-
- begin
- ^(?=(\t| {4}))
- end
- (?=[^\t\s])
- name
- meta.leading-tabs
- patterns
-
-
- captures
-
- 1
-
- name
- meta.odd-tab
-
- 2
-
- name
- meta.even-tab
-
-
- match
- (\t| {4})(\t| {4})?
-
-
-
-
- captures
-
- 1
-
- name
- support.function.perl
-
- 2
-
- name
- punctuation.definition.string.perl
-
- 5
-
- name
- punctuation.definition.string.perl
-
- 8
-
- name
- punctuation.definition.string.perl
-
-
- match
- \b(tr|y)\s*([^A-Za-z0-9\s])(.*?)(?<!\\)(\\{2})*(\2)(.*?)(?<!\\)(\\{2})*(\2)
- name
- string.regexp.replace.perl
-
-
- match
- \b(__FILE__|__LINE__|__PACKAGE__|__SUB__|__DATA__|__END__)\b
- name
- constant.language.perl
-
-
- match
- (?<!->)\b(continue|die|do|else|elsif|exit|for|foreach|goto|if|last|next|redo|return|select|unless|until|wait|while|switch|case|require|use|eval)\b
- name
- keyword.control.perl
-
-
- match
- \b(my|our|local)\b
- name
- storage.modifier.perl
-
-
- match
- (?<!\w)\-[rwx0RWXOezsfdlpSbctugkTBMAC]\b
- name
- keyword.operator.filetest.perl
-
-
- match
- \b(and|or|xor|as|not)\b
- name
- keyword.operator.logical.perl
-
-
- match
- (<=>|=>|->)
- name
- keyword.operator.comparison.perl
-
-
- begin
- (((<<) *"HTML"))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.doublequote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.html.embedded.perl
- end
- (^HTML$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- text.html.basic
-
-
-
-
- begin
- (((<<) *"XML"))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.doublequote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.xml.embedded.perl
- end
- (^XML$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- text.xml
-
-
-
-
- begin
- (((<<) *"CSS"))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.doublequote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.css.embedded.perl
- end
- (^CSS$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- source.css
-
-
-
-
- begin
- (((<<) *"JAVASCRIPT"))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.doublequote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.js.embedded.perl
- end
- (^JAVASCRIPT$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- source.js
-
-
-
-
- begin
- (((<<) *"SQL"))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.doublequote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- source.sql.embedded.perl
- end
- (^SQL$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- source.sql
-
-
-
-
- begin
- (((<<) *"POSTSCRIPT"))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.doublequote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.postscript.embedded.perl
- end
- (^POSTSCRIPT$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- source.postscript
-
-
-
-
- begin
- (((<<) *"([^"]*)"))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.doublequote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- string.unquoted.heredoc.doublequote.perl
- end
- (^\4$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- begin
- (((<<) *'HTML'))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.html.embedded.perl
- end
- (^HTML$)
- patterns
-
-
- include
- text.html.basic
-
-
-
-
- begin
- (((<<) *'XML'))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.xml.embedded.perl
- end
- (^XML$)
- patterns
-
-
- include
- text.xml
-
-
-
-
- begin
- (((<<) *'CSS'))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.css.embedded.perl
- end
- (^CSS$)
- patterns
-
-
- include
- source.css
-
-
-
-
- begin
- (((<<) *'JAVASCRIPT'))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.js.embedded.perl
- end
- (^JAVASCRIPT$)
- patterns
-
-
- include
- source.js
-
-
-
-
- begin
- (((<<) *'SQL'))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- source.sql.embedded.perl
- end
- (^SQL$)
- patterns
-
-
- include
- source.sql
-
-
-
-
- begin
- (((<<) *'POSTSCRIPT'))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- source.postscript.embedded.perl
- end
- (^POSTSCRIPT$)
- patterns
-
-
- include
- source.postscript
-
-
-
-
- begin
- (((<<) *'([^']*)'))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- string.unquoted.heredoc.quote.perl
- end
- (^\4$)
-
-
- begin
- (((<<) *\\((?![=\d\$\( ])[^;,'"`\s\)]*)))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.quote.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- string.unquoted.heredoc.quote.perl
- end
- (^\4$)
-
-
- begin
- (((<<) *`([^`]*)`))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.backtick.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- string.unquoted.heredoc.backtick.perl
- end
- (^\4$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- begin
- (((<<) *HTML\b))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.html.embedded.perl
- end
- (^HTML$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- text.html.basic
-
-
-
-
- begin
- (((<<) *XML\b))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- text.xml.embedded.perl
- end
- (^XML$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- text.xml
-
-
-
-
- begin
- (((<<) *JAVASCRIPT\b))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- source.js.embedded.perl
- end
- (^JAVASCRIPT$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- source.js
-
-
-
-
- begin
- (((<<) *SQL\b))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- source.sql.embedded.perl
- end
- (^SQL$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- source.sql
-
-
-
-
- begin
- (((<<) *POSTSCRIPT\b))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 4
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- source.postscript.embedded.perl
- end
- (^POSTSCRIPT$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- source.postscript
-
-
-
-
- begin
- (((<<) *((?![=\d\$\( ])[^;,'"`\s\)]*)))(.*)\n?
- captures
-
- 1
-
- name
- punctuation.definition.string.perl
-
- 2
-
- name
- string.unquoted.heredoc.perl
-
- 3
-
- name
- punctuation.definition.heredoc.perl
-
- 5
-
- patterns
-
-
- include
- $self
-
-
-
-
- contentName
- string.unquoted.heredoc.perl
- end
- (^\4$)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- begin
- \bqq\s*([^\(\{\[\<\w\s])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \1
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.qq.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- begin
- \bqx\s*([^'\(\{\[\<\w\s])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \1
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.interpolated.qx.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- begin
- \bqx\s*'
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- '
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.interpolated.qx.single-quote.perl
- patterns
-
-
- include
- #escaped_char
-
-
-
-
- begin
- "
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- "
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.double.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- begin
- (?<!->)\bqw?\s*([^\(\{\[\<\w\s])
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \1
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.q.perl
-
-
- begin
- '
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- '
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.single.perl
- patterns
-
-
- match
- \\['\\]
- name
- constant.character.escape.perl
-
-
-
-
- begin
- `
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- `
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.interpolated.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
-
-
- begin
- (?<!->)\bqq\s*\(
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \)
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.qq-paren.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_parens_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- \bqq\s*\{
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \}
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.qq-brace.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_braces_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- \bqq\s*\[
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \]
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.qq-bracket.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_brackets_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- \bqq\s*\<
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \>
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.qq-ltgt.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_ltgt_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- (?<!->)\bqx\s*\(
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \)
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.interpolated.qx-paren.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_parens_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- \bqx\s*\{
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \}
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.interpolated.qx-brace.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_braces_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- \bqx\s*\[
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \]
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.interpolated.qx-bracket.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_brackets_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- \bqx\s*\<
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \>
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.interpolated.qx-ltgt.perl
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_ltgt_interpolated
-
-
- include
- #variable
-
-
-
-
- begin
- (?<!->)\bqw?\s*\(
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \)
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.q-paren.perl
- patterns
-
-
- include
- #nested_parens
-
-
-
-
- begin
- \bqw?\s*\{
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \}
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.q-brace.perl
- patterns
-
-
- include
- #nested_braces
-
-
-
-
- begin
- \bqw?\s*\[
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \]
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.q-bracket.perl
- patterns
-
-
- include
- #nested_brackets
-
-
-
-
- begin
- \bqw?\s*\<
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- \>
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.quoted.other.q-ltgt.perl
- patterns
-
-
- include
- #nested_ltgt
-
-
-
-
- begin
- ^__\w+__
- beginCaptures
-
- 0
-
- name
- punctuation.definition.string.begin.perl
-
-
- end
- $
- endCaptures
-
- 0
-
- name
- punctuation.definition.string.end.perl
-
-
- name
- string.unquoted.program-block.perl
-
-
- begin
- \b(format)\s+(\w+)\s*=
- beginCaptures
-
- 1
-
- name
- support.function.perl
-
- 2
-
- name
- entity.name.function.format.perl
-
-
- end
- ^\.\s*$
- name
- meta.format.perl
- patterns
-
-
- include
- #line_comment
-
-
- include
- #variable
-
-
-
-
- captures
-
- 1
-
- name
- support.function.perl
-
- 2
-
- name
- entity.name.function.perl
-
-
- match
- \b(x)\s*(\d+)\b
-
-
- match
- \b(ARGV|DATA|ENV|SIG|STDERR|STDIN|STDOUT|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|cmp|connect|cos|crypt|dbmclose|dbmopen|defined|delete|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eq|eval|exec|exists|exp|fcntl|fileno|flock|fork|formline|ge|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|grep|gt|hex|import|index|int|ioctl|join|keys|kill|lc|lcfirst|le|length|link|listen|local|localtime|log|lstat|lt|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|ne|no|oct|open|opendir|ord|pack|pipe|pop|pos|print|printf|push|quotemeta|rand|read|readdir|readlink|recv|ref|rename|reset|reverse|rewinddir|rindex|rmdir|s|scalar|seek|seekdir|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|substr|symlink|syscall|sysopen|sysread|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|utime|values|vec|waitpid|wantarray|warn|write|y)\b
- name
- support.function.perl
-
-
- captures
-
- 1
-
- name
- punctuation.section.scope.begin.perl
-
- 2
-
- name
- punctuation.section.scope.end.perl
-
-
- comment
- Match empty brackets for ↩ snippet
- match
- (\{)(\})
-
-
- captures
-
- 1
-
- name
- punctuation.section.scope.begin.perl
-
- 2
-
- name
- punctuation.section.scope.end.perl
-
-
- comment
- Match empty parenthesis for ↩ snippet
- match
- (\()(\))
-
-
- repository
-
- escaped_char
-
- patterns
-
-
- match
- \\\d+
- name
- constant.character.escape.perl
-
-
- match
- \\c[^\s\\]
- name
- constant.character.escape.perl
-
-
- match
- \\g(?:\{(?:\w*|-\d+)\}|\d+)
- name
- constant.character.escape.perl
-
-
- match
- \\k(?:\{\w*\}|<\w*>|'\w*')
- name
- constant.character.escape.perl
-
-
- match
- \\N\{[^\}]*\}
- name
- constant.character.escape.perl
-
-
- match
- \\o\{\d*\}
- name
- constant.character.escape.perl
-
-
- match
- \\(?:p|P)(?:\{\w*\}|P)
- name
- constant.character.escape.perl
-
-
- match
- \\x(?:[0-9a-zA-Z]{2}|\{\w*\})?
- name
- constant.character.escape.perl
-
-
- match
- \\.
- name
- constant.character.escape.perl
-
-
-
- line_comment
-
- patterns
-
-
- begin
- (^[ \t]+)?(?=#)
- beginCaptures
-
- 1
-
- name
- punctuation.whitespace.comment.leading.perl
-
-
- end
- (?!\G)
- patterns
-
-
- begin
- #
- beginCaptures
-
- 0
-
- name
- punctuation.definition.comment.perl
-
-
- end
- \n
- name
- comment.line.number-sign.perl
-
-
-
-
-
- nested_braces
-
- begin
- \{
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- \}
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_braces
-
-
-
- nested_braces_interpolated
-
- begin
- \{
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- \}
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_braces_interpolated
-
-
-
- nested_brackets
-
- begin
- \[
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- \]
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_brackets
-
-
-
- nested_brackets_interpolated
-
- begin
- \[
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- \]
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_brackets_interpolated
-
-
-
- nested_ltgt
-
- begin
- <
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- >
- patterns
-
-
- include
- #nested_ltgt
-
-
-
- nested_ltgt_interpolated
-
- begin
- <
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- >
- patterns
-
-
- include
- #variable
-
-
- include
- #nested_ltgt_interpolated
-
-
-
- nested_parens
-
- begin
- \(
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- \)
- patterns
-
-
- include
- #escaped_char
-
-
- include
- #nested_parens
-
-
-
- nested_parens_interpolated
-
- begin
- \(
- captures
-
- 1
-
- name
- punctuation.section.scope.perl
-
-
- end
- \)
- patterns
-
-
- comment
- This is to prevent thinks like qr/foo$/ to treat $/ as a variable
- match
- \$(?=[^\s\w'\{\[\(\<])
- name
- keyword.control.anchor.perl
-
-
- include
- #escaped_char
-
-
- include
- #variable
-
-
- include
- #nested_parens_interpolated
-
-
-
- variable
-
- patterns
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)&(?![A-Za-z0-9_])
- name
- variable.other.regexp.match.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)`(?![A-Za-z0-9_])
- name
- variable.other.regexp.pre-match.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)'(?![A-Za-z0-9_])
- name
- variable.other.regexp.post-match.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)\+(?![A-Za-z0-9_])
- name
- variable.other.regexp.last-paren-match.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)"(?![A-Za-z0-9_])
- name
- variable.other.readwrite.list-separator.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)0(?![A-Za-z0-9_])
- name
- variable.other.predefined.program-name.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)[_ab\*\.\/\|,\\;#%=\-~^:?!\$<>\(\)\[\]@](?![A-Za-z0-9_])
- name
- variable.other.predefined.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$)[0-9]+(?![A-Za-z0-9_])
- name
- variable.other.subpattern.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- ([\$\@\%](#)?)([a-zA-Zx7f-xff\$]|::)([a-zA-Z0-9_x7f-xff\$]|::)*\b
- name
- variable.other.readwrite.global.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
- 2
-
- name
- punctuation.definition.variable.perl
-
-
- match
- (\$\{)(?:[a-zA-Zx7f-xff\$]|::)(?:[a-zA-Z0-9_x7f-xff\$]|::)*(\})
- name
- variable.other.readwrite.global.perl
-
-
- captures
-
- 1
-
- name
- punctuation.definition.variable.perl
-
-
- match
- ([\$\@\%](#)?)[0-9_]\b
- name
- variable.other.readwrite.global.special.perl
-
-
-
-
- scopeName
- source.perl
- uuid
- EDBFE125-6B1C-11D9-9189-000D93589AF6
-
+
+
+
+
+ comment
+
+ TODO: Include RegExp syntax
+
+ fileTypes
+
+ pl
+ pm
+ pod
+ t
+ PL
+ psgi
+
+ firstLineMatch
+ ^#!.*\bperl\b
+ keyEquivalent
+ ^~P
+ name
+ Perl
+ patterns
+
+
+ include
+ #line_comment
+
+
+ begin
+ ^=
+ captures
+
+ 0
+
+ name
+ punctuation.definition.comment.perl
+
+
+ end
+ ^=cut
+ name
+ comment.block.documentation.perl
+
+
+ include
+ #variable
+
+
+ applyEndPatternLast
+ 1
+ begin
+ \b(?=qr\s*[^\s\w])
+ comment
+ string.regexp.compile.perl
+ end
+ ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))
+ endCaptures
+
+ 1
+
+ name
+ string.regexp.compile.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+ 3
+
+ name
+ keyword.control.regexp-option.perl
+
+
+ patterns
+
+
+ begin
+ (qr)\s*\{
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \}
+ name
+ string.regexp.compile.nested_braces.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_braces_interpolated
+
+
+
+
+ begin
+ (qr)\s*\[
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \]
+ name
+ string.regexp.compile.nested_brackets.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_brackets_interpolated
+
+
+
+
+ begin
+ (qr)\s*<
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ >
+ name
+ string.regexp.compile.nested_ltgt.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_ltgt_interpolated
+
+
+
+
+ begin
+ (qr)\s*\(
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \)
+ name
+ string.regexp.compile.nested_parens.perl
+ patterns
+
+
+ comment
+ This is to prevent thinks like qr/foo$/ to treat $/ as a variable
+ match
+ \$(?=[^\s\w\\'\{\[\(\<])
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_parens_interpolated
+
+
+
+
+ begin
+ (qr)\s*'
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ '
+ name
+ string.regexp.compile.single-quote.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+
+
+ begin
+ (qr)\s*([^\s\w'\{\[\(\<])
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \2
+ name
+ string.regexp.compile.simple-delimiter.perl
+ patterns
+
+
+ comment
+ This is to prevent thinks like qr/foo$/ to treat $/ as a variable
+ match
+ \$(?=[^\s\w'\{\[\(\<])
+ name
+ keyword.control.anchor.perl
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_parens_interpolated
+
+
+
+
+
+
+ applyEndPatternLast
+ 1
+ begin
+ \b(?=m\s*[^\sa-zA-Z0-9])
+ comment
+ string.regexp.find-m.perl
+ end
+ ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))
+ endCaptures
+
+ 1
+
+ name
+ string.regexp.find-m.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+ 3
+
+ name
+ keyword.control.regexp-option.perl
+
+
+ patterns
+
+
+ begin
+ (m)\s*\{
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \}
+ name
+ string.regexp.find-m.nested_braces.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_braces_interpolated
+
+
+
+
+ begin
+ (m)\s*\[
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \]
+ name
+ string.regexp.find-m.nested_brackets.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_brackets_interpolated
+
+
+
+
+ begin
+ (m)\s*<
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ >
+ name
+ string.regexp.find-m.nested_ltgt.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_ltgt_interpolated
+
+
+
+
+ begin
+ (m)\s*\(
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \)
+ name
+ string.regexp.find-m.nested_parens.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_parens_interpolated
+
+
+
+
+ begin
+ (m)\s*'
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ '
+ name
+ string.regexp.find-m.single-quote.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+
+
+ begin
+ (m)\s*([^\sa-zA-Z0-9'\{\[\(\<])
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \2
+ name
+ string.regexp.find-m.simple-delimiter.perl
+ patterns
+
+
+ comment
+ This is to prevent thinks like qr/foo$/ to treat $/ as a variable
+ match
+ \$(?=[^\sa-zA-Z0-9'\{\[\(\<])
+ name
+ keyword.control.anchor.perl
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ begin
+ \[
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.character-class.begin.perl
+
+
+ end
+ \]
+ endCaptures
+
+ 1
+
+ name
+ punctuation.definition.character-class.end.perl
+
+
+ name
+ constant.other.character-class.set.perl
+ patterns
+
+
+ comment
+ This is to prevent thinks like qr/foo$/ to treat $/ as a variable
+ match
+ \$(?=[^\s\w'\{\[\(\<])
+ name
+ keyword.control.anchor.perl
+
+
+ include
+ #escaped_char
+
+
+
+
+ include
+ #nested_parens_interpolated
+
+
+
+
+
+
+ applyEndPatternLast
+ 1
+ begin
+ \b(?=(?<!\&)(s)(\s+\S|\s*[;\,\#\{\}\(\)\[<]|$))
+ comment
+ string.regexp.replace.perl
+ end
+ ((([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)\]>]|$))
+ endCaptures
+
+ 1
+
+ name
+ string.regexp.replace.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+ 3
+
+ name
+ keyword.control.regexp-option.perl
+
+
+ patterns
+
+
+ begin
+ (s)\s*\{
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \}
+ name
+ string.regexp.nested_braces.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_braces
+
+
+
+
+ begin
+ (s)\s*\[
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \]
+ name
+ string.regexp.nested_brackets.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_brackets
+
+
+
+
+ begin
+ (s)\s*<
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ >
+ name
+ string.regexp.nested_ltgt.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_ltgt
+
+
+
+
+ begin
+ (s)\s*\(
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ \)
+ name
+ string.regexp.nested_parens.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_parens
+
+
+
+
+ begin
+ \{
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ \}
+ name
+ string.regexp.format.nested_braces.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_braces_interpolated
+
+
+
+
+ begin
+ \[
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ \]
+ name
+ string.regexp.format.nested_brackets.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_brackets_interpolated
+
+
+
+
+ begin
+ <
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ >
+ name
+ string.regexp.format.nested_ltgt.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_ltgt_interpolated
+
+
+
+
+ begin
+ \(
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ \)
+ name
+ string.regexp.format.nested_parens.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_parens_interpolated
+
+
+
+
+ begin
+ '
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ '
+ name
+ string.regexp.format.single_quote.perl
+ patterns
+
+
+ match
+ \\['\\]
+ name
+ constant.character.escape.perl
+
+
+
+
+ begin
+ ([^\s\w\[({<;])
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ \1
+ name
+ string.regexp.format.simple_delimiter.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ match
+ \s+
+
+
+
+
+ begin
+ \b(?=s([^\sa-zA-Z0-9\[({<]).*\1([egimosxradlupc]*)([\}\)\;\,]|\s+))
+ comment
+ string.regexp.replaceXXX
+ end
+ ((([egimosxradlupc]*)))(?=([\}\)\;\,]|\s+|$))
+ endCaptures
+
+ 1
+
+ name
+ string.regexp.replace.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+ 3
+
+ name
+ keyword.control.regexp-option.perl
+
+
+ patterns
+
+
+ begin
+ (s\s*)([^\sa-zA-Z0-9\[({<])
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ (?=\2)
+ name
+ string.regexp.replaceXXX.simple_delimiter.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+
+
+ begin
+ '
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ '
+ name
+ string.regexp.replaceXXX.format.single_quote.perl
+ patterns
+
+
+ match
+ \\['\\]
+ name
+ constant.character.escape.perl.perl
+
+
+
+
+ begin
+ ([^\sa-zA-Z0-9\[({<])
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ \1
+ name
+ string.regexp.replaceXXX.format.simple_delimiter.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+
+
+ begin
+ \b(?=(?<!\\)s\s*([^\s\w\[({<>]))
+ comment
+ string.regexp.replace.extended
+ end
+ \2((([egimosradlupc]*x[egimosradlupc]*)))\b
+ endCaptures
+
+ 1
+
+ name
+ string.regexp.replace.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+ 3
+
+ name
+ keyword.control.regexp-option.perl
+
+
+ patterns
+
+
+ begin
+ (s)\s*(.)
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+ 1
+
+ name
+ support.function.perl
+
+
+ end
+ (?=\2)
+ name
+ string.regexp.replace.extended.simple_delimiter.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+
+
+ begin
+ '
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ '(?=[egimosradlupc]*x[egimosradlupc]*)\b
+ name
+ string.regexp.replace.extended.simple_delimiter.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+
+
+ begin
+ (.)
+ captures
+
+ 0
+
+ name
+ punctuation.definition.string.perl
+
+
+ end
+ \1(?=[egimosradlupc]*x[egimosradlupc]*)\b
+ name
+ string.regexp.replace.extended.simple_delimiter.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+
+
+ begin
+ (?<=\(|\{|~|&)\s*((\/))
+ beginCaptures
+
+ 1
+
+ name
+ string.regexp.find.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+
+ contentName
+ string.regexp.find.perl
+ end
+ ((\1([egimosxradlupc]*)))(?=(\s+\S|\s*[;\,\#\{\}\)]|$))
+ endCaptures
+
+ 1
+
+ name
+ string.regexp.find.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+ 3
+
+ name
+ keyword.control.regexp-option.perl
+
+
+ patterns
+
+
+ comment
+ This is to prevent thinks like /foo$/ to treat $/ as a variable
+ match
+ \$(?=\/)
+ name
+ keyword.control.anchor.perl
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ captures
+
+ 1
+
+ name
+ constant.other.key.perl
+
+
+ match
+ \b(\w+)\s*(?==>)
+
+
+ match
+ (?<={)\s*\w+\s*(?=})
+ name
+ constant.other.bareword.perl
+
+
+ captures
+
+ 1
+
+ name
+ keyword.control.perl
+
+ 2
+
+ name
+ entity.name.type.class.perl
+
+
+ match
+ ^\s*(package)\s+([^\s;]+)
+ name
+ meta.class.perl
+
+
+ captures
+
+ 1
+
+ name
+ storage.type.sub.perl
+
+ 2
+
+ name
+ entity.name.function.perl
+
+ 3
+
+ name
+ storage.type.method.perl
+
+
+ match
+ \b(sub)(?:\s+([-a-zA-Z0-9_]+))?\s*(?:\([\$\@\*;]*\))?[^\w\{]
+ name
+ meta.function.perl
+
+
+ captures
+
+ 1
+
+ name
+ entity.name.function.perl
+
+ 2
+
+ name
+ punctuation.definition.parameters.perl
+
+ 3
+
+ name
+ variable.parameter.function.perl
+
+
+ match
+ ^\s*(BEGIN|UNITCHECK|CHECK|INIT|END|DESTROY)\b
+ name
+ meta.function.perl
+
+
+ begin
+ ^(?=(\t| {4}))
+ end
+ (?=[^\t\s])
+ name
+ meta.leading-tabs
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ meta.odd-tab
+
+ 2
+
+ name
+ meta.even-tab
+
+
+ match
+ (\t| {4})(\t| {4})?
+
+
+
+
+ captures
+
+ 1
+
+ name
+ support.function.perl
+
+ 2
+
+ name
+ punctuation.definition.string.perl
+
+ 5
+
+ name
+ punctuation.definition.string.perl
+
+ 8
+
+ name
+ punctuation.definition.string.perl
+
+
+ match
+ \b(tr|y)\s*([^A-Za-z0-9\s])(.*?)(?<!\\)(\\{2})*(\2)(.*?)(?<!\\)(\\{2})*(\2)
+ name
+ string.regexp.replace.perl
+
+
+ match
+ \b(__FILE__|__LINE__|__PACKAGE__|__SUB__|__DATA__|__END__)\b
+ name
+ constant.language.perl
+
+
+ match
+ (?<!->)\b(continue|die|do|else|elsif|exit|for|foreach|goto|if|last|next|redo|return|select|unless|until|wait|while|switch|case|require|use|eval)\b
+ name
+ keyword.control.perl
+
+
+ match
+ \b(my|our|local)\b
+ name
+ storage.modifier.perl
+
+
+ match
+ (?<!\w)\-[rwx0RWXOezsfdlpSbctugkTBMAC]\b
+ name
+ keyword.operator.filetest.perl
+
+
+ match
+ \b(and|or|xor|as|not)\b
+ name
+ keyword.operator.logical.perl
+
+
+ match
+ (<=>|=>|->)
+ name
+ keyword.operator.comparison.perl
+
+
+ begin
+ (((<<) *"HTML"))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.doublequote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.html.embedded.perl
+ end
+ (^HTML$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ text.html.basic
+
+
+
+
+ begin
+ (((<<) *"XML"))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.doublequote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.xml.embedded.perl
+ end
+ (^XML$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ text.xml
+
+
+
+
+ begin
+ (((<<) *"CSS"))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.doublequote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.css.embedded.perl
+ end
+ (^CSS$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ source.css
+
+
+
+
+ begin
+ (((<<) *"JAVASCRIPT"))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.doublequote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.js.embedded.perl
+ end
+ (^JAVASCRIPT$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ source.js
+
+
+
+
+ begin
+ (((<<) *"SQL"))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.doublequote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ source.sql.embedded.perl
+ end
+ (^SQL$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ source.sql
+
+
+
+
+ begin
+ (((<<) *"POSTSCRIPT"))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.doublequote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.postscript.embedded.perl
+ end
+ (^POSTSCRIPT$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ source.postscript
+
+
+
+
+ begin
+ (((<<) *"([^"]*)"))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.doublequote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ string.unquoted.heredoc.doublequote.perl
+ end
+ (^\4$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ (((<<) *'HTML'))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.html.embedded.perl
+ end
+ (^HTML$)
+ patterns
+
+
+ include
+ text.html.basic
+
+
+
+
+ begin
+ (((<<) *'XML'))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.xml.embedded.perl
+ end
+ (^XML$)
+ patterns
+
+
+ include
+ text.xml
+
+
+
+
+ begin
+ (((<<) *'CSS'))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.css.embedded.perl
+ end
+ (^CSS$)
+ patterns
+
+
+ include
+ source.css
+
+
+
+
+ begin
+ (((<<) *'JAVASCRIPT'))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.js.embedded.perl
+ end
+ (^JAVASCRIPT$)
+ patterns
+
+
+ include
+ source.js
+
+
+
+
+ begin
+ (((<<) *'SQL'))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ source.sql.embedded.perl
+ end
+ (^SQL$)
+ patterns
+
+
+ include
+ source.sql
+
+
+
+
+ begin
+ (((<<) *'POSTSCRIPT'))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ source.postscript.embedded.perl
+ end
+ (^POSTSCRIPT$)
+ patterns
+
+
+ include
+ source.postscript
+
+
+
+
+ begin
+ (((<<) *'([^']*)'))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ string.unquoted.heredoc.quote.perl
+ end
+ (^\4$)
+
+
+ begin
+ (((<<) *\\((?![=\d\$\( ])[^;,'"`\s\)]*)))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.quote.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ string.unquoted.heredoc.quote.perl
+ end
+ (^\4$)
+
+
+ begin
+ (((<<) *`([^`]*)`))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.backtick.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ string.unquoted.heredoc.backtick.perl
+ end
+ (^\4$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ (((<<) *HTML\b))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.html.embedded.perl
+ end
+ (^HTML$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ text.html.basic
+
+
+
+
+ begin
+ (((<<) *XML\b))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ text.xml.embedded.perl
+ end
+ (^XML$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ text.xml
+
+
+
+
+ begin
+ (((<<) *JAVASCRIPT\b))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ source.js.embedded.perl
+ end
+ (^JAVASCRIPT$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ source.js
+
+
+
+
+ begin
+ (((<<) *SQL\b))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ source.sql.embedded.perl
+ end
+ (^SQL$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ source.sql
+
+
+
+
+ begin
+ (((<<) *POSTSCRIPT\b))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 4
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ source.postscript.embedded.perl
+ end
+ (^POSTSCRIPT$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ source.postscript
+
+
+
+
+ begin
+ (((<<) *((?![=\d\$\( ])[^;,'"`\s\)]*)))(.*)\n?
+ captures
+
+ 1
+
+ name
+ punctuation.definition.string.perl
+
+ 2
+
+ name
+ string.unquoted.heredoc.perl
+
+ 3
+
+ name
+ punctuation.definition.heredoc.perl
+
+ 5
+
+ patterns
+
+
+ include
+ $self
+
+
+
+
+ contentName
+ string.unquoted.heredoc.perl
+ end
+ (^\4$)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqq\s*([^\(\{\[\<\w\s])
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \1
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.qq.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqx\s*([^'\(\{\[\<\w\s])
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \1
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.interpolated.qx.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqx\s*'
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ '
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.interpolated.qx.single-quote.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+
+
+ begin
+ "
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ "
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.double.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ (?<!->)\bqw?\s*([^\(\{\[\<\w\s])
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \1
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.q.perl
+
+
+ begin
+ '
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ '
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.single.perl
+ patterns
+
+
+ match
+ \\['\\]
+ name
+ constant.character.escape.perl
+
+
+
+
+ begin
+ `
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ `
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.interpolated.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ (?<!->)\bqq\s*\(
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \)
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.qq-paren.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_parens_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqq\s*\{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \}
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.qq-brace.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_braces_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqq\s*\[
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \]
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.qq-bracket.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_brackets_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqq\s*\<
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.qq-ltgt.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_ltgt_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ (?<!->)\bqx\s*\(
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \)
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.interpolated.qx-paren.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_parens_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqx\s*\{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \}
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.interpolated.qx-brace.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_braces_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqx\s*\[
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \]
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.interpolated.qx-bracket.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_brackets_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ \bqx\s*\<
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.interpolated.qx-ltgt.perl
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_ltgt_interpolated
+
+
+ include
+ #variable
+
+
+
+
+ begin
+ (?<!->)\bqw?\s*\(
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \)
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.q-paren.perl
+ patterns
+
+
+ include
+ #nested_parens
+
+
+
+
+ begin
+ \bqw?\s*\{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \}
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.q-brace.perl
+ patterns
+
+
+ include
+ #nested_braces
+
+
+
+
+ begin
+ \bqw?\s*\[
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \]
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.q-bracket.perl
+ patterns
+
+
+ include
+ #nested_brackets
+
+
+
+
+ begin
+ \bqw?\s*\<
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ \>
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.quoted.other.q-ltgt.perl
+ patterns
+
+
+ include
+ #nested_ltgt
+
+
+
+
+ begin
+ ^__\w+__
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.perl
+
+
+ end
+ $
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.perl
+
+
+ name
+ string.unquoted.program-block.perl
+
+
+ begin
+ \b(format)\s+(\w+)\s*=
+ beginCaptures
+
+ 1
+
+ name
+ support.function.perl
+
+ 2
+
+ name
+ entity.name.function.format.perl
+
+
+ end
+ ^\.\s*$
+ name
+ meta.format.perl
+ patterns
+
+
+ include
+ #line_comment
+
+
+ include
+ #variable
+
+
+
+
+ captures
+
+ 1
+
+ name
+ support.function.perl
+
+ 2
+
+ name
+ entity.name.function.perl
+
+
+ match
+ \b(x)\s*(\d+)\b
+
+
+ match
+ \b(ARGV|DATA|ENV|SIG|STDERR|STDIN|STDOUT|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|cmp|connect|cos|crypt|dbmclose|dbmopen|defined|delete|dump|each|endgrent|endhostent|endnetent|endprotoent|endpwent|endservent|eof|eq|eval|exec|exists|exp|fcntl|fileno|flock|fork|formline|ge|getc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|grep|gt|hex|import|index|int|ioctl|join|keys|kill|lc|lcfirst|le|length|link|listen|local|localtime|log|lstat|lt|m|map|mkdir|msgctl|msgget|msgrcv|msgsnd|ne|no|oct|open|opendir|ord|pack|pipe|pop|pos|print|printf|push|quotemeta|rand|read|readdir|readlink|recv|ref|rename|reset|reverse|rewinddir|rindex|rmdir|s|scalar|seek|seekdir|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|study|substr|symlink|syscall|sysopen|sysread|system|syswrite|tell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unlink|unpack|unshift|untie|utime|values|vec|waitpid|wantarray|warn|write|y)\b
+ name
+ support.function.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.begin.perl
+
+ 2
+
+ name
+ punctuation.section.scope.end.perl
+
+
+ comment
+ Match empty brackets for ↩ snippet
+ match
+ (\{)(\})
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.begin.perl
+
+ 2
+
+ name
+ punctuation.section.scope.end.perl
+
+
+ comment
+ Match empty parenthesis for ↩ snippet
+ match
+ (\()(\))
+
+
+ repository
+
+ escaped_char
+
+ patterns
+
+
+ match
+ \\\d+
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\c[^\s\\]
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\g(?:\{(?:\w*|-\d+)\}|\d+)
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\k(?:\{\w*\}|<\w*>|'\w*')
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\N\{[^\}]*\}
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\o\{\d*\}
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\(?:p|P)(?:\{\w*\}|P)
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\x(?:[0-9a-zA-Z]{2}|\{\w*\})?
+ name
+ constant.character.escape.perl
+
+
+ match
+ \\.
+ name
+ constant.character.escape.perl
+
+
+
+ line_comment
+
+ patterns
+
+
+ begin
+ (^[ \t]+)?(?=#)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.whitespace.comment.leading.perl
+
+
+ end
+ (?!\G)
+ patterns
+
+
+ begin
+ #
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.perl
+
+
+ end
+ \n
+ name
+ comment.line.number-sign.perl
+
+
+
+
+
+ nested_braces
+
+ begin
+ \{
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ \}
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_braces
+
+
+
+ nested_braces_interpolated
+
+ begin
+ \{
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ \}
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_braces_interpolated
+
+
+
+ nested_brackets
+
+ begin
+ \[
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ \]
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_brackets
+
+
+
+ nested_brackets_interpolated
+
+ begin
+ \[
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ \]
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_brackets_interpolated
+
+
+
+ nested_ltgt
+
+ begin
+ <
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ >
+ patterns
+
+
+ include
+ #nested_ltgt
+
+
+
+ nested_ltgt_interpolated
+
+ begin
+ <
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ >
+ patterns
+
+
+ include
+ #variable
+
+
+ include
+ #nested_ltgt_interpolated
+
+
+
+ nested_parens
+
+ begin
+ \(
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ \)
+ patterns
+
+
+ include
+ #escaped_char
+
+
+ include
+ #nested_parens
+
+
+
+ nested_parens_interpolated
+
+ begin
+ \(
+ captures
+
+ 1
+
+ name
+ punctuation.section.scope.perl
+
+
+ end
+ \)
+ patterns
+
+
+ comment
+ This is to prevent thinks like qr/foo$/ to treat $/ as a variable
+ match
+ \$(?=[^\s\w'\{\[\(\<])
+ name
+ keyword.control.anchor.perl
+
+
+ include
+ #escaped_char
+
+
+ include
+ #variable
+
+
+ include
+ #nested_parens_interpolated
+
+
+
+ variable
+
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)&(?![A-Za-z0-9_])
+ name
+ variable.other.regexp.match.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)`(?![A-Za-z0-9_])
+ name
+ variable.other.regexp.pre-match.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)'(?![A-Za-z0-9_])
+ name
+ variable.other.regexp.post-match.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)\+(?![A-Za-z0-9_])
+ name
+ variable.other.regexp.last-paren-match.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)"(?![A-Za-z0-9_])
+ name
+ variable.other.readwrite.list-separator.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)0(?![A-Za-z0-9_])
+ name
+ variable.other.predefined.program-name.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)[_ab\*\.\/\|,\\;#%=\-~^:?!\$<>\(\)\[\]@](?![A-Za-z0-9_])
+ name
+ variable.other.predefined.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$)[0-9]+(?![A-Za-z0-9_])
+ name
+ variable.other.subpattern.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ ([\$\@\%](#)?)([a-zA-Zx7f-xff\$]|::)([a-zA-Z0-9_x7f-xff\$]|::)*\b
+ name
+ variable.other.readwrite.global.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+ 2
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ (\$\{)(?:[a-zA-Zx7f-xff\$]|::)(?:[a-zA-Z0-9_x7f-xff\$]|::)*(\})
+ name
+ variable.other.readwrite.global.perl
+
+
+ captures
+
+ 1
+
+ name
+ punctuation.definition.variable.perl
+
+
+ match
+ ([\$\@\%](#)?)[0-9_]\b
+ name
+ variable.other.readwrite.global.special.perl
+
+
+
+
+ scopeName
+ source.perl
+ uuid
+ EDBFE125-6B1C-11D9-9189-000D93589AF6
+
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Pug.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Pug.tmLanguage
new file mode 100644
index 000000000..164026d31
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Pug.tmLanguage
@@ -0,0 +1,1486 @@
+
+
+
+
+ fileTypes
+
+ pug
+
+ name
+ Pug
+ patterns
+
+
+ comment
+ Doctype declaration.
+ match
+ ^(!!!|doctype)(\s*[a-zA-Z0-9-_]+)?
+ name
+ meta.tag.sgml.doctype.html
+
+
+ begin
+ ^(\s*)//-
+ comment
+ Unbuffered (pug-only) comments.
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ comment.unbuffered.block.pug
+
+
+ begin
+ ^(\s*)//
+ comment
+ Buffered (html) comments.
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ string.comment.buffered.block.pug
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ invalid.illegal.comment.comment.block.pug
+
+
+ comment
+ Buffered comments inside buffered comments will generate invalid html.
+ match
+ ^\s*(//)(?!-)
+ name
+ string.comment.buffered.block.pug
+
+
+
+
+ begin
+ <!--
+ end
+ --\s*>
+ name
+ comment.unbuffered.block.pug
+ patterns
+
+
+ match
+ --
+ name
+ invalid.illegal.comment.comment.block.pug
+
+
+
+
+ begin
+ ^(\s*)-$
+ comment
+ Unbuffered code block.
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ source.js
+ patterns
+
+
+ include
+ source.js
+
+
+
+
+ begin
+ ^(\s*)(script)((\.$)|(?=[^\n]*(text|application)/javascript.*\.$))
+ beginCaptures
+
+ 2
+
+ name
+ entity.name.tag.pug
+
+
+ comment
+ Script tag with JavaScript code.
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ meta.tag.other
+ patterns
+
+
+ begin
+ \G(?=\()
+ end
+ $
+ patterns
+
+
+ include
+ #tag_attributes
+
+
+
+
+ begin
+ \G(?=[.#])
+ end
+ $
+ patterns
+
+
+ include
+ #complete_tag
+
+
+
+
+ include
+ source.js
+
+
+
+
+ begin
+ ^(\s*)(style)((\.$)|(?=[.#(].*\.$))
+ beginCaptures
+
+ 2
+
+ name
+ entity.name.tag.pug
+
+
+ comment
+ Style tag with CSS code.
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ meta.tag.other
+ patterns
+
+
+ begin
+ \G(?=\()
+ end
+ $
+ patterns
+
+
+ include
+ #tag_attributes
+
+
+
+
+ begin
+ \G(?=[.#])
+ end
+ $
+ patterns
+
+
+ include
+ #complete_tag
+
+
+
+
+ include
+ source.css
+
+
+
+
+ begin
+ ^(\s*):(sass)(?=\(|$)
+ beginCaptures
+
+ 2
+
+ name
+ constant.language.name.sass.filter.pug
+
+
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ source.sass.filter.pug
+ patterns
+
+
+ include
+ #tag_attributes
+
+
+ include
+ source.sass
+
+
+
+
+ begin
+ ^(\s*):(less)(?=\(|$)
+ beginCaptures
+
+ 2
+
+ name
+ constant.language.name.less.filter.pug
+
+
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ source.less.filter.pug
+ patterns
+
+
+ include
+ #tag_attributes
+
+
+ include
+ source.less
+
+
+
+
+ begin
+ ^(\s*):(stylus)(?=\(|$)
+ beginCaptures
+
+ 2
+
+ name
+ constant.language.name.stylus.filter.pug
+
+
+ end
+ ^(?!(\1\s)|\s*$)
+ patterns
+
+
+ include
+ #tag_attributes
+
+
+ include
+ source.stylus
+
+
+
+
+ begin
+ ^(\s*):(coffee(-?script)?)(?=\(|$)
+ beginCaptures
+
+ 2
+
+ name
+ constant.language.name.coffeescript.filter.pug
+
+
+ end
+ ^(?!(\1\s)|\s*$)
+ name
+ source.coffeescript.filter.pug
+ patterns
+
+
+ include
+ #tag_attributes
+
+
+ include
+ source.coffee
+
+
+
+
+ begin
+ ^(\s*)((:(?=.))|(:$))
+ beginCaptures
+
+ 4
+
+ name
+ invalid.illegal.empty.generic.filter.pug
+
+
+ comment
+ Generic Pug filter.
+ end
+ ^(?!(\1\s)|\s*$)
+ patterns
+
+
+ begin
+ \G(?<=:)(?=.)
+ end
+ $
+ name
+ name.generic.filter.pug
+ patterns
+
+
+ match
+ \G\(
+ name
+ invalid.illegal.name.generic.filter.pug
+
+
+ match
+ [\w-]
+ name
+ constant.language.name.generic.filter.pug
+
+
+ include
+ #tag_attributes
+
+
+ match
+ \W
+ name
+ invalid.illegal.name.generic.filter.pug
+
+
+
+
+
+
+ begin
+ ^(\s*)(?=[\w.#].*?\.$)(?=(?:(?:(?:(?:(?:#[\w-]+)|(?:\.[\w-]+))|(?:(?:[#!]\{[^}]*\})|(?:\w(?:(?:[\w:-]+[\w-])|(?:[\w-]*)))))(?:(?:#[\w-]+)|(?:\.[\w-]+)|(?:\((?:[^()\'\"]*(?:(?:\'(?:[^\']|(?:(?<!\\)\\\'))*\')|(?:\"(?:[^\"]|(?:(?<!\\)\\\"))*\")))*[^()]*\))*)*)(?:(?:(?::\s+)|(?<=\)))(?:(?:(?:(?:#[\w-]+)|(?:\.[\w-]+))|(?:(?:[#!]\{[^}]*\})|(?:\w(?:(?:[\w:-]+[\w-])|(?:[\w-]*)))))(?:(?:#[\w-]+)|(?:\.[\w-]+)|(?:\((?:[^()\'\"]*(?:(?:\'(?:[^\']|(?:(?<!\\)\\\'))*\')|(?:\"(?:[^\"]|(?:(?<!\\)\\\"))*\")))*[^()]*\))*)*))*)\.$)(?:(?:(#[\w-]+)|(\.[\w-]+))|((?:[#!]\{[^}]*\})|(?:\w(?:(?:[\w:-]+[\w-])|(?:[\w-]*)))))
+ beginCaptures
+
+ 2
+
+ name
+ entity.other.attribute-name.id.pug
+
+ 3
+
+ name
+ entity.other.attribute-name.class.pug
+
+ 4
+
+ name
+ meta.tag.other entity.name.tag.pug
+
+
+ comment
+ Generated from dot_block_tag.py
+ end
+ ^(?!(\1\s)|\s*$)
+ patterns
+
+
+ include
+ #tag_attributes
+
+
+ include
+ #complete_tag
+
+
+ begin
+ ^(?=.)
+ end
+ $
+ name
+ text.block.pug
+ patterns
+
+
+ include
+ #inline_pug
+
+
+ include
+ #embedded_html
+
+
+ include
+ #html_entity
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+
+
+
+ begin
+ ^\s*
+ comment
+ All constructs that generally span a single line starting with any number of white-spaces.
+ end
+ $
+ patterns
+
+
+ include
+ #inline_pug
+
+
+ include
+ #blocks_and_includes
+
+
+ include
+ #unbuffered_code
+
+
+ include
+ #mixin_definition
+
+
+ include
+ #mixin_call
+
+
+ include
+ #flow_control
+
+
+ include
+ #case_conds
+
+
+ begin
+ \|
+ comment
+ Tag pipe text line.
+ end
+ $
+ name
+ text.block.pipe.pug
+ patterns
+
+
+ include
+ #inline_pug
+
+
+ include
+ #embedded_html
+
+
+ include
+ #html_entity
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+
+ include
+ #printed_expression
+
+
+ begin
+ \G(?=(#[^\{\w-])|[^\w.#])
+ comment
+ Line starting with characters incompatible with tag name/id/class is standalone text.
+ end
+ $
+ patterns
+
+
+ begin
+ </?(?=[!#])
+ end
+ >|$
+ patterns
+
+
+ include
+ #inline_pug
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+
+ include
+ #inline_pug
+
+
+ include
+ #embedded_html
+
+
+ include
+ #html_entity
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+
+ include
+ #complete_tag
+
+
+
+
+ repository
+
+ babel_parens
+
+ begin
+ \(
+ end
+ \)|(({\s*)?$)
+ patterns
+
+
+ include
+ #babel_parens
+
+
+ include
+ source.js
+
+
+
+ blocks_and_includes
+
+ captures
+
+ 1
+
+ name
+ storage.type.import.include.pug
+
+ 4
+
+ name
+ variable.control.import.include.pug
+
+
+ comment
+ Template blocks and includes.
+ match
+ (extends|include|yield|append|prepend|block( (append|prepend))?)\s+(.*)$
+ name
+ meta.first-class.pug
+
+ case_conds
+
+ begin
+ (default|when)((\s+|(?=:))|$)
+ captures
+
+ 1
+
+ name
+ storage.type.function.pug
+
+
+ comment
+ Pug case conditionals.
+ end
+ $
+ name
+ meta.control.flow.pug
+ patterns
+
+
+ begin
+ \G(?!:)
+ end
+ (?=:\s+)|$
+ name
+ js.embedded.control.flow.pug
+ patterns
+
+
+ include
+ #case_when_paren
+
+
+ include
+ source.js
+
+
+
+
+ begin
+ :\s+
+ end
+ $
+ name
+ tag.case.control.flow.pug
+ patterns
+
+
+ include
+ #complete_tag
+
+
+
+
+
+ case_when_paren
+
+ begin
+ \(
+ end
+ \)
+ name
+ js.when.control.flow.pug
+ patterns
+
+
+ include
+ #case_when_paren
+
+
+ match
+ :
+ name
+ invalid.illegal.name.tag.pug
+
+
+ include
+ source.js
+
+
+
+ complete_tag
+
+ begin
+ (?=[\w.#])|(:\s*)
+ end
+ (\.?$)|(?=:.)
+ patterns
+
+
+ include
+ #blocks_and_includes
+
+
+ include
+ #unbuffered_code
+
+
+ include
+ #mixin_call
+
+
+ include
+ #flow_control
+
+
+ match
+ (?<=:)\w.*$
+ name
+ invalid.illegal.name.tag.pug
+
+
+ include
+ #tag_name
+
+
+ include
+ #tag_id
+
+
+ include
+ #tag_classes
+
+
+ include
+ #tag_attributes
+
+
+ include
+ #tag_mixin_attributes
+
+
+ captures
+
+ 2
+
+ name
+ invalid.illegal.end.tag.pug
+
+ 4
+
+ name
+ invalid.illegal.end.tag.pug
+
+
+ match
+ ((\.)\s+$)|((:)\s*$)
+
+
+ include
+ #printed_expression
+
+
+ include
+ #tag_text
+
+
+
+ embedded_html
+
+ begin
+ (?=<[^>]*>)
+ end
+ $|(?=>)
+ name
+ html
+ patterns
+
+
+ include
+ text.html.basic
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+ flow_control
+
+ begin
+ (for|if|else if|else|each|until|while|unless|case)(\s+|$)
+ captures
+
+ 1
+
+ name
+ storage.type.function.pug
+
+
+ comment
+ Pug control flow.
+ end
+ $
+ name
+ meta.control.flow.pug
+ patterns
+
+
+ begin
+
+ end
+ $
+ name
+ js.embedded.control.flow.pug
+ patterns
+
+
+ include
+ source.js
+
+
+
+
+
+ html_entity
+
+ patterns
+
+
+ match
+ (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
+ name
+ constant.character.entity.html.text.pug
+
+
+ match
+ [<>&]
+ name
+ invalid.illegal.html_entity.text.pug
+
+
+
+ inline_pug
+
+ begin
+ (?<!\\)(#\[)
+ captures
+
+ 1
+
+ name
+ entity.name.function.pug
+
+ 2
+
+ name
+ entity.name.function.pug
+
+
+ end
+ (\])
+ name
+ inline.pug
+ patterns
+
+
+ include
+ #inline_pug
+
+
+ include
+ #mixin_call
+
+
+ begin
+ (?<!\])(?=[\w.#])|(:\s*)
+ end
+ (?=\]|(:.)|=|\s)
+ name
+ tag.inline.pug
+ patterns
+
+
+ include
+ #tag_name
+
+
+ include
+ #tag_id
+
+
+ include
+ #tag_classes
+
+
+ include
+ #tag_attributes
+
+
+ include
+ #tag_mixin_attributes
+
+
+ include
+ #inline_pug
+
+
+ match
+ \[
+ name
+ invalid.illegal.tag.pug
+
+
+
+
+ include
+ #unbuffered_code
+
+
+ include
+ #printed_expression
+
+
+ match
+ \[
+ name
+ invalid.illegal.tag.pug
+
+
+ include
+ #inline_pug_text
+
+
+
+ inline_pug_text
+
+ begin
+
+ end
+ (?=\])
+ patterns
+
+
+ begin
+ \[
+ end
+ \]
+ patterns
+
+
+ include
+ #inline_pug_text
+
+
+
+
+ include
+ #inline_pug
+
+
+ include
+ #embedded_html
+
+
+ include
+ #html_entity
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+ interpolated_error
+
+ match
+ (?<!\\)[#!]\{(?=[^}]*$)
+ name
+ invalid.illegal.tag.pug
+
+ interpolated_value
+
+ begin
+ (?<!\\)[#!]\{(?=.*?\})
+ end
+ \}
+ name
+ string.interpolated.pug
+ patterns
+
+
+ match
+ {
+ name
+ invalid.illegal.tag.pug
+
+
+ include
+ source.js
+
+
+
+ js_braces
+
+ begin
+ \{
+ end
+ \}
+ patterns
+
+
+ include
+ #js_braces
+
+
+ include
+ source.js
+
+
+
+ js_brackets
+
+ begin
+ \[
+ end
+ \]
+ patterns
+
+
+ include
+ #js_brackets
+
+
+ include
+ source.js
+
+
+
+ js_parens
+
+ begin
+ \(
+ end
+ \)
+ patterns
+
+
+ include
+ #js_parens
+
+
+ include
+ source.js
+
+
+
+ mixin_call
+
+ begin
+ ((?:mixin\s+)|\+)([\w-]+)
+ beginCaptures
+
+ 1
+
+ name
+ storage.type.function.pug
+
+ 2
+
+ name
+ meta.tag.other entity.name.function.pug
+
+
+ end
+ (?!\()|$
+ patterns
+
+
+ begin
+ (?<!\))\(
+ end
+ \)
+ name
+ args.mixin.pug
+ patterns
+
+
+ include
+ #js_parens
+
+
+ include
+ #string
+
+
+ captures
+
+ 1
+
+ name
+ meta.tag.other entity.other.attribute-name.tag.pug
+
+
+ match
+ ([^\s(),=/]+)\s*=\s*
+
+
+ include
+ source.js
+
+
+
+
+ include
+ #tag_attributes
+
+
+
+ mixin_definition
+
+ captures
+
+ 1
+
+ name
+ storage.type.function.pug
+
+ 2
+
+ name
+ meta.tag.other entity.name.function.pug
+
+ 3
+
+ name
+ punctuation.definition.parameters.begin.js
+
+ 4
+
+ name
+ variable.parameter.function.js
+
+ 5
+
+ name
+ punctuation.definition.parameters.begin.js
+
+
+ match
+ (mixin\s+)([\w-]+)(?:(\()\s*((?:[a-zA-Z_]\w*\s*)(?:,\s*[a-zA-Z_]\w*\s*)*)(\)))?$
+
+ printed_expression
+
+ begin
+ (!?\=)\s*
+ captures
+
+ 1
+
+ name
+ constant
+
+
+ end
+ (?=\])|$
+ name
+ source.js
+ patterns
+
+
+ include
+ #js_brackets
+
+
+ include
+ source.js
+
+
+
+ string
+
+ begin
+ (['"])
+ end
+ (?<!\\)\1
+ name
+ string.quoted.pug
+ patterns
+
+
+ match
+ \\((x[0-9a-fA-F]{2})|(u[0-9]{4})|.)
+ name
+ constant.character.quoted.pug
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+ tag_attribute_name
+
+ captures
+
+ 1
+
+ name
+ entity.other.attribute-name.tag.pug
+
+
+ match
+ ([^\s(),=/!]+)\s*
+
+ tag_attribute_name_paren
+
+ begin
+ \(\s*
+ end
+ \)
+ name
+ entity.other.attribute-name.tag.pug
+ patterns
+
+
+ include
+ #tag_attribute_name_paren
+
+
+ include
+ #tag_attribute_name
+
+
+
+ tag_attributes
+
+ begin
+ (\(\s*)
+ captures
+
+ 1
+
+ name
+ constant.name.attribute.tag.pug
+
+
+ end
+ (\))
+ name
+ meta.tag.other
+ patterns
+
+
+ include
+ #tag_attribute_name_paren
+
+
+ include
+ #tag_attribute_name
+
+
+ match
+ !(?!=)
+ name
+ invalid.illegal.tag.pug
+
+
+ begin
+ =\s*
+ end
+ $|(?=,|(?:\s+[^!%&*-+~|<>:?/])|\))
+ name
+ attribute_value
+ patterns
+
+
+ include
+ #string
+
+
+ include
+ #js_parens
+
+
+ include
+ #js_brackets
+
+
+ include
+ #js_braces
+
+
+ include
+ source.js
+
+
+
+
+ begin
+ (?<=[%&*-+~|<>:?/])\s+
+ end
+ $|(?=,|(?:\s+[^!%&*-+~|<>:?/])|\))
+ name
+ attribute_value2
+ patterns
+
+
+ include
+ #string
+
+
+ include
+ #js_parens
+
+
+ include
+ #js_brackets
+
+
+ include
+ #js_braces
+
+
+ include
+ source.js
+
+
+
+
+
+ tag_classes
+
+ captures
+
+ 1
+
+ name
+ invalid.illegal.tag.pug
+
+
+ match
+ \.([^\w-])?[\w-]*
+ name
+ entity.other.attribute-name.class.pug
+
+ tag_id
+
+ match
+ #[\w-]+
+ name
+ entity.other.attribute-name.id.pug
+
+ tag_mixin_attributes
+
+ begin
+ (&attributes\()
+ captures
+
+ 1
+
+ name
+ entity.name.function.pug
+
+
+ end
+ (\))
+ name
+ meta.tag.other
+ patterns
+
+
+ match
+ attributes(?=\))
+ name
+ storage.type.keyword.pug
+
+
+ include
+ source.js
+
+
+
+ tag_name
+
+ begin
+ ([#!]\{(?=.*?\}))|(\w(([\w:-]+[\w-])|([\w-]*)))
+ end
+ (\G(?<!\5[^\w-]))|\}|$
+ name
+ meta.tag.other entity.name.tag.pug
+ patterns
+
+
+ begin
+ \G(?<=\{)
+ end
+ (?=\})
+ name
+ meta.tag.other entity.name.tag.pug
+ patterns
+
+
+ match
+ {
+ name
+ invalid.illegal.tag.pug
+
+
+ include
+ source.js
+
+
+
+
+
+ tag_text
+
+ begin
+ (?=.)
+ end
+ $
+ patterns
+
+
+ include
+ #inline_pug
+
+
+ include
+ #embedded_html
+
+
+ include
+ #html_entity
+
+
+ include
+ #interpolated_value
+
+
+ include
+ #interpolated_error
+
+
+
+ unbuffered_code
+
+ begin
+ (-|(([a-zA-Z0-9_]+)\s+=))
+ beginCaptures
+
+ 3
+
+ name
+ variable.parameter.javascript.embedded.pug
+
+
+ comment
+ name = function() {}
+ end
+ (?=\])|(({\s*)?$)
+ name
+ source.js
+ patterns
+
+
+ include
+ #js_brackets
+
+
+ include
+ #babel_parens
+
+
+ include
+ source.js
+
+
+
+
+ scopeName
+ text.pug
+ uuid
+ eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b
+
+
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Ruby.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Ruby.plist
similarity index 99%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Ruby.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Ruby.plist
index fd18e0930..053a01300 100644
--- a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/Ruby.plist
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/Ruby.plist
@@ -380,7 +380,7 @@
( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix
(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name
|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method
- \s*(\() # the openning parenthesis for arguments
+ \s*(\() # the opening parenthesis for arguments
beginCaptures
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/YAML.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/YAML.tmLanguage
new file mode 100644
index 000000000..4a1b7b15b
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/YAML.tmLanguage
@@ -0,0 +1,1164 @@
+
+
+
+
+ fileTypes
+
+ yaml
+ yml
+ rviz
+ reek
+ clang-format
+ yaml-tmlanguage
+ syntax
+ sublime-syntax
+
+ firstLineMatch
+ ^%YAML( ?1.\d+)?
+ keyEquivalent
+ ^~Y
+ name
+ YAML
+ patterns
+
+
+ include
+ #comment
+
+
+ include
+ #property
+
+
+ include
+ #directive
+
+
+ match
+ ^---
+ name
+ entity.other.document.begin.yaml
+
+
+ match
+ ^\.{3}
+ name
+ entity.other.document.end.yaml
+
+
+ include
+ #node
+
+
+ repository
+
+ block-collection
+
+ patterns
+
+
+ include
+ #block-sequence
+
+
+ include
+ #block-mapping
+
+
+
+ block-mapping
+
+ patterns
+
+
+ include
+ #block-pair
+
+
+
+ block-node
+
+ patterns
+
+
+ include
+ #prototype
+
+
+ include
+ #block-scalar
+
+
+ include
+ #block-collection
+
+
+ include
+ #flow-scalar-plain-out
+
+
+ include
+ #flow-node
+
+
+
+ block-pair
+
+ patterns
+
+
+ begin
+ \?
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.definition.key-value.begin.yaml
+
+
+ end
+ (?=\?)|^ *(:)|(:)
+ endCaptures
+
+ 1
+
+ name
+ punctuation.separator.key-value.mapping.yaml
+
+ 2
+
+ name
+ invalid.illegal.expected-newline.yaml
+
+
+ name
+ meta.block-mapping.yaml
+ patterns
+
+
+ include
+ #block-node
+
+
+
+
+ begin
+ (?x)
+ (?=
+ (?x:
+ [^\s[-?:,\[\]{}#&*!|>'"%@`]]
+ | [?:-] \S
+ )
+ (
+ [^\s:]
+ | : \S
+ | \s+ (?![#\s])
+ )*
+ \s*
+ :
+ (\s|$)
+ )
+
+ end
+ (?x)
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ )
+
+ patterns
+
+
+ include
+ #flow-scalar-plain-out-implicit-type
+
+
+ begin
+ (?x)
+ [^\s[-?:,\[\]{}#&*!|>'"%@`]]
+ | [?:-] \S
+
+ beginCaptures
+
+ 0
+
+ name
+ entity.name.tag.yaml
+
+
+ contentName
+ entity.name.tag.yaml
+ end
+ (?x)
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ )
+
+ name
+ string.unquoted.plain.out.yaml
+
+
+
+
+ match
+ :(?=\s|$)
+ name
+ punctuation.separator.key-value.mapping.yaml
+
+
+
+ block-scalar
+
+ begin
+ (?:(\|)|(>))([1-9])?([-+])?(.*\n?)
+ beginCaptures
+
+ 1
+
+ name
+ keyword.control.flow.block-scalar.literal.yaml
+
+ 2
+
+ name
+ keyword.control.flow.block-scalar.folded.yaml
+
+ 3
+
+ name
+ constant.numeric.indentation-indicator.yaml
+
+ 4
+
+ name
+ storage.modifier.chomping-indicator.yaml
+
+ 5
+
+ patterns
+
+
+ include
+ #comment
+
+
+ match
+ .+
+ name
+ invalid.illegal.expected-comment-or-newline.yaml
+
+
+
+
+ end
+ ^(?=\S)|(?!\G)
+ patterns
+
+
+ begin
+ ^([ ]+)(?! )
+ end
+ ^(?!\1|\s*$)
+ name
+ string.unquoted.block.yaml
+
+
+
+ block-sequence
+
+ match
+ (-)(?!\S)
+ name
+ punctuation.definition.block.sequence.item.yaml
+
+ comment
+
+ begin
+ (?:(^[ \t]*)|[ \t]+)(?=#\p{Print}*$)
+ beginCaptures
+
+ 1
+
+ name
+ punctuation.whitespace.comment.leading.yaml
+
+
+ end
+ (?!\G)
+ patterns
+
+
+ begin
+ #
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.comment.yaml
+
+
+ end
+ \n
+ name
+ comment.line.number-sign.yaml
+
+
+
+ directive
+
+ begin
+ ^%
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.directive.begin.yaml
+
+
+ end
+ (?=$|[ \t]+($|#))
+ name
+ meta.directive.yaml
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ keyword.other.directive.yaml.yaml
+
+ 2
+
+ name
+ constant.numeric.yaml-version.yaml
+
+
+ match
+ \G(YAML)[ \t]+(\d+\.\d+)
+
+
+ captures
+
+ 1
+
+ name
+ keyword.other.directive.tag.yaml
+
+ 2
+
+ name
+ storage.type.tag-handle.yaml
+
+ 3
+
+ name
+ support.type.tag-prefix.yaml
+
+
+ match
+ (?x)
+ \G
+ (TAG)
+ (?:[ \t]+
+ ((?:!(?:[0-9A-Za-z\-]*!)?))
+ (?:[ \t]+ (
+ ! (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )*
+ | (?![,!\[\]{}]) (?x: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+
+ )
+ )?
+ )?
+
+
+
+ captures
+
+ 1
+
+ name
+ support.other.directive.reserved.yaml
+
+ 2
+
+ name
+ string.unquoted.directive-name.yaml
+
+ 3
+
+ name
+ string.unquoted.directive-parameter.yaml
+
+
+ match
+ (?x) \G (\w+) (?:[ \t]+ (\w+) (?:[ \t]+ (\w+))? )?
+
+
+ match
+ \S+
+ name
+ invalid.illegal.unrecognized.yaml
+
+
+
+ flow-alias
+
+ captures
+
+ 1
+
+ name
+ keyword.control.flow.alias.yaml
+
+ 2
+
+ name
+ punctuation.definition.alias.yaml
+
+ 3
+
+ name
+ variable.other.alias.yaml
+
+ 4
+
+ name
+ invalid.illegal.character.anchor.yaml
+
+
+ match
+ ((\*))([^\s\[\]/{/},]+)([^\s\]},]\S*)?
+
+ flow-collection
+
+ patterns
+
+
+ include
+ #flow-sequence
+
+
+ include
+ #flow-mapping
+
+
+
+ flow-mapping
+
+ begin
+ \{
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.mapping.begin.yaml
+
+
+ end
+ \}
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.mapping.end.yaml
+
+
+ name
+ meta.flow-mapping.yaml
+ patterns
+
+
+ include
+ #prototype
+
+
+ match
+ ,
+ name
+ punctuation.separator.mapping.yaml
+
+
+ include
+ #flow-pair
+
+
+
+ flow-node
+
+ patterns
+
+
+ include
+ #prototype
+
+
+ include
+ #flow-alias
+
+
+ include
+ #flow-collection
+
+
+ include
+ #flow-scalar
+
+
+
+ flow-pair
+
+ patterns
+
+
+ begin
+ \?
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.key-value.begin.yaml
+
+
+ end
+ (?=[},\]])
+ name
+ meta.flow-pair.explicit.yaml
+ patterns
+
+
+ include
+ #prototype
+
+
+ include
+ #flow-pair
+
+
+ include
+ #flow-node
+
+
+ begin
+ :(?=\s|$|[\[\]{},])
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.separator.key-value.mapping.yaml
+
+
+ end
+ (?=[},\]])
+ patterns
+
+
+ include
+ #flow-value
+
+
+
+
+
+
+ begin
+ (?x)
+ (?=
+ (?:
+ [^\s[-?:,\[\]{}#&*!|>'"%@`]]
+ | [?:-] [^\s[\[\]{},]]
+ )
+ (
+ [^\s:[\[\]{},]]
+ | : [^\s[\[\]{},]]
+ | \s+ (?![#\s])
+ )*
+ \s*
+ :
+ (\s|$)
+ )
+
+ end
+ (?x)
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ | \s* : [\[\]{},]
+ | \s* [\[\]{},]
+ )
+
+ name
+ meta.flow-pair.key.yaml
+ patterns
+
+
+ include
+ #flow-scalar-plain-in-implicit-type
+
+
+ begin
+ (?x)
+ [^\s[-?:,\[\]{}#&*!|>'"%@`]]
+ | [?:-] [^\s[\[\]{},]]
+
+ beginCaptures
+
+ 0
+
+ name
+ entity.name.tag.yaml
+
+
+ contentName
+ entity.name.tag.yaml
+ end
+ (?x)
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ | \s* : [\[\]{},]
+ | \s* [\[\]{},]
+ )
+
+ name
+ string.unquoted.plain.in.yaml
+
+
+
+
+ include
+ #flow-node
+
+
+ begin
+ :(?=\s|$|[\[\]{},])
+ captures
+
+ 0
+
+ name
+ punctuation.separator.key-value.mapping.yaml
+
+
+ end
+ (?=[},\]])
+ name
+ meta.flow-pair.yaml
+ patterns
+
+
+ include
+ #flow-value
+
+
+
+
+
+ flow-scalar
+
+ patterns
+
+
+ include
+ #flow-scalar-double-quoted
+
+
+ include
+ #flow-scalar-single-quoted
+
+
+ include
+ #flow-scalar-plain-in
+
+
+
+ flow-scalar-double-quoted
+
+ begin
+ "
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.yaml
+
+
+ end
+ "
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.yaml
+
+
+ name
+ string.quoted.double.yaml
+ patterns
+
+
+ match
+ \\([0abtnvfre "/\\N_Lp]|x\d\d|u\d{4}|U\d{8})
+ name
+ constant.character.escape.yaml
+
+
+ match
+ \\\n
+ name
+ constant.character.escape.double-quoted.newline.yaml
+
+
+
+ flow-scalar-plain-in
+
+ patterns
+
+
+ include
+ #flow-scalar-plain-in-implicit-type
+
+
+ begin
+ (?x)
+ [^\s[-?:,\[\]{}#&*!|>'"%@`]]
+ | [?:-] [^\s[\[\]{},]]
+
+ end
+ (?x)
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ | \s* : [\[\]{},]
+ | \s* [\[\]{},]
+ )
+
+ name
+ string.unquoted.plain.in.yaml
+
+
+
+ flow-scalar-plain-in-implicit-type
+
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ constant.language.null.yaml
+
+ 2
+
+ name
+ constant.language.boolean.yaml
+
+ 3
+
+ name
+ constant.numeric.integer.yaml
+
+ 4
+
+ name
+ constant.numeric.float.yaml
+
+ 5
+
+ name
+ constant.other.timestamp.yaml
+
+ 6
+
+ name
+ constant.language.value.yaml
+
+ 7
+
+ name
+ constant.language.merge.yaml
+
+
+ match
+ (?x)
+ (?x:
+ (null|Null|NULL|~)
+ | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)
+ | (
+ (?:
+ [-+]? 0b [0-1_]+ # (base 2)
+ | [-+]? 0 [0-7_]+ # (base 8)
+ | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)
+ | [-+]? 0x [0-9a-fA-F_]+ # (base 16)
+ | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)
+ )
+ )
+ | (
+ (?x:
+ [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)
+ | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60)
+ | [-+]? \. (?: inf|Inf|INF) # (infinity)
+ | \. (?: nan|NaN|NAN) # (not a number)
+ )
+ )
+ | (
+ (?x:
+ \d{4} - \d{2} - \d{2} # (y-m-d)
+ | \d{4} # (year)
+ - \d{1,2} # (month)
+ - \d{1,2} # (day)
+ (?: [Tt] | [ \t]+) \d{1,2} # (hour)
+ : \d{2} # (minute)
+ : \d{2} # (second)
+ (?: \.\d*)? # (fraction)
+ (?:
+ (?:[ \t]*) Z
+ | [-+] \d{1,2} (?: :\d{1,2})?
+ )? # (time zone)
+ )
+ )
+ | (=)
+ | (<<)
+ )
+ (?:
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ | \s* : [\[\]{},]
+ | \s* [\[\]{},]
+ )
+ )
+
+
+
+
+ flow-scalar-plain-out
+
+ patterns
+
+
+ include
+ #flow-scalar-plain-out-implicit-type
+
+
+ begin
+ (?x)
+ [^\s[-?:,\[\]{}#&*!|>'"%@`]]
+ | [?:-] \S
+
+ end
+ (?x)
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ )
+
+ name
+ string.unquoted.plain.out.yaml
+
+
+
+ flow-scalar-plain-out-implicit-type
+
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ constant.language.null.yaml
+
+ 2
+
+ name
+ constant.language.boolean.yaml
+
+ 3
+
+ name
+ constant.numeric.integer.yaml
+
+ 4
+
+ name
+ constant.numeric.float.yaml
+
+ 5
+
+ name
+ constant.other.timestamp.yaml
+
+ 6
+
+ name
+ constant.language.value.yaml
+
+ 7
+
+ name
+ constant.language.merge.yaml
+
+
+ match
+ (?x)
+ (?x:
+ (null|Null|NULL|~)
+ | (y|Y|yes|Yes|YES|n|N|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)
+ | (
+ (?:
+ [-+]? 0b [0-1_]+ # (base 2)
+ | [-+]? 0 [0-7_]+ # (base 8)
+ | [-+]? (?: 0|[1-9][0-9_]*) # (base 10)
+ | [-+]? 0x [0-9a-fA-F_]+ # (base 16)
+ | [-+]? [1-9] [0-9_]* (?: :[0-5]?[0-9])+ # (base 60)
+ )
+ )
+ | (
+ (?x:
+ [-+]? (?: [0-9] [0-9_]*)? \. [0-9.]* (?: [eE] [-+] [0-9]+)? # (base 10)
+ | [-+]? [0-9] [0-9_]* (?: :[0-5]?[0-9])+ \. [0-9_]* # (base 60)
+ | [-+]? \. (?: inf|Inf|INF) # (infinity)
+ | \. (?: nan|NaN|NAN) # (not a number)
+ )
+ )
+ | (
+ (?x:
+ \d{4} - \d{2} - \d{2} # (y-m-d)
+ | \d{4} # (year)
+ - \d{1,2} # (month)
+ - \d{1,2} # (day)
+ (?: [Tt] | [ \t]+) \d{1,2} # (hour)
+ : \d{2} # (minute)
+ : \d{2} # (second)
+ (?: \.\d*)? # (fraction)
+ (?:
+ (?:[ \t]*) Z
+ | [-+] \d{1,2} (?: :\d{1,2})?
+ )? # (time zone)
+ )
+ )
+ | (=)
+ | (<<)
+ )
+ (?x:
+ (?=
+ \s* $
+ | \s+ \#
+ | \s* : (\s|$)
+ )
+ )
+
+
+
+
+ flow-scalar-single-quoted
+
+ begin
+ '
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.begin.yaml
+
+
+ end
+ '(?!')
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.string.end.yaml
+
+
+ name
+ string.quoted.single.yaml
+ patterns
+
+
+ match
+ ''
+ name
+ constant.character.escape.single-quoted.yaml
+
+
+
+ flow-sequence
+
+ begin
+ \[
+ beginCaptures
+
+ 0
+
+ name
+ punctuation.definition.sequence.begin.yaml
+
+
+ end
+ \]
+ endCaptures
+
+ 0
+
+ name
+ punctuation.definition.sequence.end.yaml
+
+
+ name
+ meta.flow-sequence.yaml
+ patterns
+
+
+ include
+ #prototype
+
+
+ match
+ ,
+ name
+ punctuation.separator.sequence.yaml
+
+
+ include
+ #flow-pair
+
+
+ include
+ #flow-node
+
+
+
+ flow-value
+
+ patterns
+
+
+ begin
+ \G(?![},\]])
+ end
+ (?=[},\]])
+ name
+ meta.flow-pair.value.yaml
+ patterns
+
+
+ include
+ #flow-node
+
+
+
+
+
+ node
+
+ patterns
+
+
+ include
+ #block-node
+
+
+
+ property
+
+ begin
+ (?=!|&)
+ end
+ (?!\G)
+ name
+ meta.property.yaml
+ patterns
+
+
+ captures
+
+ 1
+
+ name
+ keyword.control.property.anchor.yaml
+
+ 2
+
+ name
+ punctuation.definition.anchor.yaml
+
+ 3
+
+ name
+ entity.name.type.anchor.yaml
+
+ 4
+
+ name
+ invalid.illegal.character.anchor.yaml
+
+
+ match
+ \G((&))([^\s\[\]/{/},]+)(\S+)?
+
+
+ match
+ (?x)
+ \G
+ (?:
+ ! < (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]] )+ >
+ | (?:!(?:[0-9A-Za-z\-]*!)?) (?: %[0-9A-Fa-f]{2} | [0-9A-Za-z\-#;/?:@&=+$_.~*'()] )+
+ | !
+ )
+ (?=\ |\t|$)
+
+ name
+ storage.type.tag-handle.yaml
+
+
+ match
+ \S+
+ name
+ invalid.illegal.tag-handle.yaml
+
+
+
+ prototype
+
+ patterns
+
+
+ include
+ #comment
+
+
+ include
+ #property
+
+
+
+
+ scopeName
+ source.yaml
+ uuid
+ 686AD6AE-33F3-4493-9512-9E9FC1D5417F
+
+
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/aspvbnet.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/aspvbnet.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/aspvbnet.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/aspvbnet.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/groovy.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/groovy.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/groovy.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/groovy.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/html.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/html.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/html.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/html.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/html2.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/html2.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/html2.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/html2.json
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/infinite-loop.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/infinite-loop.json
new file mode 100644
index 000000000..a0b5e6b36
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/infinite-loop.json
@@ -0,0 +1,79 @@
+{
+ "name": "infinite-loop-grammar",
+ "scopeName": "source.infinite-loop",
+ "patterns": [
+ {
+ "name": "start",
+ "begin": "\\A",
+ "end": "$",
+ "patterns": [
+ {
+ "name": "negative-look-ahead",
+ "match": "(?!a)"
+ }
+ ]
+ },
+ {
+ "include": "#test"
+ },
+ {
+ "include": "#not_a_problem"
+ }
+ ],
+ "repository": {
+ "test": {
+ "name": "test",
+ "begin": "(?=test)",
+ "end": "$",
+ "patterns": [
+ {
+ "include": "#test_this"
+ }
+ ]
+ },
+ "test_this": {
+ "name": "test_this",
+ "begin": "(?=test this)",
+ "end": "$",
+ "patterns": [
+ {
+ "include": "#test_this_line"
+ }
+ ]
+ },
+ "test_this_line": {
+ "name": "test_this_line",
+ "begin": "(?=test this line)",
+ "end": "$",
+ "patterns": [
+ {
+ "include": "#test"
+ }
+ ]
+ },
+ "spaces":
+ {
+ "name": "spaces",
+ "begin": "^(?=\\s)",
+ "end": "(?=\\S)"
+ },
+ "not_a_problem":
+ {
+ "name": "not_a_problem",
+ "begin": "(?=not)",
+ "end": "\\z",
+ "patterns": [
+ {
+ "name": "not",
+ "match": "\\Gnot"
+ },
+ {
+ "include": "#not_a_problem"
+ },
+ {
+ "include": "#spaces"
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/javascript.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/javascript.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/javascript.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/javascript.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/markdown.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/markdown.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/markdown.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/markdown.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/php.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/php.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/php.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/php.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/testlang12.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/testlang12.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/testlang12.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/testlang12.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/whileLang.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/whileLang.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/fixtures/whileLang.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/fixtures/whileLang.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/tests.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/tests.json
similarity index 72%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/tests.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/tests.json
index 59652aa00..5e80f11b7 100644
--- a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/tests.json
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/tests.json
@@ -1253,5 +1253,580 @@
]
}
]
+ },
+ {
+ "grammars": [
+ "fixtures/Jade22.json"
+ ],
+ "grammarPath": "fixtures/Jade22.json",
+ "desc": "Issue #22",
+ "lines": [
+ {
+ "line": ".class One #[span text.] Two text.",
+ "tokens": [
+ {
+ "scopes": [
+ "text.jade",
+ "constant.language.js"
+ ],
+ "value": ".class"
+ },
+ {
+ "scopes": [
+ "text.jade"
+ ],
+ "value": " One "
+ },
+ {
+ "scopes": [
+ "text.jade",
+ "inline.jade",
+ "entity.name.function.jade"
+ ],
+ "value": "#["
+ },
+ {
+ "scopes": [
+ "text.jade",
+ "inline.jade",
+ "tag.inline.jade",
+ "meta.tag.other",
+ "entity.name.tag.jade"
+ ],
+ "value": "span"
+ },
+ {
+ "scopes": [
+ "text.jade",
+ "inline.jade"
+ ],
+ "value": " text."
+ },
+ {
+ "scopes": [
+ "text.jade",
+ "inline.jade",
+ "entity.name.function.jade"
+ ],
+ "value": "]"
+ },
+ {
+ "scopes": [
+ "text.jade"
+ ],
+ "value": " Two text."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "grammars": [
+ "fixtures/Pug.tmLanguage"
+ ],
+ "grammarPath": "fixtures/Pug.tmLanguage",
+ "desc": "Issue #82",
+ "lines": [
+ {
+ "line": "li: custom-link.has-text-primary(to=\"/\")",
+ "tokens": [
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "entity.name.tag.pug"
+ ],
+ "value": "li"
+ },
+ {
+ "scopes": [
+ "text.pug"
+ ],
+ "value": ": "
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "entity.name.tag.pug"
+ ],
+ "value": "custom-link"
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "entity.other.attribute-name.class.pug"
+ ],
+ "value": ".has-text-primary"
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "constant.name.attribute.tag.pug"
+ ],
+ "value": "("
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "entity.other.attribute-name.tag.pug"
+ ],
+ "value": "to"
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "attribute_value"
+ ],
+ "value": "="
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "attribute_value",
+ "string.quoted.pug"
+ ],
+ "value": "\""
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "attribute_value",
+ "string.quoted.pug"
+ ],
+ "value": "/"
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "attribute_value",
+ "string.quoted.pug"
+ ],
+ "value": "\""
+ },
+ {
+ "scopes": [
+ "text.pug",
+ "meta.tag.other",
+ "constant.name.attribute.tag.pug"
+ ],
+ "value": ")"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "grammars": [
+ "fixtures/66.plist"
+ ],
+ "grammarPath": "fixtures/66.plist",
+ "desc": "Issue #66",
+ "lines": [
+ {
+ "line": "Just some text",
+ "tokens": [
+ {
+ "value": "J",
+ "scopes": [
+ "text.test",
+ "comment"
+ ]
+ },
+ {
+ "value": "ust some text",
+ "scopes": [
+ "text.test",
+ "comment"
+ ]
+ }
+ ]
+ },
+ {
+ "line": "which contains undefined and then",
+ "tokens": [
+ {
+ "value": "which contains undefined and then",
+ "scopes": [
+ "text.test",
+ "comment"
+ ]
+ }
+ ]
+ },
+ {
+ "line": "more text",
+ "tokens": [
+ {
+ "value": "more text",
+ "scopes": [
+ "text.test",
+ "comment"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "grammars": [
+ "fixtures/105.grammarA.json",
+ "fixtures/105.grammarB.json"
+ ],
+ "grammarPath": "fixtures/105.grammarA.json",
+ "desc": "Issue #105",
+ "lines": [
+ {
+ "line": "embedStart",
+ "tokens": [
+ {
+ "value": "embedStart",
+ "scopes": [
+ "source.test"
+ ]
+ }
+ ]
+ },
+ {
+ "line": "testStart",
+ "tokens": [
+ {
+ "value": "testStart",
+ "scopes": [
+ "source.test"
+ ]
+ }
+ ]
+ },
+ {
+ "line": "some test pattern",
+ "tokens": [
+ {
+ "value": "some test pattern",
+ "scopes": [
+ "source.test",
+ "test.name"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "grammars": [
+ "fixtures/YAML.tmLanguage"
+ ],
+ "grammarPath": "fixtures/YAML.tmLanguage",
+ "desc": "Issue #119",
+ "lines": [
+ {
+ "line": "- run:",
+ "tokens": [
+ {
+ "scopes": [
+ "source.yaml",
+ "punctuation.definition.block.sequence.item.yaml"
+ ],
+ "value": "-"
+ },
+ {
+ "scopes": [
+ "source.yaml"
+ ],
+ "value": " "
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.plain.out.yaml",
+ "entity.name.tag.yaml"
+ ],
+ "value": "r"
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.plain.out.yaml",
+ "entity.name.tag.yaml"
+ ],
+ "value": "un"
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "punctuation.separator.key-value.mapping.yaml"
+ ],
+ "value": ":"
+ }
+ ]
+ },
+ {
+ "line": " command: |",
+ "tokens": [
+ {
+ "scopes": [
+ "source.yaml"
+ ],
+ "value": " "
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.plain.out.yaml",
+ "entity.name.tag.yaml"
+ ],
+ "value": "c"
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.plain.out.yaml",
+ "entity.name.tag.yaml"
+ ],
+ "value": "ommand"
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "punctuation.separator.key-value.mapping.yaml"
+ ],
+ "value": ":"
+ },
+ {
+ "scopes": [
+ "source.yaml"
+ ],
+ "value": " "
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "keyword.control.flow.block-scalar.literal.yaml"
+ ],
+ "value": "|"
+ }
+ ]
+ },
+ {
+ "line": " docker run \\",
+ "tokens": [
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.block.yaml"
+ ],
+ "value": " "
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.block.yaml"
+ ],
+ "value": "docker run \\"
+ }
+ ]
+ },
+ {
+ "line": " sh -c \"\\",
+ "tokens": [
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.block.yaml"
+ ],
+ "value": " sh -c \"\\"
+ }
+ ]
+ },
+ {
+ "line": " command3",
+ "tokens": [
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.block.yaml"
+ ],
+ "value": " command3"
+ }
+ ]
+ },
+ {
+ "line": " \"",
+ "tokens": [
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.block.yaml"
+ ],
+ "value": " \""
+ }
+ ]
+ },
+ {
+ "line": "- run:",
+ "tokens": [
+ {
+ "scopes": [
+ "source.yaml",
+ "punctuation.definition.block.sequence.item.yaml"
+ ],
+ "value": "-"
+ },
+ {
+ "scopes": [
+ "source.yaml"
+ ],
+ "value": " "
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.plain.out.yaml",
+ "entity.name.tag.yaml"
+ ],
+ "value": "r"
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "string.unquoted.plain.out.yaml",
+ "entity.name.tag.yaml"
+ ],
+ "value": "un"
+ },
+ {
+ "scopes": [
+ "source.yaml",
+ "punctuation.separator.key-value.mapping.yaml"
+ ],
+ "value": ":"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "grammars": [
+ "fixtures/infinite-loop.json"
+ ],
+ "grammarPath": "fixtures/infinite-loop.json",
+ "desc": "Issue #145",
+ "lines": [
+ {
+ "line": "abc",
+ "tokens": [
+ {
+ "value": "a",
+ "scopes": [
+ "source.infinite-loop",
+ "start"
+ ]
+ },
+ {
+ "value": "bc",
+ "scopes": [
+ "source.infinite-loop"
+ ]
+ }
+ ]
+ },
+ {
+ "line": "test this line",
+ "tokens": [
+ {
+ "value": "test this line",
+ "scopes": [
+ "source.infinite-loop",
+ "test",
+ "test_this",
+ "test_this_line"
+ ]
+ }
+ ]
+ },
+ {
+ "line": "not",
+ "tokens": [
+ {
+ "value": "not",
+ "scopes": [
+ "source.infinite-loop",
+ "test",
+ "test_this",
+ "test_this_line"
+ ]
+ }
+ ]
+ },
+ {
+ "line": " not",
+ "tokens": [
+ {
+ "value": " ",
+ "scopes": [
+ "source.infinite-loop"
+ ]
+ },
+ {
+ "value": "not",
+ "scopes": [
+ "source.infinite-loop",
+ "not_a_problem",
+ "not"
+ ]
+ }
+ ]
+ },
+ {
+ "line": " not",
+ "tokens": [
+ {
+ "value": " ",
+ "scopes": [
+ "source.infinite-loop",
+ "not_a_problem",
+ "spaces"
+ ]
+ },
+ {
+ "value": "not",
+ "scopes": [
+ "source.infinite-loop",
+ "not_a_problem",
+ "not_a_problem",
+ "not"
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "grammars": [
+ "fixtures/147.grammar.json"
+ ],
+ "grammarPath": "fixtures/147.grammar.json",
+ "desc": "Issue #147",
+ "lines": [
+ {
+ "line": "Function",
+ "tokens": [
+ {
+ "value": "Function",
+ "scopes": [
+ "source.test",
+ "storage.type.Function",
+ "keyword.declaration.Function"
+ ]
+ }
+ ]
+ }
+ ]
}
-]
\ No newline at end of file
+]
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/whileTests.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/whileTests.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/suite1/whileTests.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/suite1/whileTests.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/.gitignore b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/.gitignore
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/.gitignore
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/.gitignore
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Abyss.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Abyss.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Abyss.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Abyss.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Kimbie_dark.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Kimbie_dark.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Kimbie_dark.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Kimbie_dark.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Monokai.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Monokai.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Monokai.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Monokai.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/QuietLight.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/QuietLight.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/QuietLight.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/QuietLight.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Solarized-dark.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Solarized-dark.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Solarized-dark.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Solarized-dark.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Solarized-light.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Solarized-light.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Solarized-light.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Solarized-light.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Tomorrow-Night-Blue.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Tomorrow-Night-Blue.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/Tomorrow-Night-Blue.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/Tomorrow-Night-Blue.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/dark_plus.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/dark_plus.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/dark_plus.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/dark_plus.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/dark_vs.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/dark_vs.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/dark_vs.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/dark_vs.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/diff.css b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/diff.css
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/diff.css
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/diff.css
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/diff.js b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/diff.js
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/diff.js
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/diff.js
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/diff.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/diff.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/diff.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/diff.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/dimmed-monokai.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/dimmed-monokai.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/dimmed-monokai.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/dimmed-monokai.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-fixtures/test-13777.go b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-fixtures/test-13777.go
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-fixtures/test-13777.go
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-fixtures/test-13777.go
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-fixtures/test.go b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-fixtures/test.go
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-fixtures/test.go
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-fixtures/test.go
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-results/test-13777_go.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-results/test-13777_go.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-results/test-13777_go.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-results/test-13777_go.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-results/test_go.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-results/test_go.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/colorize-results/test_go.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/colorize-results/test_go.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/go.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/go.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/go/go.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/go/go.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/grammars.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/grammars.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/grammars.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/grammars.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/hc_black.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/hc_black.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/hc_black.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/hc_black.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/languages.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/languages.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/languages.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/languages.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/light_plus.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/light_plus.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/light_plus.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/light_plus.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/light_vs.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/light_vs.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/light_vs.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/light_vs.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/red.tmTheme b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/red.tmTheme
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/red.tmTheme
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/red.tmTheme
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/ASPVBnet.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/ASPVBnet.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/ASPVBnet.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/ASPVBnet.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Batch File.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Batch File.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Batch File.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Batch File.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Clojure.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Clojure.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Clojure.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Clojure.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Dockerfile.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Dockerfile.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Dockerfile.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Dockerfile.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Groovy.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Groovy.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Groovy.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Groovy.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Handlebars.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Handlebars.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Handlebars.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Handlebars.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/JSON.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/JSON.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/JSON.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/JSON.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Jade.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Jade.json
new file mode 100644
index 000000000..0bb3f8882
--- /dev/null
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Jade.json
@@ -0,0 +1,964 @@
+{
+ "fileTypes": [
+ "jade"
+ ],
+ "name": "Jade",
+ "patterns": [
+ {
+ "comment": "Doctype declaration.",
+ "match": "^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?",
+ "name": "meta.tag.sgml.doctype.html"
+ },
+ {
+ "begin": "^(\\s*)//-",
+ "comment": "Unbuffered (jade-only) comments.",
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "comment.unbuffered.block.jade"
+ },
+ {
+ "begin": "^(\\s*)//",
+ "comment": "Buffered (html) comments.",
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "string.comment.buffered.block.jade",
+ "patterns": [
+ {
+ "captures": {
+ "1": {
+ "name": "invalid.illegal.comment.comment.block.jade"
+ }
+ },
+ "comment": "Buffered comments inside buffered comments will generate invalid html.",
+ "match": "^\\s*(//)(?!-)",
+ "name": "string.comment.buffered.block.jade"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*)-$",
+ "comment": "Unbuffered code block.",
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "source.js",
+ "patterns": [
+ {
+ "include": "source.js"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*)(script)(?=[.#(\\s])((?![^\\n]*type=)|(?=[^\\n]*(text|application)/javascript))",
+ "beginCaptures": {
+ "2": {
+ "name": "entity.name.tag.script.jade"
+ }
+ },
+ "comment": "Script tag with JavaScript code.",
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "meta.tag.other",
+ "patterns": [
+ {
+ "begin": "\\G(?=\\()",
+ "end": "$",
+ "name": "stuff.tag.script.jade",
+ "patterns": [
+ {
+ "include": "#tag_attributes"
+ }
+ ]
+ },
+ {
+ "begin": "\\G(?=[.#])",
+ "end": "$",
+ "name": "stuff.tag.script.jade",
+ "patterns": [
+ {
+ "include": "#complete_tag"
+ }
+ ]
+ },
+ {
+ "include": "source.js"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*)(style)((\\.$)|(?=[.#(].*\\.$))",
+ "beginCaptures": {
+ "2": {
+ "name": "entity.name.tag.script.jade"
+ }
+ },
+ "comment": "Style tag with CSS code.",
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "meta.tag.other",
+ "patterns": [
+ {
+ "begin": "\\G(?=\\()",
+ "end": "$",
+ "name": "stuff.tag.style.jade",
+ "patterns": [
+ {
+ "include": "#tag_attributes"
+ }
+ ]
+ },
+ {
+ "begin": "\\G(?=[.#])",
+ "end": "$",
+ "name": "stuff.tag.style.jade",
+ "patterns": [
+ {
+ "include": "#complete_tag"
+ }
+ ]
+ },
+ {
+ "include": "source.css"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*):(sass)(?=\\(|$)",
+ "beginCaptures": {
+ "2": {
+ "name": "constant.language.name.sass.filter.jade"
+ }
+ },
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "source.sass.filter.jade",
+ "patterns": [
+ {
+ "include": "#tag_attributes"
+ },
+ {
+ "include": "source.sass"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*):(less)(?=\\(|$)",
+ "beginCaptures": {
+ "2": {
+ "name": "constant.language.name.less.filter.jade"
+ }
+ },
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "source.less.filter.jade",
+ "patterns": [
+ {
+ "include": "#tag_attributes"
+ },
+ {
+ "include": "source.less"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*):(stylus)(?=\\(|$)",
+ "beginCaptures": {
+ "2": {
+ "name": "constant.language.name.stylus.filter.jade"
+ }
+ },
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "patterns": [
+ {
+ "include": "#tag_attributes"
+ },
+ {
+ "include": "source.stylus"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*):(coffee(-?script)?)(?=\\(|$)",
+ "beginCaptures": {
+ "2": {
+ "name": "constant.language.name.coffeescript.filter.jade"
+ }
+ },
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "name": "source.coffeescript.filter.jade",
+ "patterns": [
+ {
+ "include": "#tag_attributes"
+ },
+ {
+ "include": "source.coffee"
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*)((:(?=.))|(:$))",
+ "beginCaptures": {
+ "4": {
+ "name": "invalid.illegal.empty.generic.filter.jade"
+ }
+ },
+ "comment": "Generic Jade filter.",
+ "end": "^(?!(\\1\\s)|\\s*$)",
+ "patterns": [
+ {
+ "begin": "\\G(?<=:)(?=.)",
+ "end": "$",
+ "name": "name.generic.filter.jade",
+ "patterns": [
+ {
+ "match": "\\G\\(",
+ "name": "invalid.illegal.name.generic.filter.jade"
+ },
+ {
+ "match": "[\\w-]",
+ "name": "constant.language.name.generic.filter.jade"
+ },
+ {
+ "include": "#tag_attributes"
+ },
+ {
+ "match": "\\W",
+ "name": "invalid.illegal.name.generic.filter.jade"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "begin": "^(\\s*)(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?|$",
+ "patterns": [
+ {
+ "include": "#inline_jade"
+ },
+ {
+ "include": "#interpolated_value"
+ },
+ {
+ "include": "#interpolated_error"
+ }
+ ]
+ },
+ {
+ "include": "#inline_jade"
+ },
+ {
+ "include": "#embedded_html"
+ },
+ {
+ "include": "#html_entity"
+ },
+ {
+ "include": "#interpolated_value"
+ },
+ {
+ "include": "#interpolated_error"
+ }
+ ]
+ },
+ {
+ "include": "#complete_tag"
+ }
+ ]
+ }
+ ],
+ "repository": {
+ "blocks_and_includes": {
+ "captures": {
+ "1": {
+ "name": "storage.type.import.include.jade"
+ },
+ "4": {
+ "name": "variable.control.import.include.jade"
+ }
+ },
+ "comment": "Template blocks and includes.",
+ "match": "(extends|include|yield|append|prepend|block( (append|prepend))?)\\s+(.*)$",
+ "name": "meta.first-class.jade"
+ },
+ "case_conds": {
+ "begin": "(default|when)((\\s+|(?=:))|$)",
+ "captures": {
+ "1": {
+ "name": "storage.type.function.jade"
+ }
+ },
+ "comment": "Jade case conditionals.",
+ "end": "$",
+ "name": "meta.control.flow.jade",
+ "patterns": [
+ {
+ "begin": "\\G(?!:)",
+ "end": "(?=:\\s+)|$",
+ "name": "js.embedded.control.flow.jade",
+ "patterns": [
+ {
+ "include": "#case_when_paren"
+ },
+ {
+ "include": "source.js"
+ }
+ ]
+ },
+ {
+ "begin": ":\\s+",
+ "end": "$",
+ "name": "tag.case.control.flow.jade",
+ "patterns": [
+ {
+ "include": "#complete_tag"
+ }
+ ]
+ }
+ ]
+ },
+ "case_when_paren": {
+ "begin": "\\(",
+ "end": "\\)",
+ "name": "js.when.control.flow.jade",
+ "patterns": [
+ {
+ "include": "#case_when_paren"
+ },
+ {
+ "match": ":",
+ "name": "invalid.illegal.name.tag.jade"
+ },
+ {
+ "include": "source.js"
+ }
+ ]
+ },
+ "complete_tag": {
+ "begin": "(?=[\\w.#])|(:\\s*)",
+ "end": "(\\.?$)|(?=:.)",
+ "patterns": [
+ {
+ "include": "#blocks_and_includes"
+ },
+ {
+ "include": "#unbuffered_code"
+ },
+ {
+ "include": "#mixin_call"
+ },
+ {
+ "include": "#flow_control"
+ },
+ {
+ "match": "(?<=:)\\w.*$",
+ "name": "invalid.illegal.name.tag.jade"
+ },
+ {
+ "include": "#tag_name"
+ },
+ {
+ "include": "#tag_id"
+ },
+ {
+ "include": "#tag_classes"
+ },
+ {
+ "include": "#tag_attributes"
+ },
+ {
+ "include": "#tag_mixin_attributes"
+ },
+ {
+ "captures": {
+ "2": {
+ "name": "invalid.illegal.end.tag.jade"
+ },
+ "4": {
+ "name": "invalid.illegal.end.tag.jade"
+ }
+ },
+ "match": "((\\.)\\s+$)|((:)\\s*$)"
+ },
+ {
+ "include": "#printed_expression"
+ },
+ {
+ "include": "#tag_text"
+ }
+ ]
+ },
+ "embedded_html": {
+ "begin": "(?=<[^>]*>)",
+ "end": "$|(?=>)",
+ "name": "html",
+ "patterns": [
+ {
+ "include": "text.html.basic"
+ },
+ {
+ "include": "#interpolated_value"
+ },
+ {
+ "include": "#interpolated_error"
+ }
+ ]
+ },
+ "flow_control": {
+ "begin": "(for|if|else if|else|each|until|while|unless|case)(\\s+|$)",
+ "captures": {
+ "1": {
+ "name": "storage.type.function.jade"
+ }
+ },
+ "comment": "Jade control flow.",
+ "end": "$",
+ "name": "meta.control.flow.jade",
+ "patterns": [
+ {
+ "begin": "",
+ "end": "$",
+ "name": "js.embedded.control.flow.jade",
+ "patterns": [
+ {
+ "include": "source.js"
+ }
+ ]
+ }
+ ]
+ },
+ "html_entity": {
+ "patterns": [
+ {
+ "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
+ "name": "constant.character.entity.html.text.jade"
+ },
+ {
+ "match": "[<>&]",
+ "name": "invalid.illegal.html_entity.text.jade"
+ }
+ ]
+ },
+ "inline_jade": {
+ "begin": "(?:?/])|\\))",
+ "name": "attribute_value",
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#js_parens"
+ },
+ {
+ "include": "#js_brackets"
+ },
+ {
+ "include": "#js_braces"
+ },
+ {
+ "include": "source.js"
+ }
+ ]
+ },
+ {
+ "begin": "(?<=[%&*-+~|<>:?/])\\s+",
+ "end": "$|(?=,|(?:\\s+[^!%&*-+~|<>:?/])|\\))",
+ "name": "attribute_value2",
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#js_parens"
+ },
+ {
+ "include": "#js_brackets"
+ },
+ {
+ "include": "#js_braces"
+ },
+ {
+ "include": "source.js"
+ }
+ ]
+ }
+ ]
+ },
+ "tag_classes": {
+ "captures": {
+ "1": {
+ "name": "invalid.illegal.tag.jade"
+ }
+ },
+ "match": "\\.([^\\w-])?[\\w-]*",
+ "name": "constant.language.js"
+ },
+ "tag_id": {
+ "match": "#[\\w-]+",
+ "name": "constant.id.tag.jade"
+ },
+ "tag_mixin_attributes": {
+ "begin": "(&attributes\\()",
+ "captures": {
+ "1": {
+ "name": "entity.name.function.jade"
+ }
+ },
+ "end": "(\\))",
+ "name": "meta.tag.other",
+ "patterns": [
+ {
+ "match": "attributes(?=\\))",
+ "name": "storage.type.keyword.jade"
+ },
+ {
+ "include": "source.js"
+ }
+ ]
+ },
+ "tag_name": {
+ "begin": "([#!]\\{(?=.*?\\}))|(\\w(([\\w:-]+[\\w-])|([\\w-]*)))",
+ "end": "(\\G(?
+
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/PowershellSyntax.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/PowershellSyntax.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/PowershellSyntax.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/PowershellSyntax.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/R.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/R.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/R.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/R.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Regular Expressions (JavaScript).tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Regular Expressions (JavaScript).tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Regular Expressions (JavaScript).tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Regular Expressions (JavaScript).tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Ruby.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Ruby.plist
similarity index 99%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Ruby.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Ruby.plist
index 04e41fabb..909581a5f 100644
--- a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Ruby.plist
+++ b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Ruby.plist
@@ -381,7 +381,7 @@
( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix
(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name
|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method
- \s*(\() # the openning parenthesis for arguments
+ \s*(\() # the opening parenthesis for arguments
beginCaptures
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/SQL.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/SQL.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/SQL.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/SQL.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Shell-Unix-Bash.tmLanguage.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Shell-Unix-Bash.tmLanguage.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/Shell-Unix-Bash.tmLanguage.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/Shell-Unix-Bash.tmLanguage.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/TypeScript.tmLanguage.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/TypeScript.tmLanguage.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/TypeScript.tmLanguage.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/TypeScript.tmLanguage.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/TypeScriptReact.tmLanguage.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/TypeScriptReact.tmLanguage.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/TypeScriptReact.tmLanguage.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/TypeScriptReact.tmLanguage.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/c++.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/c++.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/c++.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/c++.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/c.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/c.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/c.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/c.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/coffeescript.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/coffeescript.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/coffeescript.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/coffeescript.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/cshtml.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/cshtml.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/cshtml.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/cshtml.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/css.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/css.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/css.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/css.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/diff.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/diff.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/diff.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/diff.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/fsharp.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/fsharp.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/fsharp.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/fsharp.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/git-commit.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/git-commit.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/git-commit.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/git-commit.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/git-rebase.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/git-rebase.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/git-rebase.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/git-rebase.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/go.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/go.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/go.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/go.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/html.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/html.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/html.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/html.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/java.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/java.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/java.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/java.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/less.tmLanguage.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/less.tmLanguage.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/less.tmLanguage.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/less.tmLanguage.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/lua.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/lua.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/lua.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/lua.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/markdown.tmLanguage b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/markdown.tmLanguage
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/markdown.tmLanguage
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/markdown.tmLanguage
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/php.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/php.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/php.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/php.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/properties.plist b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/properties.plist
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/properties.plist
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/properties.plist
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/rust.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/rust.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/rust.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/rust.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/scss.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/scss.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/scss.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/scss.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/shaderlab.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/shaderlab.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/shaderlab.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/shaderlab.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/swift.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/swift.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/swift.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/swift.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/xml.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/xml.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/xml.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/xml.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/xsl.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/xsl.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/xsl.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/xsl.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/yaml.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/yaml.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/syntaxes/yaml.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/syntaxes/yaml.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/12750.html b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/12750.html
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/12750.html
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/12750.html
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/12750.html.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/12750.html.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/12750.html.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/12750.html.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/12750.html.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/12750.html.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/12750.html.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/12750.html.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/13448.html b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/13448.html
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/13448.html
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/13448.html
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/13448.html.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/13448.html.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/13448.html.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/13448.html.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/13448.html.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/13448.html.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/13448.html.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/13448.html.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/14119.less b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/14119.less
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/14119.less
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/14119.less
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/14119.less.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/14119.less.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/14119.less.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/14119.less.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/14119.less.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/14119.less.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/14119.less.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/14119.less.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/COMMIT_EDITMSG b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/COMMIT_EDITMSG
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/COMMIT_EDITMSG
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/COMMIT_EDITMSG
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/COMMIT_EDITMSG.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/COMMIT_EDITMSG.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/COMMIT_EDITMSG.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/COMMIT_EDITMSG.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/Dockerfile b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/Dockerfile
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/Dockerfile
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/Dockerfile
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/Dockerfile.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/Dockerfile.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/Dockerfile.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/Dockerfile.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/basic.java b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/basic.java
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/basic.java
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/basic.java
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/basic.java.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/basic.java.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/basic.java.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/basic.java.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/basic.java.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/basic.java.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/basic.java.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/basic.java.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/git-rebase-todo b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/git-rebase-todo
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/git-rebase-todo
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/git-rebase-todo
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/git-rebase-todo.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/git-rebase-todo.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/git-rebase-todo.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/git-rebase-todo.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-1550.yaml b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-1550.yaml
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-1550.yaml
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-1550.yaml
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-1550.yaml.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-1550.yaml.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-1550.yaml.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-1550.yaml.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-1550.yaml.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-1550.yaml.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-1550.yaml.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-1550.yaml.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-4008.yaml b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-4008.yaml
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-4008.yaml
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-4008.yaml
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-4008.yaml.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-4008.yaml.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-4008.yaml.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-4008.yaml.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-4008.yaml.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-4008.yaml.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-4008.yaml.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-4008.yaml.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-6303.yaml b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-6303.yaml
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-6303.yaml
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-6303.yaml
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-6303.yaml.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-6303.yaml.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-6303.yaml.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-6303.yaml.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-6303.yaml.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-6303.yaml.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/issue-6303.yaml.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/issue-6303.yaml.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/makefile b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/makefile
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/makefile
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/makefile
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/makefile.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/makefile.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/makefile.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/makefile.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/makefile.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/makefile.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/makefile.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/makefile.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-13777.go b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-13777.go
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-13777.go
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-13777.go
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-13777.go.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-13777.go.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-13777.go.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-13777.go.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-4287.jade b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-4287.jade
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-4287.jade
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-4287.jade
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-4287.jade.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-4287.jade.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-4287.jade.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-4287.jade.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-6611.rs b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-6611.rs
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-6611.rs
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-6611.rs
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-6611.rs.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-6611.rs.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-6611.rs.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-6611.rs.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-6611.rs.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-6611.rs.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-6611.rs.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-6611.rs.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-7115.xml b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-7115.xml
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-7115.xml
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-7115.xml
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-7115.xml.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-7115.xml.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-7115.xml.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-7115.xml.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-7115.xml.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-7115.xml.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-7115.xml.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-7115.xml.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-brackets.tsx b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-brackets.tsx
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-brackets.tsx
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-brackets.tsx
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-brackets.tsx.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-brackets.tsx.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-brackets.tsx.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-brackets.tsx.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-brackets.tsx.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-brackets.tsx.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-brackets.tsx.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-brackets.tsx.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.less b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.less
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.less
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.less
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.less.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.less.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.less.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.less.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.less.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.less.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.less.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.less.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.scss b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.scss
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.scss
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.scss
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.scss.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.scss.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.scss.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.scss.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.scss.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.scss.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-cssvariables.scss.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-cssvariables.scss.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-function-inv.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-function-inv.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-function-inv.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-function-inv.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-function-inv.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-function-inv.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-function-inv.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-function-inv.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-function-inv.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-function-inv.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-function-inv.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-function-inv.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue11.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue11.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue11.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue11.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue11.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue11.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue11.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue11.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue11.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue11.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue11.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue11.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5431.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5431.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5431.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5431.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5431.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5431.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5431.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5431.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5431.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5431.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5431.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5431.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5465.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5465.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5465.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5465.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5465.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5465.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5465.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5465.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5566.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5566.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5566.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5566.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5566.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5566.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5566.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5566.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5566.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5566.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-issue5566.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-issue5566.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-keywords.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-keywords.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-keywords.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-keywords.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-keywords.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-keywords.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-keywords.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-keywords.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-keywords.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-keywords.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-keywords.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-keywords.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-members.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-members.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-members.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-members.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-members.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-members.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-members.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-members.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-members.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-members.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-members.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-members.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-object-literals.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-object-literals.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-object-literals.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-object-literals.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-object-literals.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-object-literals.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-object-literals.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-object-literals.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-object-literals.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-object-literals.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-object-literals.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-object-literals.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-regex.coffee b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-regex.coffee
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-regex.coffee
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-regex.coffee
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-regex.coffee.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-regex.coffee.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-regex.coffee.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-regex.coffee.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-regex.coffee.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-regex.coffee.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-regex.coffee.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-regex.coffee.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-strings.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-strings.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-strings.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-strings.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-strings.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-strings.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-strings.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-strings.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-strings.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-strings.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-strings.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-strings.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-this.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-this.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-this.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-this.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-this.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-this.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-this.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-this.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-variables.css b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-variables.css
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-variables.css
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-variables.css
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-variables.css.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-variables.css.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-variables.css.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-variables.css.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-variables.css.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-variables.css.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test-variables.css.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test-variables.css.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.bat b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.bat
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.bat
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.bat
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.bat.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.bat.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.bat.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.bat.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.c b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.c
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.c
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.c
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.c.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.c.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.c.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.c.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.c.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.c.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.c.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.c.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cc b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cc
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cc
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cc
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cc.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cc.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cc.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cc.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cc.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cc.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cc.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cc.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.clj b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.clj
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.clj
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.clj
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.clj.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.clj.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.clj.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.clj.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.clj.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.clj.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.clj.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.clj.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.coffee b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.coffee
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.coffee
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.coffee
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.coffee.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.coffee.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.coffee.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.coffee.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.coffee.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.coffee.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.coffee.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.coffee.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cpp b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cpp
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cpp
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cpp
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cpp.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cpp.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cpp.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cpp.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cpp.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cpp.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cpp.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cpp.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cshtml b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cshtml
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cshtml
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cshtml
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cshtml.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cshtml.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cshtml.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cshtml.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cshtml.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cshtml.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.cshtml.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.cshtml.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.css b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.css
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.css
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.css
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.css.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.css.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.css.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.css.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.css.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.css.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.css.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.css.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.diff b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.diff
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.diff
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.diff
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.diff.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.diff.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.diff.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.diff.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.diff.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.diff.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.diff.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.diff.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.fs b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.fs
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.fs
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.fs
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.fs.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.fs.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.fs.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.fs.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.fs.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.fs.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.fs.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.fs.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.go b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.go
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.go
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.go
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.go.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.go.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.go.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.go.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.go.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.go.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.go.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.go.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.groovy b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.groovy
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.groovy
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.groovy
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.groovy.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.groovy.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.groovy.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.groovy.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.groovy.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.groovy.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.groovy.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.groovy.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.handlebars b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.handlebars
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.handlebars
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.handlebars
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.handlebars.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.handlebars.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.handlebars.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.handlebars.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.handlebars.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.handlebars.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.handlebars.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.handlebars.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.hbs b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.hbs
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.hbs
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.hbs
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.hbs.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.hbs.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.hbs.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.hbs.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.hbs.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.hbs.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.hbs.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.hbs.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.html b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.html
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.html
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.html
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.html.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.html.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.html.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.html.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.html.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.html.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.html.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.html.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ini b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ini
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ini
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ini
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ini.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ini.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ini.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ini.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jade b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jade
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jade
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jade
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jade.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jade.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jade.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jade.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jade.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jade.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jade.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jade.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.js b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.js
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.js
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.js
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.js.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.js.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.js.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.js.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.js.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.js.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.js.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.js.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.json.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.json.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.json.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.json.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.json.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.json.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.json.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.json.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jsx b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jsx
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jsx
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jsx
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jsx.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jsx.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jsx.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jsx.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jsx.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jsx.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.jsx.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.jsx.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.less b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.less
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.less
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.less
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.less.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.less.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.less.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.less.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.less.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.less.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.less.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.less.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.lua b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.lua
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.lua
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.lua
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.lua.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.lua.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.lua.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.lua.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.m b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.m
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.m
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.m
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.m.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.m.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.m.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.m.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.m.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.m.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.m.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.m.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.md b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.md
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.md
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.md
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.md.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.md.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.md.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.md.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.md.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.md.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.md.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.md.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.php b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.php
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.php
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.php
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.php.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.php.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.php.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.php.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.php.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.php.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.php.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.php.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.pl b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.pl
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.pl
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.pl
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.pl.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.pl.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.pl.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.pl.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.pl.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.pl.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.pl.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.pl.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ps1 b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ps1
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ps1
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ps1
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ps1.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ps1.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ps1.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ps1.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ps1.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ps1.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ps1.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ps1.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.py b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.py
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.py
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.py
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.py.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.py.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.py.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.py.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.py.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.py.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.py.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.py.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.r b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.r
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.r
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.r
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.r.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.r.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.r.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.r.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rb b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rb
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rb
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rb
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rb.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rb.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rb.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rb.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rb.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rb.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rb.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rb.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rs b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rs
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rs
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rs
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rs.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rs.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.rs.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.rs.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.scss b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.scss
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.scss
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.scss
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.scss.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.scss.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.scss.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.scss.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.scss.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.scss.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.scss.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.scss.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sh b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sh
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sh
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sh
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sh.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sh.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sh.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sh.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sh.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sh.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sh.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sh.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.shader b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.shader
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.shader
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.shader
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.shader.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.shader.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.shader.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.shader.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.shader.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.shader.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.shader.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.shader.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sql b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sql
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sql
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sql
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sql.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sql.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.sql.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.sql.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.swift b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.swift
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.swift
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.swift
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.swift.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.swift.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.swift.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.swift.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.swift.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.swift.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.swift.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.swift.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ts b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ts
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ts
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ts
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ts.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ts.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ts.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ts.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ts.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ts.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.ts.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.ts.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.vb b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.vb
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.vb
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.vb
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.vb.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.vb.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.vb.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.vb.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.vb.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.vb.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.vb.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.vb.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.xml b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.xml
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.xml
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.xml
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.xml.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.xml.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.xml.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.xml.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.xml.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.xml.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.xml.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.xml.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.yaml b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.yaml
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.yaml
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.yaml
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.yaml.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.yaml.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.yaml.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.yaml.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.yaml.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.yaml.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test.yaml.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test.yaml.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test2.pl b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test2.pl
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test2.pl
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test2.pl
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test2.pl.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test2.pl.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test2.pl.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test2.pl.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test2.pl.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test2.pl.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test2.pl.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test2.pl.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test6916.js b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test6916.js
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test6916.js
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test6916.js
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test6916.js.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test6916.js.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/test6916.js.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/test6916.js.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/tsconfig.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/tsconfig.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/tsconfig.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/tsconfig.json
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/tsconfig.json.result b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/tsconfig.json.result
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/tsconfig.json.result
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/tsconfig.json.result
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/tsconfig.json.result.patch b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/tsconfig.json.result.patch
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tests/tsconfig.json.result.patch
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tests/tsconfig.json.result.patch
diff --git a/org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tsconfig.json b/org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tsconfig.json
similarity index 100%
rename from org.eclipse.tm4e.core.tests/src/test/resources/test-cases/themes/tsconfig.json
rename to org.eclipse.tm4e.core.tests/src/main/resources/test-cases/themes/tsconfig.json
diff --git a/org.eclipse.tm4e.core/.classpath b/org.eclipse.tm4e.core/.classpath
index 48fdbaaa9..3aa82bf3a 100644
--- a/org.eclipse.tm4e.core/.classpath
+++ b/org.eclipse.tm4e.core/.classpath
@@ -1,36 +1,40 @@
-
+
-
-
+
+
-
+
+
-
+
+
+
+
+
-
+
-
+
+
-
+
-
+
-
-
diff --git a/org.eclipse.tm4e.core/.gitignore b/org.eclipse.tm4e.core/.gitignore
deleted file mode 100644
index 934e0e06f..000000000
--- a/org.eclipse.tm4e.core/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/bin
-/target
diff --git a/org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..6b99f88fc
--- /dev/null
+++ b/org.eclipse.tm4e.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,518 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
+org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=info
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=info
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=info
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=enabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
+org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false
+org.eclipse.jdt.core.formatter.align_with_spaces=false
+org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0
+org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assertion_message=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0
+org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_module_statements=16
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16
+org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_record_components=16
+org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0
+org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0
+org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0
+org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false
+org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+org.eclipse.jdt.core.formatter.comment.format_header=true
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.indent_tag_description=false
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert
+org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines
+org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.text_block_indentation=0
+org.eclipse.jdt.core.formatter.use_on_off_tags=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false
+org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/org.eclipse.tm4e.core/META-INF/MANIFEST.MF b/org.eclipse.tm4e.core/META-INF/MANIFEST.MF
index 41cdec9dd..4f1295259 100644
--- a/org.eclipse.tm4e.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.tm4e.core/META-INF/MANIFEST.MF
@@ -4,12 +4,14 @@ Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-SymbolicName: org.eclipse.tm4e.core
-Bundle-Version: 0.4.3.qualifier
+Bundle-Version: 0.4.4.qualifier
Require-Bundle: org.apache.batik.css;bundle-version="1.9.1";resolution:=optional,
org.apache.batik.util;bundle-version="1.9.1";resolution:=optional,
- com.google.gson;resolution:=optional,
- org.jcodings;bundle-version="1.0.18",
- org.joni;bundle-version="2.1.11"
+ com.google.gson,
+ com.google.guava;bundle-version="30.1.0",
+ org.jcodings;bundle-version="1.0.57",
+ org.joni;bundle-version="2.1.43",
+ org.yaml.snakeyaml;bundle-version="1.27.0"
Import-Package: org.w3c.css.sac;resolution:=optional,
org.w3c.css.sac.helpers;resolution:=optional,
org.w3c.dom.css
@@ -17,11 +19,10 @@ Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.eclipse.tm4e.core,
org.eclipse.tm4e.core.grammar,
org.eclipse.tm4e.core.internal.grammar;x-friends:="org.eclipse.tm4e.core.tests",
- org.eclipse.tm4e.core.internal.grammars;x-friends:="org.eclipse.tm4e.core.tests",
org.eclipse.tm4e.core.internal.matcher;x-friends:="org.eclipse.tm4e.core.tests",
+ org.eclipse.tm4e.core.internal.theme;x-friends:="org.eclipse.tm4e.core.tests",
org.eclipse.tm4e.core.internal.theme.reader;x-friends:="org.eclipse.tm4e.core.tests",
- org.eclipse.tm4e.core.internal.types;x-internal:=true,
- org.eclipse.tm4e.core.internal.utils;x-friends:="org.eclipse.tm4e.core.tests",
+ org.eclipse.tm4e.core.internal.utils;x-friends:="org.eclipse.tm4e.core.tests,org.eclipse.tm4e.ui",
org.eclipse.tm4e.core.model,
org.eclipse.tm4e.core.registry,
org.eclipse.tm4e.core.theme,
diff --git a/org.eclipse.tm4e.core/build.properties b/org.eclipse.tm4e.core/build.properties
index 065c68847..0a9f3a653 100644
--- a/org.eclipse.tm4e.core/build.properties
+++ b/org.eclipse.tm4e.core/build.properties
@@ -4,3 +4,9 @@ bin.includes = META-INF/,\
.,\
plugin.properties,\
about.html
+
+# https://codeiseasy.wordpress.com/2013/03/08/tycho-and-jdt-null-analysis/
+# JDT Null Analysis for Eclipse
+additional.bundles = org.eclipse.jdt.annotation
+# JDT Null Analysis types for Tycho
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tm4e.core/pom.xml b/org.eclipse.tm4e.core/pom.xml
index c882d2ab5..47031f2fa 100644
--- a/org.eclipse.tm4e.core/pom.xml
+++ b/org.eclipse.tm4e.core/pom.xml
@@ -1,11 +1,73 @@
-
- 4.0.0
- org.eclipse.tm4e.core
- eclipse-plugin
- 0.4.3-SNAPSHOT
-
- org.eclipse
- org.eclipse.tm4e
- 0.3.2-SNAPSHOT
-
+
+ 4.0.0
+ org.eclipse.tm4e.core
+ eclipse-plugin
+ 0.4.4-SNAPSHOT
+
+ org.eclipse
+ org.eclipse.tm4e
+ 0.3.2-SNAPSHOT
+
+
+
+
+ benchmark
+
+
+ benchmarkClass
+
+
+
+
+
+
+ net.officefloor.maven
+ tycho-shade-maven-plugin
+ 3.40.0
+
+
+ shade
+ pre-integration-test
+
+ shade
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 3.0.0
+
+
+ integration-test
+
+ exec
+
+
+ java
+
+
+ -Xms2048M
+ -Xmx2048M
+ -XX:+UseG1GC
+
+
+ -Xlog:gc:stderr
+
+ -Dfile.encoding=UTF-8
+
+ -cp
+ ${project.build.directory}/${project.artifactId}-${project.version}-tychoshade.jar;${project.build.directory}/test-classes
+ ${benchmarkClass}
+
+
+
+
+
+
+
+
+
diff --git a/org.eclipse.tm4e.core/src/benchmark/BENCHMARK.md b/org.eclipse.tm4e.core/src/benchmark/BENCHMARK.md
new file mode 100644
index 000000000..1f5a1d6bc
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/benchmark/BENCHMARK.md
@@ -0,0 +1,74 @@
+# TM4E Core Benchmarks
+
+## GrammarBenchmark
+
+The [GrammarBenchmark](../test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java) measures how long it takes to tokenize a given source file using the
+**[Grammar](../org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java)#tokenizeLine()**
+method and how much memory is allocated on the JVM heap to do so. As test source file the
+[GrammarBenchmark.JavaFile.txt](../test/resources/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.JavaFile.txt) is used.
+
+The benchmark executes multiple rounds. In the beginning warm-up rounds are executed to get the JIT compiler activated.
+The results of these rounds should be ignored.
+
+Each round is executed sequentially in a new thread. This gives the OS the opportunity, that in case for the first round an over-utilized core was chosen, to
+select a better core to execute the new thread of the next benchmark round.
+
+The output will look something like this:
+```yaml
+[0.047s][info][gc] Using G1
+Source Code chars: 36.385
+Source Code lines: 901
+JVM Vendor: ojdkbuild
+JVM Version: 11.0.14
+JVM Inital Heap: 2048.00 MB
+JVM Maximum Heap: 2048.00 MB
+JVM Args: -Xms2048M -Xmx2048M -XX:+UseG1GC -Xlog:gc:stderr -Dfile.encoding=UTF-8
+--------------------------------
+Warmup Rounds: 3
+Benchmark Rounds: 3
+Operations per Benchmark Round: 50
+--------------------------------
+warm-up 1/3...
+#[1.626s][info][gc] GC(0) Pause Young (Normal) (G1 Evacuation Pause) 102M->3M(2048M) 4.692ms
+#[6.155s][info][gc] GC(1) Pause Young (Normal) (G1 Evacuation Pause) 690M->3M(2048M) 3.132ms
+#[10.557s][info][gc] GC(2) Pause Young (Normal) (G1 Evacuation Pause) 719M->3M(2048M) 2.788ms
+#[15.228s][info][gc] GC(3) Pause Young (Normal) (G1 Evacuation Pause) 761M->3M(2048M) 2.957ms
+#[20.160s][info][gc] GC(4) Pause Young (Normal) (G1 Evacuation Pause) 804M->3M(2048M) 2.743ms
+#[25.590s][info][gc] GC(5) Pause Young (Normal) (G1 Evacuation Pause) 882M->3M(2048M) 2.632ms
+ -> result: 28307 ms/round | 529.90 ops/s | 113.23 ms/op
+warm-up 2/3...
+#[31.646s][info][gc] GC(6) Pause Young (Normal) (G1 Evacuation Pause) 987M->3M(2048M) 2.683ms
+#[38.579s][info][gc] GC(7) Pause Young (Normal) (G1 Evacuation Pause) 1129M->3M(2048M) 2.927ms
+#[46.106s][info][gc] GC(8) Pause Young (Normal) (G1 Evacuation Pause) 1227M->3M(2048M) 2.872ms
+#[53.542s][info][gc] GC(9) Pause Young (Normal) (G1 Evacuation Pause) 1227M->3M(2048M) 2.727ms
+ -> result: 27172 ms/round | 552.04 ops/s | 108.69 ms/op
+warm-up 3/3...
+#[61.026s][info][gc] GC(10) Pause Young (Normal) (G1 Evacuation Pause) 1227M->3M(2048M) 3.225ms
+#[68.556s][info][gc] GC(11) Pause Young (Normal) (G1 Evacuation Pause) 1227M->3M(2048M) 2.938ms
+#[76.021s][info][gc] GC(12) Pause Young (Normal) (G1 Evacuation Pause) 1227M->3M(2048M) 2.766ms
+ -> result: 27129 ms/round | 552.91 ops/s | 108.52 ms/op
+--------------------------------
+benchmark 1/3...
+#[83.000s][info][gc] GC(13) Pause Full (System.gc()) 1139M->3M(2048M) 9.200ms
+#[84.020s][info][gc] GC(14) Pause Full (System.gc()) 3M->3M(2048M) 6.465ms
+ -> result: 5315 ms/round | 564.44 ops/s | 106.30 ms/op | 17.73 MB/op
+benchmark 2/3...
+#[90.352s][info][gc] GC(15) Pause Full (System.gc()) 889M->3M(2048M) 8.125ms
+#[91.361s][info][gc] GC(16) Pause Full (System.gc()) 3M->3M(2048M) 5.792ms
+ -> result: 5208 ms/round | 576.04 ops/s | 104.16 ms/op | 17.73 MB/op
+benchmark 3/3...
+#[97.590s][info][gc] GC(17) Pause Full (System.gc()) 889M->3M(2048M) 7.367ms
+#[98.604s][info][gc] GC(18) Pause Full (System.gc()) 3M->3M(2048M) 6.515ms
+ -> result: 5202 ms/round | 576.70 ops/s | 104.04 ms/op | 17.73 MB/op
+DONE.
+```
+
+The results of the three benchmark rounds show that it was possible to parse the whole source file 564.44 to 576.70 times per second.\
+One time parsing of the source file took 104.04 to 106.30 ms and allocated 17.73MB of temporary objects on the JVM heap.
+
+### How to run the benchmark
+To run the benchmark execute the `run-grammar-benchmark.sh` or `run-grammar-benchmark.cmd` from a command line window.
+
+You can also run the [GrammarBenchmark](../test/java/org/eclipse/tm4e/core/benchmark/GrammarBenchmark.java) from within Eclipse via
+`Run As -> Java Application` for development/debugging/testing purposes. However you need to add these VM arguments to the launch configuration:
+`-Xms2048M -Xmx2048M -XX:+UseG1GC -Xlog:gc:stderr -Dfile.encoding=UTF-8`. Don't rely on the results when launched like this.
diff --git a/org.eclipse.tm4e.core/src/benchmark/run-grammar-benchmark.cmd b/org.eclipse.tm4e.core/src/benchmark/run-grammar-benchmark.cmd
new file mode 100644
index 000000000..b4f2ecfb4
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/benchmark/run-grammar-benchmark.cmd
@@ -0,0 +1,21 @@
+@echo off
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: Copyright (c) 2022 Sebatian Thomschke and others.
+:: All rights reserved. This program and the accompanying materials
+:: are made available under the terms of the Eclipse Public License v1.0
+:: which accompanies this distribution, and is available at
+:: http://www.eclipse.org/legal/epl-v10.html
+::
+:: Contributors:
+:: Sebatian Thomschke - Initial API and implementation
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+setlocal
+
+cd /D "%~dp0..\..\.."
+
+mvn clean verify ^
+ -pl target-platform,org.eclipse.tm4e.core ^
+ -Djgit.dirtyWorkingTree=warning ^
+ -DskipTests ^
+ -DbenchmarkClass=org.eclipse.tm4e.core.benchmark.GrammarBenchmark
diff --git a/org.eclipse.tm4e.core/src/benchmark/run-grammar-benchmark.sh b/org.eclipse.tm4e.core/src/benchmark/run-grammar-benchmark.sh
new file mode 100644
index 000000000..01c199ad4
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/benchmark/run-grammar-benchmark.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2022 Sebatian Thomschke and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Sebatian Thomschke - Initial API and implementation
+###############################################################################
+
+cd "$(dirname "$0")/../../.."
+
+mvn clean verify \
+ -pl target-platform,org.eclipse.tm4e.core \
+ -Djgit.dirtyWorkingTree=warning \
+ -DskipTests \
+ -DbenchmarkClass=org.eclipse.tm4e.core.benchmark.GrammarBenchmark
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/TMException.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/TMException.java
index e9ff82962..dcafe20ae 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/TMException.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/TMException.java
@@ -1,29 +1,29 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core;
-
-/**
- * TextMate exception.
- *
- */
-public class TMException extends RuntimeException {
-
- private static final long serialVersionUID = 1L;
-
- public TMException(String message) {
- super(message);
- }
-
- public TMException(String message, Throwable cause) {
- super(message, cause);
- }
-}
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ */
+package org.eclipse.tm4e.core;
+
+/**
+ * TextMate exception.
+ *
+ */
+public class TMException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public TMException(final String message) {
+ super(message);
+ }
+
+ public TMException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/GrammarHelper.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/GrammarHelper.java
deleted file mode 100644
index 316199566..000000000
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/GrammarHelper.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
- * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
- * Initial license: MIT
- *
- * Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.grammar;
-
-import java.util.Map;
-
-import org.eclipse.tm4e.core.internal.grammar.Grammar;
-import org.eclipse.tm4e.core.internal.oniguruma.OnigString;
-import org.eclipse.tm4e.core.internal.types.IRawGrammar;
-import org.eclipse.tm4e.core.theme.IThemeProvider;
-
-public class GrammarHelper {
-
- private GrammarHelper() {
- // methods should be accessed statically
- }
-
- public static IGrammar createGrammar(IRawGrammar grammar, int initialLanguage,
- Map embeddedLanguages, IGrammarRepository repository, IThemeProvider themeProvider) {
- return new Grammar(grammar, initialLanguage, embeddedLanguages, repository, themeProvider);
- }
-
- public static OnigString createOnigString(String str) {
- return new OnigString(str);
- }
-
-}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java
index bff5be455..f9ddaf457 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IGrammar.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -11,45 +11,49 @@
* Initial license: MIT
*
* Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Angelo Zerr - translation and adaptation to Java
*/
package org.eclipse.tm4e.core.grammar;
import java.util.Collection;
+import org.eclipse.jdt.annotation.Nullable;
+
/**
* TextMate grammar API.
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
+ *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
*
*/
public interface IGrammar {
/**
* Returns the name of the grammar.
- *
+ *
* @return the name of the grammar.
*/
+ @Nullable
String getName();
/**
* Returns the scope name of the grammar.
- *
+ *
* @return the scope name of the grammar.
*/
String getScopeName();
/**
* Returns the supported file types and null otherwise.
- *
+ *
* @return the supported file types and null otherwise.
*/
Collection getFileTypes();
/**
* Tokenize `lineText`.
- *
+ *
* @param lineText
* the line text to tokenize.
* @return the result of the tokenization.
@@ -58,14 +62,14 @@ public interface IGrammar {
/**
* Tokenize `lineText` using previous line state `prevState`.
- *
+ *
* @param lineText
* the line text to tokenize.
* @param prevState
* previous line state.
* @return the result of the tokenization.
*/
- ITokenizeLineResult tokenizeLine(String lineText, StackElement prevState);
+ ITokenizeLineResult tokenizeLine(String lineText, @Nullable IStackElement prevState);
/**
* Tokenize `lineText` using previous line state `prevState`.
@@ -78,7 +82,7 @@ public interface IGrammar {
* e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET`
*/
ITokenizeLineResult2 tokenizeLine2(String lineText);
-
+
/**
* Tokenize `lineText` using previous line state `prevState`.
* The result contains the tokens in binary format, resolved with the following information:
@@ -89,6 +93,6 @@ public interface IGrammar {
* - background color
* e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET`
*/
- ITokenizeLineResult2 tokenizeLine2(String lineText, StackElement prevState);
-
+ ITokenizeLineResult2 tokenizeLine2(String lineText, @Nullable IStackElement prevState);
+
}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStackElement.java
new file mode 100644
index 000000000..fb7143d6d
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IStackElement.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
+ * Initial license: MIT
+ *
+ * Contributors:
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Angelo Zerr - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.grammar;
+
+import org.eclipse.tm4e.core.internal.grammar.StackElement;
+
+/**
+ * Represents a "pushed" state on the stack (as a linked list element).
+ *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
+ */
+public interface IStackElement {
+ IStackElement INITIAL = StackElement.NULL;
+
+ int getDepth();
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java
index 810402f85..1cfef609e 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/IToken.java
@@ -13,19 +13,19 @@
* Contributors:
* - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
* - Angelo Zerr - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.grammar;
-
-import java.util.List;
-
-public interface IToken {
-
- int getStartIndex();
-
- void setStartIndex(int startIndex);
-
- int getEndIndex();
-
- List getScopes();
-
-}
+ */
+package org.eclipse.tm4e.core.grammar;
+
+import java.util.List;
+
+public interface IToken {
+
+ int getStartIndex();
+
+ void setStartIndex(int startIndex);
+
+ int getEndIndex();
+
+ List getScopes();
+
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java
index 9312a1221..5e51122fe 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -11,25 +11,25 @@
* Initial license: MIT
*
* Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.grammar;
-
-/**
- * Result of the line tokenization API.
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
- */
-public interface ITokenizeLineResult {
-
- IToken[] getTokens();
-
- /**
- * Returns the `prevState` to be passed on to the next line tokenization.
- *
- * @return the `prevState` to be passed on to the next line tokenization.
- */
- StackElement getRuleStack();
-
-}
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Angelo Zerr - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.grammar;
+
+/**
+ * Result of the line tokenization API.
+ *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
+ */
+public interface ITokenizeLineResult {
+
+ IToken[] getTokens();
+
+ /**
+ * Returns the `prevState` to be passed on to the next line tokenization.
+ *
+ * @return the `prevState` to be passed on to the next line tokenization.
+ */
+ IStackElement getRuleStack();
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java
index 4b57ca3de..3dce2c5dc 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/ITokenizeLineResult2.java
@@ -19,7 +19,8 @@
/**
* Result of the line tokenization2 API.
*
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/main.ts
*/
public interface ITokenizeLineResult2 {
@@ -32,9 +33,8 @@ public interface ITokenizeLineResult2 {
/**
* Returns the `prevState` to be passed on to the next line tokenization.
- *
+ *
* @return the `prevState` to be passed on to the next line tokenization.
*/
- StackElement getRuleStack();
-
+ IStackElement getRuleStack();
}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/Injection.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/Injection.java
deleted file mode 100644
index 487a0eea5..000000000
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/Injection.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
- * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
- * Initial license: MIT
- *
- * Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.grammar;
-
-import java.util.List;
-import java.util.function.Predicate;
-
-import org.eclipse.tm4e.core.internal.types.IRawGrammar;
-
-public class Injection {
-
- private final Predicate> matcher;
- public final int priority; // -1 | 0 | 1; // 0 is the default. -1 for 'L' and 1 for 'R'
- public final int ruleId;
- public final IRawGrammar grammar;
-
- public Injection(Predicate> matcher, int ruleId, IRawGrammar grammar, int priority) {
- this.matcher = matcher;
- this.ruleId = ruleId;
- this.grammar = grammar;
- this.priority = priority;
- }
-
- public boolean match(List states) {
- return matcher.test(states);
- }
-}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/StackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/StackElement.java
deleted file mode 100644
index 56946a409..000000000
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/StackElement.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Initial code from https://github.com/Microsoft/vscode-textmate/
- * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
- * Initial license: MIT
- *
- * Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.grammar;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-import org.eclipse.tm4e.core.internal.grammar.ScopeListElement;
-import org.eclipse.tm4e.core.internal.rule.IRuleRegistry;
-import org.eclipse.tm4e.core.internal.rule.Rule;
-
-/**
- * Represents a "pushed" state on the stack (as a linked list element).
- *
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts
- *
- */
-public class StackElement {
-
- public static final StackElement NULL = new StackElement(null, 0, 0, null, null, null);
-
- /**
- * The position on the current line where this state was pushed.
- * This is relevant only while tokenizing a line, to detect endless loops.
- * Its value is meaningless across lines.
- */
- private int enterPosition;
-
- /**
- * The previous state on the stack (or null for the root state).
- */
- public final StackElement parent;
- /**
- * The depth of the stack.
- */
- public final int depth;
-
- /**
- * The state (rule) that this element represents.
- */
- public final int ruleId;
- /**
- * The "pop" (end) condition for this state in case that it was dynamically generated through captured text.
- */
- public final String endRule;
- /**
- * The list of scopes containing the "name" for this state.
- */
- public final ScopeListElement nameScopesList;
- /**
- * The list of scopes containing the "contentName" (besides "name") for this state.
- * This list **must** contain as an element `scopeName`.
- */
- public final ScopeListElement contentNameScopesList;
-
- public StackElement(StackElement parent, int ruleId, int enterPos, String endRule, ScopeListElement nameScopesList, ScopeListElement contentNameScopesList) {
- this.parent = parent;
- this.depth = (this.parent != null ? this.parent.depth + 1 : 1);
- this.ruleId = ruleId;
- this.enterPosition = enterPos;
- this.endRule = endRule;
- this.nameScopesList = nameScopesList;
- this.contentNameScopesList = contentNameScopesList;
- }
-
- /**
- * A structural equals check. Does not take into account `scopes`.
- */
- private static boolean structuralEquals(StackElement a, StackElement b) {
- if (a == b) {
- return true;
- }
- if (a == null || b == null) {
- return false;
- }
- return a.depth == b.depth && a.ruleId == b.ruleId && !Objects.equals(a.endRule, b.endRule) && structuralEquals(a.parent, b.parent);
- }
-
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if (other == null) {
- return false;
- }
- if (!(other instanceof StackElement)) {
- return false;
- }
- StackElement stackElement = (StackElement)other;
- return structuralEquals(this, stackElement) && this.contentNameScopesList.equals(stackElement.contentNameScopesList);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(depth, ruleId, endRule, parent, contentNameScopesList);
- }
-
- public void reset() {
- StackElement el = this;
- while (el != null) {
- el.enterPosition = -1;
- el = el.parent;
- }
- }
-
- public StackElement pop() {
- return this.parent;
- }
-
- public StackElement safePop() {
- if (this.parent != null) {
- return this.parent;
- }
- return this;
- }
-
- public StackElement push(int ruleId, int enterPos, String endRule, ScopeListElement nameScopesList, ScopeListElement contentNameScopesList) {
- return new StackElement(this, ruleId, enterPos, endRule, nameScopesList, contentNameScopesList);
- }
-
- public int getEnterPos() {
- return this.enterPosition;
- }
-
- public Rule getRule(IRuleRegistry grammar) {
- return grammar.getRule(this.ruleId);
- }
-
- private void appendString(List res) {
- if (this.parent != null) {
- this.parent.appendString(res);
- }
- res.add('(' + Integer.toString(this.ruleId) + ')'); //, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`;
- }
-
- @Override
- public String toString() {
- List r = new ArrayList<>();
- this.appendString(r);
- return '[' + String.join(", ", r) + ']';
- }
-
- public StackElement setContentNameScopesList(ScopeListElement contentNameScopesList) {
- if (this.contentNameScopesList.equals(contentNameScopesList)) {
- return this;
- }
- return this.parent.push(this.ruleId, this.enterPosition, this.endRule, this.nameScopesList, contentNameScopesList);
- }
-
- public StackElement setEndRule(String endRule) {
- if (this.endRule != null && this.endRule.equals(endRule)) {
- return this;
- }
- return new StackElement(this.parent, this.ruleId, this.enterPosition, endRule, this.nameScopesList, this.contentNameScopesList);
- }
-
- public boolean hasSameRuleAs(StackElement other) {
- return this.ruleId == other.ruleId;
- }
-}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/package-info.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/package-info.java
new file mode 100644
index 000000000..bfa17ddd6
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/grammar/package-info.java
@@ -0,0 +1,4 @@
+@NonNullByDefault
+package org.eclipse.tm4e.core.grammar;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/css/CSSDocumentHandler.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/css/CSSDocumentHandler.java
deleted file mode 100644
index 6ad596ba1..000000000
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/css/CSSDocumentHandler.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/**
- * Copyright (c) 2015-2017 Angelo ZERR.
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Angelo Zerr - initial API and implementation
- */
-package org.eclipse.tm4e.core.internal.css;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.tm4e.core.theme.IStyle;
-import org.eclipse.tm4e.core.theme.RGB;
-import org.eclipse.tm4e.core.theme.css.CSSStyle;
-import org.w3c.css.sac.CSSException;
-import org.w3c.css.sac.DocumentHandler;
-import org.w3c.css.sac.InputSource;
-import org.w3c.css.sac.LexicalUnit;
-import org.w3c.css.sac.SACMediaList;
-import org.w3c.css.sac.SelectorList;
-import org.w3c.dom.css.CSSPrimitiveValue;
-import org.w3c.dom.css.RGBColor;
-
-public class CSSDocumentHandler implements DocumentHandler {
-
- private final List list;
- private CSSStyle currentStyle;
-
- public CSSDocumentHandler() {
- list = new ArrayList<>();
- }
-
- @Override
- public void comment(String arg0) throws CSSException {
-
- }
-
- @Override
- public void endDocument(InputSource arg0) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void endFontFace() throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void endMedia(SACMediaList arg0) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void endPage(String arg0, String arg1) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void endSelector(SelectorList selector) throws CSSException {
- currentStyle = null;
- }
-
- @Override
- public void ignorableAtRule(String arg0) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void importStyle(String arg0, SACMediaList arg1, String arg2) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void namespaceDeclaration(String arg0, String arg1) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void property(String name, LexicalUnit value, boolean arg2) throws CSSException {
- if (currentStyle != null) {
- if ("color".equals(name)) {
- currentStyle.setColor(createRGB(value));
- } else if ("background-color".equals(name)) {
- currentStyle.setBackgroundColor(createRGB(value));
- } else if ("font-weight".equals(name)) {
- currentStyle.setBold(value.getStringValue().toUpperCase().contains("BOLD"));
- } else if ("font-style".equals(name)) {
- currentStyle.setItalic(value.getStringValue().toUpperCase().contains("ITALIC"));
- }
- if ("text-decoration".equals(name)) {
- String decoration = value.getStringValue().toUpperCase();
- if (decoration.contains("UNDERLINE")) {
- currentStyle.setUnderline(true);
- }
- if (decoration.contains("LINE-THROUGH")) {
- currentStyle.setStrikeThrough(true);
- }
- }
- }
- }
-
- private RGB createRGB(LexicalUnit value) {
- RGBColor rgbColor = new RGBColorImpl(value);
- int green = ((int) rgbColor.getGreen().getFloatValue(CSSPrimitiveValue.CSS_NUMBER));
- int red = ((int) rgbColor.getRed().getFloatValue(CSSPrimitiveValue.CSS_NUMBER));
- int blue = ((int) rgbColor.getBlue().getFloatValue(CSSPrimitiveValue.CSS_NUMBER));
- return new RGB(red, green, blue);
- }
-
- @Override
- public void startDocument(InputSource arg0) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void startFontFace() throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void startMedia(SACMediaList arg0) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void startPage(String arg0, String arg1) throws CSSException {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void startSelector(SelectorList selector) throws CSSException {
- currentStyle = new CSSStyle(selector);
- list.add(currentStyle);
- }
-
- public List getList() {
- return list;
- }
-}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java
new file mode 100644
index 000000000..6c33439ae
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/BalancedBracketSelectors.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2022 Sebastian Thomschke and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
+ * Initial license: MIT
+ *
+ * Contributors:
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Sebastian Thomschke - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+import java.util.List;
+import java.util.stream.Stream;
+
+import org.eclipse.tm4e.core.internal.matcher.Matcher;
+
+public class BalancedBracketSelectors {
+ private final Matcher>[] balancedBracketScopes;
+ private final Matcher>[] unbalancedBracketScopes;
+
+ private boolean allowAny = false;
+
+ BalancedBracketSelectors(final List balancedBracketScopes, final List unbalancedBracketScopes) {
+ this.balancedBracketScopes = balancedBracketScopes.stream()
+ .flatMap(selector -> {
+ if ("*".equals(selector)) {
+ this.allowAny = true;
+ return Stream.empty();
+ }
+ return Matcher.createMatchers(selector).stream();
+ })
+ .map(m -> m.matcher).toArray(Matcher[]::new);
+
+ this.unbalancedBracketScopes = unbalancedBracketScopes.stream()
+ .flatMap(selector -> Matcher.createMatchers(selector).stream())
+ .map(m -> m.matcher).toArray(Matcher[]::new);
+ }
+
+ boolean matchesAlways() {
+ return this.allowAny && this.unbalancedBracketScopes.length == 0;
+ }
+
+ boolean matchesNever() {
+ return !this.allowAny && this.balancedBracketScopes.length == 0;
+ }
+
+ boolean match(final List scopes) {
+ for (final var excluder : this.unbalancedBracketScopes) {
+ if (excluder.matches(scopes)) {
+ return false;
+ }
+ }
+
+ for (final var includer : this.balancedBracketScopes) {
+ if (includer.matches(scopes)) {
+ return true;
+ }
+ }
+ return this.allowAny;
+ }
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java
index 4a3f98552..6d6fc1e7e 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Grammar.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -11,201 +11,274 @@
* Initial license: MIT
*
* Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
- * - Fabio Zadrozny - Not adding '\n' on tokenize if it already finished with '\n'
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Angelo Zerr - translation and adaptation to Java
+ * - Fabio Zadrozny - Not adding '\n' on tokenize if it already finished with '\n'
*/
package org.eclipse.tm4e.core.internal.grammar;
+import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
+import java.util.Objects;
import java.util.function.IntFunction;
-import org.eclipse.tm4e.core.grammar.GrammarHelper;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tm4e.core.grammar.IGrammar;
-import org.eclipse.tm4e.core.grammar.IGrammarRepository;
+import org.eclipse.tm4e.core.grammar.IStackElement;
import org.eclipse.tm4e.core.grammar.ITokenizeLineResult;
import org.eclipse.tm4e.core.grammar.ITokenizeLineResult2;
-import org.eclipse.tm4e.core.grammar.Injection;
-import org.eclipse.tm4e.core.grammar.StackElement;
-import org.eclipse.tm4e.core.internal.grammar.parser.Raw;
import org.eclipse.tm4e.core.internal.matcher.Matcher;
-import org.eclipse.tm4e.core.internal.matcher.MatcherWithPriority;
import org.eclipse.tm4e.core.internal.oniguruma.OnigString;
+import org.eclipse.tm4e.core.internal.registry.IGrammarRepository;
import org.eclipse.tm4e.core.internal.rule.IRuleFactoryHelper;
import org.eclipse.tm4e.core.internal.rule.Rule;
import org.eclipse.tm4e.core.internal.rule.RuleFactory;
+import org.eclipse.tm4e.core.internal.theme.IThemeProvider;
import org.eclipse.tm4e.core.internal.types.IRawGrammar;
import org.eclipse.tm4e.core.internal.types.IRawRepository;
import org.eclipse.tm4e.core.internal.types.IRawRule;
-import org.eclipse.tm4e.core.theme.IThemeProvider;
-import org.eclipse.tm4e.core.theme.ThemeTrieElementRule;
/**
* TextMate grammar implementation.
*
- * @see https://github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts
- *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts
*/
-public class Grammar implements IGrammar, IRuleFactoryHelper {
+public final class Grammar implements IGrammar, IRuleFactoryHelper {
+
+ private static final Logger LOGGER = System.getLogger(Grammar.class.getName());
+
+ private final String scopeName;
- private int rootId;
- private int lastRuleId;
- private final Map ruleId2desc;
- private final Map includedGrammars;
+ private int rootId = -1;
+ private int lastRuleId = 0;
+ private final Map ruleId2desc = new HashMap<>();
+ private final Map includedGrammars = new HashMap<>();
private final IGrammarRepository grammarRepository;
private final IRawGrammar grammar;
+
+ @Nullable
private List injections;
private final ScopeMetadataProvider scopeMetadataProvider;
-
- public Grammar(IRawGrammar grammar, int initialLanguage, Map embeddedLanguages,
- IGrammarRepository grammarRepository, IThemeProvider themeProvider) {
+ private final List tokenTypeMatchers = new ArrayList<>();
+
+ @Nullable
+ private final BalancedBracketSelectors balancedBracketSelectors;
+
+ public Grammar(
+ final String scopeName,
+ final IRawGrammar grammar,
+ final int initialLanguage,
+ @Nullable final Map embeddedLanguages,
+ @Nullable final Map tokenTypes,
+ @Nullable final BalancedBracketSelectors balancedBracketSelectors,
+ final IGrammarRepository grammarRepository,
+ final IThemeProvider themeProvider) {
+ this.scopeName = scopeName;
this.scopeMetadataProvider = new ScopeMetadataProvider(initialLanguage, themeProvider, embeddedLanguages);
- this.rootId = -1;
- this.lastRuleId = 0;
- this.includedGrammars = new HashMap<>();
+ this.balancedBracketSelectors = balancedBracketSelectors;
this.grammarRepository = grammarRepository;
this.grammar = initGrammar(grammar, null);
- this.ruleId2desc = new HashMap<>();
- this.injections = null;
+
+ if (tokenTypes != null) {
+ for (final var entry : tokenTypes.entrySet()) {
+ final var selector = entry.getKey();
+ final var type = entry.getValue().intValue();
+ for (final var matcher : Matcher.createMatchers(selector)) {
+ tokenTypeMatchers.add(new TokenTypeMatcher() {
+ @Override
+ public int getType() {
+ return type;
+ }
+
+ @Override
+ public Matcher> getMatcher() {
+ return matcher.matcher;
+ }
+ });
+ }
+ }
+ }
}
public void onDidChangeTheme() {
this.scopeMetadataProvider.onDidChangeTheme();
}
- public ScopeMetadata getMetadataForScope(String scope) {
+ ScopeMetadata getMetadataForScope(final String scope) {
return this.scopeMetadataProvider.getMetadataForScope(scope);
}
- public List getInjections() {
- if (this.injections == null) {
- this.injections = new ArrayList<>();
+ private void collectInjections(final List result, final String selector, final IRawRule rule,
+ final IRuleFactoryHelper ruleFactoryHelper, final IRawGrammar grammar) {
+ final var matchers = Matcher.createMatchers(selector);
+ final int ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, this.grammar.getRepository());
+
+ for (final var matcher : matchers) {
+ result.add(new Injection(selector, matcher.matcher, ruleId, grammar, matcher.priority));
+ }
+ }
+
+ private List collectInjections() {
+ final var grammarRepository = new IGrammarRepository() {
+ @Override
+ public @Nullable IRawGrammar lookup(final String scopeName) {
+ if (Objects.equals(scopeName, Grammar.this.scopeName)) {
+ return Grammar.this.grammar;
+ }
+ return getExternalGrammar(scopeName, null);
+ }
+
+ @Override
+ public @Nullable Collection injections(final String targetScope) {
+ return Grammar.this.grammarRepository.injections(targetScope);
+ }
+ };
+
+ final var dependencyProcessor = new ScopeDependencyProcessor(grammarRepository, this.scopeName);
+ // TODO: uncomment below to visit all scopes
+ // while (dependencyProcessor.queue.length > 0) {
+ // dependencyProcessor.processQueue();
+ // }
+
+ final var result = new ArrayList();
+
+ dependencyProcessor.seenFullScopeRequests.forEach((scopeName) -> {
+ final var grammar = grammarRepository.lookup(scopeName);
+ if (grammar == null) {
+ return;
+ }
+
// add injections from the current grammar
- Map rawInjections = this.grammar.getInjections();
+ final var rawInjections = grammar.getInjections();
if (rawInjections != null) {
- for (Entry injection : rawInjections.entrySet()) {
- String expression = injection.getKey();
- IRawRule rule = injection.getValue();
- collectInjections(this.injections, expression, rule, this, this.grammar);
+ for (final var e : rawInjections.entrySet()) {
+ collectInjections(result, e.getKey(), e.getValue(), this, grammar);
}
}
// add injection grammars contributed for the current scope
- if (this.grammarRepository != null) {
- Collection injectionScopeNames = this.grammarRepository
- .injections(this.grammar.getScopeName());
- if (injectionScopeNames != null) {
- injectionScopeNames.forEach(injectionScopeName -> {
- IRawGrammar injectionGrammar = this.getExternalGrammar(injectionScopeName);
- if (injectionGrammar != null) {
- String selector = injectionGrammar.getInjectionSelector();
- if (selector != null) {
- collectInjections(this.injections, selector, (IRawRule) injectionGrammar, this,
- injectionGrammar);
- }
+ final var injectionScopeNames = this.grammarRepository.injections(scopeName);
+ if (injectionScopeNames != null) {
+ injectionScopeNames.forEach(injectionScopeName -> {
+ final var injectionGrammar = Grammar.this.getExternalGrammar(injectionScopeName, null);
+ if (injectionGrammar != null) {
+ final var selector = injectionGrammar.getInjectionSelector();
+ if (selector != null) {
+ collectInjections(result, selector, injectionGrammar.toRawRule(), this,
+ injectionGrammar);
}
- });
- }
+ }
+ });
}
- Collections.sort(this.injections, (i1, i2) -> i1.priority - i2.priority); // sort by priority
- }
- if (this.injections.isEmpty()) {
- return this.injections;
- }
- return this.injections;
+ });
+
+ Collections.sort(result, (i1, i2) -> i1.priority - i2.priority); // sort by priority
+
+ return result;
}
- private void collectInjections(List result, String selector, IRawRule rule,
- IRuleFactoryHelper ruleFactoryHelper, IRawGrammar grammar) {
- Collection>> matchers = Matcher.createMatchers(selector);
- int ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.getRepository());
+ List getInjections() {
+ var injections = this.injections;
+ if (injections == null) {
+ injections = this.injections = this.collectInjections();
- for (MatcherWithPriority> matcher : matchers) {
- result.add(new Injection(matcher.matcher, ruleId, grammar, matcher.priority));
+ if (LOGGER.isLoggable(Level.TRACE) && !injections.isEmpty()) {
+ LOGGER.log(Level.TRACE,
+ "Grammar " + scopeName + " contains the following injections:");
+ for (final var injection : injections) {
+ LOGGER.log(Level.TRACE, " - " + injection.debugSelector);
+ }
+ }
}
+ return injections;
}
@Override
- public Rule registerRule(IntFunction factory) {
- int id = (++this.lastRuleId);
- Rule result = factory.apply(id);
+ public T registerRule(final IntFunction factory) {
+ final int id = ++this.lastRuleId;
+ final @Nullable T result = factory.apply(id);
this.ruleId2desc.put(id, result);
return result;
}
@Override
- public Rule getRule(int patternId) {
- return this.ruleId2desc.get(patternId);
- }
-
- public IRawGrammar getExternalGrammar(String scopeName) {
- return getExternalGrammar(scopeName, null);
+ public Rule getRule(final int patternId) {
+ final var rule = this.ruleId2desc.get(patternId);
+ if (rule == null) {
+ throw new IndexOutOfBoundsException(
+ "No rule with index " + patternId + " found. Possible values: 0.." + this.ruleId2desc.size());
+ }
+ return rule;
}
@Override
- public IRawGrammar getExternalGrammar(String scopeName, IRawRepository repository) {
+ @Nullable
+ public IRawGrammar getExternalGrammar(final String scopeName, @Nullable final IRawRepository repository) {
if (this.includedGrammars.containsKey(scopeName)) {
return this.includedGrammars.get(scopeName);
- } else if (this.grammarRepository != null) {
- IRawGrammar rawIncludedGrammar = this.grammarRepository.lookup(scopeName);
- if (rawIncludedGrammar != null) {
- this.includedGrammars.put(scopeName,
- initGrammar(rawIncludedGrammar, repository != null ? repository.getBase() : null));
- return this.includedGrammars.get(scopeName);
- }
+ }
+
+ final IRawGrammar rawIncludedGrammar = this.grammarRepository.lookup(scopeName);
+ if (rawIncludedGrammar != null) {
+ this.includedGrammars.put(scopeName,
+ initGrammar(rawIncludedGrammar, repository != null ? repository.getBase() : null));
+ return this.includedGrammars.get(scopeName);
}
return null;
}
- private IRawGrammar initGrammar(IRawGrammar grammar, IRawRule base) {
- grammar = clone(grammar);
- if (grammar.getRepository() == null) {
- ((Raw) grammar).setRepository(new Raw());
+ private IRawGrammar initGrammar(IRawGrammar grammar, @Nullable final IRawRule base) {
+ grammar = grammar.deepClone();
+
+ final IRawRepository repo;
+ if (grammar.isRepositorySet()) {
+ repo = grammar.getRepository();
+ } else {
+ repo = new RawRepository();
+ grammar.setRepository(repo);
}
- Raw self = new Raw();
+
+ final var self = new RawRule();
self.setPatterns(grammar.getPatterns());
self.setName(grammar.getScopeName());
- grammar.getRepository().setSelf(self);
- if (base != null) {
- grammar.getRepository().setBase(base);
- } else {
- grammar.getRepository().setBase(grammar.getRepository().getSelf());
- }
+ repo.setSelf(self);
+ repo.setBase(base != null ? base : self);
return grammar;
}
- private IRawGrammar clone(IRawGrammar grammar) {
- return (IRawGrammar) ((Raw) grammar).clone();
- }
-
@Override
- public ITokenizeLineResult tokenizeLine(String lineText) {
+ public ITokenizeLineResult tokenizeLine(final String lineText) {
return tokenizeLine(lineText, null);
}
@Override
- public ITokenizeLineResult tokenizeLine(String lineText, StackElement prevState) {
- return tokenize(lineText, prevState, false);
+ public ITokenizeLineResult tokenizeLine(final String lineText, @Nullable final IStackElement prevState) {
+ return tokenize(lineText, (StackElement) prevState, false);
}
@Override
- public ITokenizeLineResult2 tokenizeLine2(String lineText) {
+ public ITokenizeLineResult2 tokenizeLine2(final String lineText) {
return tokenizeLine2(lineText, null);
}
@Override
- public ITokenizeLineResult2 tokenizeLine2(String lineText, StackElement prevState) {
- return tokenize(lineText, prevState, true);
+ public ITokenizeLineResult2 tokenizeLine2(final String lineText, @Nullable final IStackElement prevState) {
+ return tokenize(lineText, (StackElement) prevState, true);
}
@SuppressWarnings("unchecked")
- private T tokenize(String lineText, StackElement prevState, boolean emitBinaryTokens) {
+ private T tokenize(String lineText, @Nullable StackElement prevState, final boolean emitBinaryTokens) {
if (this.rootId == -1) {
this.rootId = RuleFactory.getCompiledRuleId(this.grammar.getRepository().getSelf(), this,
this.grammar.getRepository());
@@ -214,19 +287,22 @@ private T tokenize(String lineText, StackElement prevState, boolean emitBina
boolean isFirstLine;
if (prevState == null || prevState.equals(StackElement.NULL)) {
isFirstLine = true;
- ScopeMetadata rawDefaultMetadata = this.scopeMetadataProvider.getDefaultMetadata();
- ThemeTrieElementRule defaultTheme = rawDefaultMetadata.themeData.get(0);
- int defaultMetadata = StackElementMetadata.set(0, rawDefaultMetadata.languageId,
- rawDefaultMetadata.tokenType, defaultTheme.fontStyle, defaultTheme.foreground,
+ final var rawDefaultMetadata = this.scopeMetadataProvider.getDefaultMetadata();
+ final var themeData = rawDefaultMetadata.themeData;
+ final var defaultTheme = themeData == null ? null : themeData.get(0);
+ final int defaultMetadata = StackElementMetadata.set(0, rawDefaultMetadata.languageId,
+ rawDefaultMetadata.tokenType, null, defaultTheme.fontStyle, defaultTheme.foreground,
defaultTheme.background);
- String rootScopeName = this.getRule(this.rootId).getName(null, null);
- ScopeMetadata rawRootMetadata = this.scopeMetadataProvider.getMetadataForScope(rootScopeName);
- int rootMetadata = ScopeListElement.mergeMetadata(defaultMetadata, null, rawRootMetadata);
+ final var rootRule = castNonNull(this.getRule(this.rootId));
+ final var rootScopeName = rootRule.getName(null, null);
+ final var rawRootMetadata = this.scopeMetadataProvider.getMetadataForScope(rootScopeName);
+ final int rootMetadata = ScopeListElement.mergeMetadata(defaultMetadata, null, rawRootMetadata);
- ScopeListElement scopeList = new ScopeListElement(null, rootScopeName, rootMetadata);
+ final ScopeListElement scopeList = new ScopeListElement(null,
+ rootScopeName == null ? "unknown" : rootScopeName, rootMetadata);
- prevState = new StackElement(null, this.rootId, -1, null, scopeList, scopeList);
+ prevState = new StackElement(null, this.rootId, -1, -1, false, null, scopeList, scopeList);
} else {
isFirstLine = false;
prevState.reset();
@@ -236,11 +312,11 @@ private T tokenize(String lineText, StackElement prevState, boolean emitBina
// Only add \n if the passed lineText didn't have it.
lineText += '\n';
}
- OnigString onigLineText = GrammarHelper.createOnigString(lineText);
- int lineLength = lineText.length();
- LineTokens lineTokens = new LineTokens(emitBinaryTokens, lineText);
- StackElement nextState = LineTokenizer.tokenizeString(this, onigLineText, isFirstLine, 0, prevState,
- lineTokens);
+ final var onigLineText = OnigString.of(lineText);
+ final int lineLength = lineText.length();
+ final var lineTokens = new LineTokens(emitBinaryTokens, lineText, tokenTypeMatchers, balancedBracketSelectors);
+ final var nextState = LineTokenizer.tokenizeString(this, onigLineText, isFirstLine, 0, prevState, lineTokens,
+ true);
if (emitBinaryTokens) {
return (T) new TokenizeLineResult2(lineTokens.getBinaryResult(nextState, lineLength), nextState);
@@ -249,18 +325,18 @@ private T tokenize(String lineText, StackElement prevState, boolean emitBina
}
@Override
+ @Nullable
public String getName() {
return grammar.getName();
}
@Override
public String getScopeName() {
- return grammar.getScopeName();
+ return scopeName;
}
@Override
public Collection getFileTypes() {
return grammar.getFileTypes();
}
-
}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java
new file mode 100644
index 000000000..f6fc0bc13
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/Injection.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2015-2017 Angelo ZERR.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
+ * Initial license: MIT
+ *
+ * Contributors:
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Angelo Zerr - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+import java.util.List;
+
+import org.eclipse.tm4e.core.internal.matcher.Matcher;
+import org.eclipse.tm4e.core.internal.types.IRawGrammar;
+
+final class Injection {
+
+ final String debugSelector;
+ private final Matcher> matcher;
+ final int priority; // -1 | 0 | 1; // 0 is the default. -1 for 'L' and 1 for 'R'
+ final int ruleId;
+ final IRawGrammar grammar;
+
+ Injection(final String debugSelector, final Matcher> matcher, final int ruleId,
+ final IRawGrammar grammar, final int priority) {
+ this.debugSelector = debugSelector;
+ this.matcher = matcher;
+ this.ruleId = ruleId;
+ this.grammar = grammar;
+ this.priority = priority;
+ }
+
+ boolean matches(final List states) {
+ return matcher.matches(states);
+ }
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java
index da70a91f9..41b8353f7 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokenizer.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+ * Copyright (c) 2015-2017 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -11,53 +11,70 @@
* Initial license: MIT
*
* Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Angelo Zerr - translation and adaptation to Java
*/
package org.eclipse.tm4e.core.internal.grammar;
+import static java.lang.System.Logger.Level.*;
+import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*;
+
+import java.lang.System.Logger;
+import java.lang.System.Logger.Level;
+import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;
-import java.util.logging.Logger;
-
-import org.eclipse.tm4e.core.grammar.GrammarHelper;
-import org.eclipse.tm4e.core.grammar.Injection;
-import org.eclipse.tm4e.core.grammar.StackElement;
-import org.eclipse.tm4e.core.internal.matcher.IMatchInjectionsResult;
-import org.eclipse.tm4e.core.internal.matcher.IMatchResult;
-import org.eclipse.tm4e.core.internal.oniguruma.IOnigCaptureIndex;
-import org.eclipse.tm4e.core.internal.oniguruma.IOnigNextMatchResult;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tm4e.core.internal.oniguruma.OnigCaptureIndex;
+import org.eclipse.tm4e.core.internal.oniguruma.OnigNextMatchResult;
import org.eclipse.tm4e.core.internal.oniguruma.OnigString;
import org.eclipse.tm4e.core.internal.rule.BeginEndRule;
import org.eclipse.tm4e.core.internal.rule.BeginWhileRule;
import org.eclipse.tm4e.core.internal.rule.CaptureRule;
-import org.eclipse.tm4e.core.internal.rule.ICompiledRule;
+import org.eclipse.tm4e.core.internal.rule.CompiledRule;
import org.eclipse.tm4e.core.internal.rule.MatchRule;
import org.eclipse.tm4e.core.internal.rule.Rule;
-class LineTokenizer {
+/**
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/grammar.ts
+ */
+final class LineTokenizer {
+
+ private static final Logger LOGGER = System.getLogger(LineTokenizer.class.getName());
- private static final Logger LOGGER = Logger.getLogger(LineTokenizer.class.getName());
+ private interface IMatchResult {
+ OnigCaptureIndex[] getCaptureIndices();
+
+ int getMatchedRuleId();
+ }
+
+ private interface IMatchInjectionsResult extends IMatchResult {
+ boolean isPriorityMatch();
+ }
- class WhileStack {
+ private static final class WhileStack {
- public final StackElement stack;
- public final BeginWhileRule rule;
+ private final StackElement stack;
+ private final BeginWhileRule rule;
- public WhileStack(StackElement stack, BeginWhileRule rule) {
+ private WhileStack(final StackElement stack, final BeginWhileRule rule) {
this.stack = stack;
this.rule = rule;
}
}
- class WhileCheckResult {
+ private static final class WhileCheckResult {
- public final StackElement stack;
- public final int linePos;
- public final int anchorPosition;
- public final boolean isFirstLine;
+ private final StackElement stack;
+ private final int linePos;
+ private final int anchorPosition;
+ private final boolean isFirstLine;
- public WhileCheckResult(StackElement stack, int linePos, int anchorPosition, boolean isFirstLine) {
+ private WhileCheckResult(final StackElement stack, final int linePos, final int anchorPosition,
+ final boolean isFirstLine) {
this.stack = stack;
this.linePos = linePos;
this.anchorPosition = anchorPosition;
@@ -73,28 +90,28 @@ public WhileCheckResult(StackElement stack, int linePos, int anchorPosition, boo
private final LineTokens lineTokens;
private int anchorPosition = -1;
private boolean stop;
- private final int lineLength;
- public LineTokenizer(Grammar grammar, OnigString lineText, boolean isFirstLine, int linePos, StackElement stack,
- LineTokens lineTokens) {
+ private LineTokenizer(final Grammar grammar, final OnigString lineText, final boolean isFirstLine,
+ final int linePos, final StackElement stack, final LineTokens lineTokens) {
this.grammar = grammar;
this.lineText = lineText;
- this.lineLength = lineText.utf8_value.length;
this.isFirstLine = isFirstLine;
this.linePos = linePos;
this.stack = stack;
this.lineTokens = lineTokens;
}
- public StackElement scan() {
+ private StackElement scan(final boolean checkWhileConditions) {
stop = false;
- WhileCheckResult whileCheckResult = checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack,
- lineTokens);
- stack = whileCheckResult.stack;
- linePos = whileCheckResult.linePos;
- isFirstLine = whileCheckResult.isFirstLine;
- anchorPosition = whileCheckResult.anchorPosition;
+ if (checkWhileConditions) {
+ final var whileCheckResult = checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack,
+ lineTokens);
+ stack = whileCheckResult.stack;
+ linePos = whileCheckResult.linePos;
+ isFirstLine = whileCheckResult.isFirstLine;
+ anchorPosition = whileCheckResult.anchorPosition;
+ }
while (!stop) {
scanNext(); // potentially modifies linePos && anchorPosition
@@ -104,69 +121,70 @@ public StackElement scan() {
}
private void scanNext() {
- LOGGER.finest("@@scanNext: |" + lineText.string.replaceAll("\n", "\\n").substring(linePos) + '|');
+ LOGGER.log(TRACE, () -> "@@scanNext: |" + lineText.string.replace("\n", "\\n").substring(linePos) + '|');
- IMatchResult r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
+ final IMatchResult r = matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
if (r == null) {
- LOGGER.finest(" no more matches.");
+ LOGGER.log(TRACE, " no more matches.");
// No match
- lineTokens.produce(stack, lineLength);
+ lineTokens.produce(stack, lineText.bytesCount);
stop = true;
return;
}
- IOnigCaptureIndex[] captureIndices = r.getCaptureIndices();
- int matchedRuleId = r.getMatchedRuleId();
+ final OnigCaptureIndex[] captureIndices = r.getCaptureIndices();
+ final int matchedRuleId = r.getMatchedRuleId();
- boolean hasAdvanced = (captureIndices != null && captureIndices.length > 0)
- ? (captureIndices[0].getEnd() > linePos)
- : false;
+ final boolean hasAdvanced = captureIndices.length > 0 && captureIndices[0].end > linePos;
if (matchedRuleId == -1) {
// We matched the `end` for this rule => pop it
- BeginEndRule poppedRule = (BeginEndRule) stack.getRule(grammar);
+ final BeginEndRule poppedRule = (BeginEndRule) stack.getRule(grammar);
/*
* if (logger.isEnabled()) { logger.log(" popping " + poppedRule.debugName +
* " - " + poppedRule.debugEndRegExp); }
*/
- lineTokens.produce(stack, captureIndices[0].getStart());
+ lineTokens.produce(stack, captureIndices[0].start);
stack = stack.setContentNameScopesList(stack.nameScopesList);
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, poppedRule.endCaptures, captureIndices);
- lineTokens.produce(stack, captureIndices[0].getEnd());
+ lineTokens.produce(stack, captureIndices[0].end);
// pop
- StackElement popped = stack;
- stack = stack.pop();
+ final var popped = stack;
+ stack = castNonNull(stack.pop());
+ anchorPosition = popped.getAnchorPos();
if (!hasAdvanced && popped.getEnterPos() == linePos) {
// Grammar pushed & popped a rule without advancing
- LOGGER.info("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing");
+ LOGGER.log(INFO,
+ "[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing");
// See https://github.com/Microsoft/vscode-textmate/issues/12
// Let's assume this was a mistake by the grammar author and the
// intent was to continue in this state
stack = popped;
- lineTokens.produce(stack, lineLength);
+ lineTokens.produce(stack, lineText.bytesCount);
stop = true;
return;
}
- } else if (captureIndices != null && captureIndices.length > 0) {
+ } else if (captureIndices.length > 0) {
// We matched a rule!
- Rule rule = grammar.getRule(matchedRuleId);
+ final Rule rule = grammar.getRule(matchedRuleId);
- lineTokens.produce(stack, captureIndices[0].getStart());
+ lineTokens.produce(stack, captureIndices[0].start);
- StackElement beforePush = stack;
+ final StackElement beforePush = stack;
// push it on the stack rule
- String scopeName = rule.getName(lineText.string, captureIndices);
- ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);
- stack = stack.push(matchedRuleId, linePos, null, nameScopesList, nameScopesList);
+ final String scopeName = rule.getName(lineText.string, captureIndices);
+ final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);
+ stack = stack.push(matchedRuleId, linePos, anchorPosition,
+ captureIndices[0].end == lineText.bytesCount, null, nameScopesList, nameScopesList);
if (rule instanceof BeginEndRule) {
- BeginEndRule pushedRule = (BeginEndRule) rule;
+ final BeginEndRule pushedRule = (BeginEndRule) rule;
// if (IN_DEBUG_MODE) {
// console.log(' pushing ' + pushedRule.debugName + ' - ' +
@@ -175,11 +193,11 @@ private void scanNext() {
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures,
captureIndices);
- lineTokens.produce(stack, captureIndices[0].getEnd());
- anchorPosition = captureIndices[0].getEnd();
+ lineTokens.produce(stack, captureIndices[0].end);
+ anchorPosition = captureIndices[0].end;
- String contentName = pushedRule.getContentName(lineText.string, captureIndices);
- ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName);
+ final String contentName = pushedRule.getContentName(lineText.string, captureIndices);
+ final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName);
stack = stack.setContentNameScopesList(contentNameScopesList);
if (pushedRule.endHasBackReferences) {
@@ -189,25 +207,26 @@ private void scanNext() {
if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {
// Grammar pushed the same rule without advancing
- LOGGER.info("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing");
- stack = stack.pop();
- lineTokens.produce(stack, lineLength);
+ LOGGER.log(INFO,
+ "[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing");
+ stack = castNonNull(stack.pop());
+ lineTokens.produce(stack, lineText.bytesCount);
stop = true;
return;
}
} else if (rule instanceof BeginWhileRule) {
- BeginWhileRule pushedRule = (BeginWhileRule) rule;
+ final BeginWhileRule pushedRule = (BeginWhileRule) rule;
// if (IN_DEBUG_MODE) {
// console.log(' pushing ' + pushedRule.debugName);
// }
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, pushedRule.beginCaptures,
captureIndices);
- lineTokens.produce(stack, captureIndices[0].getEnd());
- anchorPosition = captureIndices[0].getEnd();
+ lineTokens.produce(stack, captureIndices[0].end);
+ anchorPosition = captureIndices[0].end;
- String contentName = pushedRule.getContentName(lineText.string, captureIndices);
- ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName);
+ final String contentName = pushedRule.getContentName(lineText.string, captureIndices);
+ final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName);
stack = stack.setContentNameScopesList(contentNameScopesList);
if (pushedRule.whileHasBackReferences) {
@@ -217,14 +236,15 @@ private void scanNext() {
if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {
// Grammar pushed the same rule without advancing
- LOGGER.info("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing");
- stack = stack.pop();
- lineTokens.produce(stack, lineLength);
+ LOGGER.log(INFO,
+ "[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing");
+ stack = castNonNull(stack.pop());
+ lineTokens.produce(stack, lineText.bytesCount);
stop = true;
return;
}
} else {
- MatchRule matchingRule = (MatchRule) rule;
+ final MatchRule matchingRule = (MatchRule) rule;
// if (IN_DEBUG_MODE) {
// console.log(' matched ' + matchingRule.debugName + ' - ' +
// matchingRule.debugMatchRegExp);
@@ -232,34 +252,37 @@ private void scanNext() {
handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, matchingRule.captures,
captureIndices);
- lineTokens.produce(stack, captureIndices[0].getEnd());
+ lineTokens.produce(stack, captureIndices[0].end);
// pop rule immediately since it is a MatchRule
- stack = stack.pop();
+ stack = castNonNull(stack.pop());
if (!hasAdvanced) {
// Grammar is not advancing, nor is it pushing/popping
- LOGGER.info("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping");
+ LOGGER.log(INFO,
+ "[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping");
stack = stack.safePop();
- lineTokens.produce(stack, lineLength);
+ lineTokens.produce(stack, lineText.bytesCount);
stop = true;
return;
}
}
}
- if (captureIndices != null && captureIndices.length > 0 && captureIndices[0].getEnd() > linePos) {
+ if (captureIndices.length > 0 && captureIndices[0].end > linePos) {
// Advance stream
- linePos = captureIndices[0].getEnd();
+ linePos = captureIndices[0].end;
isFirstLine = false;
}
}
- private IMatchResult matchRule(Grammar grammar, OnigString lineText, boolean isFirstLine, final int linePos,
- StackElement stack, int anchorPosition) {
- Rule rule = stack.getRule(grammar);
- final ICompiledRule ruleScanner = rule.compile(grammar, stack.endRule, isFirstLine, linePos == anchorPosition);
- final IOnigNextMatchResult r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);
+ @Nullable
+ private IMatchResult matchRule(final Grammar grammar, final OnigString lineText, final boolean isFirstLine,
+ final int linePos, final StackElement stack, final int anchorPosition) {
+ final Rule rule = stack.getRule(grammar);
+ final CompiledRule ruleScanner = rule.compileAG(grammar, stack.endRule, isFirstLine, linePos == anchorPosition);
+
+ final OnigNextMatchResult r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);
if (r != null) {
return new IMatchResult() {
@@ -270,7 +293,7 @@ public int getMatchedRuleId() {
}
@Override
- public IOnigCaptureIndex[] getCaptureIndices() {
+ public OnigCaptureIndex[] getCaptureIndices() {
return r.getCaptureIndices();
}
};
@@ -278,19 +301,22 @@ public IOnigCaptureIndex[] getCaptureIndices() {
return null;
}
- private IMatchResult matchRuleOrInjections(Grammar grammar, OnigString lineText, boolean isFirstLine,
- final int linePos, StackElement stack, int anchorPosition) {
+ @Nullable
+ private IMatchResult matchRuleOrInjections(final Grammar grammar, final OnigString lineText,
+ final boolean isFirstLine,
+ final int linePos, final StackElement stack, final int anchorPosition) {
// Look for normal grammar rule
- IMatchResult matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
+ final IMatchResult matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
// Look for injected rules
- List injections = grammar.getInjections();
- if (injections.size() == 0) {
+ final List injections = grammar.getInjections();
+ if (injections.isEmpty()) {
// No injections whatsoever => early return
return matchResult;
}
- IMatchInjectionsResult injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos,
+ final IMatchInjectionsResult injectionResult = matchInjections(injections, grammar, lineText, isFirstLine,
+ linePos,
stack, anchorPosition);
if (injectionResult == null) {
// No injections matched => early return
@@ -303,8 +329,8 @@ private IMatchResult matchRuleOrInjections(Grammar grammar, OnigString lineText,
}
// Decide if `matchResult` or `injectionResult` should win
- int matchResultScore = matchResult.getCaptureIndices()[0].getStart();
- int injectionResultScore = injectionResult.getCaptureIndices()[0].getStart();
+ final int matchResultScore = matchResult.getCaptureIndices()[0].start;
+ final int injectionResultScore = injectionResult.getCaptureIndices()[0].start;
if (injectionResultScore < matchResultScore
|| (injectionResult.isPriorityMatch() && injectionResultScore == matchResultScore)) {
@@ -315,31 +341,37 @@ private IMatchResult matchRuleOrInjections(Grammar grammar, OnigString lineText,
return matchResult;
}
- private IMatchInjectionsResult matchInjections(List injections, Grammar grammar, OnigString lineText,
- boolean isFirstLine, int linePos, StackElement stack, int anchorPosition) {
+ @Nullable
+ private IMatchInjectionsResult matchInjections(final List injections, final Grammar grammar,
+ final OnigString lineText,
+ final boolean isFirstLine, final int linePos, final StackElement stack, final int anchorPosition) {
// The lower the better
int bestMatchRating = Integer.MAX_VALUE;
- IOnigCaptureIndex[] bestMatchCaptureIndices = null;
+ OnigCaptureIndex[] bestMatchCaptureIndices = null;
int bestMatchRuleId = -1;
int bestMatchResultPriority = 0;
- List scopes = stack.contentNameScopesList.generateScopes();
+ final List scopes = stack.contentNameScopesList.generateScopes();
- for (Injection injection : injections) {
- if (!injection.match(scopes)) {
+ for (final Injection injection : injections) {
+ if (!injection.matches(scopes)) {
// injection selector doesn't match stack
continue;
}
- ICompiledRule ruleScanner = grammar.getRule(injection.ruleId).compile(grammar, null, isFirstLine,
+ final CompiledRule ruleScanner = grammar.getRule(injection.ruleId).compileAG(grammar, null, isFirstLine,
linePos == anchorPosition);
- IOnigNextMatchResult matchResult = ruleScanner.scanner.findNextMatchSync(lineText, linePos);
+ final OnigNextMatchResult matchResult = ruleScanner.scanner.findNextMatchSync(lineText, linePos);
if (matchResult == null) {
continue;
}
- int matchRating = matchResult.getCaptureIndices()[0].getStart();
+ if (LOGGER.isLoggable(Level.TRACE)) {
+ LOGGER.log(Level.TRACE, " matched injection: " + injection.debugSelector);
+ LOGGER.log(Level.TRACE, debugCompiledRuleToString(ruleScanner));
+ }
+ final int matchRating = matchResult.getCaptureIndices()[0].start;
if (matchRating > bestMatchRating) {
// Injections are sorted by priority, so the previous injection had a better or
@@ -360,7 +392,7 @@ private IMatchInjectionsResult matchInjections(List injections, Gramm
if (bestMatchCaptureIndices != null) {
final int matchedRuleId = bestMatchRuleId;
- final IOnigCaptureIndex[] matchCaptureIndices = bestMatchCaptureIndices;
+ final OnigCaptureIndex[] matchCaptureIndices = bestMatchCaptureIndices;
final boolean matchResultPriority = bestMatchResultPriority == -1;
return new IMatchInjectionsResult() {
@@ -370,7 +402,7 @@ public int getMatchedRuleId() {
}
@Override
- public IOnigCaptureIndex[] getCaptureIndices() {
+ public OnigCaptureIndex[] getCaptureIndices() {
return matchCaptureIndices;
}
@@ -384,19 +416,21 @@ public boolean isPriorityMatch() {
return null;
}
- private void handleCaptures(Grammar grammar, OnigString lineText, boolean isFirstLine, StackElement stack,
- LineTokens lineTokens, List captures, IOnigCaptureIndex[] captureIndices) {
+ private void handleCaptures(final Grammar grammar, final OnigString lineText, final boolean isFirstLine,
+ final StackElement stack,
+ final LineTokens lineTokens, final List<@Nullable CaptureRule> captures,
+ final OnigCaptureIndex[] captureIndices) {
if (captures.isEmpty()) {
return;
}
- int len = Math.min(captures.size(), captureIndices.length);
- List localStack = new ArrayList();
- int maxEnd = captureIndices[0].getEnd();
- IOnigCaptureIndex captureIndex;
+ final int len = Math.min(captures.size(), captureIndices.length);
+ final var localStack = new ArrayDeque();
+ final int maxEnd = captureIndices[0].end;
+ OnigCaptureIndex captureIndex;
for (int i = 0; i < len; i++) {
- CaptureRule captureRule = captures.get(i);
+ final CaptureRule captureRule = captures.get(i);
if (captureRule == null) {
// Not interested
continue;
@@ -409,58 +443,57 @@ private void handleCaptures(Grammar grammar, OnigString lineText, boolean isFirs
continue;
}
- if (captureIndex.getStart() > maxEnd) {
+ if (captureIndex.start > maxEnd) {
// Capture going beyond consumed string
break;
}
// pop captures while needed
- while (!localStack.isEmpty() && localStack.get(localStack.size() - 1).getEndPos() <= captureIndex.getStart()) {
+ while (!localStack.isEmpty() && localStack.getLast().endPos <= captureIndex.start) {
// pop!
- lineTokens.produceFromScopes(localStack.get(localStack.size() - 1).getScopes(),
- localStack.get(localStack.size() - 1).getEndPos());
- localStack.remove(localStack.size() - 1);
+ final var lastElem = localStack.removeLast();
+ lineTokens.produceFromScopes(lastElem.scopes, lastElem.endPos);
}
if (!localStack.isEmpty()) {
- lineTokens.produceFromScopes(localStack.get(localStack.size() - 1).getScopes(),
- captureIndex.getStart());
+ lineTokens.produceFromScopes(localStack.getLast().scopes, captureIndex.start);
} else {
- lineTokens.produce(stack, captureIndex.getStart());
+ lineTokens.produce(stack, captureIndex.start);
}
- if (captureRule.retokenizeCapturedWithRuleId != null) {
+ final var retokenizeCapturedWithRuleId = captureRule.retokenizeCapturedWithRuleId;
+ if (retokenizeCapturedWithRuleId != null) {
// the capture requires additional matching
- String scopeName = captureRule.getName(lineText.string, captureIndices);
- ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);
- String contentName = captureRule.getContentName(lineText.string, captureIndices);
- ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName);
+ final String scopeName = captureRule.getName(lineText.string, captureIndices);
+ final ScopeListElement nameScopesList = stack.contentNameScopesList.push(grammar, scopeName);
+ final String contentName = captureRule.getContentName(lineText.string, captureIndices);
+ final ScopeListElement contentNameScopesList = nameScopesList.push(grammar, contentName);
// the capture requires additional matching
- StackElement stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.getStart(),
+ final StackElement stackClone = stack.push(retokenizeCapturedWithRuleId, captureIndex.start, -1, false,
null, nameScopesList, contentNameScopesList);
- tokenizeString(grammar,
- GrammarHelper.createOnigString(lineText.string.substring(0, captureIndex.getEnd())),
- (isFirstLine && captureIndex.getStart() == 0), captureIndex.getStart(), stackClone, lineTokens);
+ final var onigSubStr = OnigString.of(lineText.string.substring(0, captureIndex.end));
+ tokenizeString(grammar, onigSubStr, (isFirstLine && captureIndex.start == 0),
+ captureIndex.start, stackClone, lineTokens, false);
continue;
}
// push
- String captureRuleScopeName = captureRule.getName(lineText.string, captureIndices);
+ final String captureRuleScopeName = captureRule.getName(lineText.string, captureIndices);
if (captureRuleScopeName != null) {
// push
- ScopeListElement base = localStack.isEmpty() ? stack.contentNameScopesList :
- localStack.get(localStack.size() - 1).getScopes();
- ScopeListElement captureRuleScopesList = base.push(grammar, captureRuleScopeName);
- localStack.add(new LocalStackElement(captureRuleScopesList, captureIndex.getEnd()));
+ final ScopeListElement base = localStack.isEmpty()
+ ? stack.contentNameScopesList
+ : localStack.getLast().scopes;
+ final ScopeListElement captureRuleScopesList = base.push(grammar, captureRuleScopeName);
+ localStack.add(new LocalStackElement(captureRuleScopesList, captureIndex.end));
}
}
while (!localStack.isEmpty()) {
// pop!
- lineTokens.produceFromScopes(localStack.get(localStack.size() - 1).getScopes(),
- localStack.get(localStack.size() - 1).getEndPos());
- localStack.remove(localStack.size() - 1);
+ final var lastElem = localStack.removeLast();
+ lineTokens.produceFromScopes(lastElem.scopes, lastElem.endPos);
}
}
@@ -469,46 +502,47 @@ private void handleCaptures(Grammar grammar, OnigString lineText, boolean isFirs
* order. If any fails, cut off the entire stack above the failed while
* condition. While conditions may also advance the linePosition.
*/
- private WhileCheckResult checkWhileConditions(Grammar grammar, OnigString lineText, boolean isFirstLine,
- int linePos, StackElement stack, LineTokens lineTokens) {
- int currentanchorPosition = -1;
- List whileRules = new ArrayList<>();
+ private WhileCheckResult checkWhileConditions(final Grammar grammar, final OnigString lineText, boolean isFirstLine,
+ int linePos, StackElement stack, final LineTokens lineTokens) {
+ int currentanchorPosition = stack.beginRuleCapturedEOL ? 0 : -1;
+ final List whileRules = new ArrayList<>();
for (StackElement node = stack; node != null; node = node.pop()) {
- Rule nodeRule = node.getRule(grammar);
+ final Rule nodeRule = node.getRule(grammar);
if (nodeRule instanceof BeginWhileRule) {
whileRules.add(new WhileStack(node, (BeginWhileRule) nodeRule));
}
}
+
for (int i = whileRules.size() - 1; i >= 0; i--) {
- WhileStack whileRule = whileRules.get(i);
- ICompiledRule ruleScanner = whileRule.rule.compileWhile(grammar, whileRule.stack.endRule, isFirstLine,
+ final var whileRule = whileRules.get(i);
+ final var ruleScanner = whileRule.rule.compileWhileAG(whileRule.stack.endRule, isFirstLine,
currentanchorPosition == linePos);
- IOnigNextMatchResult r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);
- // if (IN_DEBUG_MODE) {
- // console.log(' scanning for while rule');
- // console.log(debugCompiledRuleToString(ruleScanner));
- // }
+ final var r = ruleScanner.scanner.findNextMatchSync(lineText, linePos);
+ if (LOGGER.isLoggable(TRACE)) {
+ LOGGER.log(TRACE, " scanning for while rule");
+ LOGGER.log(TRACE, debugCompiledRuleToString(ruleScanner));
+ }
if (r != null) {
- Integer matchedRuleId = ruleScanner.rules[r.getIndex()];
+ final int matchedRuleId = ruleScanner.rules[r.getIndex()];
if (matchedRuleId != -2) {
// we shouldn't end up here
- stack = whileRule.stack.pop();
+ stack = castNonNull(whileRule.stack.pop());
break;
}
- if (r.getCaptureIndices() != null && r.getCaptureIndices().length > 0) {
- lineTokens.produce(whileRule.stack, r.getCaptureIndices()[0].getStart());
+ if (r.getCaptureIndices().length > 0) {
+ lineTokens.produce(whileRule.stack, r.getCaptureIndices()[0].start);
handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens,
whileRule.rule.whileCaptures, r.getCaptureIndices());
- lineTokens.produce(whileRule.stack, r.getCaptureIndices()[0].getEnd());
- currentanchorPosition = r.getCaptureIndices()[0].getEnd();
- if (r.getCaptureIndices()[0].getEnd() > linePos) {
- linePos = r.getCaptureIndices()[0].getEnd();
+ lineTokens.produce(whileRule.stack, r.getCaptureIndices()[0].end);
+ currentanchorPosition = r.getCaptureIndices()[0].end;
+ if (r.getCaptureIndices()[0].end > linePos) {
+ linePos = r.getCaptureIndices()[0].end;
isFirstLine = false;
}
}
} else {
- stack = whileRule.stack.pop();
+ stack = castNonNull(whileRule.stack.pop());
break;
}
}
@@ -516,8 +550,17 @@ private WhileCheckResult checkWhileConditions(Grammar grammar, OnigString lineTe
return new WhileCheckResult(stack, linePos, currentanchorPosition, isFirstLine);
}
- public static StackElement tokenizeString(Grammar grammar, OnigString lineText, boolean isFirstLine, int linePos,
- StackElement stack, LineTokens lineTokens) {
- return new LineTokenizer(grammar, lineText, isFirstLine, linePos, stack, lineTokens).scan();
+ static StackElement tokenizeString(final Grammar grammar, final OnigString lineText, final boolean isFirstLine,
+ final int linePos, final StackElement stack, final LineTokens lineTokens,
+ final boolean checkWhileConditions) {
+ return new LineTokenizer(grammar, lineText, isFirstLine, linePos, stack, lineTokens).scan(checkWhileConditions);
+ }
+
+ static String debugCompiledRuleToString(final CompiledRule ruleScanner) {
+ final var r = new ArrayList();
+ for (int i = 0, l = ruleScanner.rules.length; i < l; i++) {
+ r.add(" - " + ruleScanner.rules[i] + ": " + ruleScanner.debugRegExps.get(i));
+ }
+ return String.join(System.lineSeparator(), r);
}
}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java
index 7c609b7e8..e40704cf3 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LineTokens.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2015-2017 Angelo ZERR.
+ * Copyright (c) 2015-2022 Angelo ZERR.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
@@ -11,70 +11,139 @@
* Initial license: MIT
*
* Contributors:
- * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
- * - Angelo Zerr - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.internal.grammar;
-
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Angelo Zerr - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+import static java.lang.System.Logger.Level.*;
+import static org.eclipse.tm4e.core.internal.utils.MoreCollections.*;
+import static org.eclipse.tm4e.core.internal.utils.NullSafetyHelper.*;
+
+import java.lang.System.Logger;
+import java.util.ArrayDeque;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Deque;
import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tm4e.core.grammar.IToken;
-import org.eclipse.tm4e.core.grammar.StackElement;
-
-class LineTokens {
+import org.eclipse.tm4e.core.internal.theme.FontStyle;
- private static final Logger LOGGER = Logger.getLogger(LineTokens.class.getName());
+final class LineTokens {
- private final String lineText;
+ private static final Logger LOGGER = System.getLogger(LineTokens.class.getName());
+
+ private static final Deque EMPTY_DEQUE = new ArrayDeque<>(0);
/**
- * used only if `_emitBinaryTokens` is false.
- */
- private final List tokens;
+ * defined only if `LOGGER.isLoggable(TRACE)`.
+ */
+ @Nullable
+ private final String lineText;
+ /**
+ * used only if `emitBinaryTokens` is false.
+ */
+ private final Deque tokens;
- private boolean emitBinaryTokens;
+ private final boolean emitBinaryTokens;
/**
- * used only if `_emitBinaryTokens` is true.
+ * used only if `emitBinaryTokens` is true.
*/
private final List binaryTokens;
-
- private int lastTokenEndIndex;
-
- LineTokens(boolean emitBinaryTokens, String lineText) {
+
+ private int lastTokenEndIndex = 0;
+
+ private final List tokenTypeOverrides;
+
+ @Nullable
+ private final BalancedBracketSelectors balancedBracketSelectors;
+
+ LineTokens(final boolean emitBinaryTokens, final String lineText, final List tokenTypeOverrides,
+ @Nullable final BalancedBracketSelectors balancedBracketSelectors) {
this.emitBinaryTokens = emitBinaryTokens;
- this.lineText = LOGGER.isLoggable(Level.FINEST) ? lineText : null; // store line only if it's logged
+ this.lineText = LOGGER.isLoggable(TRACE) ? lineText : null; // store line only if it's logged
if (this.emitBinaryTokens) {
- this.tokens = null;
+ this.tokens = EMPTY_DEQUE;
this.binaryTokens = new ArrayList<>();
} else {
- this.tokens = new ArrayList<>();
- this.binaryTokens = null;
- }
- this.lastTokenEndIndex = 0;
- }
-
- public void produce(StackElement stack, int endIndex) {
+ this.tokens = new ArrayDeque<>();
+ this.binaryTokens = Collections.emptyList();
+ }
+ this.tokenTypeOverrides = tokenTypeOverrides;
+ this.balancedBracketSelectors = balancedBracketSelectors;
+ }
+
+ void produce(final StackElement stack, final int endIndex) {
this.produceFromScopes(stack.contentNameScopesList, endIndex);
- }
+ }
- public void produceFromScopes(ScopeListElement scopesList, int endIndex) {
+ void produceFromScopes(final ScopeListElement scopesList, final int endIndex) {
if (this.lastTokenEndIndex >= endIndex) {
return;
}
if (this.emitBinaryTokens) {
int metadata = scopesList.metadata;
- if (!this.binaryTokens.isEmpty() && this.binaryTokens.get(this.binaryTokens.size() - 1) == metadata) {
+ var containsBalancedBrackets = false;
+ final var balancedBracketSelectors = this.balancedBracketSelectors;
+ if (balancedBracketSelectors != null && balancedBracketSelectors.matchesAlways()) {
+ containsBalancedBrackets = true;
+ }
+
+ if (!tokenTypeOverrides.isEmpty() || (balancedBracketSelectors != null
+ && !balancedBracketSelectors.matchesAlways() && !balancedBracketSelectors.matchesNever())) {
+ // Only generate scope array when required to improve performance
+ final var scopes = scopesList.generateScopes();
+ for (final var tokenType : tokenTypeOverrides) {
+ if (tokenType.getMatcher().matches(scopes)) {
+ metadata = StackElementMetadata.set(
+ metadata,
+ 0,
+ tokenType.getType(), // toOptionalTokenType(tokenType.type),
+ null,
+ FontStyle.NotSet,
+ 0,
+ 0);
+ }
+ }
+ if (balancedBracketSelectors != null) {
+ containsBalancedBrackets = balancedBracketSelectors.match(scopes);
+ }
+ }
+
+ if (containsBalancedBrackets) {
+ metadata = StackElementMetadata.set(
+ metadata,
+ 0,
+ OptionalStandardTokenType.NotSet,
+ containsBalancedBrackets,
+ FontStyle.NotSet,
+ 0,
+ 0);
+ }
+
+ if (!this.binaryTokens.isEmpty() && getLastElement(this.binaryTokens) == metadata) {
// no need to push a token with the same metadata
this.lastTokenEndIndex = endIndex;
return;
}
+ if (LOGGER.isLoggable(TRACE)) {
+ final List scopes = scopesList.generateScopes();
+ LOGGER.log(TRACE, " token: |" +
+ castNonNull(this.lineText)
+ .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex)
+ .replace("\n", "\\n")
+ + '|');
+ for (final String scope : scopes) {
+ LOGGER.log(TRACE, " * " + scope);
+ }
+ }
+
this.binaryTokens.add(this.lastTokenEndIndex);
this.binaryTokens.add(metadata);
@@ -82,52 +151,55 @@ public void produceFromScopes(ScopeListElement scopesList, int endIndex) {
return;
}
- List scopes = scopesList.generateScopes();
+ final List scopes = scopesList.generateScopes();
- if (this.lineText != null) {
- LOGGER.info(" token: |" + this.lineText.substring(this.lastTokenEndIndex, endIndex).replaceAll("\n", "\\n") + '|');
- for (String scope : scopes) {
- LOGGER.info(" * " + scope);
+ if (LOGGER.isLoggable(TRACE)) {
+ LOGGER.log(TRACE, " token: |" +
+ castNonNull(this.lineText)
+ .substring(this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0, endIndex)
+ .replace("\n", "\\n")
+ + '|');
+ for (final String scope : scopes) {
+ LOGGER.log(TRACE, " * " + scope);
}
}
- this.tokens.add(new Token(this.lastTokenEndIndex, endIndex, scopes));
+
+ this.tokens.add(new Token(
+ this.lastTokenEndIndex >= 0 ? this.lastTokenEndIndex : 0,
+ endIndex,
+ scopes));
this.lastTokenEndIndex = endIndex;
}
-
- public IToken[] getResult(StackElement stack, int lineLength) {
- if (!this.tokens.isEmpty() && this.tokens.get(this.tokens.size() - 1).getStartIndex() == lineLength - 1) {
- // pop produced token for newline
- this.tokens.remove(this.tokens.size() - 1);
- }
-
- if (this.tokens.isEmpty()) {
- this.lastTokenEndIndex = -1;
- this.produce(stack, lineLength);
- this.tokens.get(this.tokens.size() - 1).setStartIndex(0);
- }
-
- return this.tokens.toArray(new IToken[0]);
- }
- public int[] getBinaryResult(StackElement stack, int lineLength) {
- if (!this.binaryTokens.isEmpty() && this.binaryTokens.get(this.binaryTokens.size() - 2) == lineLength - 1) {
+ IToken[] getResult(final StackElement stack, final int lineLength) {
+ if (!this.tokens.isEmpty() && this.tokens.getLast().getStartIndex() == lineLength - 1) {
// pop produced token for newline
- this.binaryTokens.remove(this.binaryTokens.size() - 1);
- this.binaryTokens.remove(this.binaryTokens.size() - 1);
+ this.tokens.removeLast();
}
- if (this.binaryTokens.isEmpty()) {
+ if (this.tokens.isEmpty()) {
this.lastTokenEndIndex = -1;
this.produce(stack, lineLength);
- this.binaryTokens.set(this.binaryTokens.size() - 2, 0);
+ this.tokens.getLast().setStartIndex(0);
}
- int[] result = new int[this.binaryTokens.size()];
- for (int i = 0, len = this.binaryTokens.size(); i < len; i++) {
- result[i] = this.binaryTokens.get(i);
+ return this.tokens.toArray(IToken[]::new);
+ }
+
+ int[] getBinaryResult(final StackElement stack, final int lineLength) {
+ if (!this.binaryTokens.isEmpty() && this.binaryTokens.get(binaryTokens.size() - 2) == lineLength - 1) {
+ // pop produced token for newline
+ removeLastElement(this.binaryTokens);
+ removeLastElement(this.binaryTokens);
}
- return result;
- }
-}
+ if (this.binaryTokens.isEmpty()) {
+ this.lastTokenEndIndex = -1;
+ this.produce(stack, lineLength);
+ this.binaryTokens.set(binaryTokens.size() - 2, 0);
+ }
+
+ return binaryTokens.stream().mapToInt(Integer::intValue).toArray();
+ }
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java
index 4d5c7388b..7f67b97f0 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/LocalStackElement.java
@@ -13,25 +13,16 @@
* Contributors:
* - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
* - Angelo Zerr - translation and adaptation to Java
- */
-package org.eclipse.tm4e.core.internal.grammar;
-
-class LocalStackElement {
-
- private final ScopeListElement scopes;
- private final int endPos;
-
- public LocalStackElement(ScopeListElement scopes, int endPos) {
- this.scopes = scopes;
- this.endPos = endPos;
- }
-
- public ScopeListElement getScopes() {
- return scopes;
- }
-
- public int getEndPos() {
- return endPos;
- }
-
-}
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+final class LocalStackElement {
+
+ final ScopeListElement scopes;
+ final int endPos;
+
+ LocalStackElement(final ScopeListElement scopes, final int endPos) {
+ this.scopes = scopes;
+ this.endPos = endPos;
+ }
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/MetadataConsts.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/MetadataConsts.java
index b1e567587..1a93039c5 100644
--- a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/MetadataConsts.java
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/MetadataConsts.java
@@ -9,45 +9,52 @@
* Contributors:
* Angelo Zerr - initial API and implementation
*/
-package org.eclipse.tm4e.core.internal.grammar;
-
-/**
- * Helpers to manage the "collapsed" metadata of an entire StackElement stack.
- * The following assumptions have been made:
- * - languageId < 256 => needs 8 bits
- * - unique color count < 512 => needs 9 bits
- *
- * The binary format is:
- * - -------------------------------------------
- * 3322 2222 2222 1111 1111 1100 0000 0000
- * 1098 7654 3210 9876 5432 1098 7654 3210
- * - -------------------------------------------
- * xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
- * bbbb bbbb bfff ffff ffFF FTTT LLLL LLLL
- * - -------------------------------------------
- * - L = LanguageId (8 bits)
- * - T = StandardTokenType (3 bits)
- * - F = FontStyle (3 bits)
- * - f = foreground color (9 bits)
- * - b = background color (9 bits)
- */
-public class MetadataConsts {
+package org.eclipse.tm4e.core.internal.grammar;
+
+/**
+ * Helpers to manage the "collapsed" metadata of an entire StackElement stack.
+ * The following assumptions have been made:
+ * - languageId < 256 => needs 8 bits
+ * - unique color count < 512 => needs 9 bits
+ *
+ * The binary format is:
+ * - -------------------------------------------
+ * 3322 2222 2222 1111 1111 1100 0000 0000
+ * 1098 7654 3210 9876 5432 1098 7654 3210
+ * - -------------------------------------------
+ * xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx
+ * bbbb bbbb ffff ffff fFFF FBTT LLLL LLLL
+ * - -------------------------------------------
+ * - L = LanguageId (8 bits)
+ * - T = StandardTokenType (2 bits)
+ * - B = Balanced bracket (1 bit)
+ * - F = FontStyle (4 bits)
+ * - f = foreground color (9 bits)
+ * - b = background color (9 bits)
+ *
+ * @see
+ * github.com/Microsoft/vscode-textmate/blob/master/src/metadata.ts
+ */
+final class MetadataConsts {
/**
* content should be accessed statically
*/
private MetadataConsts() {
- }
-
- public static final int LANGUAGEID_MASK = 0b00000000000000000000000011111111;
- public static final int TOKEN_TYPE_MASK = 0b00000000000000000000011100000000;
- public static final int FONT_STYLE_MASK = 0b00000000000000000011100000000000;
- public static final int FOREGROUND_MASK = 0b00000000011111111100000000000000;
- public static final int BACKGROUND_MASK = 0b11111111100000000000000000000000;
-
- public static final int LANGUAGEID_OFFSET = 0;
- public static final int TOKEN_TYPE_OFFSET = 8;
- public static final int FONT_STYLE_OFFSET = 11;
- public static final int FOREGROUND_OFFSET = 14;
- public static final int BACKGROUND_OFFSET = 23;
-}
+ }
+
+ static final int LANGUAGEID_MASK = 0b00000000000000000000000011111111;
+ static final int TOKEN_TYPE_MASK = 0b00000000000000000000001100000000;
+ static final int BALANCED_BRACKETS_MASK = 0b00000000000000000000010000000000;
+ static final int FONT_STYLE_MASK = 0b00000000000000000111100000000000;
+ static final int FOREGROUND_MASK = 0b00000000111111111000000000000000;
+ static final int BACKGROUND_MASK = 0b11111111000000000000000000000000;
+
+ static final int LANGUAGEID_OFFSET = 0;
+ static final int TOKEN_TYPE_OFFSET = 8;
+ static final int BALANCED_BRACKETS_OFFSET = 10;
+ static final int FONT_STYLE_OFFSET = 11;
+ static final int FOREGROUND_OFFSET = 15;
+ static final int BACKGROUND_OFFSET = 24;
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/OptionalStandardTokenType.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/OptionalStandardTokenType.java
new file mode 100644
index 000000000..b1139aefc
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/OptionalStandardTokenType.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2022 Sebastian Thomschke and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Initial code from https://github.com/Microsoft/vscode-textmate/
+ * Initial copyright Copyright (C) Microsoft Corporation. All rights reserved.
+ * Initial license: MIT
+ *
+ * Contributors:
+ * - Microsoft Corporation: Initial code, written in TypeScript, licensed under MIT license
+ * - Sebastian Thomschke - translation and adaptation to Java
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+/**
+ * Standard TextMate token type.
+ */
+final class OptionalStandardTokenType {
+
+ /**
+ * Content should be accessed statically
+ */
+ private OptionalStandardTokenType() {
+ }
+
+ static final int Other = StandardTokenType.Other;
+ static final int Comment = StandardTokenType.Comment;
+ static final int String = StandardTokenType.String;
+ static final int RegEx = StandardTokenType.RegEx;
+
+ /**
+ * Indicates that no token type is set.
+ */
+ static final int NotSet = 8;
+}
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawCaptures.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawCaptures.java
new file mode 100644
index 000000000..2d86b8bc8
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawCaptures.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2022 Sebastian Thomschke and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+import java.util.HashMap;
+
+import org.eclipse.tm4e.core.internal.parser.PropertySettable;
+import org.eclipse.tm4e.core.internal.types.IRawCaptures;
+import org.eclipse.tm4e.core.internal.types.IRawRule;
+import org.eclipse.tm4e.core.internal.utils.DeepCloneable;
+
+public class RawCaptures extends HashMap implements IRawCaptures, DeepCloneable, PropertySettable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public RawCaptures deepClone() {
+ final var clone = new RawCaptures();
+ for (final var entry : entrySet()) {
+ clone.put(entry.getKey(), DeepCloneable.deepClone(entry.getValue()));
+ }
+ return clone;
+ }
+
+ @Override
+ public IRawRule getCapture(final String captureId) {
+ return get(captureId);
+ }
+
+ @Override
+ public Iterable getCaptureIds() {
+ return keySet();
+ }
+
+ @Override
+ public void setProperty(final String name, final IRawRule value) {
+ put(name, value);
+ }
+}
\ No newline at end of file
diff --git a/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawGrammar.java b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawGrammar.java
new file mode 100644
index 000000000..876e5f225
--- /dev/null
+++ b/org.eclipse.tm4e.core/src/main/java/org/eclipse/tm4e/core/internal/grammar/RawGrammar.java
@@ -0,0 +1,179 @@
+/**
+ * Copyright (c) 2015-2019 Angelo ZERR.
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Angelo Zerr - initial API and implementation
+ * Pierre-Yves B. - Issue #221 NullPointerException when retrieving fileTypes
+ */
+package org.eclipse.tm4e.core.internal.grammar;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tm4e.core.internal.parser.PropertySettable;
+import org.eclipse.tm4e.core.internal.types.IRawGrammar;
+import org.eclipse.tm4e.core.internal.types.IRawRepository;
+import org.eclipse.tm4e.core.internal.types.IRawRule;
+import org.eclipse.tm4e.core.internal.utils.DeepCloneable;
+
+public class RawGrammar extends HashMap
+ implements IRawGrammar, DeepCloneable, PropertySettable