diff --git a/.gitignore b/.gitignore
index 11c162f80..5a3d2e4db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,13 +9,24 @@
.idea/modules
.idea/modules.xml
.idea/encodings.xml
+.idea/codeStyles
+.idea/kotlinScripting.xml
/out/
/build/
+/buildsrc/build
+/buildsrc/.gradle
/common/build/
/rt-ant/build/
/.gradle/
-Hybris-Integration.zip
-
**/.directory
+/.idea/consolestorage/
+/.idea/dictionaries/
+/.idea/inspectionProfiles/
+/.idea/compiler.xml
+/.idea/dataSources.xml
+/.idea/jarRepositories.xml
+/.idea/misc.xml
+/.idea/vcs.xml
+/.idea/.gitignore
diff --git a/.idea/copyright/LGPL.xml b/.idea/copyright/LGPL.xml
index 169e8ed8a..6bdb18a1d 100644
--- a/.idea/copyright/LGPL.xml
+++ b/.idea/copyright/LGPL.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 20fc4709a..d6c7c58dd 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -1,18 +1,21 @@
+
+
+
-
+
+
+
-
-
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index d5d79e0ca..000000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 94a25f7f4..e44deea92 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,5 +2,6 @@
+
\ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 920c6782a..c0f392ba5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,6 @@
* Please read [Contributor License Agreement](http://developercertificate.org)
-* Available tasks are in our JIRA: [IIP](https://hybris-integration.atlassian.net/projects/IIP) and [IIPS](https://hybris-integration.atlassian.net/projects/IIPS) (requires a login but you can [sign-up](https://hybris-integration.atlassian.net/admin/users/sign-up))
-* [How to Configure Project Environment For Plugin Developers](https://hybris-integration.atlassian.net/wiki/spaces/IIPPS/pages/9863192/How+to+Configure+Project+Environment+For+Plugin+Developers")
+* Available tasks are in our [project board](https://github.com/epam/sap-commerce-intellij-idea-plugin/projects/1)
+* [How to Configure Project Environment For Plugin Developers](https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/setting_up_environment.html)
* We are working with [Pull Requests](https://help.github.com/articles/about-pull-requests/). You need to fork this repository, implement a feature in a separate branch, then send us a pull request.
* Be sure to include into your pull request and all commit messages the following line: "Signed-off-by: Your Real Name your.email@email.com" otherwise it can not be accepted. Use your real name (sorry, no pseudonyms or anonymous contributions).
-* For additional questions you can send an [email](mailto:AlexanderBartash@gmail.com?cc=martin.zdarsky@hybris.com).
+* For additional questions you can send an [email](mailto:hybrisideaplugin@epam.com).
\ No newline at end of file
diff --git a/README.md b/README.md
index a86d944fc..843e47aff 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
-[](https://opencollective.com/hybris-integration-intellij-idea-plugin)
-[](https://hybris-integration.atlassian.net/projects/IIPS)
-[](mailto:AlexanderBartash@gmail.com?cc=martin.zdarsky@hybris.com)
+[](mailto:hybrisideaplugin@epam.com) [](https://gitter.im/sap-commerce-intellij-idea-plugin/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Licence ##
[GNU Lesser General Public License 3.0](http://www.gnu.org/licenses/)
Copyright (C) 2014-2016 Alexander Bartash
+Copyright (C) 2019 EPAM Systems
+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
@@ -20,47 +20,23 @@ See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see .
-## Hybris Integration Intellij IDEA Plugin ##
+## SAP Commerce Developers Toolset ##
-This plugin provides [hybris](https://hybris.com/) integration into [Intellij IDEA](https://www.jetbrains.com/idea/) and another IDE based on it.
-You can install this plugin to your IDE directly from the [repository](https://plugins.jetbrains.com/plugin/7525) by clicking on the ["Browse Repositories"](https://www.jetbrains.com/idea/help/installing-updating-and-uninstalling-repository-plugins.html) button in Settings/Plugins dialog.
+This plugin provides [SAP Commerce](https://www.sap.com/products/crm/e-commerce-platforms.html) integration into [Intellij IDEA](https://www.jetbrains.com/idea/) and another IDE based on it.
## Contribution guidelines ##
* Please read [Contributor License Agreement](http://developercertificate.org)
-* Available tasks are in our JIRA: [IIP](https://hybris-integration.atlassian.net/projects/IIP) and [IIPS](https://hybris-integration.atlassian.net/projects/IIPS) (requires a login but you can [sign-up](https://hybris-integration.atlassian.net/admin/users/sign-up))
-* [How to Configure Project Environment For Plugin Developers](https://hybris-integration.atlassian.net/wiki/spaces/IIPPS/pages/9863192/How+to+Configure+Project+Environment+For+Plugin+Developers")
+* Available tasks are in our [project board](https://github.com/epam/sap-commerce-intellij-idea-plugin/projects/1)
+* [How to Configure Project Environment For Plugin Developers](https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/setting_up_environment.html)
* We are working with [Pull Requests](https://help.github.com/articles/about-pull-requests/). You need to fork this repository, implement a feature in a separate branch, then send us a pull request.
* Be sure to include into your pull request and all commit messages the following line: "Signed-off-by: Your Real Name your.email@email.com" otherwise it can not be accepted. Use your real name (sorry, no pseudonyms or anonymous contributions).
-* For additional questions you can send an [email](mailto:AlexanderBartash@gmail.com?cc=martin.zdarsky@hybris.com).
-
-### Backers
-
-Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/hybris-integration-intellij-idea-plugin#backer)]
-
-
-
-### Sponsors
-
-Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/hybris-integration-intellij-idea-plugin#sponsor)]
-
-
-
-
-
-
-
-
-
-
-
+* For additional questions you can send an [email](mailto:hybrisideaplugin@epam.com).
### Contributors and Developers
This project exists thanks to all the people who contribute.
-
-
* Alexander Bartash
* Vlad Bozhenok
* Martin Zdarsky-Jones
@@ -79,3 +55,13 @@ This project exists thanks to all the people who contribute.
* Fabian Necci
* Markus Perndorfer
* FAIR Consulting Group
+* Mykyta Kostiuk
+* Dmytro Lytvynenko
+* Oleksandr Shkurat
+* Maxim Bilohay
+* Eugene Koryakin
+* Yevhenii Koshevyi
+* Mykhailo Lytvyn
+* Viktors Jengovatovs
+* Rustam Burmenskyi
+* Oleksandr Dihtiar
\ No newline at end of file
diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml
deleted file mode 100644
index 12fe5d27a..000000000
--- a/bitbucket-pipelines.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-# This is a sample build configuration for Java (Gradle).
-# Check our guides at https://confluence.atlassian.com/x/zd-5Mw for more examples.
-# Only use spaces to indent your .yml configuration.
-# -----
-# You can specify a custom docker image from Docker Hub as your build environment.
-image: java:8
-
-pipelines:
- default:
- - step:
- caches:
- - gradle
- script: # Modify the commands below to build your repository.
- # You must commit the Gradle wrapper to your repository
- # https://docs.gradle.org/current/userguide/gradle_wrapper.html
- - bash ./gradlew buildPlugin
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index b41bed5db..000000000
--- a/build.gradle
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * This file is part of "hybris integration" plugin for Intellij IDEA.
- * Copyright (C) 2014-2016 Alexander Bartash
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-buildscript {
- repositories {
- mavenCentral()
-
- //noinspection GroovyAssignabilityCheck
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
-
- dependencies {
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath "gradle.plugin.org.jetbrains.intellij.plugins:gradle-intellij-plugin:$gradleIntellijPluginVersion"
- }
-}
-
-apply from: "community.gradle"
-
-dependencies {
- compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
- //compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
- //testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
- //testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
-
- compile "commons-codec:commons-codec:1.12"
- compile "commons-io:commons-io:2.6"
- compile "com.google.guava:guava:27.1-jre"
- compile "com.google.code.findbugs:jsr305:3.0.2"
- compile "org.apache.commons:commons-lang3:3.9"
- compile "org.apache.commons:commons-collections4:4.3"
- compile "org.apache.maven:maven-model:3.6.1"
- compile "com.wutka:dtdparser:1.21"
-
- compile("org.apache.solr:solr-solrj:8.0.0") {
- exclude group: 'org.slf4j', module: 'slf4j-api'
- exclude group: 'org.apache.httpcomponents', module: 'httpclient'
- exclude group: 'org.apache.httpcomponents', module: 'httpcore'
- exclude group: 'org.apache.httpcomponents', module: 'httpmime'
- }
-
- compile "com.github.ben-manes.caffeine:caffeine:2.7.0"
- compile "org.jsoup:jsoup:1.11.3"
-
- testCompile "org.mockito:mockito-core:2.27.0"
-
- compile project("common")
- compile project("rt-ant")
-}
-
-
-//noinspection GroovyAssignabilityCheck
-task addPsiViewerPlugin {
- def majorIntellijVersion = (intelijVersion as String).split("\\.").first()
- def psiVersion = findProperty("psiViewerVersions.$majorIntellijVersion")
- if (psiVersion != null) {
- intellij.plugins += "PsiViewer:$psiVersion"
- }
-}
-
-prepareSandbox.finalizedBy addPsiViewerPlugin
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 000000000..6045aa0da
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,114 @@
+/*
+ * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * Copyright (C) 2019-2020 EPAM Systems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+
+plugins {
+ idea
+ kotlin("jvm")
+ id("org.jetbrains.intellij") version "1.7.0"
+}
+
+sourceSets.main {
+ java.srcDirs(
+ file("src"),
+ file("gen")
+ )
+ resources.srcDir(file("resources"))
+}
+
+allprojects {
+ apply {
+ plugin("java")
+ }
+
+ repositories {
+ mavenCentral()
+ }
+
+ java {
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
+ }
+
+}
+
+intellij {
+ type.set(platformType)
+ version.set(platformVersion)
+ pluginName.set(pluginName_)
+ downloadSources.set(platformDownloadSources)
+ updateSinceUntilBuild.set(intellijUpdateSinceUntilBuild)
+
+ // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
+ plugins.addAll(*platformPlugins.split(',').map(String::trim).filter(String::isNotEmpty).toTypedArray())
+}
+
+tasks {
+
+ withType().configureEach {
+ kotlinOptions {
+ jvmTarget = sourceVersion
+ apiVersion = kotlinApiVersion
+ languageVersion = kotlinApiVersion
+ }
+ }
+
+ runIde {
+ jvmArgs = listOf(intellijJvmArgs)
+ }
+
+ patchPluginXml {
+ version.set(pluginVersion)
+ sinceBuild.set(pluginSinceBuild)
+ untilBuild.set(pluginUntilBuild)
+ }
+
+ runPluginVerifier {
+ ideVersions.addAll(pluginVerifierIdeVersions)
+ }
+
+ clean {
+ doFirst {
+ delete("out")
+ }
+ }
+}
+
+dependencies {
+
+ implementation(kotlin("stdlib"))
+ implementation("org.jsoup:jsoup:$jsoupVersion")
+ implementation("com.wutka:dtdparser:$dtdparserVersion")
+ implementation("commons-io:commons-io:$commonsIOVersion")
+ implementation("com.google.code.findbugs:jsr305:$findbugsVersion")
+ implementation("org.apache.maven:maven-model:$mavenModelVersion")
+ implementation("commons-codec:commons-codec:$commonsCodecVersion")
+ implementation("org.apache.commons:commons-lang3:$commonsLang3Version")
+ implementation("com.github.ben-manes.caffeine:caffeine:$caffeineVersion")
+ implementation("org.apache.commons:commons-collections4:$commonsCollections4Version")
+
+ implementation("org.apache.solr:solr-solrj:$solrjVersion") {
+ exclude("org.slf4j", "slf4j-api")
+ exclude("org.apache.httpcomponents", "httpclient")
+ exclude("org.apache.httpcomponents", "httpcore")
+ exclude("org.apache.httpcomponents", "httpmime")
+ }
+
+ implementation(project(":rt-ant"))
+}
+
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
new file mode 100644
index 000000000..de2b702bb
--- /dev/null
+++ b/buildSrc/build.gradle.kts
@@ -0,0 +1,31 @@
+/*
+ * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * Copyright (C) 2019-2020 EPAM Systems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+plugins {
+ `kotlin-dsl`
+}
+
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ val kotlin = "1.7.0"
+ implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin")
+}
diff --git a/buildSrc/src/main/kotlin/configuration.kt b/buildSrc/src/main/kotlin/configuration.kt
new file mode 100644
index 000000000..bba271f6c
--- /dev/null
+++ b/buildSrc/src/main/kotlin/configuration.kt
@@ -0,0 +1,46 @@
+/*
+ * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * Copyright (C) 2019-2020 EPAM Systems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+const val sourceVersion="11"
+const val kotlinApiVersion="1.5"
+
+
+// https://www.jetbrains.com/intellij-repository/releases
+// https://www.jetbrains.com/intellij-repository/snapshots
+// https://www.jetbrains.org/intellij/sdk/docs/reference_guide/intellij_artifacts.html
+// https://data.services.jetbrains.com/products?fields=code,name,releases.downloads,releases.version,releases.build,releases.type&code=IIC,IIU
+
+const val intellijJvmArgs="-Xmx2G"
+const val intellijUpdateSinceUntilBuild=true
+
+const val pluginName_ = "SAP-Commerce-Developers-Toolset"
+const val pluginVersion = "2022.2"
+const val pluginSinceBuild = "222.3345.118"
+const val pluginUntilBuild = "222.*"
+
+// Plugin Verifier integration -> https://github.com/JetBrains/intellij-plugin-verifier
+// https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
+// See https://jb.gg/intellij-platform-builds-list for available build versions
+const val pluginVerifierIdeVersions = "IIU-221.5080.40"
+
+const val platformType = "IU"
+const val platformVersion = "222.3345.118"
+const val platformDownloadSources = true
+// Plugin Dependencies -> https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html
+// Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
+const val platformPlugins = "ant, Spring, uml, junit, JavaEE, maven, eclipse, gradle, properties, Groovy, java-i18n, PersistenceSupport, CSS, java, gradle-java, PsiViewer:222-SNAPSHOT, copyright"
diff --git a/buildSrc/src/main/kotlin/dependencies.kt b/buildSrc/src/main/kotlin/dependencies.kt
new file mode 100644
index 000000000..77f9f9927
--- /dev/null
+++ b/buildSrc/src/main/kotlin/dependencies.kt
@@ -0,0 +1,11 @@
+const val antVersion="1.10.9"
+const val solrjVersion="8.7.0"
+const val jsoupVersion="1.11.3"
+const val dtdparserVersion="1.21"
+const val caffeineVersion="2.8.6"
+const val findbugsVersion="3.0.2"
+const val commonsIOVersion="2.8.0"
+const val mavenModelVersion="3.6.3"
+const val commonsCodecVersion="1.15"
+const val commonsLang3Version="3.11"
+const val commonsCollections4Version="4.4"
diff --git a/community.gradle b/community.gradle
deleted file mode 100644
index f660f0b10..000000000
--- a/community.gradle
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * This file is part of "hybris integration" plugin for Intellij IDEA.
- * Copyright (C) 2014-2016 Alexander Bartash
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-repositories {
- mavenCentral()
-}
-
-//noinspection GroovyAssignabilityCheck
-allprojects {
- repositories {
- //noinspection GroovyAssignabilityCheck
- maven {
- url "https://jcenter.bintray.com"
- }
- }
-
- apply plugin: "kotlin"
-
- // Set source version for Java code
- sourceCompatibility = sourceVersion
- targetCompatibility = sourceVersion
-
- // Set source version for Kotlin code
- compileKotlin {
- kotlinOptions {
- jvmTarget = sourceVersion
- }
- }
-
- sourceSets {
- main {
- java.srcDirs "src", "gen"
- resources.srcDirs "resources"
- }
-
- test {
- java.srcDir "tests"
- }
- }
-
- //compileJava {
- // options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
- //}
-
- //compileTestJava {
- // options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
- //}
-
- //
- // https://github.com/JetBrains/gradle-intellij-plugin
- //
- apply plugin: "org.jetbrains.intellij"
- intellij {
- setType(intelijType)
- setVersion(intelijVersion)
- setUpdateSinceUntilBuild(intellijUpdateSinceUntilBuild.toBoolean())
- setPlugins((intelijPlugins as String).split(", "))
-
- runIde {
- jvmArgs intellijJvmArgs
- }
- }
-
- patchPluginXml {
- sinceBuild intellijSinceBuild
- }
-
- // Remove Intellij build output directory
- //noinspection GroovyAssignabilityCheck
- clean.doFirst {
- delete "out"
- }
-}
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/ImpexParser.java b/gen/com/intellij/idea/plugin/hybris/impex/ImpexParser.java
index e34fa9647..e224768e4 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/ImpexParser.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/ImpexParser.java
@@ -6,7 +6,6 @@
import static com.intellij.idea.plugin.hybris.impex.psi.ImpexTypes.*;
import static com.intellij.idea.plugin.hybris.impex.utils.ImpexParserUtils.*;
import com.intellij.psi.tree.IElementType;
-import com.intellij.psi.tree.IFileElementType;
import com.intellij.lang.ASTNode;
import com.intellij.psi.tree.TokenSet;
import com.intellij.lang.PsiParser;
@@ -24,16 +23,15 @@ public void parseLight(IElementType t, PsiBuilder b) {
boolean r;
b = adapt_builder_(t, b, this, EXTENDS_SETS_);
Marker m = enter_section_(b, 0, _COLLAPSE_, null);
- if (t instanceof IFileElementType) {
- r = parse_root_(t, b, 0);
- }
- else {
- r = false;
- }
+ r = parse_root_(t, b);
exit_section_(b, 0, m, t, r, true, TRUE_CONDITION);
}
- protected boolean parse_root_(IElementType t, PsiBuilder b, int l) {
+ protected boolean parse_root_(IElementType t, PsiBuilder b) {
+ return parse_root_(t, b, 0);
+ }
+
+ static boolean parse_root_(IElementType t, PsiBuilder b, int l) {
return impexFile(b, l + 1);
}
@@ -129,7 +127,7 @@ public static boolean any_header_parameter_name(PsiBuilder b, int l) {
if (!r) r = macro_usage_dec(b, l + 1);
if (!r) r = consumeToken(b, DOCUMENT_ID);
if (!r) r = consumeToken(b, FUNCTION);
- exit_section_(b, l, m, r, false, recover_parameter_name_parser_);
+ exit_section_(b, l, m, r, false, ImpexParser::recover_parameter_name);
return r;
}
@@ -178,24 +176,15 @@ private static boolean bean_shell_1_0(PsiBuilder b, int l) {
}
/* ********************************************************** */
- // COMMENT_MARKER COMMENT_BODY?
+ // LINE_COMMENT
public static boolean comment(PsiBuilder b, int l) {
if (!recursion_guard_(b, l, "comment")) return false;
- if (!nextTokenIs(b, COMMENT_MARKER)) return false;
- boolean r, p;
- Marker m = enter_section_(b, l, _NONE_, COMMENT, null);
- r = consumeToken(b, COMMENT_MARKER);
- p = r; // pin = 1
- r = r && comment_1(b, l + 1);
- exit_section_(b, l, m, r, p, null);
- return r || p;
- }
-
- // COMMENT_BODY?
- private static boolean comment_1(PsiBuilder b, int l) {
- if (!recursion_guard_(b, l, "comment_1")) return false;
- consumeToken(b, COMMENT_BODY);
- return true;
+ if (!nextTokenIs(b, LINE_COMMENT)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, LINE_COMMENT);
+ exit_section_(b, m, COMMENT, r);
+ return r;
}
/* ********************************************************** */
@@ -209,7 +198,7 @@ public static boolean full_header_parameter(PsiBuilder b, int l) {
r = r && report_error_(b, full_header_parameter_1(b, l + 1));
r = p && report_error_(b, full_header_parameter_2(b, l + 1)) && r;
r = p && full_header_parameter_3(b, l + 1) && r;
- exit_section_(b, l, m, r, p, not_line_break_or_parameters_separator_parser_);
+ exit_section_(b, l, m, r, p, ImpexParser::not_line_break_or_parameters_separator);
return r || p;
}
@@ -246,7 +235,7 @@ public static boolean full_header_type(PsiBuilder b, int l) {
Marker m = enter_section_(b, l, _NONE_, FULL_HEADER_TYPE, "");
r = header_type_name(b, l + 1);
r = r && full_header_type_1(b, l + 1);
- exit_section_(b, l, m, r, false, not_line_break_or_parameters_separator_parser_);
+ exit_section_(b, l, m, r, false, ImpexParser::not_line_break_or_parameters_separator);
return r;
}
@@ -311,7 +300,7 @@ public static boolean header_type_name(PsiBuilder b, int l) {
boolean r;
Marker m = enter_section_(b, l, _NONE_, HEADER_TYPE_NAME, "");
r = consumeToken(b, HEADER_TYPE);
- exit_section_(b, l, m, r, false, recover_header_type_parser_);
+ exit_section_(b, l, m, r, false, ImpexParser::recover_header_type);
return r;
}
@@ -479,7 +468,7 @@ public static boolean modifiers(PsiBuilder b, int l) {
p = r; // pin = 1
r = r && report_error_(b, modifiers_1(b, l + 1));
r = p && consumeToken(b, RIGHT_SQUARE_BRACKET) && r;
- exit_section_(b, l, m, r, p, recover_modifiers_parser_);
+ exit_section_(b, l, m, r, p, ImpexParser::recover_modifiers);
return r || p;
}
@@ -647,7 +636,7 @@ public static boolean parameters(PsiBuilder b, int l) {
p = r; // pin = 1
r = r && report_error_(b, parameters_1(b, l + 1));
r = p && consumeToken(b, RIGHT_ROUND_BRACKET) && r;
- exit_section_(b, l, m, r, p, recover_parameters_parser_);
+ exit_section_(b, l, m, r, p, ImpexParser::recover_parameters);
return r || p;
}
@@ -798,7 +787,7 @@ private static boolean recover_parameters_0(PsiBuilder b, int l) {
// | HEADER_MODE_UPDATE
// | VALUE_SUBTYPE
// | FIELD_VALUE_SEPARATOR
- // | COMMENT_MARKER
+ // | LINE_COMMENT
// | macro_name_dec
// | BEAN_SHELL_MARKER
// | DOUBLE_STRING
@@ -821,7 +810,7 @@ static boolean recover_root(PsiBuilder b, int l) {
// | HEADER_MODE_UPDATE
// | VALUE_SUBTYPE
// | FIELD_VALUE_SEPARATOR
- // | COMMENT_MARKER
+ // | LINE_COMMENT
// | macro_name_dec
// | BEAN_SHELL_MARKER
// | DOUBLE_STRING
@@ -837,7 +826,7 @@ private static boolean recover_root_0(PsiBuilder b, int l) {
if (!r) r = consumeToken(b, HEADER_MODE_UPDATE);
if (!r) r = consumeToken(b, VALUE_SUBTYPE);
if (!r) r = consumeToken(b, FIELD_VALUE_SEPARATOR);
- if (!r) r = consumeToken(b, COMMENT_MARKER);
+ if (!r) r = consumeToken(b, LINE_COMMENT);
if (!r) r = macro_name_dec(b, l + 1);
if (!r) r = consumeToken(b, BEAN_SHELL_MARKER);
if (!r) r = consumeToken(b, DOUBLE_STRING);
@@ -854,7 +843,7 @@ static boolean root(PsiBuilder b, int l) {
Marker m = enter_section_(b, l, _NONE_);
r = consumeToken(b, CRLF);
if (!r) r = root_1(b, l + 1);
- exit_section_(b, l, m, r, false, recover_root_parser_);
+ exit_section_(b, l, m, r, false, ImpexParser::recover_root);
return r;
}
@@ -910,7 +899,7 @@ static boolean root_group(PsiBuilder b, int l) {
if (!r) r = bean_shell(b, l + 1);
if (!r) r = root_group_5(b, l + 1);
if (!r) r = macro_declaration(b, l + 1);
- exit_section_(b, l, m, r, false, not_line_break_parser_);
+ exit_section_(b, l, m, r, false, ImpexParser::not_line_break);
return r;
}
@@ -1188,39 +1177,4 @@ private static boolean value_line_1(PsiBuilder b, int l) {
return r;
}
- static final Parser not_line_break_or_parameters_separator_parser_ = new Parser() {
- public boolean parse(PsiBuilder b, int l) {
- return not_line_break_or_parameters_separator(b, l + 1);
- }
- };
- static final Parser not_line_break_parser_ = new Parser() {
- public boolean parse(PsiBuilder b, int l) {
- return not_line_break(b, l + 1);
- }
- };
- static final Parser recover_header_type_parser_ = new Parser() {
- public boolean parse(PsiBuilder b, int l) {
- return recover_header_type(b, l + 1);
- }
- };
- static final Parser recover_modifiers_parser_ = new Parser() {
- public boolean parse(PsiBuilder b, int l) {
- return recover_modifiers(b, l + 1);
- }
- };
- static final Parser recover_parameter_name_parser_ = new Parser() {
- public boolean parse(PsiBuilder b, int l) {
- return recover_parameter_name(b, l + 1);
- }
- };
- static final Parser recover_parameters_parser_ = new Parser() {
- public boolean parse(PsiBuilder b, int l) {
- return recover_parameters(b, l + 1);
- }
- };
- static final Parser recover_root_parser_ = new Parser() {
- public boolean parse(PsiBuilder b, int l) {
- return recover_root(b, l + 1);
- }
- };
}
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/ImpexTypes.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/ImpexTypes.java
index 080c40b8a..4daaab8f0 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/ImpexTypes.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/ImpexTypes.java
@@ -43,8 +43,6 @@ public interface ImpexTypes {
IElementType BEAN_SHELL_MARKER = new ImpexTokenType("BEAN_SHELL_MARKER");
IElementType BOOLEAN = new ImpexTokenType("BOOLEAN");
IElementType COMMA = new ImpexTokenType("COMMA");
- IElementType COMMENT_BODY = new ImpexTokenType("COMMENT_BODY");
- IElementType COMMENT_MARKER = new ImpexTokenType("COMMENT_MARKER");
IElementType CRLF = new ImpexTokenType("CRLF");
IElementType DEFAULT_KEY_VALUE_DELIMITER = new ImpexTokenType("DEFAULT_KEY_VALUE_DELIMITER");
IElementType DEFAULT_PATH_DELIMITER = new ImpexTokenType("DEFAULT_PATH_DELIMITER");
@@ -67,6 +65,7 @@ public interface ImpexTypes {
IElementType HEADER_TYPE = new ImpexTokenType("HEADER_TYPE");
IElementType LEFT_ROUND_BRACKET = new ImpexTokenType("LEFT_ROUND_BRACKET");
IElementType LEFT_SQUARE_BRACKET = new ImpexTokenType("LEFT_SQUARE_BRACKET");
+ IElementType LINE_COMMENT = new ImpexTokenType("LINE_COMMENT");
IElementType MACRO_NAME_DECLARATION = new ImpexTokenType("MACRO_NAME_DECLARATION");
IElementType MACRO_USAGE = new ImpexTokenType("MACRO_USAGE");
IElementType MACRO_VALUE = new ImpexTokenType("MACRO_VALUE");
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeNameImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeNameImpl.java
index d5a04cd14..674227dc0 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeNameImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeNameImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitAnyAttributeName(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeValueImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeValueImpl.java
index 60784fa84..7405e07e9 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeValueImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyAttributeValueImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitAnyAttributeValue(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderModeImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderModeImpl.java
index 19c379386..298bca5ae 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderModeImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderModeImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitAnyHeaderMode(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderParameterNameImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderParameterNameImpl.java
index a3259fd38..68af8c7df 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderParameterNameImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAnyHeaderParameterNameImpl.java
@@ -13,14 +13,15 @@
public class ImpexAnyHeaderParameterNameImpl extends ImpexAnyHeaderParameterNameMixin implements ImpexAnyHeaderParameterName {
- public ImpexAnyHeaderParameterNameImpl(@NotNull ASTNode node) {
- super(node);
+ public ImpexAnyHeaderParameterNameImpl(@NotNull ASTNode astNode) {
+ super(astNode);
}
public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitAnyHeaderParameterName(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAttributeImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAttributeImpl.java
index dc6e173ee..4daf7370b 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAttributeImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexAttributeImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitAttribute(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexBeanShellImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexBeanShellImpl.java
index 614bc4896..9fb6a9d61 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexBeanShellImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexBeanShellImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitBeanShell(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexCommentImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexCommentImpl.java
index 72833b022..c7e866aab 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexCommentImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexCommentImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitComment(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderParameterImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderParameterImpl.java
index bd8a52648..da6a8026c 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderParameterImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderParameterImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitFullHeaderParameter(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderTypeImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderTypeImpl.java
index e99a35749..c04bd0904 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderTypeImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexFullHeaderTypeImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitFullHeaderType(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderLineImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderLineImpl.java
index 30d01b328..32abd3091 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderLineImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderLineImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitHeaderLine(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderTypeNameImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderTypeNameImpl.java
index f69812a89..8857d2f91 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderTypeNameImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexHeaderTypeNameImpl.java
@@ -13,14 +13,15 @@
public class ImpexHeaderTypeNameImpl extends ImpexHeaderTypeNameMixin implements ImpexHeaderTypeName {
- public ImpexHeaderTypeNameImpl(@NotNull ASTNode node) {
- super(node);
+ public ImpexHeaderTypeNameImpl(@NotNull ASTNode astNode) {
+ super(astNode);
}
public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitHeaderTypeName(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroDeclarationImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroDeclarationImpl.java
index 3deff5473..107a816dc 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroDeclarationImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroDeclarationImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitMacroDeclaration(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroNameDecImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroNameDecImpl.java
index 29fa47021..ae7c7f9e2 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroNameDecImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroNameDecImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitMacroNameDec(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroUsageDecImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroUsageDecImpl.java
index 1170b014b..ee865d828 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroUsageDecImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroUsageDecImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitMacroUsageDec(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroValueDecImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroValueDecImpl.java
index 7a8bf6682..8ec6745ca 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroValueDecImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexMacroValueDecImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitMacroValueDec(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexModifiersImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexModifiersImpl.java
index 8955a85ef..6f2d17bba 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexModifiersImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexModifiersImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitModifiers(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParameterImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParameterImpl.java
index 117db9e60..f03fb89ff 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParameterImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParameterImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitParameter(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParametersImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParametersImpl.java
index b87ee7ccf..8ab17b396 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParametersImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexParametersImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitParameters(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexRootMacroUsageImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexRootMacroUsageImpl.java
index e9897176c..15054028a 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexRootMacroUsageImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexRootMacroUsageImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitRootMacroUsage(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexStringImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexStringImpl.java
index 96b2a42fc..ac12a721f 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexStringImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexStringImpl.java
@@ -20,6 +20,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitString(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexSubParametersImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexSubParametersImpl.java
index eb04573fe..5632b2ea0 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexSubParametersImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexSubParametersImpl.java
@@ -16,10 +16,12 @@ public ImpexSubParametersImpl(@NotNull ASTNode node) {
super(node);
}
+ @Override
public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitSubParameters(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueGroupImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueGroupImpl.java
index 548e2630a..c06a9ffd2 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueGroupImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueGroupImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitValueGroup(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueImpl.java
index cd18155bf..bc244bb1e 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitValue(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueLineImpl.java b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueLineImpl.java
index bd544c35e..d9f84f6aa 100644
--- a/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueLineImpl.java
+++ b/gen/com/intellij/idea/plugin/hybris/impex/psi/impl/ImpexValueLineImpl.java
@@ -21,6 +21,7 @@ public void accept(@NotNull ImpexVisitor visitor) {
visitor.visitValueLine(this);
}
+ @Override
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof ImpexVisitor) accept((ImpexVisitor)visitor);
else super.accept(visitor);
diff --git a/gradle.properties b/gradle.properties
index 828a1326f..31b0debad 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,25 +1,6 @@
-gradleIntellijPluginVersion=0.4.8
-
-kotlin_version=1.3.31
-kotlin.incremental.usePreciseJavaTracking=true
-
-sourceVersion=1.8
-
-# See for possible values:
-# https://www.jetbrains.com/intellij-repository/releases
-# https://www.jetbrains.com/intellij-repository/snapshots
-intelijType=IU
-# Leave empty to always build with the latest version
-intelijVersion=LATEST-EAP-SNAPSHOT
-intelijPlugins=ant, Spring, uml, junit, JavaEE, maven, eclipse, gradle, properties, Groovy, java-i18n, PersistenceSupport, CSS
-intellijJvmArgs=-Xmx2G
-intellijSinceBuild=191
-intellijUpdateSinceUntilBuild=false
-
-# https://plugins.jetbrains.com/plugin/227-psiviewer
-psiViewerVersions.182=182.2371.2
-psiViewerVersions.183=183.2153
-psiViewerVersions.191=191.4212
+# Opt-out flag for bundling Kotlin standard library.
+# See https://kotlinlang.org/docs/reference/using-gradle.html#dependency-on-the-standard-library for details.
+kotlin.stdlib.default.dependency = true
# This is required because after upgrading to Gradle 5.1.1 the daemon runs out of memory during compilation with the
# default value of 512m
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 070e6c851..d51447715 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -17,6 +17,6 @@
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/resources/META-INF/ant-support-optional-dependencies.xml b/resources/META-INF/ant-support-optional-dependencies.xml
index d3989355c..d3d6d9057 100644
--- a/resources/META-INF/ant-support-optional-dependencies.xml
+++ b/resources/META-INF/ant-support-optional-dependencies.xml
@@ -28,10 +28,4 @@
-
-
- com.intellij.idea.plugin.hybris.ant.AntTreeUpdatingHack
-
-
-
diff --git a/resources/META-INF/impex-optional-copyright.xml b/resources/META-INF/impex-optional-copyright.xml
new file mode 100644
index 000000000..572929cd3
--- /dev/null
+++ b/resources/META-INF/impex-optional-copyright.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/resources/META-INF/java-optional-dependencies.xml b/resources/META-INF/java-optional-dependencies.xml
index 656537418..8ac69ae6b 100644
--- a/resources/META-INF/java-optional-dependencies.xml
+++ b/resources/META-INF/java-optional-dependencies.xml
@@ -38,13 +38,9 @@
-
+
-
+
@@ -58,8 +54,7 @@
-
+
@@ -67,12 +62,10 @@
-
+
-
+
diff --git a/resources/META-INF/lang-optional-dependencies.xml b/resources/META-INF/lang-optional-dependencies.xml
index 535167940..a6bc3e7bf 100644
--- a/resources/META-INF/lang-optional-dependencies.xml
+++ b/resources/META-INF/lang-optional-dependencies.xml
@@ -42,6 +42,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -49,7 +89,7 @@
-
+
@@ -212,19 +252,13 @@
-
- com.intellij.idea.plugin.hybris.impex.assistance.ImpexHeaderHighlighterComponent
-
+ com.intellij.idea.plugin.hybris.impex.assistance.ImpexHeaderHighlighterComponent
-
- com.intellij.idea.plugin.hybris.project.components.HybrisProjectApplicationComponent
-
+ com.intellij.idea.plugin.hybris.project.components.HybrisProjectApplicationComponent
-
- com.intellij.idea.plugin.hybris.type.system.validation.TypeSystemValidationComponent
-
+ com.intellij.idea.plugin.hybris.type.system.validation.TypeSystemValidationComponent
@@ -235,6 +269,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -274,6 +327,18 @@
+
+
+
+
+
+
+
+
diff --git a/resources/META-INF/plugin-community.xml b/resources/META-INF/plugin-community.xml
index 4dcb19043..157461adb 100644
--- a/resources/META-INF/plugin-community.xml
+++ b/resources/META-INF/plugin-community.xml
@@ -17,9 +17,5 @@
-
- com.intellij.idea.plugin.hybris.statistics.StatsCollector
- com.intellij.idea.plugin.hybris.statistics.impl.DefaultStatsCollector
-
\ No newline at end of file
diff --git a/resources/META-INF/plugin-extensions.xml b/resources/META-INF/plugin-extensions.xml
index 4cc5514cb..c4eaa8e5a 100644
--- a/resources/META-INF/plugin-extensions.xml
+++ b/resources/META-INF/plugin-extensions.xml
@@ -6,8 +6,9 @@
icon="/icons/grayHybrisIcon.svg"
anchor="right"
secondary="true"
- conditionClass="com.intellij.idea.plugin.hybris.toolwindow.HybrisToolWindowCondition"
factoryClass="com.intellij.idea.plugin.hybris.toolwindow.HybrisToolWindow"/>
+
+
\ No newline at end of file
diff --git a/resources/META-INF/plugin-internal.xml b/resources/META-INF/plugin-internal.xml
index 08b244c69..7143981e6 100644
--- a/resources/META-INF/plugin-internal.xml
+++ b/resources/META-INF/plugin-internal.xml
@@ -47,12 +47,19 @@
+
com.intellij.idea.plugin.hybris.tools.remote.http.HybrisHacHttpClient
+
+
+ com.intellij.idea.plugin.hybris.tools.remote.http.solr.SolrHttpClient
+ com.intellij.idea.plugin.hybris.tools.remote.http.solr.impl.DefaultSolrHttpClient
+
+
diff --git a/resources/META-INF/plugin-release-info.xml b/resources/META-INF/plugin-release-info.xml
index 246b2b4fc..bdf35c059 100644
--- a/resources/META-INF/plugin-release-info.xml
+++ b/resources/META-INF/plugin-release-info.xml
@@ -1,40 +1,37 @@
- ccom.intellij.idea.plugin.hybris.impex
- hybris integration
- 10.5.1
+ com.intellij.idea.plugin.sap.commerce
+ SAP Commerce Developers Toolset
+ 2022.2
-
+
-
- Alexander Bartash
+
+ EPAM Systems
This plugin is a plugin for SAP Hybris Commerce integration.
- Bug tracker: Intellij IDEA Plugin Support
+ This plugin is a plugin for SAP Commerce integration.
If you have any questions you can send an email to:
Features:
- Import of Hybris extensions to Intellij IDEA with automatic dependency resolution and classpath configuration optimized for fast compilation and correct unit and integration tests execution.
+ Import of Hybris extensions to Intellij IDEA with automatic dependency resolution and classpath configuration optimized for fast compilation.
Automatic configuration of Spring, Web, Ant, Database Connector Intellij IDEA plugins.
- Import your custom Eclise, Maven and Gradle extensions together with Hybris platform.
- Custom editor for flexible Search queries with an ability to execute them on a remote Hybris instance right from your IDE by single click of a button.
- Custom editor for impex files with automatic formatting, find usages and go to declaration actions, validation and import of impexes into a remote Hybris instance right from your IDE by single click of a button.
+ Import your custom Eclipse, Maven and Gradle extensions together with Hybris platform.
+ Custom editor for flexible Search queries with an ability to execute them on a remote Hybris instance right from your IDE by a single click of a button.
+ Custom editor for impex files with automatic formatting, find usages and go to declaration actions, validation and import of impexes into a remote Hybris instance right from your IDE by a single click of a button.
Custom editor for items.xml with validation, best-practices analyses, quick-fix autosuggestion and easy navigation.
Custom editor for beans.xml with custom automated Intellij refactorings actions.
Visualization of business process graph (use context menu of the file "Diagrams/Show Diagram", only Ultimate IDEA).
Enhanced project view tree.
- JRebel and DCEVM support.
Execution of Flexible Search queries, Groovy scripts, Impexes though IDE using HAC Integration tool.
Execution of queries on remote Solr instances.
And much more
@@ -43,41 +40,16 @@
Contribution guidelines:
Please read Contributor License Agreement
- Available tasks are in our JIRA: IIP and IIPS (requires a login but you can sign-up )
- How to Configure Project Environment For Plugin Developers
+ Available tasks are in our board: Project board
+ How to Configure Project Environment For Plugin Developers
We are working with Pull Requests . You need to fork this repository, implement a feature in a separate branch, then send us a pull request.
- Be sure to include into your pull request and all commit messages the following line: "Signed-off-by: Your Real Name your.email@email.com" otherwise it can not be accepted. Use your real name (sorry, no pseudonyms or anonymous contributions).
- For additional questions you can send an email
+ Be sure to include into your pull request and all commit messages the following line: "Signed-off-by: Your Real Name your.email@email.com" otherwise it can not be accepted. Use your real name.
+ For additional questions you can send an email
- By installing thing plugin you agree to sending us anonymous statistics about plugin usage. We do not collect any information about you or your project. We just want to know which features from this plugin our users need most and learn new ways to make thing plugin better.
-
- Backers
- Thank you to all our backers!
-
-
-
-
- Sponsors
- Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
-
-
-
-
-
-
-
-
-
-
-
-
-
Contributors and Developers
This project exists thanks to all the people who contribute.
-
-
-
+
Alexander Bartash
Vlad Bozhenok
@@ -97,16 +69,29 @@
Fabian Necci
Markus Perndorfer
FAIR Consulting Group
+ Mykyta Kostiuk
+ Dmytro Lytvynenko
+ Oleksandr Shkurat
+ Maxim Bilohay
+ Eugene Koryakin
+ Yevhenii Koshevyi
+ Mykhailo Lytvyn
+ Viktors Jengovatovs
+ Oleksandr Dihtiar
+ Rustam Burmenskyi
+ Vladyslav Yanytskyi
]]>
Fault
- [IIPS-213 ] - Account for possibility of"-SNAPSHOT" in hybris version
+ New action 'Copy to Hybris console' for impex/fxs files
+ Exclude directories from index in `Settings`
+ Bug fixing
- ]]>
+ ]]>
+
diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml
index 043a1f70d..839877bef 100644
--- a/resources/META-INF/plugin.xml
+++ b/resources/META-INF/plugin.xml
@@ -22,8 +22,6 @@
- com.intellij.modules.lang
-
AntSupport
JUnit
org.jetbrains.idea.maven
@@ -36,9 +34,24 @@
com.intellij.diagram
com.intellij.properties
org.intellij.groovy
+ com.intellij.copyright
+
+
+
+
+
+
+
+
+
diff --git a/resources/META-INF/pluginIcon.svg b/resources/META-INF/pluginIcon.svg
new file mode 100644
index 000000000..136b6668c
--- /dev/null
+++ b/resources/META-INF/pluginIcon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/resources/META-INF/pluginIcon_dark.svg b/resources/META-INF/pluginIcon_dark.svg
new file mode 100644
index 000000000..39f4e738c
--- /dev/null
+++ b/resources/META-INF/pluginIcon_dark.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/resources/META-INF/spring-optional-dependencies.xml b/resources/META-INF/spring-optional-dependencies.xml
index c41158da8..c27ad183f 100644
--- a/resources/META-INF/spring-optional-dependencies.xml
+++ b/resources/META-INF/spring-optional-dependencies.xml
@@ -29,9 +29,6 @@
-
-
diff --git a/resources/fileTemplates/internal/Impex File.impex.ft b/resources/fileTemplates/internal/Impex File.impex.ft
index e69de29bb..5d6067f51 100644
--- a/resources/fileTemplates/internal/Impex File.impex.ft
+++ b/resources/fileTemplates/internal/Impex File.impex.ft
@@ -0,0 +1,3 @@
+UPDATE GenericItem[processor = de.hybris.platform.commerceservices.impex.impl.ConfigPropertyImportProcessor]; pk[unique = true]
+
+
diff --git a/resources/i18n/HybrisBundle.properties b/resources/i18n/HybrisBundle.properties
index 7808d9949..5637a4994 100644
--- a/resources/i18n/HybrisBundle.properties
+++ b/resources/i18n/HybrisBundle.properties
@@ -22,6 +22,9 @@ action.ImpexRemoteControl.Validate.short.text=Validate
action.ImpexRemoteControl.Import.text=Import selected Impex
action.ImpexRemoteControl.Import.description=Import IMPEX file to remote hybris instance
action.ImpexRemoteControl.Import.short.text=Import
+action.FSRemoteControl.Execute.text=Execute selected FlexibleSearch Statement
+action.FSRemoteControl.Execute.short.text=Execute
+action.FSRemoteControl.Execute.description=Execute FlexibleSearch file via remote hybris instance
action.GroovyRemoteControl.Execute.description=Execute groovy script on a remote hybris instance
action.GroovyRemoteControl.Execute.short.text=Execute
@@ -86,6 +89,11 @@ hybris.import.settings.exclude.resources.popup.edit.title=Edit
hybris.import.settings.exclude.resources.popup.edit.text=Edit Extension name
hybris.import.settings.exclude.resources.popup.add.title=Add
hybris.import.settings.exclude.resources.popup.add.text=Add Extension name
+hybris.import.settings.excludedFromIndex.directory.name=Excluded from index
+hybris.import.settings.excludedFromIndex.directory.popup.edit.title=Edit
+hybris.import.settings.excludedFromIndex.directory.popup.edit.text=Edit directory name
+hybris.import.settings.excludedFromIndex.directory.popup.add.title=Add
+hybris.import.settings.excludedFromIndex.directory.popup.add.text=Add directory name
hybris.toolwindow.solr.ip=Solr IP address
hybris.toolwindow.solr.label=Remote SOLR Instance
@@ -93,10 +101,11 @@ hybris.toolwindow.solr.login=Solr admin name
hybris.toolwindow.solr.pswd=Solr admin password
hybris.toolwindow.solr.port=Solr port
hybris.toolwindow.solr.webroot.label=Solr webroot
+hybris.toolwindow.solr.test.connection.fail=Unable to connect to Solr server. Reason: {0}
hybris.toolwindow.remote.label=Remote Hybris Instance
hybris.toolwindow.diplay.name.label=Connection name
hybris.toolwindow.ip.label=Running instance IP address
-hybris.toolwindow.port.label=Running instance SSL port
+hybris.toolwindow.port.label=Running instance port
hybris.toolwindow.preview.label=full URL preview
hybris.toolwindow.hac.webroot.label=HAC webroot
hybris.toolwindow.hac.login.label=HAC login name
@@ -106,6 +115,9 @@ hybris.toolwindow.hac.test.connection.fail=Connection failed at {0}. Reason {1}
hybris.toolwindow.hac.test.connection.success=Successfully connected to {0} console at {1}
hybris.toolwindow.hac.test.connection.title=Test connection
hybris.toolwindow.ok.button.title=OK
+hybris.toolwindow.ssl.label=SSL
+
+hybris.solr.search.console.reload.cores.button.tooltip=Reload Solr Cores
hybris.import.wizard.import.ootb.modules.read.only.label=Import OOTB modules in read-only mode
hybris.import.wizard.import.ootb.modules.read.only.tooltip=Extremely improves compilation performance and reduces possible amount of compilation errors but you wont be able to use code assistance in OOTB modules.
@@ -162,6 +174,9 @@ hybris.stats.permission.checkbox=I agree to send statistics for the plugin devel
hybris.project.view.tree.settings=Project Tree Settings
hybris.project.view.tree.hide.empty.middle.folders=Hide Empty Middle Folders
+hybris.project.maven.download.sources.folders=Download and attach Maven artifacts sources
+hybris.project.maven.download.javadocs.folders=Download and attach Maven artifacts javadocs
+hybris.project.attach.standard.sources=Attach Standard Sources (e.g. backoffice)
hybris.inspection.tsv.key=hybris TSV Inspections
@@ -200,21 +215,6 @@ hybris.gutter.populator.class.tooltip.navigate.declaration=Navigate to the hybri
hybris.module.dependencies.diagram.provider.name=hybris Module Dependencies
hybris.notification.group=Hybris
-support.us.step.title=We need your support
-support.us.step.text=\
-We would like to remind that this is an open source project and that we need all the help we can get :
\
-\
-On GitHub you can see our contribution guidelines. One free contributor worth 10 paid contributors. \n\
-On OpenCollective you can send us a buck. Nothing is free, so far we have been paying for this from our own pockets and by our free time. We will use the money to hire freelancers to do some extra work. For you it is just a small contribution and for us it ia monthly budget we can count on, which means regular bug fixes and new features for you! \n\
-If you have any kind of useful skills please contact us and let us know how we can rock Hybris community together! \n\
-If you represent a company you should be interested in well-being of this project as well because it saves time of your developers and your money. Please contact us and we can figure out how we can help each other. We can also offer support, training etc. If you work at a company please contact us and put us in touch with your managers. \n\
- \n\
-We have already revolutionized the way people work with Hybris and we have much more to come believe it or not, all we need is a bit of help to get the required resources. Thank you!
\
-For more information on the hybris Integration Plugin, see here .
\
-Backed by:\
-
project.import.finished=Project Import Finished
project.refresh.finished=Project Refresh Finished
@@ -227,8 +227,8 @@ scope.custom.ts.beans.impex.files=Custom Type System, Beans and Impex files
scope.all.ts.files=All Type System Files
flexible.search.table.empty.text=query parameters appear here
-obsolete.ide.version.title=Update IDEA now
-obsolete.ide.version.text=Upgrade your IDE now. Hybris integration plugin is no longer supported for <= 2018.2 IDE version.
-
hybris.ts.items.validation.settings.enabled=Warn if generated items are out of date
hybris.ts.items.validation.warn=Generated classes are out of date. Please run Build -> Build Project or ant all .
+
+copy.file.dialog.impex=Impex Console
+copy.file.dialog.fxs=Flexible Search Console
diff --git a/resources/icons/delete.png b/resources/icons/delete.png
new file mode 100644
index 000000000..c6ff278b5
Binary files /dev/null and b/resources/icons/delete.png differ
diff --git a/resources/icons/fileTypes/flexibleSearchFile@2x.svg b/resources/icons/fileTypes/flexibleSearchFile@2x.svg
new file mode 100644
index 000000000..423fa581e
--- /dev/null
+++ b/resources/icons/fileTypes/flexibleSearchFile@2x.svg
@@ -0,0 +1,12 @@
+
+
+ xml
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/icons/fileTypes/flexibleSearchFileIcon.svg b/resources/icons/fileTypes/flexibleSearchFileIcon.svg
new file mode 100644
index 000000000..942d1e4a8
--- /dev/null
+++ b/resources/icons/fileTypes/flexibleSearchFileIcon.svg
@@ -0,0 +1,12 @@
+
+
+ xml
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/icons/menu-saveall.svg b/resources/icons/menu-saveall.svg
new file mode 100644
index 000000000..f9e537d2a
--- /dev/null
+++ b/resources/icons/menu-saveall.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/resources/icons/upload.svg b/resources/icons/upload.svg
new file mode 100644
index 000000000..92a6db09b
--- /dev/null
+++ b/resources/icons/upload.svg
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/resources/ruleset.xml b/resources/ruleset.xml
index e5b1fe9a4..5da7925ec 100644
--- a/resources/ruleset.xml
+++ b/resources/ruleset.xml
@@ -24,7 +24,7 @@
description="A deployment table must be defined for all Items extending GenericItem"
priority="H"
selectionQuery="//itemtype[@extends='GenericItem' or not(@extends)]"
- testQuery="count(./deployment) > 0 or (./@autocreate='false' and ./@generate='false')"
+ testQuery="count(./deployment) > 0 or (./@autocreate='false' and ./@generate='false') or ./@abstract='true'"
nameQuery="./@code"/>
diff --git a/rt-ant/build.gradle b/rt-ant/build.gradle.kts
similarity index 75%
rename from rt-ant/build.gradle
rename to rt-ant/build.gradle.kts
index 955129472..5006e1ede 100644
--- a/rt-ant/build.gradle
+++ b/rt-ant/build.gradle.kts
@@ -15,19 +15,35 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-jar.archiveName = "rt-ant.jar"
+plugins {
+ id("org.jetbrains.intellij")
+}
+
+intellij {
+ version.set(platformVersion)
+}
// Should be 1.7 otherwise it will not work in Hybris 5.X which require java 1.7.
-compileJava {
+java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
-repositories {
- mavenCentral()
+tasks {
+ buildSearchableOptions {
+ enabled = false
+ }
+}
+
+sourceSets.main {
+ java.srcDirs(
+ file("src")
+ )
}
dependencies {
- //this should be pulled from /lib/ant/lib
- compileOnly "org.apache.ant:ant:1.10.6"
+ compileOnly("org.apache.ant:ant:$antVersion")
}
+
+val jar: Jar by tasks
+jar.archiveFileName.set("rt-ant.jar")
\ No newline at end of file
diff --git a/common/build.gradle b/settings.gradle.kts
similarity index 92%
rename from common/build.gradle
rename to settings.gradle.kts
index cf757d394..c912d147d 100644
--- a/common/build.gradle
+++ b/settings.gradle.kts
@@ -15,4 +15,6 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-jar.archiveName = "common.jar"
\ No newline at end of file
+
+rootProject.name = "SAP-Commerce-Developers-Toolset"
+include("rt-ant")
\ No newline at end of file
diff --git a/src/Impex.bnf b/src/Impex.bnf
index 4508384c8..94a5a967a 100644
--- a/src/Impex.bnf
+++ b/src/Impex.bnf
@@ -62,7 +62,7 @@ private recover_root ::= !(
| HEADER_MODE_UPDATE
| VALUE_SUBTYPE
| FIELD_VALUE_SEPARATOR
- | COMMENT_MARKER
+ | LINE_COMMENT
| macro_name_dec
| BEAN_SHELL_MARKER
| DOUBLE_STRING
@@ -88,7 +88,7 @@ header_line ::= any_header_mode full_header_type ((PARAMETERS_SEPARATOR full_hea
{pin = 1}
-comment ::= COMMENT_MARKER COMMENT_BODY?
+comment ::= LINE_COMMENT
{pin = 1}
macro_value_dec ::= MACRO_VALUE
diff --git a/src/Impex.flex b/src/Impex.flex
index 16f302117..f1c83c6c5 100644
--- a/src/Impex.flex
+++ b/src/Impex.flex
@@ -42,8 +42,7 @@ crlf = (([\n])|([\r])|(\r\n))
not_crlf = [^\r\n]
white_space = [ \t\f]
-end_of_line_comment_marker = [#]
-end_of_line_comment_body = {not_crlf}*
+line_comment = [#][^\r\n]*
bean_shell_marker = [#][%]
bean_shell_body = (({double_string})|{not_crlf}*)
@@ -98,7 +97,6 @@ field_value = ({not_crlf}|{identifier}+)
field_value_url = ([/]{identifier}+)+[.]{identifier}+
field_value_ignore = ""
-%state COMMENT
%state WAITING_MACRO_VALUE
%state MACRO_DECLARATION
%state HEADER_TYPE
@@ -122,7 +120,7 @@ field_value_ignore = ""
{bean_shell_marker} { yybegin(BEAN_SHELL); return ImpexTypes.BEAN_SHELL_MARKER; }
{double_string} { return ImpexTypes.DOUBLE_STRING; }
- {end_of_line_comment_marker} { yybegin(COMMENT); return ImpexTypes.COMMENT_MARKER; }
+ {line_comment} { yybegin(YYINITIAL); return ImpexTypes.LINE_COMMENT; }
{root_macro_usage} { return ImpexTypes.MACRO_USAGE; }
{macro_usage} { return ImpexTypes.MACRO_USAGE; }
@@ -150,10 +148,6 @@ field_value_ignore = ""
// {semicolon} { return ImpexTypes.SEMICOLON; }
//}
- {
- {end_of_line_comment_body} { return ImpexTypes.COMMENT_BODY; }
-}
-
{
{bean_shell_body} { return ImpexTypes.BEAN_SHELL_BODY; }
}
diff --git a/src/com/intellij/idea/plugin/hybris/actions/ActionUtils.java b/src/com/intellij/idea/plugin/hybris/actions/ActionUtils.java
index fbb5a481f..84f33ffb2 100644
--- a/src/com/intellij/idea/plugin/hybris/actions/ActionUtils.java
+++ b/src/com/intellij/idea/plugin/hybris/actions/ActionUtils.java
@@ -41,4 +41,8 @@ public static boolean isHybrisContext(@NotNull final DataContext dataContext) {
final Project project = CommonDataKeys.PROJECT.getData(dataContext);
return project != null && CommonIdeaService.getInstance().isHybrisProject(project);
}
+
+ public static boolean isHybrisContext(@NotNull final Project project) {
+ return CommonIdeaService.getInstance().isHybrisProject(project);
+ }
}
diff --git a/src/com/intellij/idea/plugin/hybris/actions/CopyFileToHybrisConsoleUtils.java b/src/com/intellij/idea/plugin/hybris/actions/CopyFileToHybrisConsoleUtils.java
new file mode 100644
index 000000000..3d48a70ed
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/actions/CopyFileToHybrisConsoleUtils.java
@@ -0,0 +1,172 @@
+/*
+ * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * Copyright (C) 2019 EPAM Systems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.actions;
+
+import com.intellij.execution.console.ConsoleExecutionEditor;
+import com.intellij.execution.console.LanguageConsoleImpl;
+import com.intellij.ide.projectView.ProjectView;
+import com.intellij.ide.projectView.ProjectViewNode;
+import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils;
+import com.intellij.idea.plugin.hybris.tools.remote.console.HybrisConsole;
+import com.intellij.idea.plugin.hybris.tools.remote.console.HybrisConsoleToolWindowFactory;
+import com.intellij.idea.plugin.hybris.tools.remote.console.view.HybrisConsolePanel;
+import com.intellij.idea.plugin.hybris.tools.remote.console.view.HybrisConsolePanelView;
+import com.intellij.idea.plugin.hybris.toolwindow.CopyFileToHybrisConsoleDialog;
+import com.intellij.openapi.project.Project;
+import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.openapi.wm.ToolWindowManager;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.PsiManager;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.jetbrains.annotations.NotNull;
+
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreePath;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+import static com.intellij.idea.plugin.hybris.common.HybrisConstants.DIALOG_TITLE;
+import static java.lang.System.lineSeparator;
+
+public final class CopyFileToHybrisConsoleUtils {
+
+ private CopyFileToHybrisConsoleUtils() {
+ }
+
+ private static Optional cast(@NotNull R obj, Class clazz) {
+ if (clazz.isAssignableFrom(obj.getClass())) {
+ return Optional.ofNullable((T) obj);
+ } else {
+ return Optional.empty();
+ }
+ }
+
+ public static void copySelectedFilesToHybrisConsole(Project project, String consoleTitle, String dialogTitle) {
+ var hybrisConsole = getHybrisConsole(project, consoleTitle);
+ if (hybrisConsole != null) {
+ boolean isConsoleNotEmpty = StringUtils.isNotEmpty(getTextFromHybrisConsole(project, hybrisConsole));
+ String query = getQueryFromSelectedFiles(project);
+ if (isConsoleNotEmpty) {
+ var consoleDialog = new CopyFileToHybrisConsoleDialog(
+ project,
+ getDialogTitleFromProperties(dialogTitle)
+ );
+ consoleDialog.show(() -> copyToHybrisConsole(project, consoleTitle, query));
+ } else {
+ copyToHybrisConsole(project, consoleTitle, query);
+ }
+ }
+ }
+
+ public static boolean isRequiredSingleFileExtension(Project project, String fileExtension) {
+ var fileExtensions = getFileExtensions(project);
+ return fileExtensions.size() == 1 && fileExtensions.get(0).equals(fileExtension);
+ }
+
+ public static boolean isRequiredMultipleFileExtension(Project project, String fileExtension) {
+ var fileExtensions = getFileExtensions(project);
+ return !fileExtensions.isEmpty() && fileExtensions.stream().allMatch(fileExtension::equals);
+ }
+
+ private static List getFileExtensions(Project project) {
+ var extensions = new ArrayList();
+ for (var virtualFile : getSelectedFiles(project)) {
+ if (virtualFile.isDirectory()) {
+ return Collections.emptyList();
+ }
+ extensions.add(virtualFile.getExtension());
+ }
+ return extensions;
+ }
+
+ private static HybrisConsole getHybrisConsole(Project project, String consoleTitle) {
+ var hybrisConsolePanel = HybrisConsolePanelView.Companion.getInstance(project).getConsolePanel();
+ return hybrisConsolePanel.findConsole(consoleTitle);
+ }
+
+ private static String getQueryFromSelectedFiles(Project project) {
+ return getSelectedFiles(project).stream()
+ .map(virtualFile -> getPsiFileNode(project, virtualFile))
+ .map(PsiElement::getText)
+ .collect(Collectors.joining(lineSeparator()));
+ }
+
+ private static PsiFile getPsiFileNode(Project project, VirtualFile virtualFile) {
+ return PsiManager.getInstance(project).findFile(virtualFile);
+ }
+
+ private static List getSelectedFiles(Project project) {
+ return Arrays.stream(getSelectedTreePaths(project))
+ .map(CopyFileToHybrisConsoleUtils::getVirtualFile)
+ .filter(Optional::isPresent)
+ .map(Optional::get)
+ .collect(Collectors.toList());
+ }
+
+ @NotNull
+ private static Optional getVirtualFile(final TreePath treePath) {
+ return cast(treePath.getLastPathComponent(), DefaultMutableTreeNode.class)
+ .flatMap(lastPathNode -> cast(lastPathNode.getUserObject(), ProjectViewNode.class))
+ .map(ProjectViewNode::getVirtualFile);
+ }
+
+ private static TreePath[] getSelectedTreePaths(final Project project) {
+ var currentProjectViewPane = ProjectView.getInstance(project).getCurrentProjectViewPane();
+ var selectionPaths = currentProjectViewPane.getSelectionPaths();
+ return ObjectUtils.getIfNull(selectionPaths, () -> new TreePath[0]);
+ }
+
+ private static HybrisConsolePanel getHybrisConsolePanel(Project project) {
+ return HybrisConsolePanelView.Companion.getInstance(project).getConsolePanel();
+ }
+
+ private static String getTextFromHybrisConsole(Project project, HybrisConsole hybrisConsole) {
+ var helper = new LanguageConsoleImpl.Helper(project, hybrisConsole.getVirtualFile());
+ var consoleExecutionEditor = new ConsoleExecutionEditor(helper);
+ return consoleExecutionEditor.getDocument().getText();
+ }
+
+ private static void copyToHybrisConsole(Project project, String consoleTitle, String query) {
+ var hybrisConsolePanel = getHybrisConsolePanel(project);
+ var hybrisConsole = hybrisConsolePanel.findConsole(consoleTitle);
+ if (hybrisConsole != null) {
+ hybrisConsole.clear();
+ hybrisConsole.setInputText(query);
+ hybrisConsolePanel.setActiveConsole(hybrisConsole);
+ openHybrisConsole(project);
+ }
+ }
+
+ private static void openHybrisConsole(Project project) {
+ var toolWindow = ToolWindowManager.getInstance(project).getToolWindow(HybrisConsoleToolWindowFactory.ID);
+ if (toolWindow != null) {
+ toolWindow.activate(null);
+ }
+ }
+
+ private static String getDialogTitleFromProperties(String fileExtension) {
+ return HybrisI18NBundleUtils.message(DIALOG_TITLE + fileExtension);
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/ant/AntTreeUpdatingHack.java b/src/com/intellij/idea/plugin/hybris/ant/AntTreeUpdatingHack.java
deleted file mode 100644
index 0f6535ac9..000000000
--- a/src/com/intellij/idea/plugin/hybris/ant/AntTreeUpdatingHack.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * This file is part of "hybris integration" plugin for Intellij IDEA.
- * Copyright (C) 2014-2016 Alexander Bartash
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.ant;
-
-import com.intellij.ide.util.treeView.AbstractTreeBuilder;
-import com.intellij.idea.plugin.hybris.common.services.CommonIdeaService;
-import com.intellij.lang.ant.config.explorer.AntExplorer;
-import com.intellij.openapi.components.AbstractProjectComponent;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.project.DumbService;
-import com.intellij.openapi.project.Project;
-import com.intellij.openapi.startup.StartupManager;
-import com.intellij.openapi.wm.IdeFocusManager;
-import com.intellij.openapi.wm.ToolWindow;
-import com.intellij.openapi.wm.ex.ToolWindowManagerAdapter;
-import com.intellij.openapi.wm.ex.ToolWindowManagerEx;
-import com.intellij.ui.ListenerUtil;
-import com.intellij.util.ui.UIUtil;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.FocusEvent;
-import java.awt.event.FocusListener;
-import java.util.Arrays;
-import java.util.Objects;
-
-/**
- * @author Eugene.Kudelevsky
- */
-public class AntTreeUpdatingHack extends AbstractProjectComponent {
-
- private static final Logger LOG = Logger.getInstance(AntTreeUpdatingHack.class);
-
- private static final String ANT_TOOL_WINDOW_ID = "Ant Build";
-
- public AntTreeUpdatingHack(final Project project) {
- super(project);
- }
-
- @Override
- public void initComponent() {
- StartupManager.getInstance(myProject).runWhenProjectIsInitialized(this::onProjectInitialized);
- }
-
- private void onProjectInitialized() {
- if (!CommonIdeaService.getInstance().isHybrisProject(myProject)) {
- return;
- }
- final ToolWindowManagerEx toolWindowManager = ToolWindowManagerEx.getInstanceEx(myProject);
- final ToolWindow antToolWindow = toolWindowManager.getToolWindow(ANT_TOOL_WINDOW_ID);
-
- if (antToolWindow == null) {
- LOG.info("Cannot get Ant tool window");
- return;
- }
- if (!tryToPatchToolWindow(antToolWindow)) {
- toolWindowManager.addToolWindowManagerListener(new ToolWindowManagerAdapter() {
-
- private boolean pending = true;
-
- @Override
- public void stateChanged() {
- if (pending && tryToPatchToolWindow(antToolWindow)) {
- pending = false;
- toolWindowManager.removeToolWindowManagerListener(this);
- }
- }
- });
- }
- }
-
- private boolean tryToPatchToolWindow(@NotNull final ToolWindow antToolWindow) {
- final AntExplorer antExplorer = getAntExplorer(antToolWindow);
- final AbstractTreeBuilder antTreeBuilder = antExplorer == null ? null : getAntTreeBuilder(antExplorer);
-
- if (antTreeBuilder == null) {
- return false;
- }
- ListenerUtil.addFocusListener(antExplorer, new FocusListener() {
-
- private boolean focused = false;
-
- @Override
- public void focusGained(final FocusEvent e) {
- stateChanged();
- }
-
- @Override
- public void focusLost(final FocusEvent e) {
- stateChanged();
- }
-
- private void stateChanged() {
- final Component focusOwner = IdeFocusManager.getInstance(myProject).getFocusOwner();
- final boolean newFocused = focusOwner != null && UIUtil.isAncestor(antExplorer, focusOwner);
-
- if (focused != newFocused) {
- focused = newFocused;
-
- if (newFocused && !antTreeBuilder.isDisposed()) {
- queueUpdate(antTreeBuilder);
- }
- }
- }
- });
- queueUpdate(antTreeBuilder);
-
- DumbService.getInstance(myProject).runWhenSmart(() -> {
- if (!antTreeBuilder.isDisposed()) {
- queueUpdate(antTreeBuilder);
- }
- });
- return true;
- }
-
- private static void queueUpdate(@NotNull final AbstractTreeBuilder antTreeBuilder) {
- antTreeBuilder.queueUpdate();
- antTreeBuilder.getTree().repaint();
- }
-
- @Nullable
- private static AbstractTreeBuilder getAntTreeBuilder(final AntExplorer antExplorer) {
- final JTree tree = UIUtil.findComponentOfType(antExplorer, JTree.class);
-
- if (tree == null) {
- LOG.info("Cannot get tree object from AntExplorer");
- return null;
- }
- final AbstractTreeBuilder antTreeBuilder = AbstractTreeBuilder.getBuilderFor(tree);
-
- if (antTreeBuilder == null) {
- LOG.info("Cannot get Ant tree builder");
- return null;
- }
- if (antTreeBuilder.isDisposed()) {
- LOG.info("Ant tree builder is disposed");
- return null;
- }
- return antTreeBuilder;
- }
-
- @Nullable
- private static AntExplorer getAntExplorer(final @NotNull ToolWindow antToolWindow) {
- final AntExplorer antExplorer = Arrays
- .stream(antToolWindow.getContentManager().getContents())
- .map(content -> {
- final JComponent component = content.getComponent();
- return component instanceof AntExplorer ? (AntExplorer) component : null;
- })
- .filter(Objects::nonNull)
- .findFirst()
- .orElse(null);
-
- if (antExplorer == null) {
- LOG.info("Cannot get AntExplorer object");
- }
- return antExplorer;
- }
-}
diff --git a/src/com/intellij/idea/plugin/hybris/ant/HybrisAntBuildListener.java b/src/com/intellij/idea/plugin/hybris/ant/HybrisAntBuildListener.java
index 1e68cc3db..5502eaebd 100644
--- a/src/com/intellij/idea/plugin/hybris/ant/HybrisAntBuildListener.java
+++ b/src/com/intellij/idea/plugin/hybris/ant/HybrisAntBuildListener.java
@@ -23,7 +23,6 @@
import com.intellij.idea.plugin.hybris.project.actions.ProjectRefreshAction;
import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettings;
import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent;
-import com.intellij.idea.plugin.hybris.statistics.StatsCollector;
import com.intellij.lang.ant.config.AntBuildFileBase;
import com.intellij.lang.ant.config.AntBuildListener;
import com.intellij.lang.ant.config.AntConfigurationBase;
@@ -52,9 +51,8 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.*;
+import java.util.List;
import static com.intellij.idea.plugin.hybris.common.HybrisConstants.PLATFORM_MODULE_PREFIX;
@@ -72,7 +70,7 @@
public class HybrisAntBuildListener implements AntExecutionListener {
private static final Key STATE = Key.create("hybrisAntStateMachine");
- private static final String[] antCleanAll = new String[]{"clean", "all"};
+ private static final List antCleanAll = Arrays.asList("clean", "all");
public static void registerAntListener(@NotNull Project project) {
project.getMessageBus().connect().subscribe(AntExecutionListener.TOPIC, new HybrisAntBuildListener());
@@ -86,7 +84,6 @@ public void beforeExecution(final AntBeforeExecutionEvent event) {
public void buildFinished(final AntFinishedExecutionEvent event) {
final Map resultMap = new HashMap<>();
findAntResult(resultMap);
- StatsCollector.getInstance().collectStat(StatsCollector.ACTIONS.ANT);
processNewExtensions(resultMap);
triggerNextAction();
}
@@ -161,41 +158,37 @@ private void modifyLocalExtensions(final Project project, final AntGenResult res
if (xmlFile == null) {
return;
}
- new WriteCommandAction.Simple(project, xmlFile) {
+ WriteCommandAction.writeCommandAction(project, xmlFile).run(() -> {
- @Override
- protected void run() throws Throwable {
-
- final XmlTag hybrisconfig = xmlFile.getRootTag();
- if (hybrisconfig == null) {
- return;
+ final XmlTag hybrisconfig = xmlFile.getRootTag();
+ if (hybrisconfig == null) {
+ return;
+ }
+ for (XmlTag extensions : hybrisconfig.getSubTags()) {
+ if (!extensions.getName().equals("extensions")) {
+ continue;
}
- for (XmlTag extensions : hybrisconfig.getSubTags()) {
- if (!extensions.getName().equals("extensions")) {
+ for (XmlTag extension : extensions.getSubTags()) {
+ if (!extension.getName().equals("extension")) {
continue;
}
- for (XmlTag extension : extensions.getSubTags()) {
- if (!extension.getName().equals("extension")) {
- continue;
- }
- if (result.getExtensionsToRemove().contains(extension.getAttributeValue("name"))) {
- extension.delete();
- }
- }
-
- for (String newExtension : result.getExtensionsToAdd()) {
- final XmlTag newTag = extensions.createChildTag("extension", null, null, false);
- final String name = newExtension.substring(newExtension.lastIndexOf("/") + 1);
- final String dir = "${HYBRIS_BIN_DIR}" + newExtension.substring(newExtension.indexOf("/custom"));
- newTag.setAttribute("dir", dir);
- newTag.setAttribute("name", name);
- extensions.addSubTag(newTag, false);
+ if (result.getExtensionsToRemove().contains(extension.getAttributeValue("name"))) {
+ extension.delete();
}
}
- FileDocumentManager.getInstance().saveAllDocuments();
+ for (String newExtension : result.getExtensionsToAdd()) {
+ final XmlTag newTag = extensions.createChildTag("extension", null, null, false);
+ final String name = newExtension.substring(newExtension.lastIndexOf("/") + 1);
+ final String dir = "${HYBRIS_BIN_DIR}" + newExtension.substring(newExtension.indexOf("/custom"));
+ newTag.setAttribute("dir", dir);
+ newTag.setAttribute("name", name);
+ extensions.addSubTag(newTag, false);
+ }
}
- }.execute();
+
+ FileDocumentManager.getInstance().saveAllDocuments();
+ });
}
private void triggerCleanAll(final Project project) {
diff --git a/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/BpDiagramElementManagerIml.java b/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/BpDiagramElementManagerIml.java
index 9aa370528..6d3ca0c5f 100644
--- a/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/BpDiagramElementManagerIml.java
+++ b/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/BpDiagramElementManagerIml.java
@@ -95,12 +95,6 @@ public String getElementTitle(final BpGraphNode t) {
return t.getGenericAction().getId();
}
- @Nullable
- @Override
- public SimpleColoredText getItemName(final Object o, final DiagramState diagramState) {
- return null;
- }
-
@Override
public String getNodeTooltip(final BpGraphNode t) {
return t.getGenericAction().getId();
diff --git a/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/DefaultBpDiagramProvider.java b/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/DefaultBpDiagramProvider.java
index bba8a0b2e..f458762d8 100644
--- a/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/DefaultBpDiagramProvider.java
+++ b/src/com/intellij/idea/plugin/hybris/business/process/diagram/impl/DefaultBpDiagramProvider.java
@@ -29,7 +29,6 @@
import com.intellij.idea.plugin.hybris.business.process.diagram.BpDiagramProvider;
import com.intellij.idea.plugin.hybris.business.process.diagram.BpDiagramVfsResolver;
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils;
-import com.intellij.idea.plugin.hybris.statistics.StatsCollector;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
@@ -80,7 +79,6 @@ public DiagramDataModel createDataModel(
final BpDiagramDataModel bpDiagramDataModel = new BpDiagramDataModel(project, t);
bpDiagramDataModel.refreshDataModel();
- collectStatistics();
return bpDiagramDataModel;
}
@@ -89,8 +87,4 @@ public DiagramDataModel createDataModel(
public DiagramColorManager getColorManager() {
return ServiceManager.getService(BpDiagramColorManager.class);
}
-
- private void collectStatistics() {
- StatsCollector.getInstance().collectStat(StatsCollector.ACTIONS.BUSINESS_DIAGRAM);
- }
}
diff --git a/common/src/com/intellij/idea/plugin/hybris/common/HybrisConstants.java b/src/com/intellij/idea/plugin/hybris/common/HybrisConstants.java
similarity index 95%
rename from common/src/com/intellij/idea/plugin/hybris/common/HybrisConstants.java
rename to src/com/intellij/idea/plugin/hybris/common/HybrisConstants.java
index 09e7a9509..79e691fbe 100644
--- a/common/src/com/intellij/idea/plugin/hybris/common/HybrisConstants.java
+++ b/src/com/intellij/idea/plugin/hybris/common/HybrisConstants.java
@@ -20,6 +20,7 @@
import com.google.common.collect.ImmutableSet;
+import java.io.File;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
@@ -38,6 +39,7 @@ public interface HybrisConstants {
String IMPEX_MONITOR_CONSOLE_TITLE = "Hybris Monitor Console";
String GROOVY_CONSOLE_TITLE = "Hybris Groovy Console";
String FLEXIBLE_SEARCH_CONSOLE_TITLE = "Hybris FS Console";
+ String SOLR_SEARCH_CONSOLE_TITLE = "Hybris Solr search";
String EXTENSION_INFO_XML = "extensioninfo.xml";
String DOT_PROJECT = ".project";
String SETTINGS_GRADLE = "settings.gradle";
@@ -100,11 +102,16 @@ public interface HybrisConstants {
String DEFAULT_JAVADOC_ROOT_URL = "https://download.hybris.com/api/%s/commercesuite";
String HYBRIS_6_0_PLUS_JAVADOC_ROOT_URL = "https://help.hybris.com/%s/api/commercesuite/index.html";
+ String QUERY_STORAGE_FOLDER_PATH = EXCLUDE_IDEA_DIRECTORY + File.separator + "consolestorage";
+
String SRC_DIRECTORY = "src";
+ String SCALA_SRC_DIRECTORY = "scalasrc";
+ List SRC_DIR_NAMES = Arrays.asList(SRC_DIRECTORY, SCALA_SRC_DIRECTORY);
String GEN_SRC_DIRECTORY = "gensrc";
String TEST_SRC_DIRECTORY = "testsrc";
String GROOVY_TEST_SRC_DIRECTORY = "groovytestsrc";
- List TEST_SRC_DIR_NAMES = Arrays.asList(TEST_SRC_DIRECTORY, GROOVY_TEST_SRC_DIRECTORY);
+ String SCALA_TEST_SRC_DIRECTORY = "scalatestsrc";
+ List TEST_SRC_DIR_NAMES = Arrays.asList(TEST_SRC_DIRECTORY, GROOVY_TEST_SRC_DIRECTORY, SCALA_TEST_SRC_DIRECTORY);
String HMC_MODULE_DIRECTORY = "hmc";
String HAC_MODULE_DIRECTORY = "hac";
String HAC_MODULE_EXTENSION_NAME = "hac";
@@ -143,6 +150,7 @@ public interface HybrisConstants {
String HMC_LIB_DIRECTORY = toSystemDependentName("hmc/bin");
String BACKOFFICE_LIB_DIRECTORY = toSystemDependentName("backoffice/bin");
String BACKOFFICE_JAR_DIRECTORY = toSystemDependentName("resources/backoffice");
+ String DOC_SOURCES_JAR_DIRECTORY = toSystemDependentName("doc/sources");
String PL_BOOTSTRAP_LIB_DIRECTORY = toSystemDependentName("bootstrap/bin");
String PL_BOOTSTRAP_GEN_SRC_DIRECTORY = toSystemDependentName("bootstrap/gensrc");
@@ -164,7 +172,7 @@ public interface HybrisConstants {
String HYBRIS_DEVELOPER_SPECIFIC_PROJECT_SETTINGS_COMPONENT_NAME = "HybrisDeveloperSpecificProjectSettings";
String DEFAULT_DIRECTORY_NAME_FOR_IDEA_MODULE_FILES = "idea-module-files";
- String PLUGIN_ID = "ccom.intellij.idea.plugin.hybris.impex";
+ String PLUGIN_ID = "com.intellij.idea.plugin.sap.commerce";
String JREBEL_PLUGIN_ID = "JRebelPlugin";
String CONFIGURATOR_FACTORY_ID = PLUGIN_ID + ".hybrisConfiguratorFactory";
@@ -323,4 +331,8 @@ interface IMPEX {
"Undo Reformat Code",
"Auto-Indent Lines"
};
+
+ String DIALOG_TITLE = "copy.file.dialog.";
+ String FLEXIBLE_SEARCH_FILE_EXTENSION = "fxs";
+ String IMPEX_FILE_EXTENSION = "impex";
}
diff --git a/common/src/com/intellij/idea/plugin/hybris/common/HybrisUtil.java b/src/com/intellij/idea/plugin/hybris/common/HybrisUtil.java
similarity index 100%
rename from common/src/com/intellij/idea/plugin/hybris/common/HybrisUtil.java
rename to src/com/intellij/idea/plugin/hybris/common/HybrisUtil.java
diff --git a/src/com/intellij/idea/plugin/hybris/common/LibraryDescriptorType.java b/src/com/intellij/idea/plugin/hybris/common/LibraryDescriptorType.java
new file mode 100644
index 000000000..ee81047ba
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/common/LibraryDescriptorType.java
@@ -0,0 +1,23 @@
+/*
+ * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * Copyright (C) 2019 EPAM Systems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.common;
+
+public enum LibraryDescriptorType {
+ UNKNOWN, LIB, WEB_INF_LIB
+}
diff --git a/src/com/intellij/idea/plugin/hybris/common/Version.java b/src/com/intellij/idea/plugin/hybris/common/Version.java
index 16284dec3..4e42b6d80 100644
--- a/src/com/intellij/idea/plugin/hybris/common/Version.java
+++ b/src/com/intellij/idea/plugin/hybris/common/Version.java
@@ -77,19 +77,24 @@ public static Version parseVersion(String v) {
}
String[] split = fixedVersion.split("\\.");
int major = 0, minor = 0, release = 0, patch = 0;
- switch (split.length) {
- case 4:
- patch = Integer.parseInt(split[3]);
- case 3:
- release = Integer.parseInt(split[2]);
- case 2:
- minor = Integer.parseInt(split[1]);
- case 1:
- major = Integer.parseInt(split[0]);
- break;
- default:
- throw new IllegalArgumentException("Could not parse " + fixedVersion);
+ try {
+ switch (split.length) {
+ case 4:
+ patch = Integer.parseInt(split[3]);
+ case 3:
+ release = Integer.parseInt(split[2]);
+ case 2:
+ minor = Integer.parseInt(split[1]);
+ case 1:
+ major = Integer.parseInt(split[0]);
+ break;
+ default:
+ return UNDEFINED;
+ }
+ } catch (NumberFormatException exception) {
+ return UNDEFINED;
}
+
return new Version(major, minor, release, patch, fixedVersion);
}
diff --git a/src/com/intellij/idea/plugin/hybris/common/services/CommonIdeaService.java b/src/com/intellij/idea/plugin/hybris/common/services/CommonIdeaService.java
index 7e2140980..ce04b5968 100644
--- a/src/com/intellij/idea/plugin/hybris/common/services/CommonIdeaService.java
+++ b/src/com/intellij/idea/plugin/hybris/common/services/CommonIdeaService.java
@@ -57,21 +57,18 @@ static CommonIdeaService getInstance() {
return ServiceManager.getService(CommonIdeaService.class);
}
- boolean shouldShowPermissionToSendStatisticsDialog();
-
- String getHostHacUrl(@NotNull Project project);
+ String getActiveHacUrl(@NotNull Project project);
String getHostHacUrl(@NotNull final Project project, @Nullable HybrisRemoteConnectionSettings mySettings);
- String getHostUrl(@NotNull final Project project);
-
- String getHostUrl(@NotNull final Project project, @Nullable HybrisRemoteConnectionSettings settings);
-
- String getHostSolrUrl(Project project, HybrisRemoteConnectionSettings item);
+ String getSolrUrl(Project project, HybrisRemoteConnectionSettings settings);
String getBackofficeWebInfLib(Project project);
String getBackofficeWebInfClasses(Project project);
void fixRemoteConnectionSettings(Project project);
+
+ @NotNull
+ String getActiveSslProtocol(@NotNull Project project, @Nullable HybrisRemoteConnectionSettings settings);
}
diff --git a/src/com/intellij/idea/plugin/hybris/common/services/impl/DefaultCommonIdeaService.java b/src/com/intellij/idea/plugin/hybris/common/services/impl/DefaultCommonIdeaService.java
deleted file mode 100644
index 531b7bee8..000000000
--- a/src/com/intellij/idea/plugin/hybris/common/services/impl/DefaultCommonIdeaService.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * This file is part of "hybris integration" plugin for Intellij IDEA.
- * Copyright (C) 2014-2016 Alexander Bartash
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.common.services.impl;
-
-import com.intellij.idea.plugin.hybris.common.HybrisConstants;
-import com.intellij.idea.plugin.hybris.common.Version;
-import com.intellij.idea.plugin.hybris.common.services.CommonIdeaService;
-import com.intellij.idea.plugin.hybris.project.descriptors.HybrisProjectDescriptor;
-import com.intellij.idea.plugin.hybris.project.descriptors.PlatformHybrisModuleDescriptor;
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettings;
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent;
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettings;
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent;
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettings;
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent;
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings;
-import com.intellij.idea.plugin.hybris.statistics.StatsCollector;
-import com.intellij.openapi.command.CommandProcessor;
-import com.intellij.openapi.diagnostic.Logger;
-import com.intellij.openapi.editor.EditorBundle;
-import com.intellij.openapi.module.Module;
-import com.intellij.openapi.module.ModuleManager;
-import com.intellij.openapi.project.Project;
-import com.intellij.util.proxy.ProtocolDefaultPorts;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.Validate;
-import org.apache.commons.lang3.math.NumberUtils;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Optional;
-import java.util.Properties;
-import java.util.stream.Collectors;
-
-import static com.intellij.idea.plugin.hybris.common.HybrisConstants.TYPING_EDITOR_ACTIONS;
-import static com.intellij.idea.plugin.hybris.common.HybrisConstants.UNDO_REDO_EDITOR_ACTIONS;
-import static com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings.Type.Hybris;
-import static com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings.Type.SOLR;
-
-/**
- * Created 10:24 PM 10 February 2016.
- *
- * @author Alexander Bartash
- */
-public class DefaultCommonIdeaService implements CommonIdeaService {
- private static final Logger LOG = Logger.getInstance(DefaultCommonIdeaService.class);
- private static final Version _1905 = Version.parseVersion("1905.0");
-
- private final CommandProcessor commandProcessor;
-
-
- public DefaultCommonIdeaService(@NotNull final CommandProcessor commandProcessor) {
- Validate.notNull(commandProcessor);
-
- this.commandProcessor = commandProcessor;
- }
-
- @Override
- public boolean isTypingActionInProgress() {
- final boolean isTyping = StringUtils.equalsAnyIgnoreCase(
- this.commandProcessor.getCurrentCommandName(), TYPING_EDITOR_ACTIONS
- );
-
- final boolean isUndoOrRedo = StringUtils.startsWithAny(
- this.commandProcessor.getCurrentCommandName(), UNDO_REDO_EDITOR_ACTIONS
- );
-
- return isTyping || isUndoOrRedo;
- }
-
- @Override
- @NotNull
- public Optional getHybrisDirectory(@NotNull final Project project) {
- Validate.notNull(project);
-
- return Optional.ofNullable(HybrisProjectSettingsComponent.getInstance(project))
- .map(HybrisProjectSettingsComponent::getState)
- .map(HybrisProjectSettings::getHybrisDirectory);
- }
-
- @Override
- @NotNull
- public Optional getCustomDirectory(@NotNull final Project project) {
- Validate.notNull(project);
-
- return Optional.ofNullable(HybrisProjectSettingsComponent.getInstance(project))
- .map(HybrisProjectSettingsComponent::getState)
- .map(HybrisProjectSettings::getCustomDirectory);
- }
-
-
-
- @Override
- public boolean isHybrisProject(@NotNull final Project project) {
- return HybrisProjectSettingsComponent.getInstance(project).getState().isHybrisProject();
- }
-
- @Override
- public boolean isOutDatedHybrisProject(@NotNull final Project project) {
- final HybrisProjectSettings hybrisProjectSettings = HybrisProjectSettingsComponent.getInstance(project)
- .getState();
- final String version = hybrisProjectSettings.getImportedByVersion();
- if (version == null) {
- return true;
- }
- final String[] versionParts = version.split("\\.");
- if (versionParts.length < 2) {
- return true;
- }
- final String majorVersion = versionParts[0];
- final String minorVersion = versionParts[1];
- try {
- final int majorVersionNumber = Integer.parseInt(majorVersion);
- final int minorVersionNumber = Integer.parseInt(minorVersion);
- final int versionNumber = majorVersionNumber * 100 + minorVersionNumber;
- return versionNumber < 900;
- } catch (NumberFormatException nfe) {
- return true;
- }
- }
-
- @Override
- public boolean isPotentiallyHybrisProject(@NotNull final Project project) {
- final Module[] modules = ModuleManager.getInstance(project).getModules();
- if (modules.length == 0) {
- return false;
- }
- final ArrayList moduleNames = Arrays.stream(modules)
- .map(Module::getName)
- .collect(Collectors.toCollection(ArrayList::new));
-
- final Collection acceleratorNames = Arrays.asList("*cockpits", "*core", "*facades", "*storefront");
- if (matchAllModuleNames(acceleratorNames, moduleNames)) {
- return true;
- }
- final Collection webservicesNames = Arrays.asList("*hmc", "hmc", "platform");
- return matchAllModuleNames(webservicesNames, moduleNames);
- }
-
- @Override
- public PlatformHybrisModuleDescriptor getPlatformDescriptor(final HybrisProjectDescriptor hybrisProjectDescriptor) {
- return (PlatformHybrisModuleDescriptor) hybrisProjectDescriptor
- .getFoundModules()
- .stream()
- .filter(e -> e instanceof PlatformHybrisModuleDescriptor)
- .findAny()
- .orElse(null);
- }
-
- @Override
- public boolean shouldShowPermissionToSendStatisticsDialog() {
- final HybrisApplicationSettings settings = HybrisApplicationSettingsComponent.getInstance().getState();
- if (StatsCollector.getInstance().isOpenCollectiveContributor()) {
- return !settings.isAllowedSendingPlainStatistics() && !settings.isDisallowedSendingStatistics();
- }
- return !settings.isAllowedSendingPlainStatistics() && !settings.isDevelopmentMode();
- }
-
- @Override
- public String getHostHacUrl(@NotNull final Project project) {
- return getHostHacUrl(project, null);
- }
-
- @Override
- public String getHostHacUrl(@NotNull final Project project, @Nullable HybrisRemoteConnectionSettings settings) {
- final StringBuilder sb = new StringBuilder();
-
- // First try to get the HAC webroot from the project settings, fallback to local props if not set in settings;
- // For a remote server configured with hac on the root context, use / in the tool settings
- if (settings == null) {
- settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).getActiveHybrisRemoteConnectionSettings(project);
- }
- sb.append(getHostUrl(project, settings));
- String hac = settings.getHacWebroot();
- if (StringUtils.isEmpty(hac)) {
- final Properties localProperties = getLocalProperties(project);
- if (localProperties != null) {
- hac = localProperties.getProperty(HybrisConstants.HAC_WEBROOT_KEY);
- }
- }
-
- if (hac != null) {
- sb.append('/');
- sb.append(StringUtils.strip(hac, " /"));
- }
-
- final String result = sb.toString();
-
- LOG.debug("Calculated hostHacURL=" + result);
-
- return result;
- }
-
- @Override
- public String getHostSolrUrl(final Project project, @Nullable HybrisRemoteConnectionSettings settings) {
- final StringBuilder sb = new StringBuilder();
-
- if (settings == null) {
- settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).getActiveSolrConnectionSettings(project);
- }
- if (!settings.getHostIP().startsWith("http")) {
- sb.append("https://");
- }
- sb.append(settings.getHostIP());
- sb.append(":");
- sb.append(settings.getPort());
- sb.append("/");
- sb.append(settings.getSolrWebroot());
- final String result = sb.toString();
-
- LOG.debug("Calculated host SOLR URL=" + result);
-
- return result;
- }
-
- @Override
- public String getHostUrl(@NotNull final Project project) {
- return getHostUrl(project, null);
- }
-
- @Override
- public String getHostUrl(@NotNull final Project project, @Nullable HybrisRemoteConnectionSettings settings) {
- if (settings == null) {
- settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).getActiveHybrisRemoteConnectionSettings(project);
- }
- final String ip = settings.getHostIP();
- StringBuilder sb = new StringBuilder();
- final Properties localProperties = getLocalProperties(project);
- String sslPort = HybrisConstants.DEFAULT_TOMCAT_SSL_PORT;
- String httpPort = HybrisConstants.DEFAULT_TOMCAT_HTTP_PORT;
- if (localProperties != null) {
- sslPort = localProperties.getProperty(HybrisConstants.TOMCAT_SSL_PORT_KEY, HybrisConstants.DEFAULT_TOMCAT_SSL_PORT);
- httpPort = localProperties.getProperty(HybrisConstants.TOMCAT_HTTP_PORT_KEY, HybrisConstants.DEFAULT_TOMCAT_HTTP_PORT);
- }
- String port = settings.getPort();
- if (port == null || port.isEmpty()) {
- port = sslPort;
- }
- if (port.equals(httpPort) || port.equals(String.valueOf(ProtocolDefaultPorts.HTTP))) {
- sb.append(HybrisConstants.HTTP_PROTOCOL);
- } else {
- sb.append(HybrisConstants.HTTPS_PROTOCOL);
- }
- sb.append(ip);
- sb.append(HybrisConstants.URL_PORT_DELIMITER);
- sb.append(port);
-
- return sb.toString();
- }
-
-
- private boolean is2019plus(final Project project) {
- final String hybrisVersion = HybrisProjectSettingsComponent.getInstance(project).getState().getHybrisVersion();
-
- if (StringUtils.isBlank(hybrisVersion)) {
- return false;
- }
- Version projectVersion = Version.parseVersion(hybrisVersion);
- return projectVersion.compareTo(_1905) >= 0;
- }
-
- @Override
- public String getBackofficeWebInfLib(final Project project) {
- return is2019plus(project) ? HybrisConstants.BACKOFFICE_WEB_INF_LIB_2019 : HybrisConstants.BACKOFFICE_WEB_INF_LIB;
- }
-
- @Override
- public String getBackofficeWebInfClasses(final Project project) {
- return is2019plus(project) ? HybrisConstants.BACKOFFICE_WEB_INF_CLASSES_2019 : HybrisConstants.BACKOFFICE_WEB_INF_CLASSES;
- }
-
- @Override
- public void fixRemoteConnectionSettings(final Project project) {
- HybrisDeveloperSpecificProjectSettingsComponent developerSpecificSettings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project);
- HybrisDeveloperSpecificProjectSettings state = developerSpecificSettings.getState();
- if (state != null) {
- List connectionList = state.getRemoteConnectionSettingsList();
- connectionList.stream().forEach(it->{
- if (it.getType() == null) {
- it.setType(Hybris);
- }
- });
- final List remoteList = connectionList
- .stream().filter(it -> it.getType() == Hybris).collect(Collectors.toList());
- if (remoteList.isEmpty()) {
- HybrisRemoteConnectionSettings newSettings = developerSpecificSettings.getDefaultHybrisRemoteConnectionSettings(project);
- connectionList.add(newSettings);
- state.setActiveRemoteConnectionID(newSettings.getUuid());
- }
- final List solrList = connectionList
- .stream().filter(it -> it.getType() == SOLR).collect(Collectors.toList());
- if (solrList.isEmpty()) {
- HybrisRemoteConnectionSettings newSettings = developerSpecificSettings.getDefaultSolrRemoteConnectionSettings(project);
- connectionList.add(newSettings);
- state.setActiveSolrConnectionID(newSettings.getUuid());
- }
- }
- }
-
- private Properties getLocalProperties(final Project project) {
- final String configDir = HybrisProjectSettingsComponent.getInstance(project).getState().getConfigDirectory();
- if (configDir == null) {
- return null;
- }
- final File propFile = new File(configDir, HybrisConstants.LOCAL_PROPERTIES);
- if (!propFile.exists()) {
- return null;
- }
- final Properties prop = new Properties();
- try (final FileReader fr = new FileReader(propFile)) {
- prop.load(fr);
- return prop;
- } catch (IOException e) {
- LOG.info(e.getMessage(), e);
- }
- return null;
- }
-
- private boolean matchAllModuleNames(
- @NotNull final Collection namePatterns,
- @NotNull final Collection moduleNames
- ) {
- return namePatterns.stream()
- .allMatch(pattern -> matchModuleName(pattern, moduleNames));
- }
-
- private boolean matchModuleName(@NotNull final String pattern, final Collection moduleNames) {
- String regex = ("\\Q" + pattern + "\\E").replace("*", "\\E.*\\Q");
- return moduleNames.stream()
- .parallel()
- .anyMatch(p -> p.matches(regex));
- }
-}
diff --git a/src/com/intellij/idea/plugin/hybris/common/services/impl/DefaultCommonIdeaService.kt b/src/com/intellij/idea/plugin/hybris/common/services/impl/DefaultCommonIdeaService.kt
new file mode 100644
index 000000000..5352a1eba
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/common/services/impl/DefaultCommonIdeaService.kt
@@ -0,0 +1,279 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+package com.intellij.idea.plugin.hybris.common.services.impl
+
+import com.intellij.idea.plugin.hybris.common.HybrisConstants
+import com.intellij.idea.plugin.hybris.common.Version
+import com.intellij.idea.plugin.hybris.common.services.CommonIdeaService
+import com.intellij.idea.plugin.hybris.project.descriptors.HybrisModuleDescriptor
+import com.intellij.idea.plugin.hybris.project.descriptors.HybrisProjectDescriptor
+import com.intellij.idea.plugin.hybris.project.descriptors.PlatformHybrisModuleDescriptor
+import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.openapi.command.CommandProcessor
+import com.intellij.openapi.diagnostic.Logger
+import com.intellij.openapi.module.ModuleManager
+import com.intellij.openapi.project.Project
+import org.apache.commons.lang3.StringUtils
+import org.jetbrains.annotations.Nullable
+import java.io.File
+import java.io.FileReader
+import java.io.IOException
+import java.util.*
+import java.util.function.Consumer
+import java.util.stream.Collectors
+
+/**
+ * Created 10:24 PM 10 February 2016.
+ *
+ * @author Alexander Bartash @gmail.com>
+ */
+class DefaultCommonIdeaService : CommonIdeaService {
+ private val commandProcessor: CommandProcessor = CommandProcessor.getInstance()
+ override fun isTypingActionInProgress(): Boolean {
+ val isTyping = StringUtils.equalsAnyIgnoreCase(
+ commandProcessor.currentCommandName, *HybrisConstants.TYPING_EDITOR_ACTIONS
+ )
+ val isUndoOrRedo = StringUtils.startsWithAny(
+ commandProcessor.currentCommandName, *HybrisConstants.UNDO_REDO_EDITOR_ACTIONS
+ )
+ return isTyping || isUndoOrRedo
+ }
+
+ override fun getHybrisDirectory(project: Project): Optional {
+ return Optional.ofNullable(HybrisProjectSettingsComponent.getInstance(project))
+ .map { it.state}
+ .map { it.hybrisDirectory }
+ }
+
+ override fun getCustomDirectory(project: Project): Optional {
+ return Optional.ofNullable(HybrisProjectSettingsComponent.getInstance(project))
+ .map { it.state }
+ .map { it.customDirectory }
+ }
+
+ override fun isHybrisProject(project: Project): Boolean {
+ return HybrisProjectSettingsComponent.getInstance(project).state.isHybrisProject
+ }
+
+ override fun isOutDatedHybrisProject(project: Project): Boolean {
+ val hybrisProjectSettings = HybrisProjectSettingsComponent.getInstance(project)
+ .state
+ val version = hybrisProjectSettings.importedByVersion ?: return true
+ val versionParts = version.split("\\.").toTypedArray()
+ if (versionParts.size < 2) {
+ return true
+ }
+ val majorVersion = versionParts[0]
+ val minorVersion = versionParts[1]
+ return try {
+ val majorVersionNumber = majorVersion.toInt()
+ val minorVersionNumber = minorVersion.toInt()
+ val versionNumber = majorVersionNumber * 100 + minorVersionNumber
+ versionNumber < 900
+ } catch (nfe: NumberFormatException) {
+ true
+ }
+ }
+
+ override fun isPotentiallyHybrisProject(project: Project): Boolean {
+ val modules = ModuleManager.getInstance(project).modules
+ if (modules.isEmpty()) {
+ return false
+ }
+ val moduleNames = modules.map { it.name }
+ val acceleratorNames: Collection = listOf("*cockpits", "*core", "*facades", "*storefront")
+ if (matchAllModuleNames(acceleratorNames, moduleNames)) {
+ return true
+ }
+ val webservicesNames: Collection = listOf("*hmc", "hmc", "platform")
+ return matchAllModuleNames(webservicesNames, moduleNames)
+ }
+
+ override fun getPlatformDescriptor(hybrisProjectDescriptor: HybrisProjectDescriptor): PlatformHybrisModuleDescriptor {
+ return hybrisProjectDescriptor.foundModules
+ .first { e: HybrisModuleDescriptor? -> e is PlatformHybrisModuleDescriptor } as PlatformHybrisModuleDescriptor
+
+
+ }
+
+ override fun getActiveHacUrl(project: Project): String {
+ return HybrisDeveloperSpecificProjectSettingsComponent
+ .getInstance(project)
+ .getActiveHybrisRemoteConnectionSettings(project)
+ .let { getUrl(it) }
+ }
+
+ override fun getActiveSslProtocol(project: Project, settings: @Nullable HybrisRemoteConnectionSettings?): String {
+ var settings = settings
+ if (settings == null) {
+ settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project)
+ .getActiveHybrisRemoteConnectionSettings(project)
+ }
+ return settings?.sslProtocol ?: "TLSv1"
+ }
+
+ override fun getHostHacUrl(project: Project, settings: HybrisRemoteConnectionSettings?): String {
+ var settings = settings
+ if (settings == null) {
+ settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project)
+ .getActiveHybrisRemoteConnectionSettings(project)
+ }
+ return getUrl(settings)
+ }
+
+ override fun getSolrUrl(project: Project, settings: HybrisRemoteConnectionSettings?): String {
+ var settings = settings
+ val sb = StringBuilder()
+ if (settings == null) {
+ settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project)
+ .getActiveSolrConnectionSettings(project)
+ }
+ if (settings!!.isSsl) {
+ sb.append(HybrisConstants.HTTPS_PROTOCOL)
+ } else {
+ sb.append(HybrisConstants.HTTP_PROTOCOL)
+ }
+ sb.append(settings.hostIP)
+ sb.append(":")
+ sb.append(settings.port)
+ sb.append("/")
+ sb.append(settings.solrWebroot)
+ val result = sb.toString()
+ LOG.debug("Calculated host SOLR URL=$result")
+ return result
+ }
+
+ private fun is2019plus(project: Project): Boolean {
+ val hybrisVersion = HybrisProjectSettingsComponent.getInstance(project).state.hybrisVersion
+ if (StringUtils.isBlank(hybrisVersion)) {
+ return false
+ }
+ val projectVersion = Version.parseVersion(hybrisVersion)
+ return projectVersion.compareTo(_1905) >= 0
+ }
+
+ override fun getBackofficeWebInfLib(project: Project): String {
+ return if (is2019plus(project)) HybrisConstants.BACKOFFICE_WEB_INF_LIB_2019 else HybrisConstants.BACKOFFICE_WEB_INF_LIB
+ }
+
+ override fun getBackofficeWebInfClasses(project: Project): String {
+ return if (is2019plus(project)) HybrisConstants.BACKOFFICE_WEB_INF_CLASSES_2019 else HybrisConstants.BACKOFFICE_WEB_INF_CLASSES
+ }
+
+ override fun fixRemoteConnectionSettings(project: Project) {
+ val developerSpecificSettings = HybrisDeveloperSpecificProjectSettingsComponent
+ .getInstance(project)
+ val state = developerSpecificSettings.state
+ if (state != null) {
+ val connectionList = state.remoteConnectionSettingsList
+ connectionList.forEach(Consumer {
+ if (it.type == null) {
+ it.type = HybrisRemoteConnectionSettings.Type.Hybris
+ }
+ prepareSslRemoteConnectionSettings(it)
+ })
+ val remoteList = connectionList
+ .stream().filter { it.type == HybrisRemoteConnectionSettings.Type.Hybris }.collect(Collectors.toList())
+ if (remoteList.isEmpty()) {
+ val newSettings = developerSpecificSettings.getDefaultHybrisRemoteConnectionSettings(
+ project)
+ connectionList.add(newSettings)
+ state.activeRemoteConnectionID = newSettings.uuid
+ }
+ val solrList = connectionList
+ .stream().filter { it.type == HybrisRemoteConnectionSettings.Type.SOLR }.collect(Collectors.toList())
+ if (solrList.isEmpty()) {
+ val newSettings = developerSpecificSettings.getDefaultSolrRemoteConnectionSettings(
+ project)
+ connectionList.add(newSettings)
+ state.activeSolrConnectionID = newSettings.uuid
+ }
+ }
+ }
+
+ private fun prepareSslRemoteConnectionSettings(connectionSettings: HybrisRemoteConnectionSettings) {
+ connectionSettings.isSsl = StringUtils.startsWith(connectionSettings.generatedURL, HybrisConstants.HTTPS_PROTOCOL)
+ cleanUpRemoteConnectionSettingsHostIp(connectionSettings)
+ }
+
+ private fun cleanUpRemoteConnectionSettingsHostIp(connectionSettings: HybrisRemoteConnectionSettings) {
+ val regex = Regex("https?://")
+ connectionSettings.hostIP = connectionSettings.hostIP.replace(regex, "")
+ }
+
+ private fun getLocalProperties(project: Project): Properties? {
+ val configDir = HybrisProjectSettingsComponent.getInstance(project).state.configDirectory ?: return null
+ val propFile = File(configDir, HybrisConstants.LOCAL_PROPERTIES)
+ if (!propFile.exists()) {
+ return null
+ }
+ val prop = Properties()
+ try {
+ FileReader(propFile).use { fr ->
+ prop.load(fr)
+ return prop
+ }
+ } catch (e: IOException) {
+ LOG.info(e.message, e)
+ }
+ return null
+ }
+
+ private fun matchAllModuleNames(
+ namePatterns: Collection,
+ moduleNames: Collection
+ ): Boolean {
+ return namePatterns.stream()
+ .allMatch { pattern: String -> matchModuleName(pattern, moduleNames) }
+ }
+
+ private fun matchModuleName(pattern: String, moduleNames: Collection): Boolean {
+ val regex = Regex("\\Q$pattern\\E".replace("*", "\\E.*\\Q"))
+ return moduleNames.stream()
+ .parallel()
+ .anyMatch { p: String -> p.matches(regex) }
+ }
+
+ private fun getUrl(settings: HybrisRemoteConnectionSettings?): String {
+ val ip = settings!!.hostIP
+ val sb = StringBuilder()
+ if (settings.isSsl) {
+ sb.append(HybrisConstants.HTTPS_PROTOCOL)
+ } else {
+ sb.append(HybrisConstants.HTTP_PROTOCOL)
+ }
+ sb.append(ip)
+ sb.append(HybrisConstants.URL_PORT_DELIMITER)
+ sb.append(settings.port)
+ val hac = settings.hacWebroot
+ if (StringUtils.isNoneBlank(hac)) {
+ sb.append('/')
+ sb.append(StringUtils.strip(hac, " /"))
+ }
+ val result = sb.toString()
+ LOG.debug("Calculated hostHacURL=$result")
+ return result
+ }
+
+ companion object {
+ private val LOG = Logger.getInstance(DefaultCommonIdeaService::class.java)
+ private val _1905 = Version.parseVersion("1905.0")
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/common/utils/HybrisIcons.java b/src/com/intellij/idea/plugin/hybris/common/utils/HybrisIcons.java
index 714e2db7c..6c9ea6829 100644
--- a/src/com/intellij/idea/plugin/hybris/common/utils/HybrisIcons.java
+++ b/src/com/intellij/idea/plugin/hybris/common/utils/HybrisIcons.java
@@ -19,6 +19,7 @@
package com.intellij.idea.plugin.hybris.common.utils;
import com.intellij.openapi.util.IconLoader;
+import com.intellij.util.ReflectionUtil;
import javax.swing.*;
@@ -29,34 +30,41 @@
*/
public interface HybrisIcons {
- Icon IMPEX_FILE = IconLoader.getIcon("/icons/fileTypes/impexFile.svg");
- Icon BEAN_FILE = IconLoader.getIcon("/icons/beanIcon.svg");
+ Icon IMPEX_FILE = getIcon("/icons/fileTypes/impexFile.svg");
+ Icon FS_FILE = getIcon("/icons/fileTypes/flexibleSearchFileIcon.svg");
+ Icon BEAN_FILE = getIcon("/icons/beanIcon.svg");
- Icon HYBRIS_ICON = IconLoader.getIcon("/icons/hybrisIcon.svg");
- Icon HYBRIS_ICON_13x13 = IconLoader.getIcon("/icons/hybrisIcon_13x13.svg");
- Icon HYBRIS_REMOTE_ICON = IconLoader.getIcon("/icons/hybrisRemoteIcon.svg");
+ Icon HYBRIS_ICON = getIcon("/icons/hybrisIcon.svg");
+ Icon HYBRIS_ICON_13x13 = getIcon("/icons/hybrisIcon_13x13.svg");
+ Icon HYBRIS_REMOTE_ICON = getIcon("/icons/hybrisRemoteIcon.svg");
- Icon WAIT = IconLoader.getIcon("/icons/waitIcon.svg");
- Icon END = IconLoader.getIcon("/icons/endIcon.svg");
- Icon NOTIFY = IconLoader.getIcon("/icons/notifyIcon.svg");
- Icon ACTION = IconLoader.getIcon("/icons/actionIcon.svg");
- Icon SPLIT = IconLoader.getIcon("/icons/splitIcon.svg");
- Icon JOIN = IconLoader.getIcon("/icons/joinIcon.svg");
- Icon SCRIPT = IconLoader.getIcon("/icons/scriptIcon.svg");
+ Icon WAIT = getIcon("/icons/waitIcon.svg");
+ Icon END = getIcon("/icons/endIcon.svg");
+ Icon NOTIFY = getIcon("/icons/notifyIcon.svg");
+ Icon ACTION = getIcon("/icons/actionIcon.svg");
+ Icon SPLIT = getIcon("/icons/splitIcon.svg");
+ Icon JOIN = getIcon("/icons/joinIcon.svg");
+ Icon SCRIPT = getIcon("/icons/scriptIcon.svg");
- Icon TYPE_SYSTEM = IconLoader.getIcon("/icons/typeSystem.svg");
- Icon BEAN = IconLoader.getIcon("/icons/beanIcon.svg");
- Icon LOCALIZED = IconLoader.getIcon("/icons/localized.svg");
+ Icon TYPE_SYSTEM = getIcon("/icons/typeSystem.svg");
+ Icon BEAN = getIcon("/icons/beanIcon.svg");
+ Icon LOCALIZED = getIcon("/icons/localized.svg");
- Icon MACROS = IconLoader.getIcon("/icons/macros.png");
+ Icon MACROS = getIcon("/icons/macros.png");
interface Gutter {
- Icon POPULATOR = IconLoader.getIcon("/icons/gutter/populator.svg");
+ Icon POPULATOR = getIcon("/icons/gutter/populator.svg");
}
interface Console {
- Icon SOLR = IconLoader.getIcon("/icons/console/solr.svg");
+ Icon SOLR = getIcon("/icons/console/solr.svg");
+ }
+
+ static Icon getIcon(final String path) {
+ final Class> callerClass = ReflectionUtil.getGrandCallerClass();
+ assert callerClass != null : path;
+ return IconLoader.getIcon(path, callerClass);
}
}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLanguage.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLanguage.java
new file mode 100644
index 000000000..8a23288ea
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLanguage.java
@@ -0,0 +1,34 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch;
+
+import com.intellij.lang.Language;
+
+public class FlexibleSearchLanguage extends Language {
+
+ private static final FlexibleSearchLanguage INSTANCE = new FlexibleSearchLanguage();
+
+ public static FlexibleSearchLanguage getInstance() {
+ return INSTANCE;
+ }
+
+ protected FlexibleSearchLanguage() {
+ super("FlexibleSearch");
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLexer.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLexer.java
new file mode 100644
index 000000000..228f1f3a3
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLexer.java
@@ -0,0 +1,1583 @@
+/* The following code was generated by JFlex 1.7.0 tweaked for IntelliJ platform */
+
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch;
+
+import com.intellij.lexer.FlexLexer;
+import com.intellij.psi.tree.IElementType;
+
+import com.intellij.psi.TokenType;
+
+import static com.intellij.psi.TokenType.WHITE_SPACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchParserDefinition.COMMENT;
+
+/**
+ * This class is a scanner generated by
+ * JFlex 1.7.0
+ * from the specification file flexibleSearch.flex
+ */
+public class FlexibleSearchLexer implements FlexLexer {
+
+ /** This character denotes the end of file */
+ public static final int YYEOF = -1;
+
+ /** initial size of the lookahead buffer */
+ private static final int ZZ_BUFFERSIZE = 16384;
+
+ /** lexical states */
+ public static final int YYINITIAL = 0;
+ public static final int SELECT_EXP = 2;
+ public static final int FROM_EXP = 4;
+ public static final int TABLE_IDENTIFIER = 6;
+ public static final int COLUMN_IDENTIFIER = 8;
+ public static final int PARAMETER_EXP = 10;
+ public static final int LOCALIZATION = 12;
+ public static final int WHERE_EXP = 14;
+ public static final int ON_EXP = 16;
+ public static final int CORRELATION_NAME = 18;
+ public static final int SUB_QUERY = 20;
+
+ /**
+ * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+ * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+ * at the beginning of a line
+ * l is of the form l = 2*k, k a non negative integer
+ */
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
+ 8, 8, 9, 9, 10, 10
+ };
+
+ /**
+ * Translates characters to character classes
+ * Chosen bits are [12, 6, 3]
+ * Total runtime size is 15728 bytes
+ */
+ public static int ZZ_CMAP(int ch) {
+ return ZZ_CMAP_A[(ZZ_CMAP_Y[(ZZ_CMAP_Z[ch>>9]<<6)|((ch>>3)&0x3f)]<<3)|(ch&0x7)];
+ }
+
+ /* The ZZ_CMAP_Z table has 2176 entries */
+ static final char ZZ_CMAP_Z[] = zzUnpackCMap(
+ "\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16\1\17\1"+
+ "\20\5\21\1\22\1\23\1\24\1\21\14\25\1\26\50\25\1\27\2\25\1\30\1\31\1\32\1\33"+
+ "\25\25\1\34\20\21\1\35\1\36\1\37\1\40\1\41\1\42\1\43\1\21\1\44\1\45\1\46\1"+
+ "\21\1\47\1\50\1\51\1\52\1\53\1\21\1\54\1\21\1\25\1\55\1\56\5\21\2\25\1\57"+
+ "\31\21\1\25\1\60\1\21\1\61\40\21\1\62\17\21\1\63\1\64\1\65\1\66\10\21\1\67"+
+ "\2\21\1\70\10\21\123\25\1\71\7\25\1\72\1\73\37\21\1\25\1\73\u0582\21\1\74"+
+ "\u017f\21");
+
+ /* The ZZ_CMAP_Y table has 3904 entries */
+ static final char ZZ_CMAP_Y[] = zzUnpackCMap(
+ "\1\0\1\1\1\0\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\12\1\7\1\10\1\11\1\13\1\14"+
+ "\3\0\1\15\1\16\1\17\1\20\2\21\1\22\3\21\1\22\7\21\1\23\10\21\1\24\50\21\1"+
+ "\25\1\21\1\26\1\27\1\30\1\31\2\27\16\0\1\32\1\33\1\34\1\35\2\21\1\36\11\21"+
+ "\1\37\21\21\1\40\1\41\23\21\1\27\1\42\3\21\1\22\1\43\1\42\4\21\1\44\1\45\4"+
+ "\0\1\46\1\47\1\27\3\21\2\50\1\27\1\51\1\52\1\0\1\53\5\21\1\54\2\0\1\5\1\55"+
+ "\1\56\13\21\1\57\1\46\1\60\1\61\1\5\1\62\1\27\1\63\1\64\3\21\3\0\1\65\12\21"+
+ "\1\66\1\0\1\67\1\27\1\5\1\70\3\21\1\54\1\71\1\20\2\21\1\66\1\72\1\73\1\74"+
+ "\2\27\3\21\1\75\10\27\1\76\1\30\6\27\1\77\2\0\1\100\1\101\6\21\1\102\2\0\1"+
+ "\103\1\21\1\104\1\5\2\42\1\105\1\106\1\107\2\21\1\76\1\110\1\111\1\112\1\113"+
+ "\1\63\1\114\1\104\1\5\1\115\1\52\1\105\1\116\1\107\2\21\1\76\1\117\1\120\1"+
+ "\121\1\122\1\123\1\124\1\125\1\5\1\126\1\27\1\105\1\37\1\36\2\21\1\76\1\127"+
+ "\1\111\1\46\1\130\1\131\1\27\1\104\1\5\1\43\1\27\1\105\1\106\1\107\2\21\1"+
+ "\76\1\127\1\111\1\112\1\122\1\132\1\114\1\104\1\5\1\43\1\27\1\133\1\134\1"+
+ "\135\1\136\1\137\1\134\1\21\1\140\1\141\1\142\1\143\1\27\1\125\1\5\1\27\1"+
+ "\43\1\105\1\32\1\76\2\21\1\76\1\144\1\145\1\146\1\142\1\147\1\26\1\104\1\5"+
+ "\2\27\1\150\1\32\1\76\2\21\1\76\1\144\1\111\1\146\1\142\1\147\1\34\1\104\1"+
+ "\5\1\151\1\27\1\150\1\32\1\76\4\21\1\152\1\146\1\153\1\63\1\27\1\104\1\5\1"+
+ "\27\1\41\1\150\1\21\1\22\1\41\2\21\1\36\1\154\1\22\1\155\1\156\1\0\1\157\1"+
+ "\160\1\161\1\27\1\42\5\21\1\162\1\163\1\164\1\100\1\5\1\165\4\27\1\166\1\167"+
+ "\1\170\1\42\1\171\1\172\1\162\1\173\1\174\1\175\1\5\1\176\4\27\1\131\2\27"+
+ "\1\177\1\5\1\165\1\200\1\201\1\21\1\42\3\21\1\30\1\45\1\0\1\146\1\202\1\0"+
+ "\1\45\3\0\1\51\1\203\7\27\5\21\1\54\1\0\1\204\1\5\1\165\1\66\1\205\1\206\1"+
+ "\207\1\210\1\21\1\211\1\212\1\5\1\213\4\21\1\37\1\17\5\21\1\214\51\21\1\135"+
+ "\1\22\1\135\5\21\1\135\4\21\1\135\1\22\1\135\1\21\1\22\7\21\1\135\10\21\1"+
+ "\215\4\27\2\21\2\27\12\21\1\30\1\27\1\42\114\21\1\106\2\21\1\216\2\21\1\50"+
+ "\11\21\1\134\1\131\1\27\1\21\1\32\1\217\1\27\2\21\1\217\1\27\2\21\1\220\1"+
+ "\27\1\21\1\32\1\221\1\27\6\21\1\222\3\0\1\223\1\224\1\5\1\165\3\27\1\225\1"+
+ "\5\1\165\13\21\1\27\5\21\1\226\10\21\1\227\1\27\3\21\1\30\1\0\1\2\1\0\1\2"+
+ "\1\125\1\5\3\21\1\227\1\30\1\27\5\21\1\115\2\0\1\56\1\177\1\5\1\165\4\27\2"+
+ "\21\1\164\1\2\6\21\1\202\1\100\3\0\1\112\1\5\1\165\1\5\1\165\1\44\13\27\1"+
+ "\230\5\21\1\222\1\0\1\230\1\115\1\5\1\165\1\27\1\231\1\2\1\27\1\232\3\21\1"+
+ "\103\1\207\1\5\1\70\4\21\1\66\1\0\1\2\1\27\4\21\1\222\2\0\1\27\1\5\1\233\1"+
+ "\5\1\70\3\21\1\227\12\27\1\234\2\0\1\235\1\236\1\27\30\21\4\0\1\100\2\27\1"+
+ "\77\42\21\2\227\4\21\2\227\1\21\1\237\3\21\1\227\6\21\1\32\1\174\1\240\1\30"+
+ "\1\241\1\115\1\21\1\30\1\240\1\30\1\242\1\243\3\27\1\244\1\27\1\44\1\131\1"+
+ "\27\1\245\1\246\1\51\1\247\1\43\1\44\2\27\1\21\1\30\3\21\1\50\2\27\1\0\1\51"+
+ "\1\250\1\0\1\251\1\27\1\252\1\41\1\154\1\253\1\31\1\254\1\21\1\255\1\256\1"+
+ "\257\2\27\5\21\1\131\116\27\5\21\1\22\5\21\1\22\20\21\1\30\1\260\1\261\1\27"+
+ "\4\21\1\37\1\17\7\21\1\44\1\27\1\63\2\21\1\22\1\27\10\22\4\0\5\27\1\44\72"+
+ "\27\1\262\3\27\1\42\1\211\1\253\1\30\1\42\11\21\1\22\1\263\1\42\12\21\1\214"+
+ "\1\256\4\21\1\227\1\42\12\21\1\22\2\27\3\21\1\50\6\27\170\21\1\227\11\27\71"+
+ "\21\1\30\6\27\21\21\1\30\10\27\5\21\1\227\41\21\1\30\2\21\1\5\1\264\2\27\5"+
+ "\21\1\164\1\77\1\265\3\21\1\63\12\21\1\177\3\27\1\44\1\21\1\41\14\21\1\266"+
+ "\1\115\1\27\1\21\1\50\11\27\1\21\1\267\1\270\2\21\1\54\2\27\1\131\6\21\1\115"+
+ "\1\27\1\271\5\21\1\222\1\0\1\51\1\27\1\5\1\165\2\0\1\271\1\52\1\5\1\70\2\21"+
+ "\1\66\1\175\2\21\1\164\1\0\1\2\1\27\3\21\1\30\1\101\5\21\1\54\1\0\1\251\1"+
+ "\44\1\5\1\165\2\27\1\160\1\272\5\21\1\103\1\100\1\27\1\270\1\273\1\5\1\165"+
+ "\2\21\1\22\1\274\6\21\1\206\1\275\1\226\2\27\1\276\1\21\1\54\1\277\1\27\3"+
+ "\300\1\27\2\22\22\27\4\21\1\54\1\301\1\5\1\165\64\21\1\115\1\27\2\21\1\22"+
+ "\1\302\5\21\1\115\40\27\55\21\1\227\15\21\1\26\4\27\1\22\1\27\1\302\1\303"+
+ "\1\21\1\76\1\22\1\174\1\304\15\21\1\26\3\27\1\302\54\21\1\227\2\27\10\21\1"+
+ "\41\6\21\5\27\1\21\1\30\2\0\2\27\1\100\1\27\1\137\2\27\1\256\3\27\1\43\1\32"+
+ "\20\21\1\305\1\245\1\27\1\5\1\165\1\42\2\21\1\116\1\42\2\21\1\50\1\306\12"+
+ "\21\1\22\3\41\1\307\1\310\2\27\1\311\1\21\1\144\2\21\1\22\2\21\1\312\1\21"+
+ "\1\227\1\21\1\227\4\27\17\21\1\50\10\27\6\21\1\30\20\27\1\313\20\27\3\21\1"+
+ "\30\6\21\1\131\5\27\3\21\1\22\2\27\3\21\1\50\6\27\3\21\1\227\4\21\1\115\1"+
+ "\21\1\253\5\27\23\21\1\227\1\5\1\165\52\27\1\227\1\76\4\21\1\37\1\314\2\21"+
+ "\1\227\25\27\2\21\1\227\1\27\3\21\1\26\10\27\7\21\1\306\10\27\1\315\1\77\1"+
+ "\144\1\42\2\21\1\115\1\121\4\27\3\21\1\30\20\27\6\21\1\227\1\27\2\21\1\227"+
+ "\1\27\2\21\1\50\21\27\11\21\1\131\66\27\1\232\6\21\1\0\1\100\3\27\1\125\1"+
+ "\5\2\27\1\232\5\21\1\0\1\316\2\27\3\21\1\131\1\5\1\165\1\232\3\21\1\164\1"+
+ "\0\1\317\1\5\10\27\1\232\5\21\1\54\1\0\1\320\1\27\1\5\1\165\42\27\1\160\1"+
+ "\272\52\27\1\160\1\272\16\27\1\160\1\272\56\27\1\160\1\272\4\27\5\21\1\54"+
+ "\1\0\1\27\1\5\1\165\14\27\1\160\1\272\64\27\1\160\1\272\54\27\1\160\1\272"+
+ "\64\27\55\21\1\22\22\27\14\21\1\50\63\27\5\21\1\22\72\27\7\21\1\131\4\27\1"+
+ "\160\1\272\34\27\1\160\1\272\64\27\10\21\1\30\1\27\1\103\4\0\1\100\1\27\1"+
+ "\63\1\232\1\21\14\27\1\26\153\27\1\321\1\322\2\0\1\323\1\2\3\27\1\324\22\27"+
+ "\1\325\67\27\12\21\1\32\10\21\1\32\1\326\1\327\1\21\1\330\1\144\7\21\1\37"+
+ "\1\331\2\32\3\21\1\332\1\174\1\41\1\76\51\21\1\227\3\21\1\76\2\21\1\214\3"+
+ "\21\1\214\2\21\1\32\3\21\1\32\2\21\1\22\3\21\1\22\3\21\1\76\3\21\1\76\2\21"+
+ "\1\214\1\333\6\5\52\27\1\160\1\272\24\27\1\144\3\21\1\166\1\42\1\214\1\334"+
+ "\1\252\1\335\1\166\1\237\1\166\2\214\1\124\1\21\1\36\1\21\1\115\1\336\1\36"+
+ "\1\21\1\115\50\27\32\21\1\22\5\27\106\21\1\30\1\27\33\21\1\227\74\27\1\123"+
+ "\3\27\14\0\20\27\36\0\2\27");
+
+ /* The ZZ_CMAP_A table has 1784 entries */
+ static final char ZZ_CMAP_A[] = zzUnpackCMap(
+ "\11\2\1\12\1\3\2\12\1\3\6\2\4\0\1\12\1\27\1\7\1\0\1\1\2\0\1\6\1\20\1\21\1"+
+ "\22\1\0\1\14\1\4\1\15\1\0\12\11\1\16\1\17\1\23\1\24\1\25\1\26\1\0\1\41\1\55"+
+ "\1\37\1\42\1\35\1\56\1\50\1\60\1\43\1\63\1\61\1\36\1\51\1\44\1\45\1\62\1\1"+
+ "\1\53\1\34\1\40\1\46\1\47\1\57\1\52\1\54\1\1\1\30\1\5\1\31\1\0\1\1\1\52\1"+
+ "\54\1\1\1\32\1\0\1\33\1\0\6\2\1\13\2\2\1\12\1\0\4\1\4\0\1\1\2\0\1\2\7\0\1"+
+ "\1\4\0\1\1\5\0\17\1\1\0\2\43\15\1\1\34\2\1\4\0\4\1\16\0\5\1\7\0\1\1\1\0\1"+
+ "\1\1\0\5\1\1\0\2\1\2\0\4\1\10\0\1\1\1\0\3\1\1\0\1\1\1\0\4\1\1\0\13\1\1\0\3"+
+ "\1\1\0\5\2\2\0\6\1\1\0\7\1\1\0\1\1\15\0\1\1\1\0\15\2\1\0\1\2\1\0\2\2\1\0\2"+
+ "\2\1\0\1\2\3\1\5\0\5\2\6\0\1\1\4\0\3\2\5\0\3\1\5\2\2\11\4\0\2\1\1\2\13\1\1"+
+ "\0\1\1\7\2\2\1\2\2\1\0\4\2\2\1\2\11\3\1\2\0\1\1\7\0\1\2\1\1\1\2\6\1\3\2\2"+
+ "\0\11\1\3\2\1\1\6\0\2\11\6\1\4\2\2\1\2\0\2\2\1\1\11\2\1\1\3\2\1\1\5\2\2\0"+
+ "\1\1\3\2\4\0\1\1\1\0\6\1\4\0\13\2\1\0\4\2\6\1\3\2\1\1\2\2\1\1\7\2\2\1\2\2"+
+ "\2\0\2\11\1\0\3\2\1\0\10\1\2\0\2\1\2\0\6\1\1\0\1\1\3\0\4\1\2\0\1\2\1\1\7\2"+
+ "\2\0\2\2\2\0\3\2\1\1\5\0\2\1\1\0\5\1\4\0\3\1\4\0\2\1\1\0\2\1\1\0\2\1\1\0\2"+
+ "\1\2\0\1\2\1\0\5\2\4\0\2\2\2\0\3\2\3\0\1\2\7\0\4\1\1\0\1\1\7\0\2\11\2\2\3"+
+ "\1\1\2\2\0\1\1\1\0\2\1\1\0\3\1\2\2\1\0\3\2\2\0\1\1\15\0\2\2\2\0\1\2\1\1\1"+
+ "\0\6\1\3\0\3\1\1\0\4\1\3\0\2\1\1\0\1\1\1\0\2\1\3\0\2\1\3\0\2\1\4\0\5\2\3\0"+
+ "\3\2\1\0\4\2\2\0\1\1\6\0\1\2\4\1\1\0\5\1\3\0\1\1\7\2\1\0\2\2\5\0\2\2\3\0\2"+
+ "\2\1\0\3\1\1\0\2\1\5\0\3\1\2\0\1\1\3\2\1\0\4\2\1\1\1\0\4\1\1\0\1\1\4\0\1\2"+
+ "\4\0\6\2\1\0\1\2\7\0\12\10\2\0\2\2\4\0\1\1\1\2\2\1\7\2\4\0\10\1\1\2\2\11\7"+
+ "\0\2\1\1\0\1\1\2\0\2\1\1\0\1\1\2\0\1\1\6\0\4\1\1\0\3\1\1\0\1\1\1\0\1\1\2\0"+
+ "\2\1\1\0\3\1\2\2\1\0\2\2\1\1\2\0\5\1\1\0\1\1\1\0\6\2\2\0\2\11\2\0\4\1\2\2"+
+ "\13\0\1\2\1\0\1\2\1\0\1\2\4\0\2\2\5\1\3\2\6\0\1\2\1\0\7\2\1\1\2\2\4\1\3\2"+
+ "\1\1\3\2\2\1\7\2\3\1\4\2\5\1\14\2\1\1\1\2\2\11\4\2\2\0\3\1\1\0\7\1\2\0\3\2"+
+ "\1\12\11\1\3\2\3\0\2\1\2\2\4\0\1\1\1\0\2\2\4\0\4\1\10\2\3\0\1\1\3\0\2\1\1"+
+ "\2\5\0\3\2\2\0\1\1\1\2\1\1\5\0\6\1\2\0\5\2\3\1\3\0\10\2\5\1\2\11\3\0\3\1\3"+
+ "\2\1\0\5\2\4\1\1\2\4\1\3\2\2\1\2\0\1\1\1\0\1\1\1\0\1\1\1\0\1\1\2\0\3\1\1\0"+
+ "\6\1\2\0\2\1\13\12\5\2\2\12\5\2\1\12\4\0\1\1\12\0\1\12\2\0\6\2\1\0\1\2\3\0"+
+ "\4\2\11\0\1\1\4\0\1\1\1\0\5\1\2\0\1\1\1\0\1\61\3\1\1\0\3\1\2\0\4\1\5\0\5\1"+
+ "\4\0\1\1\4\0\4\1\3\2\2\1\4\0\1\12\4\0\3\1\1\0\2\2\2\0\3\1\2\11\2\1\4\0\6\2"+
+ "\1\0\2\1\2\0\4\1\1\0\2\1\1\2\3\1\1\2\4\1\1\2\4\1\2\2\6\1\2\10\6\0\4\1\2\2"+
+ "\4\0\1\1\1\2\4\0\1\2\5\1\2\2\3\0\3\1\4\0\3\1\2\2\2\0\6\1\1\0\3\2\1\0\2\2\5"+
+ "\0\5\1\5\0\1\1\1\2\3\1\1\0\2\1\1\0\7\1\2\0\1\2\6\0\2\1\2\0\3\1\3\0\2\1\3\0"+
+ "\2\1\2\0\3\2\4\0\3\1\1\0\2\1\1\0\1\1\5\0\1\2\2\0\1\1\3\0\1\1\2\0\2\1\3\2\1"+
+ "\0\2\2\1\0\3\2\2\0\1\2\2\0\5\2\1\0\2\11\1\2\4\1\10\0\5\2\3\0\6\2\2\0\3\2\2"+
+ "\0\4\2\4\0\3\2\5\0\1\1\2\0\2\1\2\0\4\1\1\0\4\1\1\0\1\1\1\0\6\1\2\0\5\1\1\0"+
+ "\4\1\1\0\4\1\2\0\2\11\1\0\1\1\1\0\1\1\5\0\1\1\1\0\1\1\1\0\3\1\1\0\3\1\1\0"+
+ "\3\1");
+
+ /**
+ * Translates DFA states to action switch labels.
+ */
+ private static final int [] ZZ_ACTION = zzUnpackAction();
+
+ private static final String ZZ_ACTION_PACKED_0 =
+ "\13\0\1\1\1\2\1\3\1\1\2\4\1\5\1\6"+
+ "\1\7\1\10\1\11\1\12\1\13\1\14\1\15\1\16"+
+ "\1\17\20\2\1\20\1\21\1\17\12\20\1\22\1\23"+
+ "\1\24\1\25\13\2\1\26\1\27\1\30\2\26\1\31"+
+ "\1\32\1\33\1\31\1\34\1\35\1\36\1\20\1\37"+
+ "\1\40\1\41\1\42\1\17\15\20\1\43\1\44\1\2"+
+ "\2\45\2\1\1\46\3\4\1\47\1\50\11\2\1\51"+
+ "\5\2\1\52\1\53\2\2\1\54\1\55\5\2\1\56"+
+ "\4\2\1\57\6\20\1\60\4\20\1\52\2\20\1\56"+
+ "\1\20\1\61\3\2\1\62\1\2\1\55\2\2\1\63"+
+ "\1\26\1\64\1\65\1\66\1\67\1\70\1\71\1\72"+
+ "\1\73\1\74\12\20\1\52\1\53\2\20\1\55\2\20"+
+ "\1\56\2\20\1\2\1\75\1\76\1\0\2\2\1\77"+
+ "\7\2\1\100\1\101\1\102\1\103\1\104\2\2\1\105"+
+ "\4\2\1\106\1\107\5\2\2\20\1\77\4\20\1\101"+
+ "\1\103\1\104\1\20\1\106\1\107\1\20\4\2\1\26"+
+ "\7\20\1\100\1\102\1\20\1\105\6\20\1\2\1\0"+
+ "\1\2\1\110\2\2\1\111\1\112\2\2\1\113\1\114"+
+ "\1\2\1\115\6\2\1\116\1\2\1\20\1\110\1\20"+
+ "\1\117\3\20\1\120\1\2\1\121\1\2\1\122\1\123"+
+ "\2\20\1\124\1\111\1\112\1\20\1\113\1\114\1\115"+
+ "\5\20\1\123\1\0\1\2\1\125\2\2\1\126\1\2"+
+ "\1\127\1\130\1\131\1\2\1\132\1\133\1\134\1\20"+
+ "\1\125\1\20\1\126\1\20\1\2\1\135\3\20\1\127"+
+ "\1\131\1\20\1\132\1\133\1\0\1\136\1\137\1\140"+
+ "\2\2\1\141\1\140\1\20\1\142\1\143\1\137\1\140"+
+ "\1\20\1\144\1\2\1\145\1\20\1\145\2\146";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[373];
+ int offset = 0;
+ offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackAction(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+
+
+ /**
+ * Translates a state to a row index in the transition table
+ */
+ private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+ private static final String ZZ_ROWMAP_PACKED_0 =
+ "\0\0\0\64\0\150\0\234\0\320\0\u0104\0\u0138\0\u016c"+
+ "\0\u01a0\0\u01d4\0\u0208\0\u023c\0\u0270\0\u02a4\0\u02d8\0\u030c"+
+ "\0\u0340\0\u0374\0\u023c\0\u023c\0\u023c\0\u023c\0\u023c\0\u023c"+
+ "\0\u023c\0\u023c\0\u03a8\0\u03dc\0\u0410\0\u0444\0\u0478\0\u04ac"+
+ "\0\u04e0\0\u0514\0\u0548\0\u057c\0\u05b0\0\u05e4\0\u0618\0\u064c"+
+ "\0\u0680\0\u06b4\0\u06e8\0\u071c\0\u0750\0\u023c\0\u023c\0\u0784"+
+ "\0\u07b8\0\u07ec\0\u0820\0\u0854\0\u0888\0\u08bc\0\u08f0\0\u0924"+
+ "\0\u0958\0\u023c\0\u023c\0\u023c\0\u098c\0\u09c0\0\u09f4\0\u0a28"+
+ "\0\u0a5c\0\u0a90\0\u0ac4\0\u0af8\0\u0b2c\0\u0b60\0\u0b94\0\u0bc8"+
+ "\0\u0bfc\0\u023c\0\u023c\0\u0c30\0\u0c64\0\u0c98\0\u023c\0\u023c"+
+ "\0\u0ccc\0\u0d00\0\u023c\0\u023c\0\u0d34\0\u0d68\0\u0d9c\0\u023c"+
+ "\0\u03a8\0\u0dd0\0\u0e04\0\u0e38\0\u0e6c\0\u0ea0\0\u0ed4\0\u0f08"+
+ "\0\u0f3c\0\u0f70\0\u0fa4\0\u0fd8\0\u100c\0\u1040\0\u1074\0\u023c"+
+ "\0\u023c\0\u10a8\0\u10dc\0\u1110\0\u1144\0\u1178\0\u11ac\0\u11e0"+
+ "\0\u023c\0\u1214\0\u023c\0\u023c\0\u1248\0\u127c\0\u12b0\0\u12e4"+
+ "\0\u1318\0\u134c\0\u1380\0\u13b4\0\u13e8\0\u141c\0\u1450\0\u1484"+
+ "\0\u14b8\0\u14ec\0\u1520\0\u0270\0\u0270\0\u1554\0\u1588\0\u0270"+
+ "\0\u15bc\0\u15f0\0\u1624\0\u1658\0\u168c\0\u16c0\0\u0270\0\u16f4"+
+ "\0\u1728\0\u175c\0\u1790\0\u023c\0\u17c4\0\u17f8\0\u182c\0\u1860"+
+ "\0\u1894\0\u18c8\0\u0750\0\u18fc\0\u1930\0\u1964\0\u1998\0\u0750"+
+ "\0\u19cc\0\u1a00\0\u0750\0\u1a34\0\u023c\0\u1a68\0\u1a9c\0\u1ad0"+
+ "\0\u0270\0\u1b04\0\u0270\0\u1b38\0\u1b6c\0\u023c\0\u1ba0\0\u0bfc"+
+ "\0\u023c\0\u023c\0\u0c98\0\u023c\0\u023c\0\u023c\0\u023c\0\u023c"+
+ "\0\u1bd4\0\u1c08\0\u1c3c\0\u1c70\0\u1ca4\0\u1cd8\0\u1d0c\0\u1d40"+
+ "\0\u1d74\0\u1da8\0\u0d34\0\u0d34\0\u1ddc\0\u1e10\0\u1e44\0\u1e78"+
+ "\0\u1eac\0\u0d34\0\u1ee0\0\u1f14\0\u1f48\0\u10dc\0\u023c\0\u1f7c"+
+ "\0\u1fb0\0\u1fe4\0\u0270\0\u2018\0\u204c\0\u2080\0\u20b4\0\u20e8"+
+ "\0\u211c\0\u2150\0\u0270\0\u0270\0\u0270\0\u0270\0\u0270\0\u2184"+
+ "\0\u21b8\0\u0270\0\u21ec\0\u2220\0\u2254\0\u2288\0\u0270\0\u0270"+
+ "\0\u22bc\0\u22f0\0\u2324\0\u2358\0\u238c\0\u23c0\0\u23f4\0\u0750"+
+ "\0\u2428\0\u245c\0\u2490\0\u24c4\0\u0750\0\u0750\0\u0750\0\u24f8"+
+ "\0\u0750\0\u0750\0\u252c\0\u2560\0\u2594\0\u25c8\0\u25fc\0\u2630"+
+ "\0\u2664\0\u2698\0\u26cc\0\u2700\0\u2734\0\u2768\0\u279c\0\u0d34"+
+ "\0\u0d34\0\u27d0\0\u0d34\0\u2804\0\u2838\0\u286c\0\u28a0\0\u28d4"+
+ "\0\u2908\0\u293c\0\u2970\0\u29a4\0\u0270\0\u29d8\0\u2a0c\0\u0270"+
+ "\0\u0270\0\u2a40\0\u2a74\0\u0270\0\u0270\0\u2aa8\0\u0270\0\u2adc"+
+ "\0\u2b10\0\u2b44\0\u2b78\0\u2bac\0\u2be0\0\u0270\0\u2c14\0\u2c48"+
+ "\0\u0750\0\u2c7c\0\u0750\0\u2cb0\0\u2ce4\0\u2d18\0\u0750\0\u2d4c"+
+ "\0\u0270\0\u2d80\0\u0270\0\u0bfc\0\u2db4\0\u2de8\0\u0d34\0\u0d34"+
+ "\0\u0d34\0\u2e1c\0\u0d34\0\u0d34\0\u0d34\0\u2e50\0\u2e84\0\u2eb8"+
+ "\0\u2eec\0\u2f20\0\u0270\0\u2f54\0\u2f88\0\u0270\0\u2fbc\0\u2ff0"+
+ "\0\u0270\0\u3024\0\u0270\0\u0270\0\u0270\0\u3058\0\u0270\0\u0270"+
+ "\0\u0270\0\u308c\0\u0750\0\u30c0\0\u0750\0\u30f4\0\u3128\0\u0270"+
+ "\0\u315c\0\u3190\0\u31c4\0\u0d34\0\u0d34\0\u31f8\0\u0d34\0\u0d34"+
+ "\0\u322c\0\u0270\0\u0270\0\u0270\0\u3260\0\u3294\0\u0750\0\u0750"+
+ "\0\u32c8\0\u0270\0\u0d34\0\u0d34\0\u0d34\0\u32fc\0\u023c\0\u3330"+
+ "\0\u0270\0\u3364\0\u0d34\0\u0270\0\u0750";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[373];
+ int offset = 0;
+ offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int high = packed.charAt(i++) << 16;
+ result[j++] = high | packed.charAt(i++);
+ }
+ return j;
+ }
+
+ /**
+ * The transition table of the DFA
+ */
+ private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+ private static final String ZZ_TRANS_PACKED_0 =
+ "\1\14\1\15\1\14\1\16\1\17\1\14\1\20\1\21"+
+ "\2\22\2\16\1\23\1\24\1\25\1\26\1\27\1\30"+
+ "\1\31\5\14\2\32\1\33\1\34\1\35\1\36\1\37"+
+ "\1\40\1\41\1\42\1\43\1\44\1\45\1\46\1\47"+
+ "\1\15\1\50\1\51\3\15\1\52\1\53\1\54\4\15"+
+ "\1\14\1\55\1\14\1\16\1\17\1\14\1\20\1\21"+
+ "\2\22\2\16\1\23\1\24\1\25\1\26\1\27\1\30"+
+ "\1\31\7\14\1\56\1\57\1\60\1\61\1\62\1\63"+
+ "\1\55\1\64\1\65\1\66\5\55\1\67\3\55\1\70"+
+ "\1\71\5\55\1\14\1\15\1\14\1\16\1\17\1\14"+
+ "\1\20\1\21\2\22\2\16\1\23\1\24\1\25\1\26"+
+ "\1\27\1\30\2\14\1\72\1\14\1\73\1\74\2\14"+
+ "\1\75\1\34\1\76\1\77\1\100\1\101\1\41\1\102"+
+ "\1\15\1\103\1\45\1\104\1\47\1\15\1\50\4\15"+
+ "\1\105\1\106\1\107\3\15\1\110\1\14\1\111\1\14"+
+ "\1\16\1\17\5\14\2\16\1\112\11\14\1\73\1\74"+
+ "\3\14\1\113\2\111\1\114\2\111\1\115\22\111\1\14"+
+ "\1\116\1\14\1\16\1\17\5\14\2\16\1\112\1\24"+
+ "\1\25\1\26\1\14\1\117\1\31\1\14\1\120\6\14"+
+ "\1\113\5\116\1\121\22\116\1\14\1\122\1\14\1\16"+
+ "\1\17\5\14\2\16\20\14\30\122\1\14\1\15\1\14"+
+ "\1\16\1\17\5\14\2\16\14\14\1\123\1\124\2\14"+
+ "\30\15\1\14\1\125\1\14\1\16\1\17\1\14\1\20"+
+ "\1\21\2\22\2\16\1\23\1\24\1\25\1\26\1\27"+
+ "\1\30\1\14\1\126\1\72\1\127\1\130\1\74\2\14"+
+ "\1\131\1\132\1\133\1\134\1\135\1\136\1\137\1\140"+
+ "\1\141\1\142\1\143\1\144\2\125\1\145\4\125\1\146"+
+ "\1\147\5\125\1\14\1\15\1\14\1\16\1\17\3\14"+
+ "\2\22\2\16\12\14\1\150\3\14\1\151\1\113\2\15"+
+ "\1\152\25\15\1\14\1\153\1\14\1\16\1\17\5\14"+
+ "\2\16\20\14\5\153\1\154\22\153\3\14\1\16\1\17"+
+ "\5\14\2\16\17\14\1\155\1\156\27\14\65\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\30\15\3\0\1\16"+
+ "\6\0\2\16\54\0\1\157\57\0\3\20\1\0\1\20"+
+ "\1\160\1\161\55\20\3\21\1\0\1\21\1\162\1\21"+
+ "\1\161\54\21\10\0\2\22\104\0\1\163\64\0\1\164"+
+ "\31\0\2\15\6\0\1\15\1\0\1\15\20\0\1\15"+
+ "\1\165\7\15\1\166\1\167\15\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\13\15\1\170\2\15\1\171"+
+ "\11\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\5\15\1\172\1\15\1\173\20\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\11\15\1\174\16\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\17\15\1\175"+
+ "\10\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\1\176\1\15\1\177\5\15\1\200\2\15\1\201\14\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\1\15"+
+ "\1\202\5\15\1\203\20\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\1\204\7\15\1\205\17\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\11\15\1\206"+
+ "\1\207\15\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\10\15\1\210\6\15\1\211\10\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\10\15\1\212\17\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\17\15"+
+ "\1\213\10\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\5\15\1\214\1\15\1\215\20\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\1\15\1\216\16\15"+
+ "\1\217\7\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\5\15\1\220\1\15\1\221\7\15\1\222\10\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\24\15"+
+ "\1\223\3\15\1\0\2\55\6\0\1\55\1\0\1\55"+
+ "\1\0\1\224\16\0\30\55\1\0\2\55\6\0\1\55"+
+ "\1\0\1\55\1\0\1\224\16\0\1\55\1\225\7\55"+
+ "\1\226\1\227\15\55\1\0\2\55\6\0\1\55\1\0"+
+ "\1\55\1\0\1\224\16\0\13\55\1\230\14\55\1\0"+
+ "\2\55\6\0\1\55\1\0\1\55\1\0\1\224\16\0"+
+ "\1\55\1\231\26\55\1\0\2\55\6\0\1\55\1\0"+
+ "\1\55\1\0\1\224\16\0\11\55\1\232\16\55\1\0"+
+ "\2\55\6\0\1\55\1\0\1\55\1\0\1\224\16\0"+
+ "\1\233\1\55\1\234\5\55\1\235\2\55\1\236\14\55"+
+ "\1\0\2\55\6\0\1\55\1\0\1\55\1\0\1\224"+
+ "\16\0\7\55\1\237\20\55\1\0\2\55\6\0\1\55"+
+ "\1\0\1\55\1\0\1\224\16\0\1\240\27\55\1\0"+
+ "\2\55\6\0\1\55\1\0\1\55\1\0\1\224\16\0"+
+ "\5\55\1\241\1\55\1\242\20\55\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\20\55\1\243"+
+ "\7\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\17\55\1\244\10\55\32\0\1\245\32\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\1\15\1\246"+
+ "\26\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\16\15\1\171\11\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\1\15\1\247\5\15\1\173\20\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\11\15\1\250"+
+ "\16\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\1\251\1\15\1\177\5\15\1\252\17\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\1\204\27\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\10\15\1\210"+
+ "\6\15\1\253\10\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\1\15\1\216\26\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\5\15\1\220\22\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\24\15\1\254"+
+ "\3\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\11\15\1\255\16\15\1\0\2\111\6\0\1\111\1\0"+
+ "\1\111\1\0\2\256\15\0\30\111\1\0\2\111\6\0"+
+ "\1\111\1\0\1\111\1\0\2\256\15\0\1\111\1\257"+
+ "\26\111\1\0\2\111\6\0\1\111\1\0\1\111\1\0"+
+ "\2\256\15\0\1\260\27\111\1\0\2\116\6\0\1\116"+
+ "\1\0\1\116\1\0\2\261\11\0\1\262\3\0\30\116"+
+ "\1\0\2\116\6\0\1\116\1\0\1\116\1\0\2\261"+
+ "\11\0\1\262\3\0\1\263\27\116\1\0\2\122\6\0"+
+ "\1\122\1\0\1\122\20\0\30\122\1\0\2\125\6\0"+
+ "\1\125\1\0\1\125\1\0\1\264\16\0\30\125\24\0"+
+ "\1\265\1\266\62\0\1\267\72\0\1\270\31\0\2\125"+
+ "\6\0\1\125\1\0\1\125\1\0\1\264\16\0\1\125"+
+ "\1\271\26\125\1\0\2\125\6\0\1\125\1\0\1\125"+
+ "\1\0\1\264\16\0\16\125\1\272\11\125\1\0\2\125"+
+ "\6\0\1\125\1\0\1\125\1\0\1\264\16\0\1\125"+
+ "\1\273\3\125\1\274\1\125\1\275\20\125\1\0\2\125"+
+ "\6\0\1\125\1\0\1\125\1\0\1\264\16\0\11\125"+
+ "\1\276\16\125\1\0\2\125\6\0\1\125\1\0\1\125"+
+ "\1\0\1\264\16\0\17\125\1\277\10\125\1\0\2\125"+
+ "\6\0\1\125\1\0\1\125\1\0\1\264\16\0\1\300"+
+ "\7\125\1\301\17\125\1\0\2\125\6\0\1\125\1\0"+
+ "\1\125\1\0\1\264\16\0\1\125\1\302\26\125\1\0"+
+ "\2\125\6\0\1\125\1\0\1\125\1\0\1\264\16\0"+
+ "\1\303\7\125\1\304\17\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\11\125\1\305\1\306"+
+ "\15\125\1\0\2\125\6\0\1\125\1\0\1\125\1\0"+
+ "\1\264\16\0\17\125\1\307\10\125\1\0\2\125\6\0"+
+ "\1\125\1\0\1\125\1\0\1\264\16\0\17\125\1\310"+
+ "\10\125\1\0\2\125\6\0\1\125\1\0\1\125\1\0"+
+ "\1\264\16\0\1\125\1\311\16\125\1\312\7\125\1\0"+
+ "\2\125\6\0\1\125\1\0\1\125\1\0\1\264\16\0"+
+ "\5\125\1\313\1\125\1\314\20\125\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\1\15\1\315\26\15\1\0"+
+ "\2\153\6\0\1\153\1\0\1\153\20\0\30\153\1\0"+
+ "\2\153\6\0\1\153\1\0\1\153\20\0\1\316\27\153"+
+ "\33\0\1\317\65\0\1\320\26\0\3\157\1\0\60\157"+
+ "\3\20\1\0\60\20\3\21\1\0\60\21\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\2\15\1\321\25\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\15\15"+
+ "\1\322\12\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\15\15\1\323\12\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\1\15\1\324\26\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\7\15\1\325\20\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\1\326"+
+ "\27\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\25\15\1\327\2\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\10\15\1\330\1\15\1\331\15\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\12\15\1\332"+
+ "\15\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\3\15\1\333\24\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\2\15\1\334\25\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\6\15\1\335\11\15\1\336"+
+ "\7\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\14\15\1\337\13\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\1\340\27\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\1\341\27\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\4\15\1\342\23\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\2\15\1\343"+
+ "\25\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\6\15\1\344\21\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\7\15\1\345\20\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\11\15\1\346\16\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\16\15\1\347"+
+ "\11\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\10\15\1\350\17\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\4\15\1\351\23\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\2\15\1\352\25\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\17\15\1\353"+
+ "\10\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\11\15\1\354\16\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\1\15\1\355\26\15\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\2\55\1\356"+
+ "\25\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\15\55\1\357\12\55\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\15\55\1\360"+
+ "\12\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\1\55\1\361\26\55\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\22\55\1\362"+
+ "\5\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\10\55\1\363\1\55\1\364\15\55\1\0"+
+ "\2\55\6\0\1\55\1\0\1\55\1\0\1\224\16\0"+
+ "\2\55\1\365\25\55\1\0\2\55\6\0\1\55\1\0"+
+ "\1\55\1\0\1\224\16\0\20\55\1\366\7\55\1\0"+
+ "\2\55\6\0\1\55\1\0\1\55\1\0\1\224\16\0"+
+ "\14\55\1\367\13\55\1\0\2\55\6\0\1\55\1\0"+
+ "\1\55\1\0\1\224\16\0\1\370\27\55\1\0\2\55"+
+ "\6\0\1\55\1\0\1\55\1\0\1\224\16\0\16\55"+
+ "\1\371\11\55\1\0\2\55\6\0\1\55\1\0\1\55"+
+ "\1\0\1\224\16\0\10\55\1\372\17\55\1\0\2\55"+
+ "\6\0\1\55\1\0\1\55\1\0\1\224\16\0\11\55"+
+ "\1\373\16\55\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\2\15\1\374\25\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\22\15\1\375\5\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\10\15\1\330\17\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\6\15"+
+ "\1\335\21\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\1\15\1\376\26\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\7\15\1\377\20\15\1\0\2\111"+
+ "\6\0\1\111\1\0\1\111\1\0\2\256\15\0\22\111"+
+ "\1\u0100\5\111\1\0\2\125\6\0\1\125\1\0\1\125"+
+ "\1\0\1\264\16\0\2\125\1\u0101\25\125\1\0\2\125"+
+ "\6\0\1\125\1\0\1\125\1\0\1\264\16\0\7\125"+
+ "\1\u0102\20\125\1\0\2\125\6\0\1\125\1\0\1\125"+
+ "\1\0\1\264\16\0\22\125\1\u0103\5\125\1\0\2\125"+
+ "\6\0\1\125\1\0\1\125\1\0\1\264\16\0\1\u0104"+
+ "\27\125\1\0\2\125\6\0\1\125\1\0\1\125\1\0"+
+ "\1\264\16\0\25\125\1\u0105\2\125\1\0\2\125\6\0"+
+ "\1\125\1\0\1\125\1\0\1\264\16\0\10\125\1\u0106"+
+ "\17\125\1\0\2\125\6\0\1\125\1\0\1\125\1\0"+
+ "\1\264\16\0\12\125\1\u0107\15\125\1\0\2\125\6\0"+
+ "\1\125\1\0\1\125\1\0\1\264\16\0\3\125\1\u0108"+
+ "\24\125\1\0\2\125\6\0\1\125\1\0\1\125\1\0"+
+ "\1\264\16\0\6\125\1\u0109\21\125\1\0\2\125\6\0"+
+ "\1\125\1\0\1\125\1\0\1\264\16\0\1\u010a\27\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\4\125\1\u010b\23\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\2\125\1\u010c\25\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\6\125\1\u010d\21\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\11\125\1\u010e\16\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\4\125\1\u010f\23\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\2\125\1\u0110\25\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\17\125\1\u0111\10\125\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\22\15\1\u0112\5\15\36\0\1\u0113"+
+ "\26\0\2\15\6\0\1\15\1\0\1\15\20\0\1\15"+
+ "\1\u0114\26\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\1\15\1\u0115\26\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\17\15\1\u0116\10\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\1\u0117\27\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\4\15\1\u0118"+
+ "\23\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\1\15\1\u0119\26\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\3\15\1\u011a\24\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\10\15\1\u011b\17\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\1\15\1\u011c"+
+ "\26\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\3\15\1\u011d\24\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\4\15\1\u011e\23\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\2\15\1\u011f\25\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\1\15\1\u0120"+
+ "\26\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\11\15\1\u0121\16\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\12\15\1\u0122\15\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\23\15\1\u0123\4\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\1\u0124\27\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\1\u0125"+
+ "\27\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\15\15\1\u0126\12\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\17\15\1\u0127\10\15\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\1\55\1\u0128"+
+ "\26\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\1\55\1\u0129\26\55\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\17\55\1\u012a"+
+ "\10\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\4\55\1\u012b\23\55\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\3\55\1\u012c"+
+ "\24\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\10\55\1\u012d\17\55\1\0\2\55\6\0"+
+ "\1\55\1\0\1\55\1\0\1\224\16\0\4\55\1\u012e"+
+ "\23\55\1\0\2\55\6\0\1\55\1\0\1\55\1\0"+
+ "\1\224\16\0\15\55\1\u012f\12\55\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\1\15\1\u0130\26\15\1\0"+
+ "\2\15\6\0\1\15\1\0\1\15\20\0\4\15\1\u0131"+
+ "\23\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\17\15\1\u0132\10\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\10\15\1\u0133\17\15\1\0\2\111\6\0"+
+ "\1\111\1\0\1\111\1\0\2\256\15\0\4\111\1\u0134"+
+ "\23\111\1\0\2\125\6\0\1\125\1\0\1\125\1\0"+
+ "\1\264\16\0\1\125\1\u0135\26\125\1\0\2\125\6\0"+
+ "\1\125\1\0\1\125\1\0\1\264\16\0\1\u0136\27\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\4\125\1\u0137\23\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\4\125\1\u0138\23\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\1\125\1\u0139\26\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\3\125\1\u013a\24\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\1\125\1\u013b\26\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\3\125\1\u013c\24\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\2\125\1\u013d\25\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\1\125\1\u013e\26\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\12\125\1\u013f\15\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\23\125\1\u0140\4\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\1\u0141\27\125\1\0\2\125\6\0\1\125\1\0"+
+ "\1\125\1\0\1\264\16\0\1\u0142\27\125\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\4\15\1\u0143\23\15"+
+ "\35\0\1\u0144\27\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\3\15\1\u0145\24\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\20\15\1\u0146\7\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\4\15\1\u0147\23\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\5\15"+
+ "\1\u0148\22\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\4\15\1\u0149\23\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\7\15\1\u014a\20\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\17\15\1\u014b\10\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\10\15"+
+ "\1\u014c\17\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\26\15\1\u014d\1\15\1\0\2\15\6\0\1\15"+
+ "\1\0\1\15\20\0\1\15\1\u014e\26\15\1\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\1\15\1\u014f\26\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\4\15"+
+ "\1\u0150\23\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\1\15\1\u0151\26\15\1\0\2\55\6\0\1\55"+
+ "\1\0\1\55\1\0\1\224\16\0\3\55\1\u0152\24\55"+
+ "\1\0\2\55\6\0\1\55\1\0\1\55\1\0\1\224"+
+ "\16\0\20\55\1\u0153\7\55\1\0\2\55\6\0\1\55"+
+ "\1\0\1\55\1\0\1\224\16\0\5\55\1\u0154\22\55"+
+ "\1\0\2\55\6\0\1\55\1\0\1\55\1\0\1\224"+
+ "\16\0\4\55\1\u0155\23\55\1\0\2\55\6\0\1\55"+
+ "\1\0\1\55\1\0\1\224\16\0\7\55\1\u0156\20\55"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\3\15"+
+ "\1\u0157\24\15\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\1\15\1\u0158\26\15\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\3\125\1\u0159\24\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\4\125\1\u015a\23\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\5\125\1\u015b\22\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\17\125\1\u015c\10\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\26\125\1\u015d\1\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\1\125\1\u015e\26\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\1\125\1\u015f\26\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\4\125\1\u0160\23\125\37\0\1\u0161\25\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\4\15\1\u0162\23\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\1\u0163"+
+ "\27\15\1\0\2\15\6\0\1\15\1\0\1\15\20\0"+
+ "\4\15\1\u0164\23\15\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\10\15\1\u0165\17\15\1\0\2\15\6\0"+
+ "\1\15\1\0\1\15\20\0\1\15\1\u0166\26\15\1\0"+
+ "\2\55\6\0\1\55\1\0\1\55\1\0\1\224\16\0"+
+ "\4\55\1\u0167\23\55\1\0\2\55\6\0\1\55\1\0"+
+ "\1\55\1\0\1\224\16\0\4\55\1\u0168\23\55\1\0"+
+ "\2\55\6\0\1\55\1\0\1\55\1\0\1\224\16\0"+
+ "\10\55\1\u0169\17\55\1\0\2\15\6\0\1\15\1\0"+
+ "\1\15\20\0\4\15\1\u016a\23\15\1\0\2\125\6\0"+
+ "\1\125\1\0\1\125\1\0\1\264\16\0\4\125\1\u016b"+
+ "\23\125\1\0\2\125\6\0\1\125\1\0\1\125\1\0"+
+ "\1\264\16\0\1\u016c\27\125\1\0\2\125\6\0\1\125"+
+ "\1\0\1\125\1\0\1\264\16\0\4\125\1\u016d\23\125"+
+ "\1\0\2\125\6\0\1\125\1\0\1\125\1\0\1\264"+
+ "\16\0\1\125\1\u016e\26\125\40\0\1\u016f\24\0\2\15"+
+ "\6\0\1\15\1\0\1\15\20\0\3\15\1\u0170\24\15"+
+ "\1\0\2\15\6\0\1\15\1\0\1\15\20\0\10\15"+
+ "\1\u0171\17\15\1\0\2\55\6\0\1\55\1\0\1\55"+
+ "\1\0\1\224\16\0\3\55\1\u0172\24\55\1\0\2\125"+
+ "\6\0\1\125\1\0\1\125\1\0\1\264\16\0\10\125"+
+ "\1\u0173\17\125\1\0\2\15\6\0\1\15\1\0\1\15"+
+ "\20\0\4\15\1\u0174\23\15\1\0\2\55\6\0\1\55"+
+ "\1\0\1\55\1\0\1\224\16\0\4\55\1\u0175\23\55";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[13208];
+ int offset = 0;
+ offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackTrans(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ value--;
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+
+
+ /* error codes */
+ private static final int ZZ_UNKNOWN_ERROR = 0;
+ private static final int ZZ_NO_MATCH = 1;
+ private static final int ZZ_PUSHBACK_2BIG = 2;
+
+ /* error messages for the codes above */
+ private static final String[] ZZ_ERROR_MSG = {
+ "Unknown internal scanner error",
+ "Error: could not match input",
+ "Error: pushback value was too large"
+ };
+
+ /**
+ * ZZ_ATTRIBUTE[aState] contains the attributes of state aState
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\13\0\1\11\6\1\10\11\23\1\2\11\12\1\3\11"+
+ "\15\1\2\11\3\1\2\11\2\1\2\11\3\1\1\11"+
+ "\17\1\2\11\7\1\1\11\1\1\2\11\37\1\1\11"+
+ "\20\1\1\11\10\1\1\11\2\1\2\11\1\1\5\11"+
+ "\26\1\1\11\1\0\102\1\1\0\60\1\1\0\34\1"+
+ "\1\0\15\1\1\11\6\1";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[373];
+ int offset = 0;
+ offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+
+ /** the input device */
+ private java.io.Reader zzReader;
+
+ /** the current state of the DFA */
+ private int zzState;
+
+ /** the current lexical state */
+ private int zzLexicalState = YYINITIAL;
+
+ /** this buffer contains the current text to be matched and is
+ the source of the yytext() string */
+ private CharSequence zzBuffer = "";
+
+ /** the textposition at the last accepting state */
+ private int zzMarkedPos;
+
+ /** the current text position in the buffer */
+ private int zzCurrentPos;
+
+ /** startRead marks the beginning of the yytext() string in the buffer */
+ private int zzStartRead;
+
+ /** endRead marks the last character in the buffer, that has been read
+ from input */
+ private int zzEndRead;
+
+ /**
+ * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+ */
+ private boolean zzAtBOL = true;
+
+ /** zzAtEOF == true <=> the scanner is at the EOF */
+ private boolean zzAtEOF;
+
+ /** denotes if the user-EOF-code has already been executed */
+ private boolean zzEOFDone;
+
+ /* user code: */
+ private int myPrevState = YYINITIAL;
+
+ public int yyprevstate() {
+ return myPrevState;
+ }
+
+ private int popState() {
+ final int prev = myPrevState;
+ myPrevState = YYINITIAL;
+ return prev;
+ }
+
+ protected void pushState(int state){
+ myPrevState = state;
+ }
+
+
+
+ /**
+ * Creates a new scanner
+ *
+ * @param in the java.io.Reader to read input from.
+ */
+ public FlexibleSearchLexer(java.io.Reader in) {
+ this.zzReader = in;
+ }
+
+
+ /**
+ * Unpacks the compressed character translation table.
+ *
+ * @param packed the packed character translation table
+ * @return the unpacked character translation table
+ */
+ private static char [] zzUnpackCMap(String packed) {
+ int size = 0;
+ for (int i = 0, length = packed.length(); i < length; i += 2) {
+ size += packed.charAt(i);
+ }
+ char[] map = new char[size];
+ int i = 0; /* index in packed string */
+ int j = 0; /* index in unpacked array */
+ while (i < packed.length()) {
+ int count = packed.charAt(i++);
+ char value = packed.charAt(i++);
+ do map[j++] = value; while (--count > 0);
+ }
+ return map;
+ }
+
+ public final int getTokenStart() {
+ return zzStartRead;
+ }
+
+ public final int getTokenEnd() {
+ return getTokenStart() + yylength();
+ }
+
+ public void reset(CharSequence buffer, int start, int end, int initialState) {
+ zzBuffer = buffer;
+ zzCurrentPos = zzMarkedPos = zzStartRead = start;
+ zzAtEOF = false;
+ zzAtBOL = true;
+ zzEndRead = end;
+ yybegin(initialState);
+ }
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return false, iff there was new input.
+ *
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ private boolean zzRefill() throws java.io.IOException {
+ return true;
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ */
+ public final int yystate() {
+ return zzLexicalState;
+ }
+
+
+ /**
+ * Enters a new lexical state
+ *
+ * @param newState the new lexical state
+ */
+ public final void yybegin(int newState) {
+ zzLexicalState = newState;
+ }
+
+
+ /**
+ * Returns the text matched by the current regular expression.
+ */
+ public final CharSequence yytext() {
+ return zzBuffer.subSequence(zzStartRead, zzMarkedPos);
+ }
+
+
+ /**
+ * Returns the character at position pos from the
+ * matched text.
+ *
+ * It is equivalent to yytext().charAt(pos), but faster
+ *
+ * @param pos the position of the character to fetch.
+ * A value from 0 to yylength()-1.
+ *
+ * @return the character at position pos
+ */
+ public final char yycharat(int pos) {
+ return zzBuffer.charAt(zzStartRead+pos);
+ }
+
+
+ /**
+ * Returns the length of the matched text region.
+ */
+ public final int yylength() {
+ return zzMarkedPos-zzStartRead;
+ }
+
+
+ /**
+ * Reports an error that occured while scanning.
+ *
+ * In a wellformed scanner (no or only correct usage of
+ * yypushback(int) and a match-all fallback rule) this method
+ * will only be called with things that "Can't Possibly Happen".
+ * If this method is called, something is seriously wrong
+ * (e.g. a JFlex bug producing a faulty scanner etc.).
+ *
+ * Usual syntax/scanner level error handling should be done
+ * in error fallback rules.
+ *
+ * @param errorCode the code of the errormessage to display
+ */
+ private void zzScanError(int errorCode) {
+ String message;
+ try {
+ message = ZZ_ERROR_MSG[errorCode];
+ }
+ catch (ArrayIndexOutOfBoundsException e) {
+ message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
+ }
+
+ throw new Error(message);
+ }
+
+
+ /**
+ * Pushes the specified amount of characters back into the input stream.
+ *
+ * They will be read again by then next call of the scanning method
+ *
+ * @param number the number of characters to be read again.
+ * This number must not be greater than yylength()!
+ */
+ public void yypushback(int number) {
+ if ( number > yylength() )
+ zzScanError(ZZ_PUSHBACK_2BIG);
+
+ zzMarkedPos -= number;
+ }
+
+
+ /**
+ * Contains user EOF-code, which will be executed exactly once,
+ * when the end of file is reached
+ */
+ private void zzDoEOF() {
+ if (!zzEOFDone) {
+ zzEOFDone = true;
+ return;
+
+ }
+ }
+
+
+ /**
+ * Resumes scanning until the next regular expression is matched,
+ * the end of input is encountered or an I/O-Error occurs.
+ *
+ * @return the next token
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ public IElementType advance() throws java.io.IOException {
+ int zzInput;
+ int zzAction;
+
+ // cached fields:
+ int zzCurrentPosL;
+ int zzMarkedPosL;
+ int zzEndReadL = zzEndRead;
+ CharSequence zzBufferL = zzBuffer;
+
+ int [] zzTransL = ZZ_TRANS;
+ int [] zzRowMapL = ZZ_ROWMAP;
+ int [] zzAttrL = ZZ_ATTRIBUTE;
+
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
+
+ zzAction = -1;
+
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+ zzState = ZZ_LEXSTATE[zzLexicalState];
+
+ // set up zzAction for empty match case:
+ int zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ }
+
+
+ zzForAction: {
+ while (true) {
+
+ if (zzCurrentPosL < zzEndReadL) {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL/*, zzEndReadL*/);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
+ else if (zzAtEOF) {
+ zzInput = YYEOF;
+ break zzForAction;
+ }
+ else {
+ // store back cached positions
+ zzCurrentPos = zzCurrentPosL;
+ zzMarkedPos = zzMarkedPosL;
+ boolean eof = zzRefill();
+ // get translated positions and possibly new buffer
+ zzCurrentPosL = zzCurrentPos;
+ zzMarkedPosL = zzMarkedPos;
+ zzBufferL = zzBuffer;
+ zzEndReadL = zzEndRead;
+ if (eof) {
+ zzInput = YYEOF;
+ break zzForAction;
+ }
+ else {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL/*, zzEndReadL*/);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
+ }
+ int zzNext = zzTransL[ zzRowMapL[zzState] + ZZ_CMAP(zzInput) ];
+ if (zzNext == -1) break zzForAction;
+ zzState = zzNext;
+
+ zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ zzMarkedPosL = zzCurrentPosL;
+ if ( (zzAttributes & 8) == 8 ) break zzForAction;
+ }
+
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ zzDoEOF();
+ return null;
+ }
+ else {
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 1:
+ { return TokenType.BAD_CHARACTER;
+ }
+ // fall through
+ case 103: break;
+ case 2:
+ { return IDENTIFIER;
+ }
+ // fall through
+ case 104: break;
+ case 3:
+ { return WHITE_SPACE;
+ }
+ // fall through
+ case 105: break;
+ case 4:
+ { return STRING;
+ }
+ // fall through
+ case 106: break;
+ case 5:
+ { return NUMBER;
+ }
+ // fall through
+ case 107: break;
+ case 6:
+ { return COMMA;
+ }
+ // fall through
+ case 108: break;
+ case 7:
+ { return DOT;
+ }
+ // fall through
+ case 109: break;
+ case 8:
+ { return COLON;
+ }
+ // fall through
+ case 110: break;
+ case 9:
+ { return SEMICOLON;
+ }
+ // fall through
+ case 111: break;
+ case 10:
+ { return LEFT_PAREN;
+ }
+ // fall through
+ case 112: break;
+ case 11:
+ { return RIGHT_PAREN;
+ }
+ // fall through
+ case 113: break;
+ case 12:
+ { return ASTERISK;
+ }
+ // fall through
+ case 114: break;
+ case 13:
+ { return RIGHT_BRACKET;
+ }
+ // fall through
+ case 115: break;
+ case 14:
+ { return LEFT_BRACE;
+ }
+ // fall through
+ case 116: break;
+ case 15:
+ { return RIGHT_BRACE;
+ }
+ // fall through
+ case 117: break;
+ case 16:
+ { return COLUMN_REFERENCE_IDENTIFIER;
+ }
+ // fall through
+ case 118: break;
+ case 17:
+ { yybegin(COLUMN_IDENTIFIER); pushState(SELECT_EXP); return LEFT_BRACE;
+ }
+ // fall through
+ case 119: break;
+ case 18:
+ { return EQUALS_OPERATOR;
+ }
+ // fall through
+ case 120: break;
+ case 19:
+ { return QUESTION_MARK;
+ }
+ // fall through
+ case 121: break;
+ case 20:
+ { return EXCLAMATION_MARK;
+ }
+ // fall through
+ case 122: break;
+ case 21:
+ { yybegin(TABLE_IDENTIFIER); pushState(FROM_EXP); return LEFT_BRACE;
+ }
+ // fall through
+ case 123: break;
+ case 22:
+ { yybegin(popState()); return TABLE_NAME_IDENTIFIER;
+ }
+ // fall through
+ case 124: break;
+ case 23:
+ { yybegin(popState()); return COMMA;
+ }
+ // fall through
+ case 125: break;
+ case 24:
+ { yybegin(popState()); return RIGHT_BRACE;
+ }
+ // fall through
+ case 126: break;
+ case 25:
+ { yybegin(popState()); return COLUMN_REFERENCE_IDENTIFIER;
+ }
+ // fall through
+ case 127: break;
+ case 26:
+ { yybegin(popState()); return RIGHT_PAREN;
+ }
+ // fall through
+ case 128: break;
+ case 27:
+ { yybegin(popState()); return EQUALS_OPERATOR;
+ }
+ // fall through
+ case 129: break;
+ case 28:
+ { yybegin(popState()); return PARAMETER_IDENTIFIER;
+ }
+ // fall through
+ case 130: break;
+ case 29:
+ { return LEFT_BRACKET;
+ }
+ // fall through
+ case 131: break;
+ case 30:
+ { yybegin(COLUMN_IDENTIFIER); return RIGHT_BRACKET;
+ }
+ // fall through
+ case 132: break;
+ case 31:
+ { return LESS_THAN_OPERATOR;
+ }
+ // fall through
+ case 133: break;
+ case 32:
+ { return GREATER_THAN_OPERATOR;
+ }
+ // fall through
+ case 134: break;
+ case 33:
+ { yybegin(PARAMETER_EXP); pushState(WHERE_EXP); return QUESTION_MARK;
+ }
+ // fall through
+ case 135: break;
+ case 34:
+ { yybegin(COLUMN_IDENTIFIER); pushState(WHERE_EXP); return LEFT_BRACE;
+ }
+ // fall through
+ case 136: break;
+ case 35:
+ { yybegin(PARAMETER_EXP); pushState(FROM_EXP); return QUESTION_MARK;
+ }
+ // fall through
+ case 137: break;
+ case 36:
+ { yybegin(COLUMN_IDENTIFIER); return LEFT_BRACE;
+ }
+ // fall through
+ case 138: break;
+ case 37:
+ { yybegin(popState()); return IDENTIFIER;
+ }
+ // fall through
+ case 139: break;
+ case 38:
+ { return COMMENT;
+ }
+ // fall through
+ case 140: break;
+ case 39:
+ { return LEFT_DOUBLE_BRACE;
+ }
+ // fall through
+ case 141: break;
+ case 40:
+ { return RIGHT_DOUBLE_BRACE;
+ }
+ // fall through
+ case 142: break;
+ case 41:
+ { yybegin(CORRELATION_NAME);return AS;
+ }
+ // fall through
+ case 143: break;
+ case 42:
+ { return IS;
+ }
+ // fall through
+ case 144: break;
+ case 43:
+ { return IN;
+ }
+ // fall through
+ case 145: break;
+ case 44:
+ { yybegin(ON_EXP); pushState(FROM_EXP); return ON;
+ }
+ // fall through
+ case 146: break;
+ case 45:
+ { return OR;
+ }
+ // fall through
+ case 147: break;
+ case 46:
+ { return BY;
+ }
+ // fall through
+ case 148: break;
+ case 47:
+ { yypushback(yylength()); yybegin(COLUMN_IDENTIFIER); pushState(SELECT_EXP);
+ }
+ // fall through
+ case 149: break;
+ case 48:
+ { yybegin(CORRELATION_NAME); pushState(SELECT_EXP); return AS;
+ }
+ // fall through
+ case 150: break;
+ case 49:
+ { yybegin(SUB_QUERY); pushState(FROM_EXP); return LEFT_DOUBLE_BRACE;
+ }
+ // fall through
+ case 151: break;
+ case 50:
+ { yybegin(CORRELATION_NAME); pushState(FROM_EXP); return AS;
+ }
+ // fall through
+ case 152: break;
+ case 51:
+ { yypushback(1); yybegin(COLUMN_IDENTIFIER); return TABLE_NAME_IDENTIFIER;
+ }
+ // fall through
+ case 153: break;
+ case 52:
+ { yybegin(CORRELATION_NAME); pushState(TABLE_IDENTIFIER); return AS;
+ }
+ // fall through
+ case 154: break;
+ case 53:
+ { yypushback(yylength()); yybegin(TABLE_IDENTIFIER);
+ }
+ // fall through
+ case 155: break;
+ case 54:
+ { yypushback(1); yybegin(LOCALIZATION); return COLUMN_REFERENCE_IDENTIFIER;
+ }
+ // fall through
+ case 156: break;
+ case 55:
+ { yybegin(CORRELATION_NAME); pushState(COLUMN_IDENTIFIER); return AS;
+ }
+ // fall through
+ case 157: break;
+ case 56:
+ { yypushback(yylength()); yybegin(COLUMN_IDENTIFIER); pushState(WHERE_EXP);
+ }
+ // fall through
+ case 158: break;
+ case 57:
+ { return LESS_THAN_OR_EQUALS_OPERATOR;
+ }
+ // fall through
+ case 159: break;
+ case 58:
+ { return NOT_EQUALS_OPERATOR;
+ }
+ // fall through
+ case 160: break;
+ case 59:
+ { return GREATER_THAN_OR_EQUALS_OPERATOR;
+ }
+ // fall through
+ case 161: break;
+ case 60:
+ { yybegin(popState()); return RIGHT_DOUBLE_BRACE;
+ }
+ // fall through
+ case 162: break;
+ case 61:
+ { return AS;
+ }
+ // fall through
+ case 163: break;
+ case 62:
+ { yybegin(FROM_EXP); return RIGHT_DOUBLE_BRACE;
+ }
+ // fall through
+ case 164: break;
+ case 63:
+ { return SUM;
+ }
+ // fall through
+ case 165: break;
+ case 64:
+ { return ASC;
+ }
+ // fall through
+ case 166: break;
+ case 65:
+ { return ALL;
+ }
+ // fall through
+ case 167: break;
+ case 66:
+ { return AND;
+ }
+ // fall through
+ case 168: break;
+ case 67:
+ { return ANY;
+ }
+ // fall through
+ case 169: break;
+ case 68:
+ { return AVG;
+ }
+ // fall through
+ case 170: break;
+ case 69:
+ { return NOT;
+ }
+ // fall through
+ case 171: break;
+ case 70:
+ { return MAX;
+ }
+ // fall through
+ case 172: break;
+ case 71:
+ { return MIN;
+ }
+ // fall through
+ case 173: break;
+ case 72:
+ { return SOME;
+ }
+ // fall through
+ case 174: break;
+ case 73:
+ { return LAST;
+ }
+ // fall through
+ case 175: break;
+ case 74:
+ { return LIKE;
+ }
+ // fall through
+ case 176: break;
+ case 75:
+ { return TRUE;
+ }
+ // fall through
+ case 177: break;
+ case 76:
+ { return DESC;
+ }
+ // fall through
+ case 178: break;
+ case 77:
+ { return NULL;
+ }
+ // fall through
+ case 179: break;
+ case 78:
+ { yybegin(FROM_EXP); return FROM;
+ }
+ // fall through
+ case 180: break;
+ case 79:
+ { yybegin(popState()); return LEFT;
+ }
+ // fall through
+ case 181: break;
+ case 80:
+ { yybegin(FROM_EXP); pushState(SELECT_EXP); return FROM;
+ }
+ // fall through
+ case 182: break;
+ case 81:
+ { return LEFT;
+ }
+ // fall through
+ case 183: break;
+ case 82:
+ { yybegin(TABLE_IDENTIFIER); pushState(FROM_EXP); return JOIN;
+ }
+ // fall through
+ case 184: break;
+ case 83:
+ { yybegin(FROM_EXP); return LEFT;
+ }
+ // fall through
+ case 185: break;
+ case 84:
+ { yybegin(FROM_EXP); pushState(WHERE_EXP); return LEFT;
+ }
+ // fall through
+ case 186: break;
+ case 85:
+ { return EVERY;
+ }
+ // fall through
+ case 187: break;
+ case 86:
+ { return COUNT;
+ }
+ // fall through
+ case 188: break;
+ case 87:
+ { return ORDER;
+ }
+ // fall through
+ case 189: break;
+ case 88:
+ { return UNION;
+ }
+ // fall through
+ case 190: break;
+ case 89:
+ { return GROUP;
+ }
+ // fall through
+ case 191: break;
+ case 90:
+ { return FALSE;
+ }
+ // fall through
+ case 192: break;
+ case 91:
+ { return FIRST;
+ }
+ // fall through
+ case 193: break;
+ case 92:
+ { yybegin(WHERE_EXP); return WHERE;
+ }
+ // fall through
+ case 194: break;
+ case 93:
+ { yybegin(WHERE_EXP); pushState(FROM_EXP); return WHERE;
+ }
+ // fall through
+ case 195: break;
+ case 94:
+ { yybegin(SELECT_EXP); pushState(YYINITIAL); return SELECT;
+ }
+ // fall through
+ case 196: break;
+ case 95:
+ { return EXISTS;
+ }
+ // fall through
+ case 197: break;
+ case 96:
+ { return CONCAT;
+ }
+ // fall through
+ case 198: break;
+ case 97:
+ { return SELECT;
+ }
+ // fall through
+ case 199: break;
+ case 98:
+ { yybegin(SELECT_EXP); pushState(FROM_EXP); return SELECT;
+ }
+ // fall through
+ case 200: break;
+ case 99:
+ { yybegin(SELECT_EXP); pushState(WHERE_EXP); return SELECT;
+ }
+ // fall through
+ case 201: break;
+ case 100:
+ { yybegin(SELECT_EXP); pushState(SUB_QUERY); return SELECT;
+ }
+ // fall through
+ case 202: break;
+ case 101:
+ { return BETWEEN;
+ }
+ // fall through
+ case 203: break;
+ case 102:
+ { return DISTINCT;
+ }
+ // fall through
+ case 204: break;
+ default:
+ zzScanError(ZZ_NO_MATCH);
+ }
+ }
+ }
+ }
+
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLexerAdapter.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLexerAdapter.java
new file mode 100644
index 000000000..6df227aa8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchLexerAdapter.java
@@ -0,0 +1,30 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch;
+
+import com.intellij.lexer.FlexAdapter;
+
+import java.io.Reader;
+
+public class FlexibleSearchLexerAdapter extends FlexAdapter {
+
+ public FlexibleSearchLexerAdapter() {
+ super(new FlexibleSearchLexer((Reader) null));
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchParser.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchParser.java
new file mode 100644
index 000000000..cbc6ed9c8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchParser.java
@@ -0,0 +1,2330 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch;
+
+import com.intellij.lang.PsiBuilder;
+import com.intellij.lang.PsiBuilder.Marker;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.utils.FlexibleSearchParserUtils.*;
+import com.intellij.psi.tree.IElementType;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.tree.TokenSet;
+import com.intellij.lang.PsiParser;
+import com.intellij.lang.LightPsiParser;
+
+@SuppressWarnings({"SimplifiableIfStatement", "UnusedAssignment"})
+public class FlexibleSearchParser implements PsiParser, LightPsiParser {
+
+ public ASTNode parse(IElementType t, PsiBuilder b) {
+ parseLight(t, b);
+ return b.getTreeBuilt();
+ }
+
+ public void parseLight(IElementType t, PsiBuilder b) {
+ boolean r;
+ b = adapt_builder_(t, b, this, null);
+ Marker m = enter_section_(b, 0, _COLLAPSE_, null);
+ if (t == AGGREGATE_FUNCTION) {
+ r = aggregate_function(b, 0);
+ }
+ else if (t == BETWEEN_PREDICATE) {
+ r = between_predicate(b, 0);
+ }
+ else if (t == BOOLEAN_FACTOR) {
+ r = boolean_factor(b, 0);
+ }
+ else if (t == BOOLEAN_PREDICAND) {
+ r = boolean_predicand(b, 0);
+ }
+ else if (t == BOOLEAN_PRIMARY) {
+ r = boolean_primary(b, 0);
+ }
+ else if (t == BOOLEAN_TERM) {
+ r = boolean_term(b, 0);
+ }
+ else if (t == BOOLEAN_TEST) {
+ r = boolean_test(b, 0);
+ }
+ else if (t == BOOLEAN_VALUE_EXPRESSION) {
+ r = boolean_value_expression(b, 0);
+ }
+ else if (t == CHARACTER_LIKE_PREDICATE) {
+ r = character_like_predicate(b, 0);
+ }
+ else if (t == CHARACTER_PATTERN) {
+ r = character_pattern(b, 0);
+ }
+ else if (t == CHARACTER_STRING_LITERAL) {
+ r = character_string_literal(b, 0);
+ }
+ else if (t == CHARACTER_SUBSTRING_FUNCTION) {
+ r = character_substring_function(b, 0);
+ }
+ else if (t == CHARACTER_VALUE_FUNCTION) {
+ r = character_value_function(b, 0);
+ }
+ else if (t == COLUMN_LOCALIZATION) {
+ r = column_localization(b, 0);
+ }
+ else if (t == COLUMN_REFERENCE) {
+ r = column_reference(b, 0);
+ }
+ else if (t == COMMON_VALUE_EXPRESSION) {
+ r = common_value_expression(b, 0);
+ }
+ else if (t == COMP_OP) {
+ r = comp_op(b, 0);
+ }
+ else if (t == CORRELATION_NAME) {
+ r = correlation_name(b, 0);
+ }
+ else if (t == DERIVED_COLUMN) {
+ r = derived_column(b, 0);
+ }
+ else if (t == EXISTS_PREDICATE) {
+ r = exists_predicate(b, 0);
+ }
+ else if (t == FROM_CLAUSE) {
+ r = from_clause(b, 0);
+ }
+ else if (t == GENERAL_LITERAL) {
+ r = general_literal(b, 0);
+ }
+ else if (t == GENERAL_SET_FUNCTION) {
+ r = general_set_function(b, 0);
+ }
+ else if (t == GROUP_BY_CLAUSE) {
+ r = group_by_clause(b, 0);
+ }
+ else if (t == GROUPING_COLUMN_REFERENCE) {
+ r = grouping_column_reference(b, 0);
+ }
+ else if (t == GROUPING_COLUMN_REFERENCE_LIST) {
+ r = grouping_column_reference_list(b, 0);
+ }
+ else if (t == GROUPING_ELEMENT) {
+ r = grouping_element(b, 0);
+ }
+ else if (t == GROUPING_ELEMENT_LIST) {
+ r = grouping_element_list(b, 0);
+ }
+ else if (t == IN_PREDICATE) {
+ r = in_predicate(b, 0);
+ }
+ else if (t == JOIN_CONDITION) {
+ r = join_condition(b, 0);
+ }
+ else if (t == JOIN_SPECIFICATION) {
+ r = join_specification(b, 0);
+ }
+ else if (t == JOIN_TYPE) {
+ r = join_type(b, 0);
+ }
+ else if (t == JOINED_TABLE) {
+ r = joined_table(b, 0);
+ }
+ else if (t == LIKE_PREDICATE) {
+ r = like_predicate(b, 0);
+ }
+ else if (t == NULL_ORDERING) {
+ r = null_ordering(b, 0);
+ }
+ else if (t == NULL_PREDICATE) {
+ r = null_predicate(b, 0);
+ }
+ else if (t == ORDER_BY_CLAUSE) {
+ r = order_by_clause(b, 0);
+ }
+ else if (t == ORDERING_SPECIFICATION) {
+ r = ordering_specification(b, 0);
+ }
+ else if (t == ORDINARY_GROUPING_SET) {
+ r = ordinary_grouping_set(b, 0);
+ }
+ else if (t == PARAMETER_REFERENCE) {
+ r = parameter_reference(b, 0);
+ }
+ else if (t == PREDICATE) {
+ r = predicate(b, 0);
+ }
+ else if (t == QUERY_SPECIFICATION) {
+ r = query_specification(b, 0);
+ }
+ else if (t == ROW_VALUE_PREDICAND) {
+ r = row_value_predicand(b, 0);
+ }
+ else if (t == SEARCH_CONDITION) {
+ r = search_condition(b, 0);
+ }
+ else if (t == SELECT_LIST) {
+ r = select_list(b, 0);
+ }
+ else if (t == SELECT_SUBLIST) {
+ r = select_sublist(b, 0);
+ }
+ else if (t == SET_FUNCTION_TYPE) {
+ r = set_function_type(b, 0);
+ }
+ else if (t == SET_QUANTIFIER) {
+ r = set_quantifier(b, 0);
+ }
+ else if (t == SORT_KEY) {
+ r = sort_key(b, 0);
+ }
+ else if (t == SORT_SPECIFICATION) {
+ r = sort_specification(b, 0);
+ }
+ else if (t == SORT_SPECIFICATION_LIST) {
+ r = sort_specification_list(b, 0);
+ }
+ else if (t == STRING_VALUE_EXPRESSION) {
+ r = string_value_expression(b, 0);
+ }
+ else if (t == STRING_VALUE_FUNCTION) {
+ r = string_value_function(b, 0);
+ }
+ else if (t == SUBQUERY) {
+ r = subquery(b, 0);
+ }
+ else if (t == TABLE_EXPRESSION) {
+ r = table_expression(b, 0);
+ }
+ else if (t == TABLE_NAME) {
+ r = table_name(b, 0);
+ }
+ else if (t == TABLE_PRIMARY) {
+ r = table_primary(b, 0);
+ }
+ else if (t == TABLE_REFERENCE) {
+ r = table_reference(b, 0);
+ }
+ else if (t == TABLE_REFERENCE_LIST) {
+ r = table_reference_list(b, 0);
+ }
+ else if (t == TABLE_SUBQUERY) {
+ r = table_subquery(b, 0);
+ }
+ else if (t == TRUTH_VALUE) {
+ r = truth_value(b, 0);
+ }
+ else if (t == VALUE_EXPRESSION) {
+ r = value_expression(b, 0);
+ }
+ else if (t == WHERE_CLAUSE) {
+ r = where_clause(b, 0);
+ }
+ else {
+ r = parse_root_(t, b, 0);
+ }
+ exit_section_(b, 0, m, t, r, true, TRUE_CONDITION);
+ }
+
+ protected boolean parse_root_(IElementType t, PsiBuilder b, int l) {
+ return flexibleSearchFile(b, l + 1);
+ }
+
+ /* ********************************************************** */
+ // COUNT LEFT_PAREN ASTERISK RIGHT_PAREN
+ // | general_set_function
+ public static boolean aggregate_function(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "aggregate_function")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, AGGREGATE_FUNCTION, "");
+ r = parseTokens(b, 0, COUNT, LEFT_PAREN, ASTERISK, RIGHT_PAREN);
+ if (!r) r = general_set_function(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // row_value_predicand [ NOT ] BETWEEN row_value_predicand AND row_value_predicand
+ public static boolean between_predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "between_predicate")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, BETWEEN_PREDICATE, "");
+ r = row_value_predicand(b, l + 1);
+ r = r && between_predicate_1(b, l + 1);
+ r = r && consumeToken(b, BETWEEN);
+ r = r && row_value_predicand(b, l + 1);
+ r = r && consumeToken(b, AND);
+ r = r && row_value_predicand(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ NOT ]
+ private static boolean between_predicate_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "between_predicate_1")) return false;
+ consumeToken(b, NOT);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // [ NOT ] boolean_test
+ public static boolean boolean_factor(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_factor")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, BOOLEAN_FACTOR, "");
+ r = boolean_factor_0(b, l + 1);
+ r = r && boolean_test(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ NOT ]
+ private static boolean boolean_factor_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_factor_0")) return false;
+ consumeToken(b, NOT);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // parenthesized_boolean_value_expression | nonparenthesized_value_expression_primary
+ public static boolean boolean_predicand(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_predicand")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, BOOLEAN_PREDICAND, "");
+ r = parenthesized_boolean_value_expression(b, l + 1);
+ if (!r) r = nonparenthesized_value_expression_primary(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // boolean_predicand | predicate
+ public static boolean boolean_primary(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_primary")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, BOOLEAN_PRIMARY, "");
+ r = boolean_predicand(b, l + 1);
+ if (!r) r = predicate(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // boolean_factor [([AND|OR] boolean_term)*]
+ public static boolean boolean_term(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_term")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, BOOLEAN_TERM, "");
+ r = boolean_factor(b, l + 1);
+ p = r; // pin = 1
+ r = r && boolean_term_1(b, l + 1);
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // [([AND|OR] boolean_term)*]
+ private static boolean boolean_term_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_term_1")) return false;
+ boolean_term_1_0(b, l + 1);
+ return true;
+ }
+
+ // ([AND|OR] boolean_term)*
+ private static boolean boolean_term_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_term_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!boolean_term_1_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "boolean_term_1_0", c)) break;
+ }
+ return true;
+ }
+
+ // [AND|OR] boolean_term
+ private static boolean boolean_term_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_term_1_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = boolean_term_1_0_0_0(b, l + 1);
+ r = r && boolean_term(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // [AND|OR]
+ private static boolean boolean_term_1_0_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_term_1_0_0_0")) return false;
+ boolean_term_1_0_0_0_0(b, l + 1);
+ return true;
+ }
+
+ // AND|OR
+ private static boolean boolean_term_1_0_0_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_term_1_0_0_0_0")) return false;
+ boolean r;
+ r = consumeToken(b, AND);
+ if (!r) r = consumeToken(b, OR);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // !(JOIN)
+ static boolean boolean_term_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_term_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !consumeToken(b, JOIN);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // boolean_primary [ IS [ NOT ] truth_value ]
+ public static boolean boolean_test(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_test")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, BOOLEAN_TEST, "");
+ r = boolean_primary(b, l + 1);
+ r = r && boolean_test_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ IS [ NOT ] truth_value ]
+ private static boolean boolean_test_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_test_1")) return false;
+ boolean_test_1_0(b, l + 1);
+ return true;
+ }
+
+ // IS [ NOT ] truth_value
+ private static boolean boolean_test_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_test_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, IS);
+ r = r && boolean_test_1_0_1(b, l + 1);
+ r = r && truth_value(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // [ NOT ]
+ private static boolean boolean_test_1_0_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_test_1_0_1")) return false;
+ consumeToken(b, NOT);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // boolean_term
+ public static boolean boolean_value_expression(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "boolean_value_expression")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, BOOLEAN_VALUE_EXPRESSION, "");
+ r = boolean_term(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // row_value_predicand [ NOT ] LIKE (character_pattern | value_expression)
+ public static boolean character_like_predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_like_predicate")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, CHARACTER_LIKE_PREDICATE, "");
+ r = row_value_predicand(b, l + 1);
+ r = r && character_like_predicate_1(b, l + 1);
+ r = r && consumeToken(b, LIKE);
+ r = r && character_like_predicate_3(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ NOT ]
+ private static boolean character_like_predicate_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_like_predicate_1")) return false;
+ consumeToken(b, NOT);
+ return true;
+ }
+
+ // character_pattern | value_expression
+ private static boolean character_like_predicate_3(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_like_predicate_3")) return false;
+ boolean r;
+ r = character_pattern(b, l + 1);
+ if (!r) r = value_expression(b, l + 1);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // STRING | string_value_function
+ public static boolean character_pattern(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_pattern")) return false;
+ if (!nextTokenIs(b, "", CONCAT, STRING)) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, CHARACTER_PATTERN, "");
+ r = consumeToken(b, STRING);
+ if (!r) r = string_value_function(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // STRING
+ public static boolean character_string_literal(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_string_literal")) return false;
+ if (!nextTokenIs(b, STRING)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, STRING);
+ exit_section_(b, m, CHARACTER_STRING_LITERAL, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // CONCAT LEFT_PAREN string_value_expression COMMA (character_substring_function | string_value_expression) RIGHT_PAREN
+ public static boolean character_substring_function(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_substring_function")) return false;
+ if (!nextTokenIs(b, CONCAT)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeTokens(b, 0, CONCAT, LEFT_PAREN);
+ r = r && string_value_expression(b, l + 1);
+ r = r && consumeToken(b, COMMA);
+ r = r && character_substring_function_4(b, l + 1);
+ r = r && consumeToken(b, RIGHT_PAREN);
+ exit_section_(b, m, CHARACTER_SUBSTRING_FUNCTION, r);
+ return r;
+ }
+
+ // character_substring_function | string_value_expression
+ private static boolean character_substring_function_4(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_substring_function_4")) return false;
+ boolean r;
+ r = character_substring_function(b, l + 1);
+ if (!r) r = string_value_expression(b, l + 1);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // character_substring_function
+ public static boolean character_value_function(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "character_value_function")) return false;
+ if (!nextTokenIs(b, CONCAT)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = character_substring_function(b, l + 1);
+ exit_section_(b, m, CHARACTER_VALUE_FUNCTION, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // LEFT_BRACKET IDENTIFIER RIGHT_BRACKET
+ public static boolean column_localization(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_localization")) return false;
+ if (!nextTokenIs(b, LEFT_BRACKET)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeTokens(b, 0, LEFT_BRACKET, IDENTIFIER, RIGHT_BRACKET);
+ exit_section_(b, m, COLUMN_LOCALIZATION, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // identifier_chain
+ public static boolean column_reference(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_reference")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, COLUMN_REFERENCE, "");
+ r = identifier_chain(b, l + 1);
+ exit_section_(b, l, m, r, false, column_reference_recover_parser_);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // !(<> | IDENTIFIER | LINE_TERMINATOR | RIGHT_BRACE | FROM | LEFT_BRACKET | SEMICOLON | WHITE_SPACE | AND | ORDER | IS | OR | COMMA | RIGHT_PAREN | IN | RIGHT_DOUBLE_BRACE | comp_op)
+ static boolean column_reference_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_reference_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !column_reference_recover_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // <> | IDENTIFIER | LINE_TERMINATOR | RIGHT_BRACE | FROM | LEFT_BRACKET | SEMICOLON | WHITE_SPACE | AND | ORDER | IS | OR | COMMA | RIGHT_PAREN | IN | RIGHT_DOUBLE_BRACE | comp_op
+ private static boolean column_reference_recover_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_reference_recover_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = eof(b, l + 1);
+ if (!r) r = consumeToken(b, IDENTIFIER);
+ if (!r) r = consumeToken(b, LINE_TERMINATOR);
+ if (!r) r = consumeToken(b, RIGHT_BRACE);
+ if (!r) r = consumeToken(b, FROM);
+ if (!r) r = consumeToken(b, LEFT_BRACKET);
+ if (!r) r = consumeToken(b, SEMICOLON);
+ if (!r) r = consumeToken(b, WHITE_SPACE);
+ if (!r) r = consumeToken(b, AND);
+ if (!r) r = consumeToken(b, ORDER);
+ if (!r) r = consumeToken(b, IS);
+ if (!r) r = consumeToken(b, OR);
+ if (!r) r = consumeToken(b, COMMA);
+ if (!r) r = consumeToken(b, RIGHT_PAREN);
+ if (!r) r = consumeToken(b, IN);
+ if (!r) r = consumeToken(b, RIGHT_DOUBLE_BRACE);
+ if (!r) r = comp_op(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // LEFT_BRACE? column_reference column_localization? RIGHT_BRACE?
+ static boolean column_reference_value(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_reference_value")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_);
+ r = column_reference_value_0(b, l + 1);
+ r = r && column_reference(b, l + 1);
+ p = r; // pin = 2
+ r = r && report_error_(b, column_reference_value_2(b, l + 1));
+ r = p && column_reference_value_3(b, l + 1) && r;
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // LEFT_BRACE?
+ private static boolean column_reference_value_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_reference_value_0")) return false;
+ consumeToken(b, LEFT_BRACE);
+ return true;
+ }
+
+ // column_localization?
+ private static boolean column_reference_value_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_reference_value_2")) return false;
+ column_localization(b, l + 1);
+ return true;
+ }
+
+ // RIGHT_BRACE?
+ private static boolean column_reference_value_3(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "column_reference_value_3")) return false;
+ consumeToken(b, RIGHT_BRACE);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // string_value_expression | NUMBER
+ public static boolean common_value_expression(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "common_value_expression")) return false;
+ if (!nextTokenIs(b, "", NUMBER, STRING)) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, COMMON_VALUE_EXPRESSION, "");
+ r = string_value_expression(b, l + 1);
+ if (!r) r = consumeToken(b, NUMBER);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // EQUALS_OPERATOR
+ // | GREATER_THAN_OPERATOR
+ // | NOT_EQUALS_OPERATOR
+ // | LESS_THAN_OPERATOR
+ // | LESS_THAN_OR_EQUALS_OPERATOR
+ // | GREATER_THAN_OR_EQUALS_OPERATOR
+ public static boolean comp_op(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "comp_op")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, COMP_OP, "");
+ r = consumeToken(b, EQUALS_OPERATOR);
+ if (!r) r = consumeToken(b, GREATER_THAN_OPERATOR);
+ if (!r) r = consumeToken(b, NOT_EQUALS_OPERATOR);
+ if (!r) r = consumeToken(b, LESS_THAN_OPERATOR);
+ if (!r) r = consumeToken(b, LESS_THAN_OR_EQUALS_OPERATOR);
+ if (!r) r = consumeToken(b, GREATER_THAN_OR_EQUALS_OPERATOR);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // row_value_predicand? comp_op row_value_predicand
+ static boolean comparison_predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "comparison_predicate")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_);
+ r = comparison_predicate_0(b, l + 1);
+ r = r && comp_op(b, l + 1);
+ p = r; // pin = 2
+ r = r && row_value_predicand(b, l + 1);
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // row_value_predicand?
+ private static boolean comparison_predicate_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "comparison_predicate_0")) return false;
+ row_value_predicand(b, l + 1);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // AVG | MAX | MIN | SUM
+ // | EVERY | ANY | SOME
+ // | COUNT
+ static boolean computational_operation(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "computational_operation")) return false;
+ boolean r;
+ r = consumeToken(b, AVG);
+ if (!r) r = consumeToken(b, MAX);
+ if (!r) r = consumeToken(b, MIN);
+ if (!r) r = consumeToken(b, SUM);
+ if (!r) r = consumeToken(b, EVERY);
+ if (!r) r = consumeToken(b, ANY);
+ if (!r) r = consumeToken(b, SOME);
+ if (!r) r = consumeToken(b, COUNT);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // IDENTIFIER
+ public static boolean correlation_name(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "correlation_name")) return false;
+ if (!nextTokenIs(b, IDENTIFIER)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, IDENTIFIER);
+ exit_section_(b, m, CORRELATION_NAME, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // value_expression [ AS correlation_name ]
+ public static boolean derived_column(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "derived_column")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, DERIVED_COLUMN, "");
+ r = value_expression(b, l + 1);
+ r = r && derived_column_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ AS correlation_name ]
+ private static boolean derived_column_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "derived_column_1")) return false;
+ derived_column_1_0(b, l + 1);
+ return true;
+ }
+
+ // AS correlation_name
+ private static boolean derived_column_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "derived_column_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, AS);
+ r = r && correlation_name(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // SEMICOLON | <>
+ static boolean empty_statement(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "empty_statement")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, SEMICOLON);
+ if (!r) r = eof(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // EXISTS table_subquery
+ public static boolean exists_predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "exists_predicate")) return false;
+ if (!nextTokenIs(b, EXISTS)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, EXISTS);
+ r = r && table_subquery(b, l + 1);
+ exit_section_(b, m, EXISTS_PREDICATE, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // !(SEMICOLON | <> )
+ static boolean expressionRecoverWhile(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "expressionRecoverWhile")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !expressionRecoverWhile_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // SEMICOLON | <>
+ private static boolean expressionRecoverWhile_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "expressionRecoverWhile_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, SEMICOLON);
+ if (!r) r = eof(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // ( statement )? ( ';' ( statement )? )*
+ static boolean flexibleSearchFile(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "flexibleSearchFile")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = flexibleSearchFile_0(b, l + 1);
+ r = r && flexibleSearchFile_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // ( statement )?
+ private static boolean flexibleSearchFile_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "flexibleSearchFile_0")) return false;
+ flexibleSearchFile_0_0(b, l + 1);
+ return true;
+ }
+
+ // ( statement )
+ private static boolean flexibleSearchFile_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "flexibleSearchFile_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = statement(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // ( ';' ( statement )? )*
+ private static boolean flexibleSearchFile_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "flexibleSearchFile_1")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!flexibleSearchFile_1_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "flexibleSearchFile_1", c)) break;
+ }
+ return true;
+ }
+
+ // ';' ( statement )?
+ private static boolean flexibleSearchFile_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "flexibleSearchFile_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, SEMICOLON);
+ r = r && flexibleSearchFile_1_0_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // ( statement )?
+ private static boolean flexibleSearchFile_1_0_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "flexibleSearchFile_1_0_1")) return false;
+ flexibleSearchFile_1_0_1_0(b, l + 1);
+ return true;
+ }
+
+ // ( statement )
+ private static boolean flexibleSearchFile_1_0_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "flexibleSearchFile_1_0_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = statement(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // FROM LEFT_PAREN? (LEFT_BRACE table_reference_list RIGHT_BRACE | subquery ) RIGHT_PAREN?
+ public static boolean from_clause(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "from_clause")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, FROM_CLAUSE, "");
+ r = consumeToken(b, FROM);
+ p = r; // pin = 1
+ r = r && report_error_(b, from_clause_1(b, l + 1));
+ r = p && report_error_(b, from_clause_2(b, l + 1)) && r;
+ r = p && from_clause_3(b, l + 1) && r;
+ exit_section_(b, l, m, r, p, from_clause_recover_parser_);
+ return r || p;
+ }
+
+ // LEFT_PAREN?
+ private static boolean from_clause_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "from_clause_1")) return false;
+ consumeToken(b, LEFT_PAREN);
+ return true;
+ }
+
+ // LEFT_BRACE table_reference_list RIGHT_BRACE | subquery
+ private static boolean from_clause_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "from_clause_2")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = from_clause_2_0(b, l + 1);
+ if (!r) r = subquery(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // LEFT_BRACE table_reference_list RIGHT_BRACE
+ private static boolean from_clause_2_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "from_clause_2_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, LEFT_BRACE);
+ r = r && table_reference_list(b, l + 1);
+ r = r && consumeToken(b, RIGHT_BRACE);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // RIGHT_PAREN?
+ private static boolean from_clause_3(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "from_clause_3")) return false;
+ consumeToken(b, RIGHT_PAREN);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // !(WHERE | SELECT | FROM | SEMICOLON )
+ static boolean from_clause_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "from_clause_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !from_clause_recover_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // WHERE | SELECT | FROM | SEMICOLON
+ private static boolean from_clause_recover_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "from_clause_recover_0")) return false;
+ boolean r;
+ r = consumeToken(b, WHERE);
+ if (!r) r = consumeToken(b, SELECT);
+ if (!r) r = consumeToken(b, FROM);
+ if (!r) r = consumeToken(b, SEMICOLON);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // character_string_literal
+ public static boolean general_literal(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "general_literal")) return false;
+ if (!nextTokenIs(b, STRING)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = character_string_literal(b, l + 1);
+ exit_section_(b, m, GENERAL_LITERAL, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // set_function_type LEFT_PAREN [ set_quantifier ] value_expression RIGHT_PAREN [ [ AS ] correlation_name ]
+ public static boolean general_set_function(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "general_set_function")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, GENERAL_SET_FUNCTION, "");
+ r = set_function_type(b, l + 1);
+ r = r && consumeToken(b, LEFT_PAREN);
+ r = r && general_set_function_2(b, l + 1);
+ r = r && value_expression(b, l + 1);
+ r = r && consumeToken(b, RIGHT_PAREN);
+ r = r && general_set_function_5(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ set_quantifier ]
+ private static boolean general_set_function_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "general_set_function_2")) return false;
+ set_quantifier(b, l + 1);
+ return true;
+ }
+
+ // [ [ AS ] correlation_name ]
+ private static boolean general_set_function_5(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "general_set_function_5")) return false;
+ general_set_function_5_0(b, l + 1);
+ return true;
+ }
+
+ // [ AS ] correlation_name
+ private static boolean general_set_function_5_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "general_set_function_5_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = general_set_function_5_0_0(b, l + 1);
+ r = r && correlation_name(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // [ AS ]
+ private static boolean general_set_function_5_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "general_set_function_5_0_0")) return false;
+ consumeToken(b, AS);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // GROUP BY [ set_quantifier ] grouping_element_list
+ public static boolean group_by_clause(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "group_by_clause")) return false;
+ if (!nextTokenIs(b, GROUP)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeTokens(b, 0, GROUP, BY);
+ r = r && group_by_clause_2(b, l + 1);
+ r = r && grouping_element_list(b, l + 1);
+ exit_section_(b, m, GROUP_BY_CLAUSE, r);
+ return r;
+ }
+
+ // [ set_quantifier ]
+ private static boolean group_by_clause_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "group_by_clause_2")) return false;
+ set_quantifier(b, l + 1);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // value_expression
+ public static boolean grouping_column_reference(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_column_reference")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, GROUPING_COLUMN_REFERENCE, "");
+ r = value_expression(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // grouping_column_reference [ { COMMA grouping_column_reference }* ]
+ public static boolean grouping_column_reference_list(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_column_reference_list")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, GROUPING_COLUMN_REFERENCE_LIST, "");
+ r = grouping_column_reference(b, l + 1);
+ r = r && grouping_column_reference_list_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ { COMMA grouping_column_reference }* ]
+ private static boolean grouping_column_reference_list_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_column_reference_list_1")) return false;
+ grouping_column_reference_list_1_0(b, l + 1);
+ return true;
+ }
+
+ // { COMMA grouping_column_reference }*
+ private static boolean grouping_column_reference_list_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_column_reference_list_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!grouping_column_reference_list_1_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "grouping_column_reference_list_1_0", c)) break;
+ }
+ return true;
+ }
+
+ // COMMA grouping_column_reference
+ private static boolean grouping_column_reference_list_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_column_reference_list_1_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, COMMA);
+ r = r && grouping_column_reference(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // ordinary_grouping_set
+ public static boolean grouping_element(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_element")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, GROUPING_ELEMENT, "");
+ r = ordinary_grouping_set(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // grouping_element [ { COMMA grouping_element }* ]
+ public static boolean grouping_element_list(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_element_list")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, GROUPING_ELEMENT_LIST, "");
+ r = grouping_element(b, l + 1);
+ r = r && grouping_element_list_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ { COMMA grouping_element }* ]
+ private static boolean grouping_element_list_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_element_list_1")) return false;
+ grouping_element_list_1_0(b, l + 1);
+ return true;
+ }
+
+ // { COMMA grouping_element }*
+ private static boolean grouping_element_list_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_element_list_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!grouping_element_list_1_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "grouping_element_list_1_0", c)) break;
+ }
+ return true;
+ }
+
+ // COMMA grouping_element
+ private static boolean grouping_element_list_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "grouping_element_list_1_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, COMMA);
+ r = r && grouping_element(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // (IDENTIFIER | TABLE_NAME_IDENTIFIER | COLUMN_REFERENCE_IDENTIFIER) [ ( (DOT|COLON) (IDENTIFIER | COLUMN_REFERENCE_IDENTIFIER) )* ]
+ static boolean identifier_chain(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "identifier_chain")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = identifier_chain_0(b, l + 1);
+ r = r && identifier_chain_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // IDENTIFIER | TABLE_NAME_IDENTIFIER | COLUMN_REFERENCE_IDENTIFIER
+ private static boolean identifier_chain_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "identifier_chain_0")) return false;
+ boolean r;
+ r = consumeToken(b, IDENTIFIER);
+ if (!r) r = consumeToken(b, TABLE_NAME_IDENTIFIER);
+ if (!r) r = consumeToken(b, COLUMN_REFERENCE_IDENTIFIER);
+ return r;
+ }
+
+ // [ ( (DOT|COLON) (IDENTIFIER | COLUMN_REFERENCE_IDENTIFIER) )* ]
+ private static boolean identifier_chain_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "identifier_chain_1")) return false;
+ identifier_chain_1_0(b, l + 1);
+ return true;
+ }
+
+ // ( (DOT|COLON) (IDENTIFIER | COLUMN_REFERENCE_IDENTIFIER) )*
+ private static boolean identifier_chain_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "identifier_chain_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!identifier_chain_1_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "identifier_chain_1_0", c)) break;
+ }
+ return true;
+ }
+
+ // (DOT|COLON) (IDENTIFIER | COLUMN_REFERENCE_IDENTIFIER)
+ private static boolean identifier_chain_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "identifier_chain_1_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = identifier_chain_1_0_0_0(b, l + 1);
+ r = r && identifier_chain_1_0_0_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // DOT|COLON
+ private static boolean identifier_chain_1_0_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "identifier_chain_1_0_0_0")) return false;
+ boolean r;
+ r = consumeToken(b, DOT);
+ if (!r) r = consumeToken(b, COLON);
+ return r;
+ }
+
+ // IDENTIFIER | COLUMN_REFERENCE_IDENTIFIER
+ private static boolean identifier_chain_1_0_0_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "identifier_chain_1_0_0_1")) return false;
+ boolean r;
+ r = consumeToken(b, IDENTIFIER);
+ if (!r) r = consumeToken(b, COLUMN_REFERENCE_IDENTIFIER);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // row_value_predicand IN (table_subquery | LEFT_PAREN? row_value_predicand RIGHT_PAREN?)
+ public static boolean in_predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "in_predicate")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, IN_PREDICATE, "");
+ r = row_value_predicand(b, l + 1);
+ r = r && consumeToken(b, IN);
+ r = r && in_predicate_2(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // table_subquery | LEFT_PAREN? row_value_predicand RIGHT_PAREN?
+ private static boolean in_predicate_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "in_predicate_2")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = table_subquery(b, l + 1);
+ if (!r) r = in_predicate_2_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // LEFT_PAREN? row_value_predicand RIGHT_PAREN?
+ private static boolean in_predicate_2_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "in_predicate_2_1")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = in_predicate_2_1_0(b, l + 1);
+ r = r && row_value_predicand(b, l + 1);
+ r = r && in_predicate_2_1_2(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // LEFT_PAREN?
+ private static boolean in_predicate_2_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "in_predicate_2_1_0")) return false;
+ consumeToken(b, LEFT_PAREN);
+ return true;
+ }
+
+ // RIGHT_PAREN?
+ private static boolean in_predicate_2_1_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "in_predicate_2_1_2")) return false;
+ consumeToken(b, RIGHT_PAREN);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // ON search_condition
+ public static boolean join_condition(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "join_condition")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, JOIN_CONDITION, "");
+ r = consumeToken(b, ON);
+ p = r; // pin = 1
+ r = r && search_condition(b, l + 1);
+ exit_section_(b, l, m, r, p, join_condition_recover_parser_);
+ return r || p;
+ }
+
+ /* ********************************************************** */
+ // !( RIGHT_BRACE | LEFT | JOIN )
+ static boolean join_condition_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "join_condition_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !join_condition_recover_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // RIGHT_BRACE | LEFT | JOIN
+ private static boolean join_condition_recover_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "join_condition_recover_0")) return false;
+ boolean r;
+ r = consumeToken(b, RIGHT_BRACE);
+ if (!r) r = consumeToken(b, LEFT);
+ if (!r) r = consumeToken(b, JOIN);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // join_condition
+ public static boolean join_specification(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "join_specification")) return false;
+ if (!nextTokenIs(b, ON)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = join_condition(b, l + 1);
+ exit_section_(b, m, JOIN_SPECIFICATION, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // LEFT |
+ public static boolean join_type(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "join_type")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, JOIN_TYPE, "");
+ r = consumeToken(b, LEFT);
+ if (!r) r = consumeToken(b, JOIN_TYPE_1_0);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // [ join_type ] JOIN table_reference join_specification
+ public static boolean joined_table(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "joined_table")) return false;
+ if (!nextTokenIs(b, "", JOIN, LEFT)) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, JOINED_TABLE, "");
+ r = joined_table_0(b, l + 1);
+ r = r && consumeToken(b, JOIN);
+ p = r; // pin = 2
+ r = r && report_error_(b, table_reference(b, l + 1));
+ r = p && join_specification(b, l + 1) && r;
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // [ join_type ]
+ private static boolean joined_table_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "joined_table_0")) return false;
+ join_type(b, l + 1);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // character_like_predicate
+ public static boolean like_predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "like_predicate")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, LIKE_PREDICATE, "");
+ r = character_like_predicate(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // column_reference
+ static boolean nonparenthesized_value_expression_primary(PsiBuilder b, int l) {
+ return column_reference(b, l + 1);
+ }
+
+ /* ********************************************************** */
+ // NULLS FIRST | NULLS LAST
+ public static boolean null_ordering(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "null_ordering")) return false;
+ if (!nextTokenIs(b, NULLS)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = parseTokens(b, 0, NULLS, FIRST);
+ if (!r) r = parseTokens(b, 0, NULLS, LAST);
+ exit_section_(b, m, NULL_ORDERING, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // row_value_predicand IS [ NOT ] NULL
+ public static boolean null_predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "null_predicate")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, NULL_PREDICATE, "");
+ r = row_value_predicand(b, l + 1);
+ r = r && consumeToken(b, IS);
+ r = r && null_predicate_2(b, l + 1);
+ r = r && consumeToken(b, NULL);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ NOT ]
+ private static boolean null_predicate_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "null_predicate_2")) return false;
+ consumeToken(b, NOT);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // !( SEMICOLON | query_specification | RIGHT_DOUBLE_BRACE)
+ static boolean orderByClauseRecoverWhile(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "orderByClauseRecoverWhile")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !orderByClauseRecoverWhile_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // SEMICOLON | query_specification | RIGHT_DOUBLE_BRACE
+ private static boolean orderByClauseRecoverWhile_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "orderByClauseRecoverWhile_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, SEMICOLON);
+ if (!r) r = query_specification(b, l + 1);
+ if (!r) r = consumeToken(b, RIGHT_DOUBLE_BRACE);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // ORDER BY sort_specification_list
+ public static boolean order_by_clause(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "order_by_clause")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, ORDER_BY_CLAUSE, "");
+ r = consumeTokens(b, 1, ORDER, BY);
+ p = r; // pin = 1
+ r = r && sort_specification_list(b, l + 1);
+ exit_section_(b, l, m, r, p, orderByClauseRecoverWhile_parser_);
+ return r || p;
+ }
+
+ /* ********************************************************** */
+ // ASC | DESC
+ public static boolean ordering_specification(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "ordering_specification")) return false;
+ if (!nextTokenIs(b, "", ASC, DESC)) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, ORDERING_SPECIFICATION, "");
+ r = consumeToken(b, ASC);
+ if (!r) r = consumeToken(b, DESC);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // grouping_column_reference | LEFT_PAREN grouping_column_reference_list RIGHT_PAREN
+ public static boolean ordinary_grouping_set(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "ordinary_grouping_set")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, ORDINARY_GROUPING_SET, "");
+ r = grouping_column_reference(b, l + 1);
+ if (!r) r = ordinary_grouping_set_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // LEFT_PAREN grouping_column_reference_list RIGHT_PAREN
+ private static boolean ordinary_grouping_set_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "ordinary_grouping_set_1")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, LEFT_PAREN);
+ r = r && grouping_column_reference_list(b, l + 1);
+ r = r && consumeToken(b, RIGHT_PAREN);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // QUESTION_MARK PARAMETER_IDENTIFIER
+ public static boolean parameter_reference(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "parameter_reference")) return false;
+ if (!nextTokenIs(b, QUESTION_MARK)) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, PARAMETER_REFERENCE, null);
+ r = consumeTokens(b, 1, QUESTION_MARK, PARAMETER_IDENTIFIER);
+ p = r; // pin = 1
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ /* ********************************************************** */
+ // LEFT_PAREN boolean_value_expression RIGHT_PAREN
+ static boolean parenthesized_boolean_value_expression(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "parenthesized_boolean_value_expression")) return false;
+ if (!nextTokenIs(b, LEFT_PAREN)) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_);
+ r = consumeToken(b, LEFT_PAREN);
+ p = r; // pin = 1
+ r = r && report_error_(b, boolean_value_expression(b, l + 1));
+ r = p && consumeToken(b, RIGHT_PAREN) && r;
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ /* ********************************************************** */
+ // comparison_predicate
+ // | between_predicate
+ // | like_predicate
+ // | null_predicate
+ // | exists_predicate
+ // | in_predicate
+ public static boolean predicate(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "predicate")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, PREDICATE, "");
+ r = comparison_predicate(b, l + 1);
+ if (!r) r = between_predicate(b, l + 1);
+ if (!r) r = like_predicate(b, l + 1);
+ if (!r) r = null_predicate(b, l + 1);
+ if (!r) r = exists_predicate(b, l + 1);
+ if (!r) r = in_predicate(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // !( SEMICOLON | query_specification | RIGHT_DOUBLE_BRACE)
+ static boolean querySpecificationRecoverWhile(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "querySpecificationRecoverWhile")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !querySpecificationRecoverWhile_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // SEMICOLON | query_specification | RIGHT_DOUBLE_BRACE
+ private static boolean querySpecificationRecoverWhile_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "querySpecificationRecoverWhile_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, SEMICOLON);
+ if (!r) r = query_specification(b, l + 1);
+ if (!r) r = consumeToken(b, RIGHT_DOUBLE_BRACE);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // SELECT [ set_quantifier ] select_list table_expression (SEMICOLON | <>)?
+ public static boolean query_specification(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "query_specification")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, QUERY_SPECIFICATION, "");
+ r = consumeToken(b, SELECT);
+ p = r; // pin = 1
+ r = r && report_error_(b, query_specification_1(b, l + 1));
+ r = p && report_error_(b, select_list(b, l + 1)) && r;
+ r = p && report_error_(b, table_expression(b, l + 1)) && r;
+ r = p && query_specification_4(b, l + 1) && r;
+ exit_section_(b, l, m, r, p, querySpecificationRecoverWhile_parser_);
+ return r || p;
+ }
+
+ // [ set_quantifier ]
+ private static boolean query_specification_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "query_specification_1")) return false;
+ set_quantifier(b, l + 1);
+ return true;
+ }
+
+ // (SEMICOLON | <>)?
+ private static boolean query_specification_4(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "query_specification_4")) return false;
+ query_specification_4_0(b, l + 1);
+ return true;
+ }
+
+ // SEMICOLON | <>
+ private static boolean query_specification_4_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "query_specification_4_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, SEMICOLON);
+ if (!r) r = eof(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // value_expression | common_value_expression (','common_value_expression)*
+ public static boolean row_value_predicand(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "row_value_predicand")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, ROW_VALUE_PREDICAND, "");
+ r = value_expression(b, l + 1);
+ if (!r) r = row_value_predicand_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // common_value_expression (','common_value_expression)*
+ private static boolean row_value_predicand_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "row_value_predicand_1")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = common_value_expression(b, l + 1);
+ r = r && row_value_predicand_1_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // (','common_value_expression)*
+ private static boolean row_value_predicand_1_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "row_value_predicand_1_1")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!row_value_predicand_1_1_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "row_value_predicand_1_1", c)) break;
+ }
+ return true;
+ }
+
+ // ','common_value_expression
+ private static boolean row_value_predicand_1_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "row_value_predicand_1_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, COMMA);
+ r = r && common_value_expression(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // boolean_value_expression
+ public static boolean search_condition(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "search_condition")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SEARCH_CONDITION, "");
+ r = boolean_value_expression(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // ASTERISK | select_sublist [ ( COMMA select_sublist )* ]
+ public static boolean select_list(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_list")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SELECT_LIST, "");
+ r = consumeToken(b, ASTERISK);
+ if (!r) r = select_list_1(b, l + 1);
+ exit_section_(b, l, m, r, false, select_list_recover_parser_);
+ return r;
+ }
+
+ // select_sublist [ ( COMMA select_sublist )* ]
+ private static boolean select_list_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_list_1")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = select_sublist(b, l + 1);
+ r = r && select_list_1_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // [ ( COMMA select_sublist )* ]
+ private static boolean select_list_1_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_list_1_1")) return false;
+ select_list_1_1_0(b, l + 1);
+ return true;
+ }
+
+ // ( COMMA select_sublist )*
+ private static boolean select_list_1_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_list_1_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!select_list_1_1_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "select_list_1_1_0", c)) break;
+ }
+ return true;
+ }
+
+ // COMMA select_sublist
+ private static boolean select_list_1_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_list_1_1_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, COMMA);
+ r = r && select_sublist(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // !(FROM)
+ static boolean select_list_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_list_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !consumeToken(b, FROM);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // derived_column | (aggregate_function [COMMA aggregate_function*])
+ public static boolean select_sublist(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_sublist")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SELECT_SUBLIST, "");
+ r = derived_column(b, l + 1);
+ if (!r) r = select_sublist_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // aggregate_function [COMMA aggregate_function*]
+ private static boolean select_sublist_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_sublist_1")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = aggregate_function(b, l + 1);
+ r = r && select_sublist_1_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // [COMMA aggregate_function*]
+ private static boolean select_sublist_1_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_sublist_1_1")) return false;
+ select_sublist_1_1_0(b, l + 1);
+ return true;
+ }
+
+ // COMMA aggregate_function*
+ private static boolean select_sublist_1_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_sublist_1_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, COMMA);
+ r = r && select_sublist_1_1_0_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // aggregate_function*
+ private static boolean select_sublist_1_1_0_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "select_sublist_1_1_0_1")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!aggregate_function(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "select_sublist_1_1_0_1", c)) break;
+ }
+ return true;
+ }
+
+ /* ********************************************************** */
+ // computational_operation
+ public static boolean set_function_type(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "set_function_type")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SET_FUNCTION_TYPE, "");
+ r = computational_operation(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // DISTINCT | ALL
+ public static boolean set_quantifier(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "set_quantifier")) return false;
+ if (!nextTokenIs(b, "", ALL, DISTINCT)) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SET_QUANTIFIER, "");
+ r = consumeToken(b, DISTINCT);
+ if (!r) r = consumeToken(b, ALL);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // value_expression
+ public static boolean sort_key(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_key")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SORT_KEY, "");
+ r = value_expression(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // sort_key [ ordering_specification ] [ null_ordering ]
+ public static boolean sort_specification(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_specification")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SORT_SPECIFICATION, "");
+ r = sort_key(b, l + 1);
+ r = r && sort_specification_1(b, l + 1);
+ r = r && sort_specification_2(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ ordering_specification ]
+ private static boolean sort_specification_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_specification_1")) return false;
+ ordering_specification(b, l + 1);
+ return true;
+ }
+
+ // [ null_ordering ]
+ private static boolean sort_specification_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_specification_2")) return false;
+ null_ordering(b, l + 1);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // sort_specification [ { COMMA sort_specification }* ]
+ public static boolean sort_specification_list(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_specification_list")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, SORT_SPECIFICATION_LIST, "");
+ r = sort_specification(b, l + 1);
+ r = r && sort_specification_list_1(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // [ { COMMA sort_specification }* ]
+ private static boolean sort_specification_list_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_specification_list_1")) return false;
+ sort_specification_list_1_0(b, l + 1);
+ return true;
+ }
+
+ // { COMMA sort_specification }*
+ private static boolean sort_specification_list_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_specification_list_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!sort_specification_list_1_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "sort_specification_list_1_0", c)) break;
+ }
+ return true;
+ }
+
+ // COMMA sort_specification
+ private static boolean sort_specification_list_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "sort_specification_list_1_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, COMMA);
+ r = r && sort_specification(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // !<> (query_specification empty_statement?)* empty_statement?
+ static boolean statement(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "statement")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_);
+ r = statement_0(b, l + 1);
+ r = r && statement_1(b, l + 1);
+ r = r && statement_2(b, l + 1);
+ exit_section_(b, l, m, r, false, expressionRecoverWhile_parser_);
+ return r;
+ }
+
+ // !<>
+ private static boolean statement_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "statement_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !eof(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // (query_specification empty_statement?)*
+ private static boolean statement_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "statement_1")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!statement_1_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "statement_1", c)) break;
+ }
+ return true;
+ }
+
+ // query_specification empty_statement?
+ private static boolean statement_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "statement_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = query_specification(b, l + 1);
+ r = r && statement_1_0_1(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // empty_statement?
+ private static boolean statement_1_0_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "statement_1_0_1")) return false;
+ empty_statement(b, l + 1);
+ return true;
+ }
+
+ // empty_statement?
+ private static boolean statement_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "statement_2")) return false;
+ empty_statement(b, l + 1);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // general_literal
+ public static boolean string_value_expression(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "string_value_expression")) return false;
+ if (!nextTokenIs(b, STRING)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = general_literal(b, l + 1);
+ exit_section_(b, m, STRING_VALUE_EXPRESSION, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // character_value_function
+ public static boolean string_value_function(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "string_value_function")) return false;
+ if (!nextTokenIs(b, CONCAT)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = character_value_function(b, l + 1);
+ exit_section_(b, m, STRING_VALUE_FUNCTION, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // LEFT_PAREN? LEFT_DOUBLE_BRACE query_specification RIGHT_DOUBLE_BRACE [(UNION ALL? subquery)*] RIGHT_PAREN? [ [ AS ] correlation_name ]
+ public static boolean subquery(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery")) return false;
+ if (!nextTokenIs(b, "", LEFT_DOUBLE_BRACE, LEFT_PAREN)) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, SUBQUERY, "");
+ r = subquery_0(b, l + 1);
+ r = r && consumeToken(b, LEFT_DOUBLE_BRACE);
+ p = r; // pin = 2
+ r = r && report_error_(b, query_specification(b, l + 1));
+ r = p && report_error_(b, consumeToken(b, RIGHT_DOUBLE_BRACE)) && r;
+ r = p && report_error_(b, subquery_4(b, l + 1)) && r;
+ r = p && report_error_(b, subquery_5(b, l + 1)) && r;
+ r = p && subquery_6(b, l + 1) && r;
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // LEFT_PAREN?
+ private static boolean subquery_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_0")) return false;
+ consumeToken(b, LEFT_PAREN);
+ return true;
+ }
+
+ // [(UNION ALL? subquery)*]
+ private static boolean subquery_4(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_4")) return false;
+ subquery_4_0(b, l + 1);
+ return true;
+ }
+
+ // (UNION ALL? subquery)*
+ private static boolean subquery_4_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_4_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!subquery_4_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "subquery_4_0", c)) break;
+ }
+ return true;
+ }
+
+ // UNION ALL? subquery
+ private static boolean subquery_4_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_4_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, UNION);
+ r = r && subquery_4_0_0_1(b, l + 1);
+ r = r && subquery(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // ALL?
+ private static boolean subquery_4_0_0_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_4_0_0_1")) return false;
+ consumeToken(b, ALL);
+ return true;
+ }
+
+ // RIGHT_PAREN?
+ private static boolean subquery_5(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_5")) return false;
+ consumeToken(b, RIGHT_PAREN);
+ return true;
+ }
+
+ // [ [ AS ] correlation_name ]
+ private static boolean subquery_6(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_6")) return false;
+ subquery_6_0(b, l + 1);
+ return true;
+ }
+
+ // [ AS ] correlation_name
+ private static boolean subquery_6_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_6_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = subquery_6_0_0(b, l + 1);
+ r = r && correlation_name(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // [ AS ]
+ private static boolean subquery_6_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "subquery_6_0_0")) return false;
+ consumeToken(b, AS);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // from_clause
+ // where_clause?
+ // order_by_clause?
+ // group_by_clause?
+ public static boolean table_expression(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_expression")) return false;
+ if (!nextTokenIs(b, FROM)) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = from_clause(b, l + 1);
+ r = r && table_expression_1(b, l + 1);
+ r = r && table_expression_2(b, l + 1);
+ r = r && table_expression_3(b, l + 1);
+ exit_section_(b, m, TABLE_EXPRESSION, r);
+ return r;
+ }
+
+ // where_clause?
+ private static boolean table_expression_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_expression_1")) return false;
+ where_clause(b, l + 1);
+ return true;
+ }
+
+ // order_by_clause?
+ private static boolean table_expression_2(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_expression_2")) return false;
+ order_by_clause(b, l + 1);
+ return true;
+ }
+
+ // group_by_clause?
+ private static boolean table_expression_3(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_expression_3")) return false;
+ group_by_clause(b, l + 1);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // TABLE_NAME_IDENTIFIER [ EXCLAMATION_MARK ]
+ public static boolean table_name(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_name")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, TABLE_NAME, "");
+ r = consumeToken(b, TABLE_NAME_IDENTIFIER);
+ p = r; // pin = 1
+ r = r && table_name_1(b, l + 1);
+ exit_section_(b, l, m, r, p, table_name_recover_parser_);
+ return r || p;
+ }
+
+ // [ EXCLAMATION_MARK ]
+ private static boolean table_name_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_name_1")) return false;
+ consumeToken(b, EXCLAMATION_MARK);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // !(RIGHT_BRACE | AS | JOIN | ON | SPACE | " ")
+ static boolean table_name_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_name_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !table_name_recover_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // RIGHT_BRACE | AS | JOIN | ON | SPACE | " "
+ private static boolean table_name_recover_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_name_recover_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, RIGHT_BRACE);
+ if (!r) r = consumeToken(b, AS);
+ if (!r) r = consumeToken(b, JOIN);
+ if (!r) r = consumeToken(b, ON);
+ if (!r) r = consumeToken(b, SPACE);
+ if (!r) r = consumeToken(b, " ");
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // table_name [ [ AS ] correlation_name ]
+ public static boolean table_primary(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_primary")) return false;
+ if (!nextTokenIs(b, TABLE_NAME_IDENTIFIER)) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, TABLE_PRIMARY, null);
+ r = table_name(b, l + 1);
+ p = r; // pin = 1
+ r = r && table_primary_1(b, l + 1);
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // [ [ AS ] correlation_name ]
+ private static boolean table_primary_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_primary_1")) return false;
+ table_primary_1_0(b, l + 1);
+ return true;
+ }
+
+ // [ AS ] correlation_name
+ private static boolean table_primary_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_primary_1_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = table_primary_1_0_0(b, l + 1);
+ r = r && correlation_name(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // [ AS ]
+ private static boolean table_primary_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_primary_1_0_0")) return false;
+ consumeToken(b, AS);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // !(JOIN)
+ static boolean table_primary_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_primary_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !consumeToken(b, JOIN);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // table_primary [joined_table*]
+ public static boolean table_reference(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference")) return false;
+ if (!nextTokenIs(b, TABLE_NAME_IDENTIFIER)) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, TABLE_REFERENCE, null);
+ r = table_primary(b, l + 1);
+ p = r; // pin = 1
+ r = r && table_reference_1(b, l + 1);
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // [joined_table*]
+ private static boolean table_reference_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference_1")) return false;
+ table_reference_1_0(b, l + 1);
+ return true;
+ }
+
+ // joined_table*
+ private static boolean table_reference_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!joined_table(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "table_reference_1_0", c)) break;
+ }
+ return true;
+ }
+
+ /* ********************************************************** */
+ // table_reference [ ( COMMA? table_reference )* ]
+ public static boolean table_reference_list(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference_list")) return false;
+ if (!nextTokenIs(b, TABLE_NAME_IDENTIFIER)) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, TABLE_REFERENCE_LIST, null);
+ r = table_reference(b, l + 1);
+ p = r; // pin = 1
+ r = r && table_reference_list_1(b, l + 1);
+ exit_section_(b, l, m, r, p, null);
+ return r || p;
+ }
+
+ // [ ( COMMA? table_reference )* ]
+ private static boolean table_reference_list_1(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference_list_1")) return false;
+ table_reference_list_1_0(b, l + 1);
+ return true;
+ }
+
+ // ( COMMA? table_reference )*
+ private static boolean table_reference_list_1_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference_list_1_0")) return false;
+ while (true) {
+ int c = current_position_(b);
+ if (!table_reference_list_1_0_0(b, l + 1)) break;
+ if (!empty_element_parsed_guard_(b, "table_reference_list_1_0", c)) break;
+ }
+ return true;
+ }
+
+ // COMMA? table_reference
+ private static boolean table_reference_list_1_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference_list_1_0_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = table_reference_list_1_0_0_0(b, l + 1);
+ r = r && table_reference(b, l + 1);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ // COMMA?
+ private static boolean table_reference_list_1_0_0_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_reference_list_1_0_0_0")) return false;
+ consumeToken(b, COMMA);
+ return true;
+ }
+
+ /* ********************************************************** */
+ // subquery
+ public static boolean table_subquery(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "table_subquery")) return false;
+ if (!nextTokenIs(b, "", LEFT_DOUBLE_BRACE, LEFT_PAREN)) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, TABLE_SUBQUERY, "");
+ r = subquery(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // TRUE | FALSE
+ public static boolean truth_value(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "truth_value")) return false;
+ if (!nextTokenIs(b, "", FALSE, TRUE)) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, TRUTH_VALUE, "");
+ r = consumeToken(b, TRUE);
+ if (!r) r = consumeToken(b, FALSE);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // NUMBER
+ // | parameter_reference
+ // | column_reference_value
+ public static boolean value_expression(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "value_expression")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NONE_, VALUE_EXPRESSION, "");
+ r = consumeToken(b, NUMBER);
+ if (!r) r = parameter_reference(b, l + 1);
+ if (!r) r = column_reference_value(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ /* ********************************************************** */
+ // WHERE search_condition
+ public static boolean where_clause(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "where_clause")) return false;
+ boolean r, p;
+ Marker m = enter_section_(b, l, _NONE_, WHERE_CLAUSE, "");
+ r = consumeToken(b, WHERE);
+ p = r; // pin = 1
+ r = r && search_condition(b, l + 1);
+ exit_section_(b, l, m, r, p, where_clause_recover_parser_);
+ return r || p;
+ }
+
+ /* ********************************************************** */
+ // !('{{' | <> | SELECT | ORDER | LEFT_PAREN | SEMICOLON | RIGHT_DOUBLE_BRACE )
+ static boolean where_clause_recover(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "where_clause_recover")) return false;
+ boolean r;
+ Marker m = enter_section_(b, l, _NOT_);
+ r = !where_clause_recover_0(b, l + 1);
+ exit_section_(b, l, m, r, false, null);
+ return r;
+ }
+
+ // '{{' | <> | SELECT | ORDER | LEFT_PAREN | SEMICOLON | RIGHT_DOUBLE_BRACE
+ private static boolean where_clause_recover_0(PsiBuilder b, int l) {
+ if (!recursion_guard_(b, l, "where_clause_recover_0")) return false;
+ boolean r;
+ Marker m = enter_section_(b);
+ r = consumeToken(b, "{{");
+ if (!r) r = eof(b, l + 1);
+ if (!r) r = consumeToken(b, SELECT);
+ if (!r) r = consumeToken(b, ORDER);
+ if (!r) r = consumeToken(b, LEFT_PAREN);
+ if (!r) r = consumeToken(b, SEMICOLON);
+ if (!r) r = consumeToken(b, RIGHT_DOUBLE_BRACE);
+ exit_section_(b, m, null, r);
+ return r;
+ }
+
+ final static Parser column_reference_recover_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return column_reference_recover(b, l + 1);
+ }
+ };
+ final static Parser expressionRecoverWhile_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return expressionRecoverWhile(b, l + 1);
+ }
+ };
+ final static Parser from_clause_recover_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return from_clause_recover(b, l + 1);
+ }
+ };
+ final static Parser join_condition_recover_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return join_condition_recover(b, l + 1);
+ }
+ };
+ final static Parser orderByClauseRecoverWhile_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return orderByClauseRecoverWhile(b, l + 1);
+ }
+ };
+ final static Parser querySpecificationRecoverWhile_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return querySpecificationRecoverWhile(b, l + 1);
+ }
+ };
+ final static Parser select_list_recover_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return select_list_recover(b, l + 1);
+ }
+ };
+ final static Parser table_name_recover_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return table_name_recover(b, l + 1);
+ }
+ };
+ final static Parser where_clause_recover_parser_ = new Parser() {
+ public boolean parse(PsiBuilder b, int l) {
+ return where_clause_recover(b, l + 1);
+ }
+ };
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchParserDefinition.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchParserDefinition.java
new file mode 100644
index 000000000..421bdd01d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/FlexibleSearchParserDefinition.java
@@ -0,0 +1,89 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch;
+
+import com.intellij.idea.plugin.hybris.flexibleSearch.file.FlexibleSearchFile;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTokenType;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes;
+import com.intellij.lang.ASTNode;
+import com.intellij.lang.ParserDefinition;
+import com.intellij.lang.PsiParser;
+import com.intellij.lexer.Lexer;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.FileViewProvider;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.TokenType;
+import com.intellij.psi.tree.IFileElementType;
+import com.intellij.psi.tree.TokenSet;
+import org.jetbrains.annotations.NotNull;
+
+public class FlexibleSearchParserDefinition implements ParserDefinition {
+
+ public static final TokenSet WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE);
+ public static final FlexibleSearchTokenType COMMENT = new FlexibleSearchTokenType("COMMENT");
+ public static final TokenSet COMMENTS = TokenSet.create(COMMENT);
+
+ public static final IFileElementType FILE = new IFileElementType(FlexibleSearchLanguage.getInstance());
+
+ @NotNull
+ @Override
+ public Lexer createLexer(Project project) {
+ return new FlexibleSearchLexerAdapter();
+ }
+
+ @NotNull
+ public TokenSet getWhitespaceTokens() {
+ return WHITE_SPACES;
+ }
+
+ @NotNull
+ @Override
+ public TokenSet getCommentTokens() {
+ return COMMENTS;
+ }
+
+ @NotNull
+ public TokenSet getStringLiteralElements() {
+ return TokenSet.EMPTY;
+ }
+
+ @NotNull
+ public PsiParser createParser(final Project project) {
+ return new FlexibleSearchParser();
+ }
+
+ @Override
+ public IFileElementType getFileNodeType() {
+ return FILE;
+ }
+
+ public PsiFile createFile(FileViewProvider viewProvider) {
+ return new FlexibleSearchFile(viewProvider);
+ }
+
+ public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) {
+ return SpaceRequirements.MAY;
+ }
+
+ @NotNull
+ public PsiElement createElement(ASTNode node) {
+ return FlexibleSearchTypes.Factory.createElement(node);
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/commenter/FlexibleSearchCommenter.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/commenter/FlexibleSearchCommenter.java
new file mode 100644
index 000000000..e0a8a76af
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/commenter/FlexibleSearchCommenter.java
@@ -0,0 +1,55 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.commenter;
+
+import com.intellij.lang.Commenter;
+import org.jetbrains.annotations.Nullable;
+
+public class FlexibleSearchCommenter implements Commenter {
+
+ @Nullable
+ @Override
+ public String getLineCommentPrefix() {
+ return "-- ";
+ }
+
+ @Nullable
+ @Override
+ public String getBlockCommentPrefix() {
+ return "";
+ }
+
+ @Nullable
+ @Override
+ public String getBlockCommentSuffix() {
+ return null;
+ }
+
+ @Nullable
+ @Override
+ public String getCommentedBlockCommentPrefix() {
+ return null;
+ }
+
+ @Nullable
+ @Override
+ public String getCommentedBlockCommentSuffix() {
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/FlexibleSearchCompletionContributor.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/FlexibleSearchCompletionContributor.java
new file mode 100644
index 000000000..eb32ebdd8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/FlexibleSearchCompletionContributor.java
@@ -0,0 +1,104 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion;
+
+import com.intellij.codeInsight.completion.CompletionContributor;
+import com.intellij.codeInsight.completion.CompletionType;
+import com.intellij.codeInsight.lookup.LookupElementBuilder;
+import com.intellij.icons.AllIcons;
+import com.intellij.idea.plugin.hybris.completion.provider.ItemTypeCodeCompletionProvider;
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider.FSFieldsCompletionProvider;
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider.FSKeywordCompletionProvider;
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider.FSKeywords;
+import com.intellij.openapi.diagnostic.Logger;
+import com.intellij.patterns.PlatformPatterns;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.tree.TokenSet;
+
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.COLUMN_REFERENCE_IDENTIFIER;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.TABLE_NAME_IDENTIFIER;
+import static com.intellij.patterns.PlatformPatterns.psiElement;
+
+public class FlexibleSearchCompletionContributor extends CompletionContributor {
+
+ private static final Logger LOG = Logger.getInstance(FlexibleSearchCompletionContributor.class);
+
+ public FlexibleSearchCompletionContributor() {
+ // keywords
+ extend(
+ CompletionType.BASIC,
+ PlatformPatterns.psiElement(PsiElement.class)
+ .withLanguage(FlexibleSearchLanguage.getInstance())
+// .andNot(psiElement().withParents(
+// FlexibleSearchTableName.class,
+// FlexibleSearchFromClause.class,
+// FlexibleSearchWhereClause.class
+// ))
+// .andNot(psiElement().inside(psiElement(COLUMN_REFERENCE)))
+// .andNot(psiElement().inside(psiElement(TABLE_NAME_IDENTIFIER)))
+ /*.andNot(psiElement().inside(psiElement(COLUMN_REFERENCE_IDENTIFIER)))*/,
+ new FSKeywordCompletionProvider(FSKeywords.topLevelKeywords(), (keyword) ->
+ LookupElementBuilder.create(keyword)
+ .withCaseSensitivity(false)
+ .withIcon(AllIcons.Nodes.Function))
+ );
+
+ extend(
+ CompletionType.BASIC,
+ psiElement()
+ .withElementType(TokenSet.create(TABLE_NAME_IDENTIFIER))
+ .withLanguage(FlexibleSearchLanguage.getInstance()),
+ ItemTypeCodeCompletionProvider.getInstance()
+ );
+
+ extend(
+ CompletionType.BASIC,
+ psiElement().inside(psiElement(COLUMN_REFERENCE_IDENTIFIER))
+ .withLanguage(FlexibleSearchLanguage.getInstance()),
+ FSFieldsCompletionProvider.Companion.getInstance()
+ );
+
+// extend(
+// CompletionType.BASIC,
+// psiElement()
+// .afterLeaf(psiElement().withElementType(TokenSet.create(TABLE_NAME_IDENTIFIER)))
+// .withLanguage(FlexibleSearchLanguage.getInstance()),
+// new FSKeywordCompletionProvider(newHashSet("AS"), (keyword) ->
+// LookupElementBuilder.create(keyword)
+// .withCaseSensitivity(false)
+// .withIcon(AllIcons.Nodes.Function))
+// );
+
+
+// extend(
+// CompletionType.BASIC,
+// psiElement()
+// .inside(psiElement(SELECT_LIST))
+// .withLanguage(FlexibleSearchLanguage.getInstance())
+// .andNot(psiElement().inside(psiElement(COLUMN_REFERENCE))),
+// new FSKeywordCompletionProvider(newHashSet("*", "DISTINCT", "COUNT"), (keyword) ->
+// LookupElementBuilder.create(keyword)
+// .bold()
+// .withCaseSensitivity(false)
+// .withIcon(AllIcons.Nodes.Static))
+// );
+
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/FSKeywordTableClauseAnalyzer.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/FSKeywordTableClauseAnalyzer.kt
new file mode 100644
index 000000000..6783a7623
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/FSKeywordTableClauseAnalyzer.kt
@@ -0,0 +1,91 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer
+
+import com.intellij.codeInsight.completion.CompletionParameters
+import com.intellij.codeInsight.completion.CompletionResultSet
+import com.intellij.codeInsight.lookup.LookupElementBuilder
+import com.intellij.icons.AllIcons
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.checker.FSFromClauseKeywordsAnalyzer
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.checker.FSSelectClauseKeywordsAnalyzer
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.checker.FSWhereClauseKeywordsAnalyzer
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider.FSFieldsCompletionProvider
+import com.intellij.idea.plugin.hybris.flexibleSearch.file.FlexibleSearchFile
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchJoinCondition
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchSelectList
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes
+import com.intellij.psi.PsiElement
+import com.intellij.psi.PsiWhiteSpace
+import com.intellij.psi.impl.source.tree.LeafPsiElement
+import com.intellij.psi.util.PsiTreeUtil
+import com.intellij.util.ProcessingContext
+import javax.swing.Icon
+
+
+/**
+ * @author Nosov Aleksandr
+ */
+object FSKeywordTableClauseAnalyzer {
+ private val topLevelKeywords = hashSetOf("SELECT", "FROM", "WHERE", "ORDER", /* Temporarily place this*/ "LEFT", "JOIN", "ON", "BY", "ASC", "DESC")
+
+ fun analyzeKeyword(parameters: CompletionParameters, completionResultSet: CompletionResultSet) {
+ if ((parameters.originalPosition == null && !isTableNameIdentifier(parameters) && !isColumnReferenceIdentifier(parameters)) || isFile(parameters)) {
+ addToResult(hashSetOf("SELECT", "FROM", "WHERE"), completionResultSet, AllIcons.Nodes.Static, true)
+ }
+ if ((isColumnReferenceIdentifier(parameters) && parameters.position.skipWhitespaceSiblingsBackward() != null && parameters.position.skipWhitespaceSiblingsBackward()!!.text != "}") ||
+ (isColumnReferenceIdentifier(parameters) && PsiTreeUtil.getParentOfType(parameters.position, FlexibleSearchSelectList::class.java) != null)) {
+ FSFieldsCompletionProvider.instance.addCompletionVariants(parameters, ProcessingContext(), completionResultSet)
+
+ }
+ if (isFile(parameters)) {
+ addToResult(hashSetOf("SELECT", "FROM", "WHERE"), completionResultSet, AllIcons.Nodes.Static, true)
+ }
+
+ FSSelectClauseKeywordsAnalyzer.analyzeCompletions(parameters, completionResultSet)
+ FSWhereClauseKeywordsAnalyzer.analyzeCompletions(parameters, completionResultSet)
+ FSFromClauseKeywordsAnalyzer.analyzeCompletions(parameters, completionResultSet)
+
+ }
+}
+
+fun isFile(parameters: CompletionParameters) =
+ parameters.position.parent != null && parameters.position.parent.parent != null && parameters.position.parent.parent is FlexibleSearchFile
+
+fun isJoinCondition(parameters: CompletionParameters) =
+ parameters.position.parent != null && parameters.position.parent.parent != null && parameters.position.parent.parent is FlexibleSearchJoinCondition
+
+fun isTableNameIdentifier(parameters: CompletionParameters) =
+ (parameters.position as LeafPsiElement).elementType == FlexibleSearchTypes.TABLE_NAME_IDENTIFIER
+
+fun isColumnReferenceIdentifier(parameters: CompletionParameters) =
+ (parameters.position as LeafPsiElement).elementType == FlexibleSearchTypes.COLUMN_REFERENCE_IDENTIFIER
+
+fun isIdentifier(parameters: CompletionParameters) =
+ (parameters.position as LeafPsiElement).elementType == FlexibleSearchTypes.IDENTIFIER
+
+
+fun addToResult(results: Set, completionResultSet: CompletionResultSet, icon: Icon, bold: Boolean = false) {
+ results.forEach { completionResultSet.addElement(LookupElementBuilder.create(it).withCaseSensitivity(false).withBoldness(bold).withIcon(icon)) }
+}
+
+fun addSymbolToResult(results: Set, completionResultSet: CompletionResultSet, icon: Icon, bold: Boolean = false) {
+ results.forEach { completionResultSet.addElement(LookupElementBuilder.create(it).withPresentableText(it).withCaseSensitivity(false).withBoldness(bold).withIcon(icon)) }
+}
+
+fun PsiElement.skipWhitespaceSiblingsBackward() = PsiTreeUtil.skipSiblingsBackward(this, PsiWhiteSpace::class.java)
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSFromClauseKeywordsAnalyzer.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSFromClauseKeywordsAnalyzer.kt
new file mode 100644
index 000000000..b094ebe0c
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSFromClauseKeywordsAnalyzer.kt
@@ -0,0 +1,76 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.checker
+
+import com.intellij.codeInsight.completion.CompletionParameters
+import com.intellij.codeInsight.completion.CompletionResultSet
+import com.intellij.codeInsight.lookup.LookupElementBuilder
+import com.intellij.icons.AllIcons
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.*
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*
+import com.intellij.psi.PsiElement
+import com.intellij.psi.PsiErrorElement
+import com.intellij.psi.impl.source.tree.PsiErrorElementImpl
+import com.intellij.psi.util.PsiTreeUtil
+
+/**
+ * @author Nosov Aleksandr
+ */
+object FSFromClauseKeywordsAnalyzer {
+ private val errorIdendifier = "IntellijIdeaRulezzz"
+
+ fun analyzeCompletions(parameters: CompletionParameters, completionResultSet: CompletionResultSet) {
+ val context = parameters.originalPosition ?: parameters.position
+ if (!isTableNameIdentifier(parameters) && parameters.position.parent != null /*&& parameters.position.parent is FlexibleSearchTableName*/ && !isJoinCondition(parameters) && PsiTreeUtil.getPrevSiblingOfType(context, FlexibleSearchTableReferenceList::class.java) != null) {
+ addToResult(hashSetOf("AS"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+ if (isIdentifier(parameters) && context.parentIsFromClause() && PsiTreeUtil.getPrevSiblingOfType(parameters.position, FlexibleSearchTableReferenceList::class.java) == null) {
+ completionResultSet.addElement(LookupElementBuilder.create("{}").withPresentableText("{...}").withInsertHandler { ctx, _ ->
+ val cursorOffset = ctx.editor.caretModel.offset
+ ctx.editor.caretModel.moveToOffset(cursorOffset - 1)
+ }.withCaseSensitivity(false))
+ }
+
+ if (isIdentifier(parameters) && parameters.position.parent is PsiErrorElement) {
+ if ((parameters.position.parent as PsiErrorElementImpl).errorDescription.contains("join")) {
+ addToResult(hashSetOf("ON"), completionResultSet, AllIcons.Nodes.Function)
+ }
+ }
+ if (isIdentifier(parameters) && context.prevSibling is FlexibleSearchQuerySpecification) {
+ addToResult(hashSetOf("WHERE"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+ if (context.parent != null && context.parent is FlexibleSearchFromClause) {
+ val siblingBackward = context.skipWhitespaceSiblingsBackward()
+
+ if (siblingBackward != null && siblingBackward is FlexibleSearchTableReferenceList && isIdentifier(parameters) && !isJoinCondition(parameters)) {
+ addSymbolToResult(hashSetOf("ON"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ if (PsiTreeUtil.findChildrenOfAnyType(context.parent, FlexibleSearchJoinType::class.java, FlexibleSearchJoinedTable::class.java).isEmpty())
+ addToResult(hashSetOf("JOIN", "LEFT JOIN"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+ }
+ if (isJoinCondition(parameters)) {
+ addSymbolToResult(hashSetOf("=", ">", "<>", "<", "<=", ">="), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ addToResult(hashSetOf("IS", "NOT"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+
+ }
+}
+
+
+fun PsiElement.parentIsFromClause() = PsiTreeUtil.getParentOfType(this, FlexibleSearchFromClause::class.java) != null
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSSelectClauseKeywordsAnalyzer.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSSelectClauseKeywordsAnalyzer.kt
new file mode 100644
index 000000000..f326536a5
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSSelectClauseKeywordsAnalyzer.kt
@@ -0,0 +1,64 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.checker
+
+import com.intellij.codeInsight.completion.CompletionParameters
+import com.intellij.codeInsight.completion.CompletionResultSet
+import com.intellij.icons.AllIcons
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.addToResult
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.isColumnReferenceIdentifier
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.skipWhitespaceSiblingsBackward
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchQuerySpecification
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchSelectList
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTableName
+import com.intellij.psi.util.PsiTreeUtil
+
+/**
+ * @author Nosov Aleksandr
+ */
+object FSSelectClauseKeywordsAnalyzer {
+ private val errorIdendifier = "IntellijIdeaRulezzz"
+
+ fun analyzeCompletions(parameters: CompletionParameters, completionResultSet: CompletionResultSet) {
+ val context = parameters.originalPosition ?: parameters.position
+
+ if (context.parent != null && PsiTreeUtil.getParentOfType(parameters.position.parent, FlexibleSearchSelectList::class.java) != null) {
+ val siblingBackward = context.skipWhitespaceSiblingsBackward()
+
+ if (siblingBackward is FlexibleSearchQuerySpecification) {
+ val tableNames = PsiTreeUtil.findChildrenOfType(siblingBackward, FlexibleSearchTableName::class.java)
+
+ if (tableNames.isEmpty()) {
+ addToResult(hashSetOf("*", "COUNT", "DISTINCT", "FROM"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+ }
+ }
+
+ if (isColumnReferenceIdentifier(parameters) && PsiTreeUtil.getParentOfType(context, FlexibleSearchSelectList::class.java) != null) {
+ addToResult(hashSetOf("FROM"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Static)
+ addToResult(hashSetOf("*", "COUNT", "DISTINCT", "FROM"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+ if (isColumnReferenceIdentifier(parameters) && PsiTreeUtil.getPrevSiblingOfType(context, FlexibleSearchQuerySpecification::class.java) != null) {
+ addToResult(hashSetOf("*", "COUNT", "DISTINCT", "FROM"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+// if (isColumnReferenceIdentifier(parameters)) {
+// addToResult(hashSetOf("*"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+// }
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSWhereClauseKeywordsAnalyzer.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSWhereClauseKeywordsAnalyzer.kt
new file mode 100644
index 000000000..cf6adfa69
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/analyzer/checker/FSWhereClauseKeywordsAnalyzer.kt
@@ -0,0 +1,71 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.checker
+
+import com.intellij.codeInsight.completion.CompletionParameters
+import com.intellij.codeInsight.completion.CompletionResultSet
+import com.intellij.codeInsight.lookup.LookupElementBuilder
+import com.intellij.icons.AllIcons
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.*
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider.FSFieldsCompletionProvider
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchJoinType
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchJoinedTable
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTableReferenceList
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchWhereClause
+import com.intellij.psi.PsiElement
+import com.intellij.psi.util.PsiTreeUtil
+import com.intellij.util.ProcessingContext
+
+/**
+ * @author Nosov Aleksandr
+ */
+object FSWhereClauseKeywordsAnalyzer {
+ private val errorIdendifier = "IntellijIdeaRulezzz"
+
+ fun analyzeCompletions(parameters: CompletionParameters, completionResultSet: CompletionResultSet) {
+ val context = parameters.originalPosition ?: parameters.position
+
+ if (isColumnReferenceIdentifier(parameters)) {
+ FSFieldsCompletionProvider.instance.addCompletionVariants(parameters, ProcessingContext(), completionResultSet)
+ }
+
+ if (context.parent != null && PsiTreeUtil.getParentOfType(parameters.position.parent, FlexibleSearchWhereClause::class.java) != null) {
+ val siblingBackward = context.skipWhitespaceSiblingsBackward()
+
+ if (siblingBackward != null && siblingBackward is FlexibleSearchTableReferenceList && isIdentifier(parameters) && !isJoinCondition(parameters)) {
+ addSymbolToResult(hashSetOf("ON"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ if (PsiTreeUtil.findChildrenOfAnyType(context.parent, FlexibleSearchJoinType::class.java, FlexibleSearchJoinedTable::class.java).isEmpty())
+ addToResult(hashSetOf("JOIN", "LEFT JOIN"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+ }
+ if (isColumnReferenceIdentifier(parameters) && context.parentIsWhereClause()) {
+ completionResultSet.addElement(LookupElementBuilder.create("{}").withPresentableText("{...}").withInsertHandler { ctx, _ ->
+ val cursorOffset = ctx.editor.caretModel.offset
+ ctx.editor.caretModel.moveToOffset(cursorOffset - 1)
+ }.withCaseSensitivity(false))
+ }
+ if (isJoinCondition(parameters)) {
+ addSymbolToResult(hashSetOf("=", ">", "<>", "<", "<=", ">="), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ addToResult(hashSetOf("IS", "NOT"), completionResultSet.withPrefixMatcher(""), AllIcons.Nodes.Function)
+ }
+
+ }
+}
+
+fun PsiElement.parentIsWhereClause() = PsiTreeUtil.getParentOfType(this, FlexibleSearchWhereClause::class.java) != null
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSFieldsCompletionProvider.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSFieldsCompletionProvider.kt
new file mode 100644
index 000000000..1b0f8e5a9
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSFieldsCompletionProvider.kt
@@ -0,0 +1,157 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider
+
+import com.intellij.codeInsight.completion.CompletionParameters
+import com.intellij.codeInsight.completion.CompletionProvider
+import com.intellij.codeInsight.completion.CompletionResultSet
+import com.intellij.codeInsight.lookup.LookupElementBuilder
+import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.isColumnReferenceIdentifier
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchCorrelationName
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchQuerySpecification
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTableName
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTableReference
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes
+import com.intellij.idea.plugin.hybris.type.system.meta.TSMetaModelAccess
+import com.intellij.idea.plugin.hybris.type.system.meta.TSMetaProperty
+import com.intellij.idea.plugin.hybris.type.system.meta.TSMetaReference
+import com.intellij.openapi.project.Project
+import com.intellij.openapi.util.text.StringUtil
+import com.intellij.psi.util.PsiTreeUtil
+import com.intellij.psi.util.PsiTreeUtil.findSiblingBackward
+import com.intellij.javaee.JavaeeIcons.PARAMETER_ICON
+import com.intellij.util.ProcessingContext
+import java.util.Objects
+import java.util.Optional
+import java.util.stream.Stream
+
+/**
+ * @author Nosov Aleksandr
+ */
+class FSFieldsCompletionProvider : CompletionProvider() {
+ companion object {
+ val instance: FSFieldsCompletionProvider = FSFieldsCompletionProvider()
+ }
+
+ override fun addCompletions(parameters: CompletionParameters, context: ProcessingContext, result: CompletionResultSet) {
+ val project = getProject(parameters) ?: return
+ val psiElementUnderCaret = parameters.originalPosition ?: parameters.position
+
+ if (isColumnReferenceIdentifier(parameters)) {
+ val tableNameId = findSiblingBackward(parameters.position, FlexibleSearchTypes.TABLE_NAME_IDENTIFIER, null)
+
+ if (tableNameId == null) {
+ val querySpecification = PsiTreeUtil.getParentOfType(psiElementUnderCaret, FlexibleSearchQuerySpecification::class.java)
+
+ val tableRefs = PsiTreeUtil.findChildrenOfType(querySpecification, FlexibleSearchTableReference::class.java)
+ val correlationNames = if (tableRefs.isNotEmpty()) PsiTreeUtil.findChildrenOfType(tableRefs.first(), FlexibleSearchCorrelationName::class.java) else listOf()
+
+ if (correlationNames.isNotEmpty()) {
+ correlationNames.map { it.text }
+ .map { LookupElementBuilder.create(it).withPresentableText(it).withIcon(PARAMETER_ICON) }
+ .forEach { result.addElement(it) }
+
+ } else {
+ val tableName = PsiTreeUtil.findChildOfType(querySpecification, FlexibleSearchTableName::class.java)
+ if (tableName != null) {
+ fillDomAttributesCompletions(project, tableName.text, result)
+ }
+ }
+ } else {
+ val querySpecification = PsiTreeUtil.getTopmostParentOfType(psiElementUnderCaret, FlexibleSearchQuerySpecification::class.java)
+ val tableNames = PsiTreeUtil.findChildrenOfType(querySpecification, FlexibleSearchTableReference::class.java)
+
+ if (tableNames.isNotEmpty()) {
+ val foundTableName = tableNames
+ .map { PsiTreeUtil.findChildOfType(it, FlexibleSearchTableName::class.java) }
+ .filter {
+ if (it != null) {
+ val element = PsiTreeUtil.getNextSiblingOfType(it, FlexibleSearchCorrelationName::class.java)
+ element != null && element.text == tableNameId.text
+ } else {
+ false
+ }
+ }
+ if (foundTableName.isNotEmpty()) {
+ fillDomAttributesCompletions(project, foundTableName.first()!!.text, result)
+ }
+ }
+ }
+ }
+ }
+
+ private fun getProject(parameters: CompletionParameters): Project? = parameters.editor.project
+
+ private fun fillDomAttributesCompletions(
+ project: Project,
+ itemTypeCode: String,
+ resultSet: CompletionResultSet
+ ) {
+ val metaModel = TSMetaModelAccess.getInstance(project).typeSystemMeta
+ val metaClass = Optional.ofNullable(metaModel.findMetaClassByName(itemTypeCode))
+
+ val currentPrefix = resultSet.prefixMatcher.prefix
+ val delimiters = arrayOf('.', ':')
+ val emptyPrefixResultSet = resultSet.withPrefixMatcher(currentPrefix.substringAfter(delimiters))
+ metaClass
+ .map { meta -> meta.getPropertiesStream(true) }
+ .orElse(Stream.empty())
+ .map { prop ->
+ val name = prop.name ?: return@map null
+
+ val builder = LookupElementBuilder
+ .create(name)
+ .withIcon(HybrisIcons.TYPE_SYSTEM)
+ .withStrikeoutness(prop.isDeprecated)
+ val typeText = getTypePresentableText(prop.type)
+ return@map if (StringUtil.isEmpty(typeText)) builder else builder.withTypeText(typeText, true)
+ }
+ .filter { Objects.nonNull(it) }
+ .forEach { emptyPrefixResultSet.addElement(it) }
+ metaClass
+ .map { meta -> meta.getReferenceEndsStream(true) }
+ .orElse(Stream.empty())
+ .map { ref ->
+ LookupElementBuilder
+ .create(ref.role)
+ .withTypeText(ref.typeName)
+ .withIcon(HybrisIcons.TYPE_SYSTEM)
+ }
+ .forEach { emptyPrefixResultSet.addElement(it) }
+ }
+
+ private fun getTypePresentableText(type: String?): String {
+ if (type == null) {
+ return ""
+ }
+ val index = type.lastIndexOf('.')
+ return if (index >= 0) type.substring(index + 1) else type
+ }
+
+
+ private fun String.substringAfter(delimiters: Array, missingDelimiterValue: String = this): String {
+ val result = delimiters
+ .filter { delimiter -> indexOf(delimiter) != -1 }
+ .map { delimiter -> substring(indexOf(delimiter) + 1, length) }
+ return if (result.isEmpty()) missingDelimiterValue else result.first()
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSKeywordCompletionProvider.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSKeywordCompletionProvider.java
new file mode 100644
index 000000000..841c3a514
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSKeywordCompletionProvider.java
@@ -0,0 +1,57 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider;
+
+import com.intellij.codeInsight.completion.CompletionParameters;
+import com.intellij.codeInsight.completion.CompletionProvider;
+import com.intellij.codeInsight.completion.CompletionResultSet;
+import com.intellij.codeInsight.lookup.LookupElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.completion.analyzer.FSKeywordTableClauseAnalyzer;
+import com.intellij.util.ProcessingContext;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.Set;
+import java.util.function.Function;
+
+public class FSKeywordCompletionProvider extends CompletionProvider {
+
+ @NotNull
+ private final Set keywords;
+
+ @NotNull
+ private final Function func;
+
+ public FSKeywordCompletionProvider(
+ @NotNull final Set keywords,
+ @NotNull final Function func
+ ) {
+ this.keywords = keywords;
+ this.func = func;
+ }
+
+ @Override
+ protected void addCompletions(
+ @NotNull final CompletionParameters parameters,
+ final ProcessingContext processingContext,
+ @NotNull final CompletionResultSet completionResultSet
+ ) {
+ final FSKeywordTableClauseAnalyzer keywordAnalyzer = FSKeywordTableClauseAnalyzer.INSTANCE;
+ keywordAnalyzer.analyzeKeyword(parameters, completionResultSet);
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSKeywords.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSKeywords.java
new file mode 100644
index 000000000..ddc6889dd
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/completion/provider/FSKeywords.java
@@ -0,0 +1,68 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.completion.provider;
+
+import com.intellij.util.containers.ContainerUtil;
+
+import java.util.Set;
+
+public final class FSKeywords {
+
+ private FSKeywords() {
+ }
+
+ /**
+ * @return set of keywords.
+ */
+ public static Set topLevelKeywords() {
+ return ContainerUtil.newHashSet(
+ "SELECT",
+ "FROM",
+ "WHERE",
+ "ORDER",
+
+ // Temporarily place this
+ "LEFT",
+ "JOIN",
+ "ON",
+ "IN",
+
+ "BY",
+ "ASC",
+ "DESC"
+ );
+ }
+
+ public static Set joinKeywords() {
+ return ContainerUtil.newHashSet(
+ "LEFT",
+ "JOIN",
+ "ON"
+ );
+ }
+
+ public static Set orderKeywords() {
+ return ContainerUtil.newHashSet(
+ "BY",
+ "ASC",
+ "DESC"
+ );
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/FlexibleSearchFile.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/FlexibleSearchFile.java
new file mode 100644
index 000000000..0711592c6
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/FlexibleSearchFile.java
@@ -0,0 +1,52 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.file;
+
+import com.intellij.extapi.psi.PsiFileBase;
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.openapi.fileTypes.FileType;
+import com.intellij.psi.FileViewProvider;
+import org.jetbrains.annotations.NotNull;
+
+import javax.swing.*;
+
+public class FlexibleSearchFile extends PsiFileBase {
+
+ public FlexibleSearchFile(@NotNull final FileViewProvider viewProvider) {
+ super(viewProvider, FlexibleSearchLanguage.getInstance());
+ }
+
+ @NotNull
+ @Override
+ public FileType getFileType() {
+ return FlexibleSearchFileType.getInstance();
+ }
+
+ @NotNull
+ @Override
+ public String toString() {
+ return "FlexibleSearch File";
+ }
+
+ @Override
+ public Icon getIcon(final int flags) {
+ return super.getIcon(flags);
+ }
+
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/FlexibleSearchFileType.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/FlexibleSearchFileType.java
new file mode 100644
index 000000000..c12284477
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/FlexibleSearchFileType.java
@@ -0,0 +1,64 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.file;
+
+import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons;
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.openapi.fileTypes.LanguageFileType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.swing.*;
+
+public class FlexibleSearchFileType extends LanguageFileType {
+
+ private static final FlexibleSearchFileType INSTANCE = new FlexibleSearchFileType();
+
+ public static FlexibleSearchFileType getInstance() {
+ return INSTANCE;
+ }
+
+ protected FlexibleSearchFileType() {
+ super(FlexibleSearchLanguage.getInstance());
+ }
+
+ @NotNull
+ @Override
+ public String getName() {
+ return "FlexibleSearch file";
+ }
+
+ @NotNull
+ @Override
+ public String getDescription() {
+ return "FlexibleSearch language file";
+ }
+
+ @NotNull
+ @Override
+ public String getDefaultExtension() {
+ return "fxs";
+ }
+
+ @Nullable
+ @Override
+ public Icon getIcon() {
+ return HybrisIcons.FS_FILE;
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/actions/CopyFlexibleSearchFileAction.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/actions/CopyFlexibleSearchFileAction.java
new file mode 100644
index 000000000..7937c87d3
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/actions/CopyFlexibleSearchFileAction.java
@@ -0,0 +1,50 @@
+/*
+ * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * Copyright (C) 2019 EPAM Systems
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.file.actions;
+
+import com.intellij.idea.plugin.hybris.actions.ActionUtils;
+import com.intellij.openapi.actionSystem.AnAction;
+import com.intellij.openapi.actionSystem.AnActionEvent;
+import com.intellij.openapi.project.Project;
+import org.jetbrains.annotations.NotNull;
+
+import static com.intellij.idea.plugin.hybris.actions.CopyFileToHybrisConsoleUtils.copySelectedFilesToHybrisConsole;
+import static com.intellij.idea.plugin.hybris.actions.CopyFileToHybrisConsoleUtils.isRequiredSingleFileExtension;
+import static com.intellij.idea.plugin.hybris.common.HybrisConstants.*;
+
+public class CopyFlexibleSearchFileAction extends AnAction {
+
+ @Override
+ public void update(@NotNull final AnActionEvent event) {
+ Project project = event.getProject();
+ if (project != null) {
+ event.getPresentation()
+ .setEnabledAndVisible(ActionUtils.isHybrisContext(project) && isRequiredSingleFileExtension(
+ project, FLEXIBLE_SEARCH_FILE_EXTENSION));
+ }
+ }
+
+ @Override
+ public void actionPerformed(@NotNull final AnActionEvent event) {
+ Project project = event.getProject();
+ if (project != null) {
+ copySelectedFilesToHybrisConsole(project, FLEXIBLE_SEARCH_CONSOLE_TITLE, FLEXIBLE_SEARCH_FILE_EXTENSION);
+ }
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/actions/FlexibleSearchFileCreateAction.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/actions/FlexibleSearchFileCreateAction.java
new file mode 100644
index 000000000..9d8c8a392
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/file/actions/FlexibleSearchFileCreateAction.java
@@ -0,0 +1,91 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.file.actions;
+
+import com.intellij.ide.actions.CreateFileFromTemplateAction;
+import com.intellij.ide.actions.CreateFileFromTemplateDialog;
+import com.intellij.idea.plugin.hybris.actions.ActionUtils;
+import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons;
+import com.intellij.openapi.actionSystem.DataContext;
+import com.intellij.openapi.project.DumbAware;
+import com.intellij.openapi.project.Project;
+import com.intellij.psi.PsiDirectory;
+import com.intellij.psi.PsiFile;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.Map;
+
+/**
+ * @author Nosov Aleksandr
+ */
+public class FlexibleSearchFileCreateAction extends CreateFileFromTemplateAction implements DumbAware {
+
+ public static final String FILE_TEMPLATE = "FlexibleSearch File";
+
+
+ private static final String NEW_FS_FILE = "New FlexibleSearch File";
+
+ public FlexibleSearchFileCreateAction() {
+ super(NEW_FS_FILE, "", HybrisIcons.FS_FILE);
+ }
+
+ @Override
+ protected void buildDialog(
+ final Project project,
+ final PsiDirectory directory,
+ final CreateFileFromTemplateDialog.Builder builder
+ ) {
+ builder.setTitle(NEW_FS_FILE)
+ .addKind("Empty file", HybrisIcons.FS_FILE, FILE_TEMPLATE);
+ }
+
+ @Nullable
+ @Override
+ protected String getDefaultTemplateProperty() {
+ return null;
+ }
+
+ @NotNull
+ @Override
+ protected String getActionName(PsiDirectory directory, String newName, String templateName) {
+ return NEW_FS_FILE;
+ }
+
+
+ @Override
+ protected void postProcess(PsiFile createdElement, String templateName, Map customProperties) {
+ super.postProcess(createdElement, templateName, customProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return getClass().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return obj instanceof FlexibleSearchFileCreateAction;
+ }
+
+ @Override
+ protected boolean isAvailable(final DataContext dataContext) {
+ return super.isAvailable(dataContext) && ActionUtils.isHybrisContext(dataContext);
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSBlock.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSBlock.kt
new file mode 100644
index 000000000..d98c83c88
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSBlock.kt
@@ -0,0 +1,158 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.formatting
+
+import com.intellij.formatting.ASTBlock
+import com.intellij.formatting.Alignment
+import com.intellij.formatting.Block
+import com.intellij.formatting.ChildAttributes
+import com.intellij.formatting.Indent
+import com.intellij.formatting.Spacing
+import com.intellij.formatting.SpacingBuilder
+import com.intellij.formatting.Wrap
+import com.intellij.formatting.WrapType
+import com.intellij.formatting.alignment.AlignmentStrategy
+import com.intellij.formatting.alignment.AlignmentStrategy.createAlignmentPerTypeStrategy
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.BOOLEAN_PREDICAND
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.FROM
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.FROM_CLAUSE
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.ON
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.SEARCH_CONDITION
+import com.intellij.lang.ASTNode
+import com.intellij.openapi.util.TextRange
+import com.intellij.psi.TokenType
+import com.intellij.psi.codeStyle.CodeStyleSettings
+import com.intellij.psi.formatter.FormatterUtil
+import java.util.function.Predicate
+
+/**
+ * @author Nosov Aleksandr
+ */
+class FSBlock internal constructor(
+ private val node: ASTNode,
+ private val alignment: Alignment?,
+ private val indent: Indent?,
+ private val wrap: Wrap?,
+ private val codeStyleSettings: CodeStyleSettings,
+ private val spacingBuilder: SpacingBuilder
+) : ASTBlock {
+
+ private var subBlocks: MutableList? = null
+
+ override fun getNode() = node
+
+ override fun getTextRange(): TextRange = node.textRange
+
+ override fun getSubBlocks(): List {
+ if (subBlocks == null) {
+ val isWhitespaceOrEmpty = Predicate { isWhitespaceOrEmpty(it) }
+ val strategy = createStrategy(getNode())
+
+ subBlocks = mutableListOf()
+ var subNode: ASTNode? = node.firstChildNode
+ while (subNode != null) {
+ if (isWhitespaceOrEmpty.test(subNode)) {
+ subNode = subNode.treeNext
+ continue
+ }
+
+ val alignment = strategy?.getAlignment(getNode().elementType, subNode.elementType)
+
+ val block = makeSubBlock(subNode, alignment)
+ subBlocks!!.add(block)
+ subNode = subNode.treeNext
+ }
+ }
+ return subBlocks as MutableList
+ }
+
+ private fun createStrategy(node: ASTNode?): AlignmentStrategy.AlignmentPerTypeStrategy? {
+ return if (node == null) {
+ null
+ } else createAlignmentPerTypeStrategy(arrayListOf(node.elementType), node.elementType, true
+ )
+
+ }
+
+ private fun makeSubBlock(node: ASTNode, alignment: Alignment?): FSBlock {
+ val wrap = Wrap.createWrap(WrapType.NONE, false)
+ val indent = calcIndent(node)
+
+ return FSBlock(node, alignment, indent, wrap, codeStyleSettings, spacingBuilder)
+ }
+
+ private fun calcIndent(node: ASTNode): Indent {
+ val parentType = this.node.elementType
+ val type = node.elementType
+
+ if (parentType === FlexibleSearchTypes.QUERY_SPECIFICATION && type === FlexibleSearchTypes.SUBQUERY) {
+ return Indent.getNoneIndent()
+ }
+ if (type === FlexibleSearchTypes.LEFT_DOUBLE_BRACE || type === FlexibleSearchTypes.RIGHT_DOUBLE_BRACE) {
+ return Indent.getNormalIndent()
+ }
+ if (parentType === FlexibleSearchTypes.SUBQUERY && type === FlexibleSearchTypes.QUERY_SPECIFICATION) {
+ return Indent.getContinuationWithoutFirstIndent()
+ }
+ if (type === FlexibleSearchTypes.FROM_CLAUSE) {
+ return Indent.getNormalIndent()
+ }
+ if (type !== FROM && parentType === FROM_CLAUSE) {
+ return Indent.getNormalIndent()
+ }
+ if (type === ON || type === BOOLEAN_PREDICAND) {
+ return Indent.getNormalIndent()
+ }
+ if (isReturnBodyKeywords(node)) {
+ return Indent.getNormalIndent()
+ }
+ return if (type === FlexibleSearchTypes.WHERE) {
+ Indent.getNormalIndent()
+ } else Indent.getNoneIndent()
+
+ }
+
+ override fun getWrap() = wrap
+ override fun getIndent() = indent
+ override fun getAlignment() = alignment
+
+ override fun getSpacing(child1: Block?, child2: Block): Spacing? {
+ return spacingBuilder.getSpacing(this, child1, child2)
+ }
+
+ override fun getChildAttributes(newChildIndex: Int) = ChildAttributes(Indent.getNoneIndent(), null)
+
+ override fun isIncomplete() = false
+
+ override fun isLeaf() = node.firstChildNode == null
+
+ private fun isWhitespaceOrEmpty(node: ASTNode): Boolean {
+ return node.elementType === TokenType.WHITE_SPACE || node.textLength == 0
+ }
+
+ private fun isReturnBodyKeywords(node: ASTNode): Boolean {
+ return FormatterUtil.isOneOf(
+ node,
+ FlexibleSearchTypes.LEFT,
+ FlexibleSearchTypes.JOIN,
+ FlexibleSearchTypes.ORDER
+ )
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSCodeStyleSettings.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSCodeStyleSettings.java
new file mode 100644
index 000000000..0ec31e579
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSCodeStyleSettings.java
@@ -0,0 +1,36 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.formatting;
+
+import com.intellij.psi.codeStyle.CodeStyleSettings;
+import com.intellij.psi.codeStyle.CustomCodeStyleSettings;
+
+/**
+ * @author Nosov Aleksandr
+ */
+public class FSCodeStyleSettings extends CustomCodeStyleSettings {
+
+ public static boolean SPACES_INSIDE_BRACES = true;
+ public static boolean SPACES_INSIDE_DOUBLE_BRACES = true;
+ public static boolean SPACE_AROUND_OP = true;
+
+ public FSCodeStyleSettings(final CodeStyleSettings settings) {
+ super("FSCodeStyleSettings", settings);
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSCodeStyleSettingsProvider.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSCodeStyleSettingsProvider.java
new file mode 100644
index 000000000..84ec7587d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSCodeStyleSettingsProvider.java
@@ -0,0 +1,70 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.formatting;
+
+import com.intellij.application.options.CodeStyleAbstractConfigurable;
+import com.intellij.application.options.CodeStyleAbstractPanel;
+import com.intellij.application.options.TabbedLanguageCodeStylePanel;
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.openapi.options.Configurable;
+import com.intellij.psi.codeStyle.CodeStyleSettings;
+import com.intellij.psi.codeStyle.CodeStyleSettingsProvider;
+import com.intellij.psi.codeStyle.CustomCodeStyleSettings;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+
+public class FSCodeStyleSettingsProvider extends CodeStyleSettingsProvider {
+
+ @Override
+ public CustomCodeStyleSettings createCustomSettings(final CodeStyleSettings settings) {
+ return new FSCodeStyleSettings(settings);
+ }
+
+ @Nullable
+ @Override
+ public String getConfigurableDisplayName() {
+ return "FlexibleSearch";
+ }
+
+ @NotNull
+ @Override
+ public Configurable createSettingsPage(final CodeStyleSettings settings, final CodeStyleSettings modelSettings) {
+ return new CodeStyleAbstractConfigurable(settings, modelSettings, "FlexibleSearch") {
+
+ @Override
+ protected CodeStyleAbstractPanel createPanel(final CodeStyleSettings settings) {
+ return new SimpleCodeStyleMainPanel(getCurrentSettings(), settings);
+ }
+
+ @Nullable
+ @Override
+ public String getHelpTopic() {
+ return null;
+ }
+ };
+ }
+
+ private static class SimpleCodeStyleMainPanel extends TabbedLanguageCodeStylePanel {
+
+ public SimpleCodeStyleMainPanel(final CodeStyleSettings currentSettings, final CodeStyleSettings settings) {
+ super(FlexibleSearchLanguage.getInstance(), currentSettings, settings);
+ }
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSLanguageCodeStyleSettingsProvider.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSLanguageCodeStyleSettingsProvider.java
new file mode 100644
index 000000000..a0c61969a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FSLanguageCodeStyleSettingsProvider.java
@@ -0,0 +1,73 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.formatting;
+
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.lang.Language;
+import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizable;
+import com.intellij.psi.codeStyle.CodeStyleSettingsCustomizableOptions;
+import com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider;
+import org.jetbrains.annotations.NotNull;
+
+public class FSLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettingsProvider {
+
+ @NotNull
+ @Override
+ public Language getLanguage() {
+ return FlexibleSearchLanguage.getInstance();
+ }
+
+ @Override
+ public void customizeSettings(
+ @NotNull final CodeStyleSettingsCustomizable consumer,
+ @NotNull final SettingsType settingsType
+ ) {
+ if (SettingsType.SPACING_SETTINGS == settingsType) {
+ final var styleOptions = CodeStyleSettingsCustomizableOptions.getInstance();
+ consumer.showCustomOption(
+ FSCodeStyleSettings.class,
+ "SPACE_AROUND_OP",
+ "Around comparision operator",
+ styleOptions.SPACES_AROUND_OPERATORS
+ );
+ consumer.showCustomOption(
+ FSCodeStyleSettings.class,
+ "SPACES_INSIDE_BRACES",
+ "Inside braces",
+ styleOptions.SPACES_AROUND_OPERATORS
+ );
+ consumer.showCustomOption(
+ FSCodeStyleSettings.class,
+ "SPACES_INSIDE_DOUBLE_BRACES",
+ "Inside double braces",
+ styleOptions.SPACES_AROUND_OPERATORS
+ );
+ } else if (settingsType == SettingsType.BLANK_LINES_SETTINGS) {
+ consumer.showStandardOptions("KEEP_BLANK_LINES_IN_CODE");
+ }
+ }
+
+ @Override
+ public String getCodeSample(@NotNull final SettingsType settingsType) {
+ return "SELECT DISTINCT * FROM {Category AS c} WHERE NOT EXISTS (\n" +
+ " {{\n" +
+ " SELECT * FROM {CategoryCategoryRelation} WHERE{target}={c:pk}\n" +
+ " }}\n)";
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FlexibleSearchFormattingModelBuilder.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FlexibleSearchFormattingModelBuilder.java
new file mode 100644
index 000000000..a4ddacb66
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/formatting/FlexibleSearchFormattingModelBuilder.java
@@ -0,0 +1,99 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.formatting;
+
+
+import com.intellij.formatting.*;
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.lang.ASTNode;
+import com.intellij.openapi.util.TextRange;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.codeStyle.CodeStyleSettings;
+import com.intellij.psi.tree.TokenSet;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.COMP_OP;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.FROM;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.FROM_CLAUSE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.LEFT_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.LEFT_DOUBLE_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.ON;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.QUERY_SPECIFICATION;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.RIGHT_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.RIGHT_DOUBLE_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.SELECT_LIST;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.WHERE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.WHERE_CLAUSE;
+
+public class FlexibleSearchFormattingModelBuilder implements FormattingModelBuilder {
+
+ @Override
+ public @NotNull FormattingModel createModel(@NotNull FormattingContext formattingContext) {
+ return createModelInternally(formattingContext.getPsiElement(), formattingContext.getCodeStyleSettings());
+ }
+
+ @NotNull
+ private FormattingModel createModelInternally(
+ final PsiElement element, final CodeStyleSettings settings
+ ) {
+
+ final FSBlock block = new FSBlock(
+ element.getNode(),
+ Alignment.createAlignment(),
+ Indent.getNoneIndent(),
+ Wrap.createWrap(WrapType.NONE, false),
+ settings,
+ createSpaceBuilder(settings)
+ );
+ return FormattingModelProvider.createFormattingModelForPsiFile(element.getContainingFile(), block, settings);
+ }
+
+ private static SpacingBuilder createSpaceBuilder(final CodeStyleSettings settings) {
+ return new SpacingBuilder(settings, FlexibleSearchLanguage.getInstance())
+ .around(TokenSet.create(WHERE, FROM, SELECT_LIST, ON))
+ .spaces(1)
+ .between(FROM_CLAUSE, WHERE_CLAUSE)
+ .spaces(1)
+
+ .around(COMP_OP)
+ .spaceIf(FSCodeStyleSettings.SPACE_AROUND_OP)
+
+ .before(RIGHT_BRACE)
+ .spaceIf(FSCodeStyleSettings.SPACES_INSIDE_BRACES)
+ .after(LEFT_BRACE)
+ .spaceIf(FSCodeStyleSettings.SPACES_INSIDE_BRACES)
+
+ .before(RIGHT_DOUBLE_BRACE)
+ .spaceIf(FSCodeStyleSettings.SPACES_INSIDE_DOUBLE_BRACES)
+ .between(QUERY_SPECIFICATION, RIGHT_DOUBLE_BRACE)
+ .spaceIf(FSCodeStyleSettings.SPACES_INSIDE_DOUBLE_BRACES)
+ .after(LEFT_DOUBLE_BRACE)
+ .spaceIf(FSCodeStyleSettings.SPACES_INSIDE_DOUBLE_BRACES);
+ }
+
+ @Nullable
+ @Override
+ public TextRange getRangeAffectingIndent(
+ final PsiFile file, final int offset, final ASTNode elementAtOffset
+ ) {
+ return null;
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchColorSettingsPage.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchColorSettingsPage.java
new file mode 100644
index 000000000..7ea3546dc
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchColorSettingsPage.java
@@ -0,0 +1,132 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.highlighting;
+
+import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons;
+import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.editor.HighlighterColors;
+import com.intellij.openapi.editor.colors.TextAttributesKey;
+import com.intellij.openapi.fileTypes.SyntaxHighlighter;
+import com.intellij.openapi.options.colors.AttributesDescriptor;
+import com.intellij.openapi.options.colors.ColorDescriptor;
+import com.intellij.openapi.options.colors.ColorSettingsPage;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import javax.swing.*;
+import java.util.Map;
+
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_BRACES;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_BRACKETS;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_COLUMN;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_COMMENT;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_KEYWORD;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_NUMBER;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_PARAMETER;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_PARENTHESES;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_SYMBOL;
+
+public class FlexibleSearchColorSettingsPage implements ColorSettingsPage {
+
+ private static final AttributesDescriptor[] DESCRIPTORS = new AttributesDescriptor[]{
+ new AttributesDescriptor("Comment", FS_COMMENT),
+ new AttributesDescriptor("Parameter", FS_PARAMETER),
+ new AttributesDescriptor("Keywords", FS_KEYWORD),
+ new AttributesDescriptor("Column", FS_COLUMN),
+ new AttributesDescriptor("Comma", FS_SYMBOL),
+ new AttributesDescriptor("Number", FS_NUMBER),
+ new AttributesDescriptor("Braces", FS_BRACES),
+ new AttributesDescriptor("Brackets", FS_BRACKETS),
+ new AttributesDescriptor("Parentheses", FS_PARENTHESES),
+ new AttributesDescriptor("Bad character", HighlighterColors.BAD_CHARACTER)
+ };
+
+ @Nullable
+ @Override
+ public Icon getIcon() {
+ return HybrisIcons.FS_FILE;
+ }
+
+ @NotNull
+ @Override
+ public SyntaxHighlighter getHighlighter() {
+ return ServiceManager.getService(FlexibleSearchSyntaxHighlighter.class);
+ }
+
+ @NotNull
+ @Override
+ public String getDemoText() {
+ return "SELECT {cat:pk} FROM {Category AS cat} WHERE NOT EXISTS (\n" +
+ " {{ SELECT * FROM {CategoryCategoryRelation} WHERE {target}={cat:pk} }}\n" +
+ ")\n" +
+ "\n" +
+ "SELECT * FROM {Product} WHERE {code} LIKE '%al%'\n" +
+ "\n" +
+ "\n" +
+ "SELECT * FROM {Product} WHERE {code} LIKE '%al%' AND {code} LIKE '%15%'\n" +
+ "\n" +
+ "SELECT * FROM {Product} WHERE {code} IS NULL\n" +
+ "\n" +
+ "SELECT * FROM {Product} WHERE {code} NOT LIKE '%al%' AND {code} NOT LIKE '%15%' OR {code} IS NULL\n" +
+ "\n" +
+ "SELECT * FROM {Product} WHERE {code} LIKE '%al%' AND {code} NOT LIKE '%15%'\n" +
+ "\n" +
+ "SELECT * FROM {Product} WHERE {code} IS NOT NULL\n" +
+ "\n" +
+ "SELECT {cat:pk} FROM {Category AS cat} WHERE NOT EXISTS (\n" +
+ " {{ SELECT * FROM {CategoryCategoryRelation} WHERE {target}={cat.spk} }}\n" +
+ ")\n" +
+ "\n" +
+ "SELECT {code},{pk} FROM {Product} ORDER BY {code} DESC\n" +
+ "\n" +
+ "SELECT {pk} FROM {Product} WHERE {modifiedtime} >= ?startDate AND {modifiedtime} <= ?endDate\n" +
+ "\n" +
+ "SELECT {p:PK}\n" +
+ " FROM {Product AS p}\n" +
+ " WHERE {p:code} LIKE '%myProduct'\n" +
+ " OR {p:name} LIKE '%myProduct'\n" +
+ " ORDER BY {p:code} ASC\n" +
+ "\n" +
+ "@@@@@\n";
+ }
+
+ @Nullable
+ @Override
+ public Map getAdditionalHighlightingTagToDescriptorMap() {
+ return null;
+ }
+
+ @NotNull
+ @Override
+ public AttributesDescriptor[] getAttributeDescriptors() {
+ return DESCRIPTORS;
+ }
+
+ @NotNull
+ @Override
+ public ColorDescriptor[] getColorDescriptors() {
+ return ColorDescriptor.EMPTY_ARRAY;
+ }
+
+ @NotNull
+ @Override
+ public String getDisplayName() {
+ return "FlexibleSearch";
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchHighlighterColors.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchHighlighterColors.java
new file mode 100644
index 000000000..40c9ed1b6
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchHighlighterColors.java
@@ -0,0 +1,75 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.highlighting;
+
+import com.intellij.openapi.editor.colors.TextAttributesKey;
+import com.intellij.openapi.editor.markup.TextAttributes;
+import com.intellij.ui.JBColor;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+import java.awt.*;
+
+import static com.intellij.ide.highlighter.JavaHighlightingColors.CLASS_NAME_ATTRIBUTES;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.BRACES;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.BRACKETS;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.INSTANCE_FIELD;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.KEYWORD;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.LINE_COMMENT;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.NUMBER;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.PARENTHESES;
+import static com.intellij.openapi.editor.DefaultLanguageHighlighterColors.STRING;
+
+public final class FlexibleSearchHighlighterColors {
+
+ private FlexibleSearchHighlighterColors() {
+ }
+
+ public static final TextAttributesKey FS_KEYWORD = key("KEYWORD", KEYWORD);
+ public static final TextAttributesKey FS_STRING = key("STRING", STRING);
+
+ public static final TextAttributesKey FS_BRACES = key("BRACES", BRACES);
+ public static final TextAttributesKey FS_PARENTHESES = key("PARENTHESES", PARENTHESES);
+ public static final TextAttributesKey FS_BRACKETS = key("BRACKETS", BRACKETS);
+
+ public static final TextAttributesKey FS_SYMBOL = key("COMMA", KEYWORD);
+ public static final TextAttributesKey FS_NUMBER = key("NUMBER", NUMBER);
+
+ public static final TextAttributesKey FS_COLUMN = key("COLUMN", INSTANCE_FIELD);
+ public static final TextAttributesKey FS_TABLE = key("TABLE NAME", CLASS_NAME_ATTRIBUTES);
+
+ public static final TextAttributesKey FS_COMMENT = key("COMMENT", LINE_COMMENT);
+
+ public static final TextAttributesKey FS_PARAMETER =
+ TextAttributesKey.createTextAttributesKey("FS_PARAMETER", new TextAttributes(
+ new JBColor(0x0D96D9, 0x0097C5),
+ null,
+ null,
+ null,
+ Font.PLAIN
+ ));
+
+
+ private static TextAttributesKey key(
+ @NonNls @NotNull final String externalName,
+ final TextAttributesKey fallbackAttributeKey
+ ) {
+ return TextAttributesKey.createTextAttributesKey(externalName, fallbackAttributeKey);
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchSyntaxHighlighter.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchSyntaxHighlighter.java
new file mode 100644
index 000000000..2482bc5e4
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchSyntaxHighlighter.java
@@ -0,0 +1,163 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.highlighting;
+
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLexerAdapter;
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchParserDefinition;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes;
+import com.intellij.lexer.Lexer;
+import com.intellij.openapi.editor.HighlighterColors;
+import com.intellij.openapi.editor.colors.TextAttributesKey;
+import com.intellij.openapi.fileTypes.SyntaxHighlighterBase;
+import com.intellij.psi.TokenType;
+import com.intellij.psi.tree.IElementType;
+import com.intellij.psi.tree.TokenSet;
+import org.jetbrains.annotations.NotNull;
+
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_BRACES;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_BRACKETS;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_COLUMN;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_COMMENT;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_KEYWORD;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_NUMBER;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_PARAMETER;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_PARENTHESES;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_STRING;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_SYMBOL;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.highlighting.FlexibleSearchHighlighterColors.FS_TABLE;
+
+public class FlexibleSearchSyntaxHighlighter extends SyntaxHighlighterBase {
+
+ private static final TokenSet BRACES_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.LEFT_BRACE,
+ FlexibleSearchTypes.LEFT_DOUBLE_BRACE,
+ FlexibleSearchTypes.RIGHT_BRACE,
+ FlexibleSearchTypes.RIGHT_DOUBLE_BRACE
+ );
+ private static final TokenSet BRACKETS_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.LEFT_BRACKET,
+ FlexibleSearchTypes.RIGHT_BRACKET
+ );
+ private static final TokenSet PARENTHESES_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.LEFT_PAREN,
+ FlexibleSearchTypes.RIGHT_PAREN
+ );
+
+ private static final TokenSet SYMBOL_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.DOT,
+ FlexibleSearchTypes.COLON,
+ FlexibleSearchTypes.COMMA
+ );
+
+ private static final TokenSet COLUMN_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.COLUMN_REFERENCE_IDENTIFIER
+ );
+
+ private static final TokenSet TABLE_NAME_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.TABLE_NAME_IDENTIFIER
+ );
+
+ private static final TokenSet PARAMETER_REFERENCE_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.QUESTION_MARK,
+ FlexibleSearchTypes.PARAMETER_IDENTIFIER
+ );
+
+ private static final TokenSet KEYWORD_TOKEN_SET = TokenSet.create(
+ FlexibleSearchTypes.SELECT,
+ FlexibleSearchTypes.FROM,
+ FlexibleSearchTypes.WHERE,
+ FlexibleSearchTypes.DISTINCT,
+ FlexibleSearchTypes.GROUP,
+ FlexibleSearchTypes.AS,
+ FlexibleSearchTypes.IS,
+ FlexibleSearchTypes.NULL,
+ FlexibleSearchTypes.LIKE,
+ FlexibleSearchTypes.AND,
+ FlexibleSearchTypes.OR,
+ FlexibleSearchTypes.IN,
+ FlexibleSearchTypes.ORDER,
+ FlexibleSearchTypes.BY,
+ FlexibleSearchTypes.DESC,
+ FlexibleSearchTypes.ASC,
+ FlexibleSearchTypes.ALL,
+ FlexibleSearchTypes.JOIN,
+ FlexibleSearchTypes.ON,
+ FlexibleSearchTypes.LEFT,
+ FlexibleSearchTypes.UNION,
+ FlexibleSearchTypes.NOT,
+ FlexibleSearchTypes.EXISTS
+ );
+
+ public static final TextAttributesKey[] KEYWORD_KEYS = pack(FS_KEYWORD);
+ public static final TextAttributesKey[] STRING_KEYS = pack(FS_STRING);
+ public static final TextAttributesKey[] SYMBOL_KEYS = pack(FS_SYMBOL);
+
+ public static final TextAttributesKey[] BRACES_KEYS = pack(FS_BRACES);
+ public static final TextAttributesKey[] BRACKETS_KEYS = pack(FS_BRACKETS);
+ public static final TextAttributesKey[] PARENTHESES_KEYS = pack(FS_PARENTHESES);
+
+ public static final TextAttributesKey[] NUMBER_KEYS = pack(FS_NUMBER);
+
+ public static final TextAttributesKey[] COLUMN_KEYS = pack(FS_COLUMN);
+ public static final TextAttributesKey[] TABLE_KEYS = pack(FS_TABLE);
+
+ public static final TextAttributesKey[] COMMENT_KEYS = pack(FS_COMMENT);
+
+ public static final TextAttributesKey[] BAD_CHARACTER_KEYS = pack(HighlighterColors.BAD_CHARACTER);
+
+ private static final TextAttributesKey[] EMPTY_KEYS = new TextAttributesKey[0];
+
+ @NotNull
+ @Override
+ public Lexer getHighlightingLexer() {
+ return new FlexibleSearchLexerAdapter();
+ }
+
+ @NotNull
+ @Override
+ public TextAttributesKey[] getTokenHighlights(IElementType tokenType) {
+ if (KEYWORD_TOKEN_SET.contains(tokenType)) {
+ return KEYWORD_KEYS;
+ } else if (tokenType.equals(FlexibleSearchTypes.STRING)) {
+ return STRING_KEYS;
+ } else if (SYMBOL_TOKEN_SET.contains(tokenType)) {
+ return SYMBOL_KEYS;
+ } else if (COLUMN_TOKEN_SET.contains(tokenType)) {
+ return COLUMN_KEYS;
+ } else if (TABLE_NAME_TOKEN_SET.contains(tokenType)) {
+ return TABLE_KEYS;
+ } else if (PARAMETER_REFERENCE_TOKEN_SET.contains(tokenType)) {
+ return pack(FS_PARAMETER);
+ } else if (BRACES_TOKEN_SET.contains(tokenType)) {
+ return BRACES_KEYS;
+ } else if (BRACKETS_TOKEN_SET.contains(tokenType)) {
+ return BRACKETS_KEYS;
+ } else if (PARENTHESES_TOKEN_SET.contains(tokenType)) {
+ return PARENTHESES_KEYS;
+ } else if (tokenType.equals(FlexibleSearchTypes.NUMBER)) {
+ return NUMBER_KEYS;
+ } else if (tokenType.equals(FlexibleSearchParserDefinition.COMMENT)) {
+ return COMMENT_KEYS;
+ } else if (tokenType.equals(TokenType.BAD_CHARACTER)) {
+ return STRING_KEYS;
+ } else {
+ return EMPTY_KEYS;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/impex/view/ImpexStructureViewComponent.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchSyntaxHighlighterFactory.java
similarity index 58%
rename from src/com/intellij/idea/plugin/hybris/impex/view/ImpexStructureViewComponent.java
rename to src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchSyntaxHighlighterFactory.java
index d0099a210..6ead5ec90 100644
--- a/src/com/intellij/idea/plugin/hybris/impex/view/ImpexStructureViewComponent.java
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/highlighting/FlexibleSearchSyntaxHighlighterFactory.java
@@ -16,24 +16,19 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.impex.view;
+package com.intellij.idea.plugin.hybris.flexibleSearch.highlighting;
-import com.intellij.ide.structureView.StructureViewModel;
-import com.intellij.ide.structureView.newStructureView.StructureViewComponent;
-import com.intellij.openapi.fileEditor.FileEditor;
+import com.intellij.openapi.fileTypes.SyntaxHighlighter;
+import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory;
import com.intellij.openapi.project.Project;
+import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NotNull;
-/**
- * Created by Martin Zdarsky-Jones (martin.zdarsky@hybris.com) on 7/3/17.
- */
-public class ImpexStructureViewComponent extends StructureViewComponent {
+public class FlexibleSearchSyntaxHighlighterFactory extends SyntaxHighlighterFactory {
- public ImpexStructureViewComponent(
- final FileEditor editor,
- @NotNull final StructureViewModel structureViewModel,
- @NotNull final Project project
- ) {
- super(editor, structureViewModel, project, false);
+ @NotNull
+ @Override
+ public SyntaxHighlighter getSyntaxHighlighter(Project project, VirtualFile virtualFile) {
+ return new FlexibleSearchSyntaxHighlighter();
}
-}
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/injection/FlexibleSearchInjector.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/injection/FlexibleSearchInjector.java
new file mode 100644
index 000000000..5dc53df84
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/injection/FlexibleSearchInjector.java
@@ -0,0 +1,94 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.injection;
+
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.idea.plugin.hybris.impex.psi.impl.ImpexStringImpl;
+import com.intellij.lang.Language;
+import com.intellij.openapi.diagnostic.Logger;
+import com.intellij.openapi.progress.ProcessCanceledException;
+import com.intellij.openapi.util.TextRange;
+import com.intellij.openapi.util.text.StringUtil;
+import com.intellij.psi.InjectedLanguagePlaces;
+import com.intellij.psi.LanguageInjector;
+import com.intellij.psi.PsiClass;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiLanguageInjectionHost;
+import com.intellij.psi.PsiMethod;
+import com.intellij.psi.impl.source.tree.java.PsiMethodCallExpressionImpl;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * @author Nosov Aleksandr
+ */
+public class FlexibleSearchInjector implements LanguageInjector {
+
+ private static final Logger LOG = Logger.getInstance(FlexibleSearchInjector.class);
+
+ @Override
+ public void getLanguagesToInject(
+ @NotNull final PsiLanguageInjectionHost host,
+ @NotNull final InjectedLanguagePlaces injectionPlacesRegistrar
+ ) {
+ final PsiElement hostParent = host.getParent();
+ if (host instanceof ImpexStringImpl) {
+ final String hostString = StringUtil.unquoteString(host.getText()).toLowerCase();
+ if (StringUtil.trim(hostString).startsWith("select ")) {
+ registerInjectionPlace(injectionPlacesRegistrar, host);
+ }
+ }
+
+ if (hostParent != null) {
+ if (hostParent.getParent() instanceof PsiMethodCallExpressionImpl) {
+ final PsiMethodCallExpressionImpl callExpression = (PsiMethodCallExpressionImpl) hostParent.getParent();
+ final PsiMethod method = callExpression.resolveMethod();
+ if (method != null) {
+ final PsiClass containingClass = method.getContainingClass();
+ if (containingClass != null
+ && "FlexibleSearchService".equals(containingClass.getName())
+ && "search".equals(method.getName())) {
+
+ registerInjectionPlace(injectionPlacesRegistrar, host);
+ }
+ }
+ }
+ }
+ }
+
+ private void registerInjectionPlace(
+ @NotNull final InjectedLanguagePlaces injectionPlacesRegistrar,
+ @NotNull final PsiElement host
+ ) {
+ final Language language = FlexibleSearchLanguage.getInstance();
+ if (language != null) {
+ try {
+ injectionPlacesRegistrar.addPlace(
+ language,
+ TextRange.from(1, host.getTextLength() - 2),
+ null,
+ null
+ );
+ } catch (ProcessCanceledException e) {
+ // ignore
+ } catch (Throwable e) {
+ LOG.error(e);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/lang/FlexibleSearchPairedBraceMatcher.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/lang/FlexibleSearchPairedBraceMatcher.java
new file mode 100644
index 000000000..a4a809bbf
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/lang/FlexibleSearchPairedBraceMatcher.java
@@ -0,0 +1,61 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.lang;
+
+import com.intellij.lang.BracePair;
+import com.intellij.lang.PairedBraceMatcher;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.tree.IElementType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.LEFT_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.LEFT_BRACKET;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.LEFT_DOUBLE_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.LEFT_PAREN;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.RIGHT_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.RIGHT_BRACKET;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.RIGHT_DOUBLE_BRACE;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.RIGHT_PAREN;
+
+public class FlexibleSearchPairedBraceMatcher implements PairedBraceMatcher {
+
+ private static final BracePair[] PAIRS = new BracePair[]{
+ new BracePair(LEFT_BRACE, RIGHT_BRACE, false),
+ new BracePair(LEFT_BRACKET, RIGHT_BRACKET, false),
+ new BracePair(LEFT_DOUBLE_BRACE, RIGHT_DOUBLE_BRACE, false),
+ new BracePair(LEFT_PAREN, RIGHT_PAREN, false),
+ };
+
+ public BracePair[] getPairs() {
+ return PAIRS;
+ }
+
+ @Override
+ public boolean isPairedBracesAllowedBeforeType(
+ @NotNull final IElementType lbraceType, @Nullable final IElementType contextType
+ ) {
+ return true;
+ }
+
+ @Override
+ public int getCodeConstructStart(final PsiFile file, final int openingBraceOffset) {
+ return openingBraceOffset;
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchAggregateFunction.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchAggregateFunction.java
new file mode 100644
index 000000000..007a49462
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchAggregateFunction.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchAggregateFunction extends PsiElement {
+
+ @Nullable
+ FlexibleSearchGeneralSetFunction getGeneralSetFunction();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBasicIdentifierChain.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBasicIdentifierChain.java
new file mode 100644
index 000000000..825be450d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBasicIdentifierChain.java
@@ -0,0 +1,30 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+
+public interface FlexibleSearchBasicIdentifierChain extends PsiElement {
+
+ @NotNull
+ FlexibleSearchIdentifierChain getIdentifierChain();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBetweenPredicate.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBetweenPredicate.java
new file mode 100644
index 000000000..f4df2d247
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBetweenPredicate.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchBetweenPredicate extends PsiElement {
+
+ @NotNull
+ List getRowValuePredicandList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBetweenPredicatePart2.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBetweenPredicatePart2.java
new file mode 100644
index 000000000..21f09d2f1
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBetweenPredicatePart2.java
@@ -0,0 +1,32 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.List;
+
+public interface FlexibleSearchBetweenPredicatePart2 extends PsiElement {
+
+ @NotNull
+ List getRowValuePredicandList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanFactor.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanFactor.java
new file mode 100644
index 000000000..4605a85c0
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanFactor.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchBooleanFactor extends PsiElement {
+
+ @NotNull
+ FlexibleSearchBooleanTest getBooleanTest();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanPredicand.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanPredicand.java
new file mode 100644
index 000000000..11bf9c5b1
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanPredicand.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchBooleanPredicand extends PsiElement {
+
+ @Nullable
+ FlexibleSearchBooleanValueExpression getBooleanValueExpression();
+
+ @Nullable
+ FlexibleSearchColumnReference getColumnReference();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanPrimary.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanPrimary.java
new file mode 100644
index 000000000..c0922073d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanPrimary.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchBooleanPrimary extends PsiElement {
+
+ @Nullable
+ FlexibleSearchBooleanPredicand getBooleanPredicand();
+
+ @Nullable
+ FlexibleSearchPredicate getPredicate();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanTerm.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanTerm.java
new file mode 100644
index 000000000..aec00a090
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanTerm.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchBooleanTerm extends PsiElement {
+
+ @NotNull
+ FlexibleSearchBooleanFactor getBooleanFactor();
+
+ @NotNull
+ List getBooleanTermList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanTest.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanTest.java
new file mode 100644
index 000000000..d3d827540
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanTest.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchBooleanTest extends PsiElement {
+
+ @NotNull
+ FlexibleSearchBooleanPrimary getBooleanPrimary();
+
+ @Nullable
+ FlexibleSearchTruthValue getTruthValue();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanValueExpression.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanValueExpression.java
new file mode 100644
index 000000000..6172461ca
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchBooleanValueExpression.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchBooleanValueExpression extends PsiElement {
+
+ @NotNull
+ FlexibleSearchBooleanTerm getBooleanTerm();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterLikePredicate.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterLikePredicate.java
new file mode 100644
index 000000000..48f7937f4
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterLikePredicate.java
@@ -0,0 +1,19 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCharacterLikePredicate extends PsiElement {
+
+ @Nullable
+ FlexibleSearchCharacterPattern getCharacterPattern();
+
+ @NotNull
+ FlexibleSearchRowValuePredicand getRowValuePredicand();
+
+ @Nullable
+ FlexibleSearchValueExpression getValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterLikePredicatePart2.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterLikePredicatePart2.java
new file mode 100644
index 000000000..0002edeba
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterLikePredicatePart2.java
@@ -0,0 +1,33 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.Nullable;
+
+public interface FlexibleSearchCharacterLikePredicatePart2 extends PsiElement {
+
+ @Nullable
+ FlexibleSearchCharacterPattern getCharacterPattern();
+
+ @Nullable
+ FlexibleSearchValueExpression getValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterPattern.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterPattern.java
new file mode 100644
index 000000000..6f76792f8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterPattern.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCharacterPattern extends PsiElement {
+
+ @Nullable
+ FlexibleSearchStringValueFunction getStringValueFunction();
+
+ @Nullable
+ PsiElement getString();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterStringLiteral.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterStringLiteral.java
new file mode 100644
index 000000000..1c6f81200
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterStringLiteral.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCharacterStringLiteral extends PsiElement {
+
+ @NotNull
+ PsiElement getString();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterSubstringFunction.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterSubstringFunction.java
new file mode 100644
index 000000000..122ccb1ce
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterSubstringFunction.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCharacterSubstringFunction extends PsiElement {
+
+ @Nullable
+ FlexibleSearchCharacterSubstringFunction getCharacterSubstringFunction();
+
+ @NotNull
+ List getStringValueExpressionList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterValueFunction.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterValueFunction.java
new file mode 100644
index 000000000..d12382564
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCharacterValueFunction.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCharacterValueFunction extends PsiElement {
+
+ @NotNull
+ FlexibleSearchCharacterSubstringFunction getCharacterSubstringFunction();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchColumnLocalization.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchColumnLocalization.java
new file mode 100644
index 000000000..f24542048
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchColumnLocalization.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchColumnLocalization extends PsiElement {
+
+ @NotNull
+ PsiElement getIdentifier();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchColumnReference.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchColumnReference.java
new file mode 100644
index 000000000..f6bc720da
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchColumnReference.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchColumnReference extends PsiElement {
+
+ @Nullable
+ PsiElement getTableNameIdentifier();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComment.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComment.java
new file mode 100644
index 000000000..0e9e51167
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComment.java
@@ -0,0 +1,30 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+
+public interface FlexibleSearchComment extends PsiElement {
+
+ @NotNull
+ PsiElement getEndOfLineComment();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCommonValueExpression.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCommonValueExpression.java
new file mode 100644
index 000000000..826630378
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCommonValueExpression.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCommonValueExpression extends PsiElement {
+
+ @Nullable
+ FlexibleSearchStringValueExpression getStringValueExpression();
+
+ @Nullable
+ PsiElement getNumber();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCompOp.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCompOp.java
new file mode 100644
index 000000000..0c563d7d8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCompOp.java
@@ -0,0 +1,19 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCompOp extends PsiElement {
+
+ @Nullable
+ PsiElement getEqualsOperator();
+
+ @Nullable
+ PsiElement getGreaterThanOrEqualsOperator();
+
+ @Nullable
+ PsiElement getLessThanOrEqualsOperator();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/statistics/impl/StatsResponse.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComparisonPredicate.java
similarity index 68%
rename from src/com/intellij/idea/plugin/hybris/statistics/impl/StatsResponse.java
rename to src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComparisonPredicate.java
index 14679eee1..43ce40846 100644
--- a/src/com/intellij/idea/plugin/hybris/statistics/impl/StatsResponse.java
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComparisonPredicate.java
@@ -16,25 +16,20 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.statistics.impl;
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
-import org.apache.http.HttpResponse;
+import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
-/**
- * Created by Martin Zdarsky-Jones (martin.zdarsky@hybris.com) on 28/2/17.
- */
-public class StatsResponse {
+import java.util.List;
- @NotNull
- private HttpResponse response;
+public interface FlexibleSearchComparisonPredicate extends PsiElement {
- public StatsResponse(@NotNull HttpResponse response) {
- this.response = response;
- }
+ @NotNull
+ FlexibleSearchCompOp getCompOp();
@NotNull
- public HttpResponse getResponse() {
- return response;
- }
+ List getRowValuePredicandList();
+
}
diff --git a/src/com/intellij/idea/plugin/hybris/impex/file/ImpexFileTypeFactory.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComparisonPredicatePart2.java
similarity index 67%
rename from src/com/intellij/idea/plugin/hybris/impex/file/ImpexFileTypeFactory.java
rename to src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComparisonPredicatePart2.java
index b47e629ea..013ff3921 100644
--- a/src/com/intellij/idea/plugin/hybris/impex/file/ImpexFileTypeFactory.java
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComparisonPredicatePart2.java
@@ -16,17 +16,18 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.impex.file;
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
-import com.intellij.openapi.fileTypes.FileTypeConsumer;
-import com.intellij.openapi.fileTypes.FileTypeFactory;
+import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
-public class ImpexFileTypeFactory extends FileTypeFactory {
+public interface FlexibleSearchComparisonPredicatePart2 extends PsiElement {
- @Override
- public void createFileTypes(@NotNull final FileTypeConsumer consumer) {
- consumer.consume(ImpexFileType.getInstance(), ImpexFileType.getInstance().getDefaultExtension());
- }
+ @NotNull
+ FlexibleSearchCompOp getCompOp();
+
+ @NotNull
+ FlexibleSearchRowValuePredicand getRowValuePredicand();
}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComputationalOperation.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComputationalOperation.java
new file mode 100644
index 000000000..eabecc98a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchComputationalOperation.java
@@ -0,0 +1,26 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchComputationalOperation extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCorrelationName.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCorrelationName.java
new file mode 100644
index 000000000..5e7a92758
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchCorrelationName.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchCorrelationName extends PsiElement {
+
+ @NotNull
+ PsiElement getIdentifier();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchDerivedColumn.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchDerivedColumn.java
new file mode 100644
index 000000000..f2d2927a4
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchDerivedColumn.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchDerivedColumn extends PsiElement {
+
+ @Nullable
+ FlexibleSearchCorrelationName getCorrelationName();
+
+ @NotNull
+ FlexibleSearchValueExpression getValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchElementType.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchElementType.java
new file mode 100644
index 000000000..58765a47d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchElementType.java
@@ -0,0 +1,31 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.psi.tree.IElementType;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+public class FlexibleSearchElementType extends IElementType {
+
+ public FlexibleSearchElementType(@NotNull @NonNls final String debugName) {
+ super(debugName, FlexibleSearchLanguage.getInstance());
+ }
+}
diff --git a/settings.gradle b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchEndOfExpression.java
similarity index 78%
rename from settings.gradle
rename to src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchEndOfExpression.java
index 862c3f58d..3d17a419d 100644
--- a/settings.gradle
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchEndOfExpression.java
@@ -16,7 +16,11 @@
* along with this program. If not, see .
*/
-rootProject.name = "Hybris-Integration"
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
-include ":common"
-include ":rt-ant"
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchEndOfExpression extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchExistsPredicate.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchExistsPredicate.java
new file mode 100644
index 000000000..6599d5773
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchExistsPredicate.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchExistsPredicate extends PsiElement {
+
+ @NotNull
+ FlexibleSearchTableSubquery getTableSubquery();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchFromClause.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchFromClause.java
new file mode 100644
index 000000000..4d3cc7644
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchFromClause.java
@@ -0,0 +1,22 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchFromClause extends PsiElement {
+
+ @Nullable
+ FlexibleSearchSubquery getSubquery();
+
+ @Nullable
+ FlexibleSearchTableReferenceList getTableReferenceList();
+
+ @Nullable
+ PsiElement getLeftBrace();
+
+ @Nullable
+ PsiElement getRightBrace();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGeneralLiteral.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGeneralLiteral.java
new file mode 100644
index 000000000..880793b78
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGeneralLiteral.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGeneralLiteral extends PsiElement {
+
+ @NotNull
+ FlexibleSearchCharacterStringLiteral getCharacterStringLiteral();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGeneralSetFunction.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGeneralSetFunction.java
new file mode 100644
index 000000000..58e268c72
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGeneralSetFunction.java
@@ -0,0 +1,22 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGeneralSetFunction extends PsiElement {
+
+ @Nullable
+ FlexibleSearchCorrelationName getCorrelationName();
+
+ @NotNull
+ FlexibleSearchSetFunctionType getSetFunctionType();
+
+ @Nullable
+ FlexibleSearchSetQuantifier getSetQuantifier();
+
+ @NotNull
+ FlexibleSearchValueExpression getValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGreaterThanOrEqualsOperator.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGreaterThanOrEqualsOperator.java
new file mode 100644
index 000000000..9f4c35085
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGreaterThanOrEqualsOperator.java
@@ -0,0 +1,26 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGreaterThanOrEqualsOperator extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupByClause.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupByClause.java
new file mode 100644
index 000000000..311d60967
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupByClause.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGroupByClause extends PsiElement {
+
+ @NotNull
+ FlexibleSearchGroupingElementList getGroupingElementList();
+
+ @Nullable
+ FlexibleSearchSetQuantifier getSetQuantifier();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingColumnReference.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingColumnReference.java
new file mode 100644
index 000000000..dae7ed310
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingColumnReference.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGroupingColumnReference extends PsiElement {
+
+ @NotNull
+ FlexibleSearchValueExpression getValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingColumnReferenceList.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingColumnReferenceList.java
new file mode 100644
index 000000000..710e31e5b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingColumnReferenceList.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGroupingColumnReferenceList extends PsiElement {
+
+ @NotNull
+ List getGroupingColumnReferenceList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingElement.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingElement.java
new file mode 100644
index 000000000..35930de7b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingElement.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGroupingElement extends PsiElement {
+
+ @NotNull
+ FlexibleSearchOrdinaryGroupingSet getOrdinaryGroupingSet();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingElementList.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingElementList.java
new file mode 100644
index 000000000..229a40ac7
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchGroupingElementList.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchGroupingElementList extends PsiElement {
+
+ @NotNull
+ List getGroupingElementList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchIdentifier.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchIdentifier.java
new file mode 100644
index 000000000..0e0e5d0d8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchIdentifier.java
@@ -0,0 +1,30 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+
+public interface FlexibleSearchIdentifier extends PsiElement {
+
+ @NotNull
+ PsiElement getId();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/console/SolrConsole.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchIdentifierChain.java
similarity index 77%
rename from src/com/intellij/idea/plugin/hybris/tools/remote/console/SolrConsole.kt
rename to src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchIdentifierChain.java
index e87fdf0f9..ba5e05ac1 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/remote/console/SolrConsole.kt
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchIdentifierChain.java
@@ -3,8 +3,8 @@
* Copyright (C) 2014-2016 Alexander Bartash
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@@ -16,14 +16,11 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.tools.remote.console
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
-import com.intellij.openapi.ui.ComboBox
+import com.intellij.psi.PsiElement;
-/**
- * @author Nosov Aleksandr
- */
-interface SolrConsole {
+public interface FlexibleSearchIdentifierChain extends PsiElement {
- val coresComboBox: ComboBox
-}
\ No newline at end of file
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchInPredicate.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchInPredicate.java
new file mode 100644
index 000000000..2aee7af43
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchInPredicate.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchInPredicate extends PsiElement {
+
+ @NotNull
+ List getRowValuePredicandList();
+
+ @Nullable
+ FlexibleSearchTableSubquery getTableSubquery();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinCondition.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinCondition.java
new file mode 100644
index 000000000..85b66278f
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinCondition.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchJoinCondition extends PsiElement {
+
+ @Nullable
+ FlexibleSearchSearchCondition getSearchCondition();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinSpecification.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinSpecification.java
new file mode 100644
index 000000000..97dc92011
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinSpecification.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchJoinSpecification extends PsiElement {
+
+ @NotNull
+ FlexibleSearchJoinCondition getJoinCondition();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinType.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinType.java
new file mode 100644
index 000000000..3df8a8721
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinType.java
@@ -0,0 +1,10 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchJoinType extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinedTable.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinedTable.java
new file mode 100644
index 000000000..cb47a84b4
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchJoinedTable.java
@@ -0,0 +1,19 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchJoinedTable extends PsiElement {
+
+ @Nullable
+ FlexibleSearchJoinSpecification getJoinSpecification();
+
+ @Nullable
+ FlexibleSearchJoinType getJoinType();
+
+ @Nullable
+ FlexibleSearchTableReference getTableReference();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLang.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLang.java
new file mode 100644
index 000000000..6b63ce554
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLang.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchLang extends PsiElement {
+
+ @NotNull
+ PsiElement getIdentifier();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLessThanOrEqualsOperator.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLessThanOrEqualsOperator.java
new file mode 100644
index 000000000..ce3505d41
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLessThanOrEqualsOperator.java
@@ -0,0 +1,26 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchLessThanOrEqualsOperator extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLikePredicate.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLikePredicate.java
new file mode 100644
index 000000000..76f204bdd
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchLikePredicate.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchLikePredicate extends PsiElement {
+
+ @NotNull
+ FlexibleSearchCharacterLikePredicate getCharacterLikePredicate();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNonparenthesizedValueExpressionPrimary.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNonparenthesizedValueExpressionPrimary.java
new file mode 100644
index 000000000..8e22cf12d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNonparenthesizedValueExpressionPrimary.java
@@ -0,0 +1,30 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+
+public interface FlexibleSearchNonparenthesizedValueExpressionPrimary extends PsiElement {
+
+ @NotNull
+ FlexibleSearchBooleanValueExpression getBooleanValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNotEqualsOperator.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNotEqualsOperator.java
new file mode 100644
index 000000000..6a7bad82c
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNotEqualsOperator.java
@@ -0,0 +1,26 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchNotEqualsOperator extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullOrdering.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullOrdering.java
new file mode 100644
index 000000000..ff91e9003
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullOrdering.java
@@ -0,0 +1,10 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchNullOrdering extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullPredicate.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullPredicate.java
new file mode 100644
index 000000000..5824bb507
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullPredicate.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchNullPredicate extends PsiElement {
+
+ @NotNull
+ FlexibleSearchRowValuePredicand getRowValuePredicand();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullPredicatePart2.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullPredicatePart2.java
new file mode 100644
index 000000000..e272b047a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchNullPredicatePart2.java
@@ -0,0 +1,26 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchNullPredicatePart2 extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrderByClause.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrderByClause.java
new file mode 100644
index 000000000..65f5a923b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrderByClause.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchOrderByClause extends PsiElement {
+
+ @Nullable
+ FlexibleSearchSortSpecificationList getSortSpecificationList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrderingSpecification.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrderingSpecification.java
new file mode 100644
index 000000000..cf75c3d5b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrderingSpecification.java
@@ -0,0 +1,10 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchOrderingSpecification extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrdinaryGroupingSet.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrdinaryGroupingSet.java
new file mode 100644
index 000000000..ca289b7c8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchOrdinaryGroupingSet.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchOrdinaryGroupingSet extends PsiElement {
+
+ @Nullable
+ FlexibleSearchGroupingColumnReference getGroupingColumnReference();
+
+ @Nullable
+ FlexibleSearchGroupingColumnReferenceList getGroupingColumnReferenceList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchParameterReference.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchParameterReference.java
new file mode 100644
index 000000000..4fb3b97d0
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchParameterReference.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchParameterReference extends PsiElement {
+
+ @Nullable
+ PsiElement getParameterIdentifier();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchParenthesizedBooleanValueExpression.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchParenthesizedBooleanValueExpression.java
new file mode 100644
index 000000000..e929c36c5
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchParenthesizedBooleanValueExpression.java
@@ -0,0 +1,30 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+
+public interface FlexibleSearchParenthesizedBooleanValueExpression extends PsiElement {
+
+ @NotNull
+ FlexibleSearchBooleanValueExpression getBooleanValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchPredicate.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchPredicate.java
new file mode 100644
index 000000000..3ce20589d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchPredicate.java
@@ -0,0 +1,31 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchPredicate extends PsiElement {
+
+ @Nullable
+ FlexibleSearchBetweenPredicate getBetweenPredicate();
+
+ @Nullable
+ FlexibleSearchCompOp getCompOp();
+
+ @Nullable
+ FlexibleSearchExistsPredicate getExistsPredicate();
+
+ @Nullable
+ FlexibleSearchInPredicate getInPredicate();
+
+ @Nullable
+ FlexibleSearchLikePredicate getLikePredicate();
+
+ @Nullable
+ FlexibleSearchNullPredicate getNullPredicate();
+
+ @NotNull
+ List getRowValuePredicandList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchQuerySpecification.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchQuerySpecification.java
new file mode 100644
index 000000000..7acca318e
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchQuerySpecification.java
@@ -0,0 +1,19 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchQuerySpecification extends PsiElement {
+
+ @Nullable
+ FlexibleSearchSelectList getSelectList();
+
+ @Nullable
+ FlexibleSearchSetQuantifier getSetQuantifier();
+
+ @Nullable
+ FlexibleSearchTableExpression getTableExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchRowValuePredicand.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchRowValuePredicand.java
new file mode 100644
index 000000000..17d1dd8ef
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchRowValuePredicand.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchRowValuePredicand extends PsiElement {
+
+ @NotNull
+ List getCommonValueExpressionList();
+
+ @Nullable
+ FlexibleSearchValueExpression getValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSearchCondition.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSearchCondition.java
new file mode 100644
index 000000000..46fcde82d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSearchCondition.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSearchCondition extends PsiElement {
+
+ @NotNull
+ FlexibleSearchBooleanValueExpression getBooleanValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSelectList.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSelectList.java
new file mode 100644
index 000000000..87de0070b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSelectList.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSelectList extends PsiElement {
+
+ @NotNull
+ List getSelectSublistList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSelectSublist.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSelectSublist.java
new file mode 100644
index 000000000..41c248ba9
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSelectSublist.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSelectSublist extends PsiElement {
+
+ @NotNull
+ List getAggregateFunctionList();
+
+ @Nullable
+ FlexibleSearchDerivedColumn getDerivedColumn();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSetFunctionType.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSetFunctionType.java
new file mode 100644
index 000000000..03549506c
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSetFunctionType.java
@@ -0,0 +1,10 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSetFunctionType extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSetQuantifier.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSetQuantifier.java
new file mode 100644
index 000000000..284dd0367
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSetQuantifier.java
@@ -0,0 +1,10 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSetQuantifier extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortKey.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortKey.java
new file mode 100644
index 000000000..13a4b537e
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortKey.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSortKey extends PsiElement {
+
+ @NotNull
+ FlexibleSearchValueExpression getValueExpression();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortSpecification.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortSpecification.java
new file mode 100644
index 000000000..62194966a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortSpecification.java
@@ -0,0 +1,19 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSortSpecification extends PsiElement {
+
+ @Nullable
+ FlexibleSearchNullOrdering getNullOrdering();
+
+ @Nullable
+ FlexibleSearchOrderingSpecification getOrderingSpecification();
+
+ @NotNull
+ FlexibleSearchSortKey getSortKey();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortSpecificationList.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortSpecificationList.java
new file mode 100644
index 000000000..ed7e93d4e
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSortSpecificationList.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSortSpecificationList extends PsiElement {
+
+ @NotNull
+ List getSortSpecificationList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchStringValueExpression.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchStringValueExpression.java
new file mode 100644
index 000000000..8c9ec687f
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchStringValueExpression.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchStringValueExpression extends PsiElement {
+
+ @NotNull
+ FlexibleSearchGeneralLiteral getGeneralLiteral();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchStringValueFunction.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchStringValueFunction.java
new file mode 100644
index 000000000..b02970d16
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchStringValueFunction.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchStringValueFunction extends PsiElement {
+
+ @NotNull
+ FlexibleSearchCharacterValueFunction getCharacterValueFunction();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSubquery.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSubquery.java
new file mode 100644
index 000000000..d8506c436
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchSubquery.java
@@ -0,0 +1,25 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchSubquery extends PsiElement {
+
+ @Nullable
+ FlexibleSearchCorrelationName getCorrelationName();
+
+ @Nullable
+ FlexibleSearchQuerySpecification getQuerySpecification();
+
+ @NotNull
+ List getSubqueryList();
+
+ @NotNull
+ PsiElement getLeftDoubleBrace();
+
+ @Nullable
+ PsiElement getRightDoubleBrace();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableExpression.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableExpression.java
new file mode 100644
index 000000000..3d6a76ca0
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableExpression.java
@@ -0,0 +1,22 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchTableExpression extends PsiElement {
+
+ @NotNull
+ FlexibleSearchFromClause getFromClause();
+
+ @Nullable
+ FlexibleSearchGroupByClause getGroupByClause();
+
+ @Nullable
+ FlexibleSearchOrderByClause getOrderByClause();
+
+ @Nullable
+ FlexibleSearchWhereClause getWhereClause();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableName.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableName.java
new file mode 100644
index 000000000..ff96e4c53
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableName.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchTableName extends PsiElement {
+
+ @NotNull
+ PsiElement getTableNameIdentifier();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableNameVal.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableNameVal.java
new file mode 100644
index 000000000..e77627941
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableNameVal.java
@@ -0,0 +1,30 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.PsiElement;
+import org.jetbrains.annotations.NotNull;
+
+public interface FlexibleSearchTableNameVal extends PsiElement {
+
+ @NotNull
+ PsiElement getId();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTablePrimary.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTablePrimary.java
new file mode 100644
index 000000000..1e70319ed
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTablePrimary.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchTablePrimary extends PsiElement {
+
+ @Nullable
+ FlexibleSearchCorrelationName getCorrelationName();
+
+ @NotNull
+ FlexibleSearchTableName getTableName();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableReference.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableReference.java
new file mode 100644
index 000000000..64e3faa36
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableReference.java
@@ -0,0 +1,16 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchTableReference extends PsiElement {
+
+ @NotNull
+ List getJoinedTableList();
+
+ @NotNull
+ FlexibleSearchTablePrimary getTablePrimary();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableReferenceList.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableReferenceList.java
new file mode 100644
index 000000000..0ff741a9c
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableReferenceList.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchTableReferenceList extends PsiElement {
+
+ @NotNull
+ List getTableReferenceList();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableSubquery.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableSubquery.java
new file mode 100644
index 000000000..a4b3f51c6
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTableSubquery.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchTableSubquery extends PsiElement {
+
+ @NotNull
+ FlexibleSearchSubquery getSubquery();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTokenType.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTokenType.java
new file mode 100644
index 000000000..8849e9304
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTokenType.java
@@ -0,0 +1,51 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage;
+import com.intellij.psi.tree.IElementType;
+import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.regex.Pattern;
+
+import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.lowerCase;
+
+public class FlexibleSearchTokenType extends IElementType {
+
+ private static final Pattern PATTERN = Pattern.compile("[_]");
+
+ public FlexibleSearchTokenType(@NotNull @NonNls final String debugName) {
+ super(debugName, FlexibleSearchLanguage.getInstance());
+ }
+
+ @Override
+ public String toString() {
+ final String name = super.toString();
+
+ if (isBlank(name)) {
+ return name;
+ }
+
+ final String fixedName = PATTERN.matcher(lowerCase(name)).replaceAll(" ");
+
+ return new StringBuilder("<").append(fixedName).append('>').toString();
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTruthValue.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTruthValue.java
new file mode 100644
index 000000000..939ad86e1
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTruthValue.java
@@ -0,0 +1,10 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchTruthValue extends PsiElement {
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTypes.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTypes.java
new file mode 100644
index 000000000..2c7de943a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchTypes.java
@@ -0,0 +1,345 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import com.intellij.psi.tree.IElementType;
+import com.intellij.psi.PsiElement;
+import com.intellij.lang.ASTNode;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl.*;
+
+public interface FlexibleSearchTypes {
+
+ IElementType AGGREGATE_FUNCTION = new FlexibleSearchElementType("AGGREGATE_FUNCTION");
+ IElementType BETWEEN_PREDICATE = new FlexibleSearchElementType("BETWEEN_PREDICATE");
+ IElementType BOOLEAN_FACTOR = new FlexibleSearchElementType("BOOLEAN_FACTOR");
+ IElementType BOOLEAN_PREDICAND = new FlexibleSearchElementType("BOOLEAN_PREDICAND");
+ IElementType BOOLEAN_PRIMARY = new FlexibleSearchElementType("BOOLEAN_PRIMARY");
+ IElementType BOOLEAN_TERM = new FlexibleSearchElementType("BOOLEAN_TERM");
+ IElementType BOOLEAN_TEST = new FlexibleSearchElementType("BOOLEAN_TEST");
+ IElementType BOOLEAN_VALUE_EXPRESSION = new FlexibleSearchElementType("BOOLEAN_VALUE_EXPRESSION");
+ IElementType CHARACTER_LIKE_PREDICATE = new FlexibleSearchElementType("CHARACTER_LIKE_PREDICATE");
+ IElementType CHARACTER_PATTERN = new FlexibleSearchElementType("CHARACTER_PATTERN");
+ IElementType CHARACTER_STRING_LITERAL = new FlexibleSearchElementType("CHARACTER_STRING_LITERAL");
+ IElementType CHARACTER_SUBSTRING_FUNCTION = new FlexibleSearchElementType("CHARACTER_SUBSTRING_FUNCTION");
+ IElementType CHARACTER_VALUE_FUNCTION = new FlexibleSearchElementType("CHARACTER_VALUE_FUNCTION");
+ IElementType COLUMN_LOCALIZATION = new FlexibleSearchElementType("COLUMN_LOCALIZATION");
+ IElementType COLUMN_REFERENCE = new FlexibleSearchElementType("COLUMN_REFERENCE");
+ IElementType COMMON_VALUE_EXPRESSION = new FlexibleSearchElementType("COMMON_VALUE_EXPRESSION");
+ IElementType COMP_OP = new FlexibleSearchElementType("COMP_OP");
+ IElementType CORRELATION_NAME = new FlexibleSearchElementType("CORRELATION_NAME");
+ IElementType DERIVED_COLUMN = new FlexibleSearchElementType("DERIVED_COLUMN");
+ IElementType EXISTS_PREDICATE = new FlexibleSearchElementType("EXISTS_PREDICATE");
+ IElementType FROM_CLAUSE = new FlexibleSearchElementType("FROM_CLAUSE");
+ IElementType GENERAL_LITERAL = new FlexibleSearchElementType("GENERAL_LITERAL");
+ IElementType GENERAL_SET_FUNCTION = new FlexibleSearchElementType("GENERAL_SET_FUNCTION");
+ IElementType GROUPING_COLUMN_REFERENCE = new FlexibleSearchElementType("GROUPING_COLUMN_REFERENCE");
+ IElementType GROUPING_COLUMN_REFERENCE_LIST = new FlexibleSearchElementType("GROUPING_COLUMN_REFERENCE_LIST");
+ IElementType GROUPING_ELEMENT = new FlexibleSearchElementType("GROUPING_ELEMENT");
+ IElementType GROUPING_ELEMENT_LIST = new FlexibleSearchElementType("GROUPING_ELEMENT_LIST");
+ IElementType GROUP_BY_CLAUSE = new FlexibleSearchElementType("GROUP_BY_CLAUSE");
+ IElementType IN_PREDICATE = new FlexibleSearchElementType("IN_PREDICATE");
+ IElementType JOINED_TABLE = new FlexibleSearchElementType("JOINED_TABLE");
+ IElementType JOIN_CONDITION = new FlexibleSearchElementType("JOIN_CONDITION");
+ IElementType JOIN_SPECIFICATION = new FlexibleSearchElementType("JOIN_SPECIFICATION");
+ IElementType JOIN_TYPE = new FlexibleSearchElementType("JOIN_TYPE");
+ IElementType LIKE_PREDICATE = new FlexibleSearchElementType("LIKE_PREDICATE");
+ IElementType NULL_ORDERING = new FlexibleSearchElementType("NULL_ORDERING");
+ IElementType NULL_PREDICATE = new FlexibleSearchElementType("NULL_PREDICATE");
+ IElementType ORDERING_SPECIFICATION = new FlexibleSearchElementType("ORDERING_SPECIFICATION");
+ IElementType ORDER_BY_CLAUSE = new FlexibleSearchElementType("ORDER_BY_CLAUSE");
+ IElementType ORDINARY_GROUPING_SET = new FlexibleSearchElementType("ORDINARY_GROUPING_SET");
+ IElementType PARAMETER_REFERENCE = new FlexibleSearchElementType("PARAMETER_REFERENCE");
+ IElementType PREDICATE = new FlexibleSearchElementType("PREDICATE");
+ IElementType QUERY_SPECIFICATION = new FlexibleSearchElementType("QUERY_SPECIFICATION");
+ IElementType ROW_VALUE_PREDICAND = new FlexibleSearchElementType("ROW_VALUE_PREDICAND");
+ IElementType SEARCH_CONDITION = new FlexibleSearchElementType("SEARCH_CONDITION");
+ IElementType SELECT_LIST = new FlexibleSearchElementType("SELECT_LIST");
+ IElementType SELECT_SUBLIST = new FlexibleSearchElementType("SELECT_SUBLIST");
+ IElementType SET_FUNCTION_TYPE = new FlexibleSearchElementType("SET_FUNCTION_TYPE");
+ IElementType SET_QUANTIFIER = new FlexibleSearchElementType("SET_QUANTIFIER");
+ IElementType SORT_KEY = new FlexibleSearchElementType("SORT_KEY");
+ IElementType SORT_SPECIFICATION = new FlexibleSearchElementType("SORT_SPECIFICATION");
+ IElementType SORT_SPECIFICATION_LIST = new FlexibleSearchElementType("SORT_SPECIFICATION_LIST");
+ IElementType STRING_VALUE_EXPRESSION = new FlexibleSearchElementType("STRING_VALUE_EXPRESSION");
+ IElementType STRING_VALUE_FUNCTION = new FlexibleSearchElementType("STRING_VALUE_FUNCTION");
+ IElementType SUBQUERY = new FlexibleSearchElementType("SUBQUERY");
+ IElementType TABLE_EXPRESSION = new FlexibleSearchElementType("TABLE_EXPRESSION");
+ IElementType TABLE_NAME = new FlexibleSearchElementType("TABLE_NAME");
+ IElementType TABLE_PRIMARY = new FlexibleSearchElementType("TABLE_PRIMARY");
+ IElementType TABLE_REFERENCE = new FlexibleSearchElementType("TABLE_REFERENCE");
+ IElementType TABLE_REFERENCE_LIST = new FlexibleSearchElementType("TABLE_REFERENCE_LIST");
+ IElementType TABLE_SUBQUERY = new FlexibleSearchElementType("TABLE_SUBQUERY");
+ IElementType TRUTH_VALUE = new FlexibleSearchElementType("TRUTH_VALUE");
+ IElementType VALUE_EXPRESSION = new FlexibleSearchElementType("VALUE_EXPRESSION");
+ IElementType WHERE_CLAUSE = new FlexibleSearchElementType("WHERE_CLAUSE");
+
+ IElementType ALL = new FlexibleSearchTokenType("ALL");
+ IElementType AND = new FlexibleSearchTokenType("AND");
+ IElementType ANY = new FlexibleSearchTokenType("ANY");
+ IElementType AS = new FlexibleSearchTokenType("AS");
+ IElementType ASC = new FlexibleSearchTokenType("ASC");
+ IElementType ASTERISK = new FlexibleSearchTokenType("*");
+ IElementType AVG = new FlexibleSearchTokenType("AVG");
+ IElementType BETWEEN = new FlexibleSearchTokenType("BETWEEN");
+ IElementType BY = new FlexibleSearchTokenType("BY");
+ IElementType COLON = new FlexibleSearchTokenType(":");
+ IElementType COLUMN_REFERENCE_IDENTIFIER = new FlexibleSearchTokenType("COLUMN_REFERENCE_IDENTIFIER");
+ IElementType COMMA = new FlexibleSearchTokenType(",");
+ IElementType CONCAT = new FlexibleSearchTokenType("CONCAT");
+ IElementType COUNT = new FlexibleSearchTokenType("COUNT");
+ IElementType DESC = new FlexibleSearchTokenType("DESC");
+ IElementType DISTINCT = new FlexibleSearchTokenType("DISTINCT");
+ IElementType DOT = new FlexibleSearchTokenType(".");
+ IElementType EQUALS_OPERATOR = new FlexibleSearchTokenType("EQUALS_OPERATOR");
+ IElementType EVERY = new FlexibleSearchTokenType("EVERY");
+ IElementType EXCLAMATION_MARK = new FlexibleSearchTokenType("!");
+ IElementType EXISTS = new FlexibleSearchTokenType("EXISTS");
+ IElementType FALSE = new FlexibleSearchTokenType("FALSE");
+ IElementType FIRST = new FlexibleSearchTokenType("FIRST");
+ IElementType FROM = new FlexibleSearchTokenType("FROM");
+ IElementType GREATER_THAN_OPERATOR = new FlexibleSearchTokenType(">");
+ IElementType GREATER_THAN_OR_EQUALS_OPERATOR = new FlexibleSearchTokenType("GREATER_THAN_OR_EQUALS_OPERATOR");
+ IElementType GROUP = new FlexibleSearchTokenType("GROUP");
+ IElementType IDENTIFIER = new FlexibleSearchTokenType("IDENTIFIER");
+ IElementType IN = new FlexibleSearchTokenType("IN");
+ IElementType IS = new FlexibleSearchTokenType("IS");
+ IElementType JOIN = new FlexibleSearchTokenType("JOIN");
+ IElementType JOIN_TYPE_1_0 = new FlexibleSearchTokenType("join_type_1_0");
+ IElementType LAST = new FlexibleSearchTokenType("LAST");
+ IElementType LEFT = new FlexibleSearchTokenType("LEFT");
+ IElementType LEFT_BRACE = new FlexibleSearchTokenType("LEFT_BRACE");
+ IElementType LEFT_BRACKET = new FlexibleSearchTokenType("[");
+ IElementType LEFT_DOUBLE_BRACE = new FlexibleSearchTokenType("LEFT_DOUBLE_BRACE");
+ IElementType LEFT_PAREN = new FlexibleSearchTokenType("(");
+ IElementType LESS_THAN_OPERATOR = new FlexibleSearchTokenType("<");
+ IElementType LESS_THAN_OR_EQUALS_OPERATOR = new FlexibleSearchTokenType("LESS_THAN_OR_EQUALS_OPERATOR");
+ IElementType LIKE = new FlexibleSearchTokenType("LIKE");
+ IElementType LINE_TERMINATOR = new FlexibleSearchTokenType("LINE_TERMINATOR");
+ IElementType MAX = new FlexibleSearchTokenType("MAX");
+ IElementType MIN = new FlexibleSearchTokenType("MIN");
+ IElementType MINUS_SIGN = new FlexibleSearchTokenType("-");
+ IElementType NOT = new FlexibleSearchTokenType("NOT");
+ IElementType NOT_EQUALS_OPERATOR = new FlexibleSearchTokenType("<>");
+ IElementType NULL = new FlexibleSearchTokenType("NULL");
+ IElementType NULLS = new FlexibleSearchTokenType("NULLS");
+ IElementType NUMBER = new FlexibleSearchTokenType("NUMBER");
+ IElementType ON = new FlexibleSearchTokenType("ON");
+ IElementType OR = new FlexibleSearchTokenType("OR");
+ IElementType ORDER = new FlexibleSearchTokenType("ORDER");
+ IElementType PARAMETER_IDENTIFIER = new FlexibleSearchTokenType("PARAMETER_IDENTIFIER");
+ IElementType PERCENT = new FlexibleSearchTokenType("%");
+ IElementType PLUS_SIGN = new FlexibleSearchTokenType("+");
+ IElementType QUESTION_MARK = new FlexibleSearchTokenType("?");
+ IElementType QUOTE = new FlexibleSearchTokenType("'");
+ IElementType RIGHT_BRACE = new FlexibleSearchTokenType("RIGHT_BRACE");
+ IElementType RIGHT_BRACKET = new FlexibleSearchTokenType("]");
+ IElementType RIGHT_DOUBLE_BRACE = new FlexibleSearchTokenType("RIGHT_DOUBLE_BRACE");
+ IElementType RIGHT_PAREN = new FlexibleSearchTokenType(")");
+ IElementType SELECT = new FlexibleSearchTokenType("SELECT");
+ IElementType SEMICOLON = new FlexibleSearchTokenType(";");
+ IElementType SOME = new FlexibleSearchTokenType("SOME");
+ IElementType SPACE = new FlexibleSearchTokenType("SPACE");
+ IElementType STRING = new FlexibleSearchTokenType("STRING");
+ IElementType SUM = new FlexibleSearchTokenType("SUM");
+ IElementType TABLE_NAME_IDENTIFIER = new FlexibleSearchTokenType("TABLE_NAME_IDENTIFIER");
+ IElementType TRUE = new FlexibleSearchTokenType("TRUE");
+ IElementType UNDERSCORE = new FlexibleSearchTokenType("_");
+ IElementType UNION = new FlexibleSearchTokenType("UNION");
+ IElementType WHERE = new FlexibleSearchTokenType("WHERE");
+ IElementType WHITE_SPACE = new FlexibleSearchTokenType("WHITE_SPACE");
+
+ class Factory {
+ public static PsiElement createElement(ASTNode node) {
+ IElementType type = node.getElementType();
+ if (type == AGGREGATE_FUNCTION) {
+ return new FlexibleSearchAggregateFunctionImpl(node);
+ }
+ else if (type == BETWEEN_PREDICATE) {
+ return new FlexibleSearchBetweenPredicateImpl(node);
+ }
+ else if (type == BOOLEAN_FACTOR) {
+ return new FlexibleSearchBooleanFactorImpl(node);
+ }
+ else if (type == BOOLEAN_PREDICAND) {
+ return new FlexibleSearchBooleanPredicandImpl(node);
+ }
+ else if (type == BOOLEAN_PRIMARY) {
+ return new FlexibleSearchBooleanPrimaryImpl(node);
+ }
+ else if (type == BOOLEAN_TERM) {
+ return new FlexibleSearchBooleanTermImpl(node);
+ }
+ else if (type == BOOLEAN_TEST) {
+ return new FlexibleSearchBooleanTestImpl(node);
+ }
+ else if (type == BOOLEAN_VALUE_EXPRESSION) {
+ return new FlexibleSearchBooleanValueExpressionImpl(node);
+ }
+ else if (type == CHARACTER_LIKE_PREDICATE) {
+ return new FlexibleSearchCharacterLikePredicateImpl(node);
+ }
+ else if (type == CHARACTER_PATTERN) {
+ return new FlexibleSearchCharacterPatternImpl(node);
+ }
+ else if (type == CHARACTER_STRING_LITERAL) {
+ return new FlexibleSearchCharacterStringLiteralImpl(node);
+ }
+ else if (type == CHARACTER_SUBSTRING_FUNCTION) {
+ return new FlexibleSearchCharacterSubstringFunctionImpl(node);
+ }
+ else if (type == CHARACTER_VALUE_FUNCTION) {
+ return new FlexibleSearchCharacterValueFunctionImpl(node);
+ }
+ else if (type == COLUMN_LOCALIZATION) {
+ return new FlexibleSearchColumnLocalizationImpl(node);
+ }
+ else if (type == COLUMN_REFERENCE) {
+ return new FlexibleSearchColumnReferenceImpl(node);
+ }
+ else if (type == COMMON_VALUE_EXPRESSION) {
+ return new FlexibleSearchCommonValueExpressionImpl(node);
+ }
+ else if (type == COMP_OP) {
+ return new FlexibleSearchCompOpImpl(node);
+ }
+ else if (type == CORRELATION_NAME) {
+ return new FlexibleSearchCorrelationNameImpl(node);
+ }
+ else if (type == DERIVED_COLUMN) {
+ return new FlexibleSearchDerivedColumnImpl(node);
+ }
+ else if (type == EXISTS_PREDICATE) {
+ return new FlexibleSearchExistsPredicateImpl(node);
+ }
+ else if (type == FROM_CLAUSE) {
+ return new FlexibleSearchFromClauseImpl(node);
+ }
+ else if (type == GENERAL_LITERAL) {
+ return new FlexibleSearchGeneralLiteralImpl(node);
+ }
+ else if (type == GENERAL_SET_FUNCTION) {
+ return new FlexibleSearchGeneralSetFunctionImpl(node);
+ }
+ else if (type == GROUPING_COLUMN_REFERENCE) {
+ return new FlexibleSearchGroupingColumnReferenceImpl(node);
+ }
+ else if (type == GROUPING_COLUMN_REFERENCE_LIST) {
+ return new FlexibleSearchGroupingColumnReferenceListImpl(node);
+ }
+ else if (type == GROUPING_ELEMENT) {
+ return new FlexibleSearchGroupingElementImpl(node);
+ }
+ else if (type == GROUPING_ELEMENT_LIST) {
+ return new FlexibleSearchGroupingElementListImpl(node);
+ }
+ else if (type == GROUP_BY_CLAUSE) {
+ return new FlexibleSearchGroupByClauseImpl(node);
+ }
+ else if (type == IN_PREDICATE) {
+ return new FlexibleSearchInPredicateImpl(node);
+ }
+ else if (type == JOINED_TABLE) {
+ return new FlexibleSearchJoinedTableImpl(node);
+ }
+ else if (type == JOIN_CONDITION) {
+ return new FlexibleSearchJoinConditionImpl(node);
+ }
+ else if (type == JOIN_SPECIFICATION) {
+ return new FlexibleSearchJoinSpecificationImpl(node);
+ }
+ else if (type == JOIN_TYPE) {
+ return new FlexibleSearchJoinTypeImpl(node);
+ }
+ else if (type == LIKE_PREDICATE) {
+ return new FlexibleSearchLikePredicateImpl(node);
+ }
+ else if (type == NULL_ORDERING) {
+ return new FlexibleSearchNullOrderingImpl(node);
+ }
+ else if (type == NULL_PREDICATE) {
+ return new FlexibleSearchNullPredicateImpl(node);
+ }
+ else if (type == ORDERING_SPECIFICATION) {
+ return new FlexibleSearchOrderingSpecificationImpl(node);
+ }
+ else if (type == ORDER_BY_CLAUSE) {
+ return new FlexibleSearchOrderByClauseImpl(node);
+ }
+ else if (type == ORDINARY_GROUPING_SET) {
+ return new FlexibleSearchOrdinaryGroupingSetImpl(node);
+ }
+ else if (type == PARAMETER_REFERENCE) {
+ return new FlexibleSearchParameterReferenceImpl(node);
+ }
+ else if (type == PREDICATE) {
+ return new FlexibleSearchPredicateImpl(node);
+ }
+ else if (type == QUERY_SPECIFICATION) {
+ return new FlexibleSearchQuerySpecificationImpl(node);
+ }
+ else if (type == ROW_VALUE_PREDICAND) {
+ return new FlexibleSearchRowValuePredicandImpl(node);
+ }
+ else if (type == SEARCH_CONDITION) {
+ return new FlexibleSearchSearchConditionImpl(node);
+ }
+ else if (type == SELECT_LIST) {
+ return new FlexibleSearchSelectListImpl(node);
+ }
+ else if (type == SELECT_SUBLIST) {
+ return new FlexibleSearchSelectSublistImpl(node);
+ }
+ else if (type == SET_FUNCTION_TYPE) {
+ return new FlexibleSearchSetFunctionTypeImpl(node);
+ }
+ else if (type == SET_QUANTIFIER) {
+ return new FlexibleSearchSetQuantifierImpl(node);
+ }
+ else if (type == SORT_KEY) {
+ return new FlexibleSearchSortKeyImpl(node);
+ }
+ else if (type == SORT_SPECIFICATION) {
+ return new FlexibleSearchSortSpecificationImpl(node);
+ }
+ else if (type == SORT_SPECIFICATION_LIST) {
+ return new FlexibleSearchSortSpecificationListImpl(node);
+ }
+ else if (type == STRING_VALUE_EXPRESSION) {
+ return new FlexibleSearchStringValueExpressionImpl(node);
+ }
+ else if (type == STRING_VALUE_FUNCTION) {
+ return new FlexibleSearchStringValueFunctionImpl(node);
+ }
+ else if (type == SUBQUERY) {
+ return new FlexibleSearchSubqueryImpl(node);
+ }
+ else if (type == TABLE_EXPRESSION) {
+ return new FlexibleSearchTableExpressionImpl(node);
+ }
+ else if (type == TABLE_NAME) {
+ return new FlexibleSearchTableNameImpl(node);
+ }
+ else if (type == TABLE_PRIMARY) {
+ return new FlexibleSearchTablePrimaryImpl(node);
+ }
+ else if (type == TABLE_REFERENCE) {
+ return new FlexibleSearchTableReferenceImpl(node);
+ }
+ else if (type == TABLE_REFERENCE_LIST) {
+ return new FlexibleSearchTableReferenceListImpl(node);
+ }
+ else if (type == TABLE_SUBQUERY) {
+ return new FlexibleSearchTableSubqueryImpl(node);
+ }
+ else if (type == TRUTH_VALUE) {
+ return new FlexibleSearchTruthValueImpl(node);
+ }
+ else if (type == VALUE_EXPRESSION) {
+ return new FlexibleSearchValueExpressionImpl(node);
+ }
+ else if (type == WHERE_CLAUSE) {
+ return new FlexibleSearchWhereClauseImpl(node);
+ }
+ throw new AssertionError("Unknown element type: " + type);
+ }
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchValueExpression.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchValueExpression.java
new file mode 100644
index 000000000..576fa81d1
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchValueExpression.java
@@ -0,0 +1,28 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchValueExpression extends PsiElement {
+
+ @Nullable
+ FlexibleSearchColumnLocalization getColumnLocalization();
+
+ @Nullable
+ FlexibleSearchColumnReference getColumnReference();
+
+ @Nullable
+ FlexibleSearchParameterReference getParameterReference();
+
+ @Nullable
+ PsiElement getLeftBrace();
+
+ @Nullable
+ PsiElement getNumber();
+
+ @Nullable
+ PsiElement getRightBrace();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchVisitor.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchVisitor.java
new file mode 100644
index 000000000..00ca7de36
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchVisitor.java
@@ -0,0 +1,266 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.PsiElement;
+
+public class FlexibleSearchVisitor extends PsiElementVisitor {
+
+ public void visitAggregateFunction(@NotNull FlexibleSearchAggregateFunction o) {
+ visitPsiElement(o);
+ }
+
+ public void visitBetweenPredicate(@NotNull FlexibleSearchBetweenPredicate o) {
+ visitPsiElement(o);
+ }
+
+ public void visitBooleanFactor(@NotNull FlexibleSearchBooleanFactor o) {
+ visitPsiElement(o);
+ }
+
+ public void visitBooleanPredicand(@NotNull FlexibleSearchBooleanPredicand o) {
+ visitPsiElement(o);
+ }
+
+ public void visitBooleanPrimary(@NotNull FlexibleSearchBooleanPrimary o) {
+ visitPsiElement(o);
+ }
+
+ public void visitBooleanTerm(@NotNull FlexibleSearchBooleanTerm o) {
+ visitPsiElement(o);
+ }
+
+ public void visitBooleanTest(@NotNull FlexibleSearchBooleanTest o) {
+ visitPsiElement(o);
+ }
+
+ public void visitBooleanValueExpression(@NotNull FlexibleSearchBooleanValueExpression o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCharacterLikePredicate(@NotNull FlexibleSearchCharacterLikePredicate o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCharacterPattern(@NotNull FlexibleSearchCharacterPattern o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCharacterStringLiteral(@NotNull FlexibleSearchCharacterStringLiteral o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCharacterSubstringFunction(@NotNull FlexibleSearchCharacterSubstringFunction o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCharacterValueFunction(@NotNull FlexibleSearchCharacterValueFunction o) {
+ visitPsiElement(o);
+ }
+
+ public void visitColumnLocalization(@NotNull FlexibleSearchColumnLocalization o) {
+ visitPsiElement(o);
+ }
+
+ public void visitColumnReference(@NotNull FlexibleSearchColumnReference o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCommonValueExpression(@NotNull FlexibleSearchCommonValueExpression o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCompOp(@NotNull FlexibleSearchCompOp o) {
+ visitPsiElement(o);
+ }
+
+ public void visitCorrelationName(@NotNull FlexibleSearchCorrelationName o) {
+ visitPsiElement(o);
+ }
+
+ public void visitDerivedColumn(@NotNull FlexibleSearchDerivedColumn o) {
+ visitPsiElement(o);
+ }
+
+ public void visitExistsPredicate(@NotNull FlexibleSearchExistsPredicate o) {
+ visitPsiElement(o);
+ }
+
+ public void visitFromClause(@NotNull FlexibleSearchFromClause o) {
+ visitPsiElement(o);
+ }
+
+ public void visitGeneralLiteral(@NotNull FlexibleSearchGeneralLiteral o) {
+ visitPsiElement(o);
+ }
+
+ public void visitGeneralSetFunction(@NotNull FlexibleSearchGeneralSetFunction o) {
+ visitPsiElement(o);
+ }
+
+ public void visitGroupByClause(@NotNull FlexibleSearchGroupByClause o) {
+ visitPsiElement(o);
+ }
+
+ public void visitGroupingColumnReference(@NotNull FlexibleSearchGroupingColumnReference o) {
+ visitPsiElement(o);
+ }
+
+ public void visitGroupingColumnReferenceList(@NotNull FlexibleSearchGroupingColumnReferenceList o) {
+ visitPsiElement(o);
+ }
+
+ public void visitGroupingElement(@NotNull FlexibleSearchGroupingElement o) {
+ visitPsiElement(o);
+ }
+
+ public void visitGroupingElementList(@NotNull FlexibleSearchGroupingElementList o) {
+ visitPsiElement(o);
+ }
+
+ public void visitInPredicate(@NotNull FlexibleSearchInPredicate o) {
+ visitPsiElement(o);
+ }
+
+ public void visitJoinCondition(@NotNull FlexibleSearchJoinCondition o) {
+ visitPsiElement(o);
+ }
+
+ public void visitJoinSpecification(@NotNull FlexibleSearchJoinSpecification o) {
+ visitPsiElement(o);
+ }
+
+ public void visitJoinType(@NotNull FlexibleSearchJoinType o) {
+ visitPsiElement(o);
+ }
+
+ public void visitJoinedTable(@NotNull FlexibleSearchJoinedTable o) {
+ visitPsiElement(o);
+ }
+
+ public void visitLikePredicate(@NotNull FlexibleSearchLikePredicate o) {
+ visitPsiElement(o);
+ }
+
+ public void visitNullOrdering(@NotNull FlexibleSearchNullOrdering o) {
+ visitPsiElement(o);
+ }
+
+ public void visitNullPredicate(@NotNull FlexibleSearchNullPredicate o) {
+ visitPsiElement(o);
+ }
+
+ public void visitOrderByClause(@NotNull FlexibleSearchOrderByClause o) {
+ visitPsiElement(o);
+ }
+
+ public void visitOrderingSpecification(@NotNull FlexibleSearchOrderingSpecification o) {
+ visitPsiElement(o);
+ }
+
+ public void visitOrdinaryGroupingSet(@NotNull FlexibleSearchOrdinaryGroupingSet o) {
+ visitPsiElement(o);
+ }
+
+ public void visitParameterReference(@NotNull FlexibleSearchParameterReference o) {
+ visitPsiElement(o);
+ }
+
+ public void visitPredicate(@NotNull FlexibleSearchPredicate o) {
+ visitPsiElement(o);
+ }
+
+ public void visitQuerySpecification(@NotNull FlexibleSearchQuerySpecification o) {
+ visitPsiElement(o);
+ }
+
+ public void visitRowValuePredicand(@NotNull FlexibleSearchRowValuePredicand o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSearchCondition(@NotNull FlexibleSearchSearchCondition o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSelectList(@NotNull FlexibleSearchSelectList o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSelectSublist(@NotNull FlexibleSearchSelectSublist o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSetFunctionType(@NotNull FlexibleSearchSetFunctionType o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSetQuantifier(@NotNull FlexibleSearchSetQuantifier o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSortKey(@NotNull FlexibleSearchSortKey o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSortSpecification(@NotNull FlexibleSearchSortSpecification o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSortSpecificationList(@NotNull FlexibleSearchSortSpecificationList o) {
+ visitPsiElement(o);
+ }
+
+ public void visitStringValueExpression(@NotNull FlexibleSearchStringValueExpression o) {
+ visitPsiElement(o);
+ }
+
+ public void visitStringValueFunction(@NotNull FlexibleSearchStringValueFunction o) {
+ visitPsiElement(o);
+ }
+
+ public void visitSubquery(@NotNull FlexibleSearchSubquery o) {
+ visitPsiElement(o);
+ }
+
+ public void visitTableExpression(@NotNull FlexibleSearchTableExpression o) {
+ visitPsiElement(o);
+ }
+
+ public void visitTableName(@NotNull FlexibleSearchTableName o) {
+ visitPsiElement(o);
+ }
+
+ public void visitTablePrimary(@NotNull FlexibleSearchTablePrimary o) {
+ visitPsiElement(o);
+ }
+
+ public void visitTableReference(@NotNull FlexibleSearchTableReference o) {
+ visitPsiElement(o);
+ }
+
+ public void visitTableReferenceList(@NotNull FlexibleSearchTableReferenceList o) {
+ visitPsiElement(o);
+ }
+
+ public void visitTableSubquery(@NotNull FlexibleSearchTableSubquery o) {
+ visitPsiElement(o);
+ }
+
+ public void visitTruthValue(@NotNull FlexibleSearchTruthValue o) {
+ visitPsiElement(o);
+ }
+
+ public void visitValueExpression(@NotNull FlexibleSearchValueExpression o) {
+ visitPsiElement(o);
+ }
+
+ public void visitWhereClause(@NotNull FlexibleSearchWhereClause o) {
+ visitPsiElement(o);
+ }
+
+ public void visitPsiElement(@NotNull PsiElement o) {
+ visitElement(o);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchWhereClause.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchWhereClause.java
new file mode 100644
index 000000000..c6a189b8b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/FlexibleSearchWhereClause.java
@@ -0,0 +1,13 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.psi.PsiElement;
+
+public interface FlexibleSearchWhereClause extends PsiElement {
+
+ @Nullable
+ FlexibleSearchSearchCondition getSearchCondition();
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchAggregateFunctionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchAggregateFunctionImpl.java
new file mode 100644
index 000000000..1dc0361c9
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchAggregateFunctionImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchAggregateFunctionImpl extends ASTWrapperPsiElement implements FlexibleSearchAggregateFunction {
+
+ public FlexibleSearchAggregateFunctionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitAggregateFunction(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchGeneralSetFunction getGeneralSetFunction() {
+ return findChildByClass(FlexibleSearchGeneralSetFunction.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBetweenPredicateImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBetweenPredicateImpl.java
new file mode 100644
index 000000000..b70f4f28b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBetweenPredicateImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchBetweenPredicateImpl extends ASTWrapperPsiElement implements FlexibleSearchBetweenPredicate {
+
+ public FlexibleSearchBetweenPredicateImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitBetweenPredicate(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getRowValuePredicandList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchRowValuePredicand.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanFactorImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanFactorImpl.java
new file mode 100644
index 000000000..cb5e3969b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanFactorImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchBooleanFactorImpl extends ASTWrapperPsiElement implements FlexibleSearchBooleanFactor {
+
+ public FlexibleSearchBooleanFactorImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitBooleanFactor(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchBooleanTest getBooleanTest() {
+ return findNotNullChildByClass(FlexibleSearchBooleanTest.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanPredicandImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanPredicandImpl.java
new file mode 100644
index 000000000..f66d95bdf
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanPredicandImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchBooleanPredicandImpl extends ASTWrapperPsiElement implements FlexibleSearchBooleanPredicand {
+
+ public FlexibleSearchBooleanPredicandImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitBooleanPredicand(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchBooleanValueExpression getBooleanValueExpression() {
+ return findChildByClass(FlexibleSearchBooleanValueExpression.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchColumnReference getColumnReference() {
+ return findChildByClass(FlexibleSearchColumnReference.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanPrimaryImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanPrimaryImpl.java
new file mode 100644
index 000000000..cd1d06756
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanPrimaryImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchBooleanPrimaryImpl extends ASTWrapperPsiElement implements FlexibleSearchBooleanPrimary {
+
+ public FlexibleSearchBooleanPrimaryImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitBooleanPrimary(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchBooleanPredicand getBooleanPredicand() {
+ return findChildByClass(FlexibleSearchBooleanPredicand.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchPredicate getPredicate() {
+ return findChildByClass(FlexibleSearchPredicate.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanTermImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanTermImpl.java
new file mode 100644
index 000000000..ab1dcfc8a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanTermImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchBooleanTermImpl extends ASTWrapperPsiElement implements FlexibleSearchBooleanTerm {
+
+ public FlexibleSearchBooleanTermImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitBooleanTerm(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchBooleanFactor getBooleanFactor() {
+ return findNotNullChildByClass(FlexibleSearchBooleanFactor.class);
+ }
+
+ @Override
+ @NotNull
+ public List getBooleanTermList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchBooleanTerm.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanTestImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanTestImpl.java
new file mode 100644
index 000000000..b0627f1f4
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanTestImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchBooleanTestImpl extends ASTWrapperPsiElement implements FlexibleSearchBooleanTest {
+
+ public FlexibleSearchBooleanTestImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitBooleanTest(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchBooleanPrimary getBooleanPrimary() {
+ return findNotNullChildByClass(FlexibleSearchBooleanPrimary.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchTruthValue getTruthValue() {
+ return findChildByClass(FlexibleSearchTruthValue.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanValueExpressionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanValueExpressionImpl.java
new file mode 100644
index 000000000..7f6be033b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchBooleanValueExpressionImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchBooleanValueExpressionImpl extends ASTWrapperPsiElement implements FlexibleSearchBooleanValueExpression {
+
+ public FlexibleSearchBooleanValueExpressionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitBooleanValueExpression(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchBooleanTerm getBooleanTerm() {
+ return findNotNullChildByClass(FlexibleSearchBooleanTerm.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterLikePredicateImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterLikePredicateImpl.java
new file mode 100644
index 000000000..a980965ea
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterLikePredicateImpl.java
@@ -0,0 +1,47 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCharacterLikePredicateImpl extends ASTWrapperPsiElement implements FlexibleSearchCharacterLikePredicate {
+
+ public FlexibleSearchCharacterLikePredicateImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCharacterLikePredicate(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchCharacterPattern getCharacterPattern() {
+ return findChildByClass(FlexibleSearchCharacterPattern.class);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchRowValuePredicand getRowValuePredicand() {
+ return findNotNullChildByClass(FlexibleSearchRowValuePredicand.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchValueExpression getValueExpression() {
+ return findChildByClass(FlexibleSearchValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterPatternImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterPatternImpl.java
new file mode 100644
index 000000000..9c7b757e8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterPatternImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCharacterPatternImpl extends ASTWrapperPsiElement implements FlexibleSearchCharacterPattern {
+
+ public FlexibleSearchCharacterPatternImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCharacterPattern(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchStringValueFunction getStringValueFunction() {
+ return findChildByClass(FlexibleSearchStringValueFunction.class);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getString() {
+ return findChildByType(STRING);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterStringLiteralImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterStringLiteralImpl.java
new file mode 100644
index 000000000..defddb9fa
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterStringLiteralImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCharacterStringLiteralImpl extends ASTWrapperPsiElement implements FlexibleSearchCharacterStringLiteral {
+
+ public FlexibleSearchCharacterStringLiteralImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCharacterStringLiteral(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public PsiElement getString() {
+ return findNotNullChildByType(STRING);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterSubstringFunctionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterSubstringFunctionImpl.java
new file mode 100644
index 000000000..418e4d29d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterSubstringFunctionImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCharacterSubstringFunctionImpl extends ASTWrapperPsiElement implements FlexibleSearchCharacterSubstringFunction {
+
+ public FlexibleSearchCharacterSubstringFunctionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCharacterSubstringFunction(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchCharacterSubstringFunction getCharacterSubstringFunction() {
+ return findChildByClass(FlexibleSearchCharacterSubstringFunction.class);
+ }
+
+ @Override
+ @NotNull
+ public List getStringValueExpressionList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchStringValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterValueFunctionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterValueFunctionImpl.java
new file mode 100644
index 000000000..f6e3dd9bf
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCharacterValueFunctionImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCharacterValueFunctionImpl extends ASTWrapperPsiElement implements FlexibleSearchCharacterValueFunction {
+
+ public FlexibleSearchCharacterValueFunctionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCharacterValueFunction(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchCharacterSubstringFunction getCharacterSubstringFunction() {
+ return findNotNullChildByClass(FlexibleSearchCharacterSubstringFunction.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchColumnLocalizationImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchColumnLocalizationImpl.java
new file mode 100644
index 000000000..2830c16d2
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchColumnLocalizationImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchColumnLocalizationImpl extends ASTWrapperPsiElement implements FlexibleSearchColumnLocalization {
+
+ public FlexibleSearchColumnLocalizationImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitColumnLocalization(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public PsiElement getIdentifier() {
+ return findNotNullChildByType(IDENTIFIER);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchColumnReferenceImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchColumnReferenceImpl.java
new file mode 100644
index 000000000..e68015bd1
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchColumnReferenceImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.idea.plugin.hybris.flexibleSearch.references.ColumnReferenceMixin;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchColumnReferenceImpl extends ColumnReferenceMixin implements FlexibleSearchColumnReference {
+
+ public FlexibleSearchColumnReferenceImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitColumnReference(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getTableNameIdentifier() {
+ return findChildByType(TABLE_NAME_IDENTIFIER);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCommonValueExpressionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCommonValueExpressionImpl.java
new file mode 100644
index 000000000..eeb81d375
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCommonValueExpressionImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCommonValueExpressionImpl extends ASTWrapperPsiElement implements FlexibleSearchCommonValueExpression {
+
+ public FlexibleSearchCommonValueExpressionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCommonValueExpression(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchStringValueExpression getStringValueExpression() {
+ return findChildByClass(FlexibleSearchStringValueExpression.class);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getNumber() {
+ return findChildByType(NUMBER);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCompOpImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCompOpImpl.java
new file mode 100644
index 000000000..b0bfdbc7d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCompOpImpl.java
@@ -0,0 +1,47 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCompOpImpl extends ASTWrapperPsiElement implements FlexibleSearchCompOp {
+
+ public FlexibleSearchCompOpImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCompOp(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getEqualsOperator() {
+ return findChildByType(EQUALS_OPERATOR);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getGreaterThanOrEqualsOperator() {
+ return findChildByType(GREATER_THAN_OR_EQUALS_OPERATOR);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getLessThanOrEqualsOperator() {
+ return findChildByType(LESS_THAN_OR_EQUALS_OPERATOR);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCorrelationNameImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCorrelationNameImpl.java
new file mode 100644
index 000000000..12aede9de
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchCorrelationNameImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchCorrelationNameImpl extends ASTWrapperPsiElement implements FlexibleSearchCorrelationName {
+
+ public FlexibleSearchCorrelationNameImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitCorrelationName(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public PsiElement getIdentifier() {
+ return findNotNullChildByType(IDENTIFIER);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchDerivedColumnImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchDerivedColumnImpl.java
new file mode 100644
index 000000000..fe56ed2de
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchDerivedColumnImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchDerivedColumnImpl extends ASTWrapperPsiElement implements FlexibleSearchDerivedColumn {
+
+ public FlexibleSearchDerivedColumnImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitDerivedColumn(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchCorrelationName getCorrelationName() {
+ return findChildByClass(FlexibleSearchCorrelationName.class);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchValueExpression getValueExpression() {
+ return findNotNullChildByClass(FlexibleSearchValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchExistsPredicateImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchExistsPredicateImpl.java
new file mode 100644
index 000000000..0cb249d0a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchExistsPredicateImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchExistsPredicateImpl extends ASTWrapperPsiElement implements FlexibleSearchExistsPredicate {
+
+ public FlexibleSearchExistsPredicateImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitExistsPredicate(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchTableSubquery getTableSubquery() {
+ return findNotNullChildByClass(FlexibleSearchTableSubquery.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchFromClauseImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchFromClauseImpl.java
new file mode 100644
index 000000000..0663c630a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchFromClauseImpl.java
@@ -0,0 +1,53 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchFromClauseImpl extends ASTWrapperPsiElement implements FlexibleSearchFromClause {
+
+ public FlexibleSearchFromClauseImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitFromClause(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSubquery getSubquery() {
+ return findChildByClass(FlexibleSearchSubquery.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchTableReferenceList getTableReferenceList() {
+ return findChildByClass(FlexibleSearchTableReferenceList.class);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getLeftBrace() {
+ return findChildByType(LEFT_BRACE);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getRightBrace() {
+ return findChildByType(RIGHT_BRACE);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGeneralLiteralImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGeneralLiteralImpl.java
new file mode 100644
index 000000000..2551d461d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGeneralLiteralImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchGeneralLiteralImpl extends ASTWrapperPsiElement implements FlexibleSearchGeneralLiteral {
+
+ public FlexibleSearchGeneralLiteralImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitGeneralLiteral(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchCharacterStringLiteral getCharacterStringLiteral() {
+ return findNotNullChildByClass(FlexibleSearchCharacterStringLiteral.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGeneralSetFunctionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGeneralSetFunctionImpl.java
new file mode 100644
index 000000000..678663bef
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGeneralSetFunctionImpl.java
@@ -0,0 +1,53 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchGeneralSetFunctionImpl extends ASTWrapperPsiElement implements FlexibleSearchGeneralSetFunction {
+
+ public FlexibleSearchGeneralSetFunctionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitGeneralSetFunction(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchCorrelationName getCorrelationName() {
+ return findChildByClass(FlexibleSearchCorrelationName.class);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchSetFunctionType getSetFunctionType() {
+ return findNotNullChildByClass(FlexibleSearchSetFunctionType.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSetQuantifier getSetQuantifier() {
+ return findChildByClass(FlexibleSearchSetQuantifier.class);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchValueExpression getValueExpression() {
+ return findNotNullChildByClass(FlexibleSearchValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupByClauseImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupByClauseImpl.java
new file mode 100644
index 000000000..90c6c52b6
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupByClauseImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchGroupByClauseImpl extends ASTWrapperPsiElement implements FlexibleSearchGroupByClause {
+
+ public FlexibleSearchGroupByClauseImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitGroupByClause(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchGroupingElementList getGroupingElementList() {
+ return findNotNullChildByClass(FlexibleSearchGroupingElementList.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSetQuantifier getSetQuantifier() {
+ return findChildByClass(FlexibleSearchSetQuantifier.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingColumnReferenceImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingColumnReferenceImpl.java
new file mode 100644
index 000000000..aa18147ab
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingColumnReferenceImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchGroupingColumnReferenceImpl extends ASTWrapperPsiElement implements FlexibleSearchGroupingColumnReference {
+
+ public FlexibleSearchGroupingColumnReferenceImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitGroupingColumnReference(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchValueExpression getValueExpression() {
+ return findNotNullChildByClass(FlexibleSearchValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingColumnReferenceListImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingColumnReferenceListImpl.java
new file mode 100644
index 000000000..b88d46d74
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingColumnReferenceListImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchGroupingColumnReferenceListImpl extends ASTWrapperPsiElement implements FlexibleSearchGroupingColumnReferenceList {
+
+ public FlexibleSearchGroupingColumnReferenceListImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitGroupingColumnReferenceList(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getGroupingColumnReferenceList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchGroupingColumnReference.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingElementImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingElementImpl.java
new file mode 100644
index 000000000..77ed1118b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingElementImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchGroupingElementImpl extends ASTWrapperPsiElement implements FlexibleSearchGroupingElement {
+
+ public FlexibleSearchGroupingElementImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitGroupingElement(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchOrdinaryGroupingSet getOrdinaryGroupingSet() {
+ return findNotNullChildByClass(FlexibleSearchOrdinaryGroupingSet.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingElementListImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingElementListImpl.java
new file mode 100644
index 000000000..22c011cfd
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchGroupingElementListImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchGroupingElementListImpl extends ASTWrapperPsiElement implements FlexibleSearchGroupingElementList {
+
+ public FlexibleSearchGroupingElementListImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitGroupingElementList(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getGroupingElementList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchGroupingElement.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchInPredicateImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchInPredicateImpl.java
new file mode 100644
index 000000000..a6698ff8f
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchInPredicateImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchInPredicateImpl extends ASTWrapperPsiElement implements FlexibleSearchInPredicate {
+
+ public FlexibleSearchInPredicateImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitInPredicate(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getRowValuePredicandList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchRowValuePredicand.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchTableSubquery getTableSubquery() {
+ return findChildByClass(FlexibleSearchTableSubquery.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinConditionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinConditionImpl.java
new file mode 100644
index 000000000..474de5988
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinConditionImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchJoinConditionImpl extends ASTWrapperPsiElement implements FlexibleSearchJoinCondition {
+
+ public FlexibleSearchJoinConditionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitJoinCondition(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSearchCondition getSearchCondition() {
+ return findChildByClass(FlexibleSearchSearchCondition.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinSpecificationImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinSpecificationImpl.java
new file mode 100644
index 000000000..b30c58789
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinSpecificationImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchJoinSpecificationImpl extends ASTWrapperPsiElement implements FlexibleSearchJoinSpecification {
+
+ public FlexibleSearchJoinSpecificationImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitJoinSpecification(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchJoinCondition getJoinCondition() {
+ return findNotNullChildByClass(FlexibleSearchJoinCondition.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinTypeImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinTypeImpl.java
new file mode 100644
index 000000000..ae9f5429c
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinTypeImpl.java
@@ -0,0 +1,29 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchJoinTypeImpl extends ASTWrapperPsiElement implements FlexibleSearchJoinType {
+
+ public FlexibleSearchJoinTypeImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitJoinType(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinedTableImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinedTableImpl.java
new file mode 100644
index 000000000..6e89a2271
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchJoinedTableImpl.java
@@ -0,0 +1,47 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchJoinedTableImpl extends ASTWrapperPsiElement implements FlexibleSearchJoinedTable {
+
+ public FlexibleSearchJoinedTableImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitJoinedTable(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchJoinSpecification getJoinSpecification() {
+ return findChildByClass(FlexibleSearchJoinSpecification.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchJoinType getJoinType() {
+ return findChildByClass(FlexibleSearchJoinType.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchTableReference getTableReference() {
+ return findChildByClass(FlexibleSearchTableReference.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchLikePredicateImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchLikePredicateImpl.java
new file mode 100644
index 000000000..81e8db58a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchLikePredicateImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchLikePredicateImpl extends ASTWrapperPsiElement implements FlexibleSearchLikePredicate {
+
+ public FlexibleSearchLikePredicateImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitLikePredicate(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchCharacterLikePredicate getCharacterLikePredicate() {
+ return findNotNullChildByClass(FlexibleSearchCharacterLikePredicate.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchNullOrderingImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchNullOrderingImpl.java
new file mode 100644
index 000000000..ab8c8f62d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchNullOrderingImpl.java
@@ -0,0 +1,29 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchNullOrderingImpl extends ASTWrapperPsiElement implements FlexibleSearchNullOrdering {
+
+ public FlexibleSearchNullOrderingImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitNullOrdering(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchNullPredicateImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchNullPredicateImpl.java
new file mode 100644
index 000000000..24c71b16a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchNullPredicateImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchNullPredicateImpl extends ASTWrapperPsiElement implements FlexibleSearchNullPredicate {
+
+ public FlexibleSearchNullPredicateImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitNullPredicate(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchRowValuePredicand getRowValuePredicand() {
+ return findNotNullChildByClass(FlexibleSearchRowValuePredicand.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrderByClauseImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrderByClauseImpl.java
new file mode 100644
index 000000000..f8cec0f59
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrderByClauseImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchOrderByClauseImpl extends ASTWrapperPsiElement implements FlexibleSearchOrderByClause {
+
+ public FlexibleSearchOrderByClauseImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitOrderByClause(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSortSpecificationList getSortSpecificationList() {
+ return findChildByClass(FlexibleSearchSortSpecificationList.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrderingSpecificationImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrderingSpecificationImpl.java
new file mode 100644
index 000000000..1fc486df2
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrderingSpecificationImpl.java
@@ -0,0 +1,29 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchOrderingSpecificationImpl extends ASTWrapperPsiElement implements FlexibleSearchOrderingSpecification {
+
+ public FlexibleSearchOrderingSpecificationImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitOrderingSpecification(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrdinaryGroupingSetImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrdinaryGroupingSetImpl.java
new file mode 100644
index 000000000..42fc38591
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchOrdinaryGroupingSetImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchOrdinaryGroupingSetImpl extends ASTWrapperPsiElement implements FlexibleSearchOrdinaryGroupingSet {
+
+ public FlexibleSearchOrdinaryGroupingSetImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitOrdinaryGroupingSet(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchGroupingColumnReference getGroupingColumnReference() {
+ return findChildByClass(FlexibleSearchGroupingColumnReference.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchGroupingColumnReferenceList getGroupingColumnReferenceList() {
+ return findChildByClass(FlexibleSearchGroupingColumnReferenceList.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchParameterReferenceImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchParameterReferenceImpl.java
new file mode 100644
index 000000000..970efb404
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchParameterReferenceImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchParameterReferenceImpl extends ASTWrapperPsiElement implements FlexibleSearchParameterReference {
+
+ public FlexibleSearchParameterReferenceImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitParameterReference(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getParameterIdentifier() {
+ return findChildByType(PARAMETER_IDENTIFIER);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchPredicateImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchPredicateImpl.java
new file mode 100644
index 000000000..75a76a81e
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchPredicateImpl.java
@@ -0,0 +1,71 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchPredicateImpl extends ASTWrapperPsiElement implements FlexibleSearchPredicate {
+
+ public FlexibleSearchPredicateImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitPredicate(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchBetweenPredicate getBetweenPredicate() {
+ return findChildByClass(FlexibleSearchBetweenPredicate.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchCompOp getCompOp() {
+ return findChildByClass(FlexibleSearchCompOp.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchExistsPredicate getExistsPredicate() {
+ return findChildByClass(FlexibleSearchExistsPredicate.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchInPredicate getInPredicate() {
+ return findChildByClass(FlexibleSearchInPredicate.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchLikePredicate getLikePredicate() {
+ return findChildByClass(FlexibleSearchLikePredicate.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchNullPredicate getNullPredicate() {
+ return findChildByClass(FlexibleSearchNullPredicate.class);
+ }
+
+ @Override
+ @NotNull
+ public List getRowValuePredicandList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchRowValuePredicand.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchQuerySpecificationImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchQuerySpecificationImpl.java
new file mode 100644
index 000000000..c495c7183
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchQuerySpecificationImpl.java
@@ -0,0 +1,47 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchQuerySpecificationImpl extends ASTWrapperPsiElement implements FlexibleSearchQuerySpecification {
+
+ public FlexibleSearchQuerySpecificationImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitQuerySpecification(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSelectList getSelectList() {
+ return findChildByClass(FlexibleSearchSelectList.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSetQuantifier getSetQuantifier() {
+ return findChildByClass(FlexibleSearchSetQuantifier.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchTableExpression getTableExpression() {
+ return findChildByClass(FlexibleSearchTableExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchRowValuePredicandImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchRowValuePredicandImpl.java
new file mode 100644
index 000000000..3ff240e44
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchRowValuePredicandImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchRowValuePredicandImpl extends ASTWrapperPsiElement implements FlexibleSearchRowValuePredicand {
+
+ public FlexibleSearchRowValuePredicandImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitRowValuePredicand(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getCommonValueExpressionList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchCommonValueExpression.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchValueExpression getValueExpression() {
+ return findChildByClass(FlexibleSearchValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSearchConditionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSearchConditionImpl.java
new file mode 100644
index 000000000..676d23e5c
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSearchConditionImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSearchConditionImpl extends ASTWrapperPsiElement implements FlexibleSearchSearchCondition {
+
+ public FlexibleSearchSearchConditionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSearchCondition(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchBooleanValueExpression getBooleanValueExpression() {
+ return findNotNullChildByClass(FlexibleSearchBooleanValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSelectListImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSelectListImpl.java
new file mode 100644
index 000000000..302b71230
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSelectListImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSelectListImpl extends ASTWrapperPsiElement implements FlexibleSearchSelectList {
+
+ public FlexibleSearchSelectListImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSelectList(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getSelectSublistList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchSelectSublist.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSelectSublistImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSelectSublistImpl.java
new file mode 100644
index 000000000..538086d89
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSelectSublistImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSelectSublistImpl extends ASTWrapperPsiElement implements FlexibleSearchSelectSublist {
+
+ public FlexibleSearchSelectSublistImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSelectSublist(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getAggregateFunctionList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchAggregateFunction.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchDerivedColumn getDerivedColumn() {
+ return findChildByClass(FlexibleSearchDerivedColumn.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSetFunctionTypeImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSetFunctionTypeImpl.java
new file mode 100644
index 000000000..f3dbb85dc
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSetFunctionTypeImpl.java
@@ -0,0 +1,29 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSetFunctionTypeImpl extends ASTWrapperPsiElement implements FlexibleSearchSetFunctionType {
+
+ public FlexibleSearchSetFunctionTypeImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSetFunctionType(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSetQuantifierImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSetQuantifierImpl.java
new file mode 100644
index 000000000..7a23466ae
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSetQuantifierImpl.java
@@ -0,0 +1,29 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSetQuantifierImpl extends ASTWrapperPsiElement implements FlexibleSearchSetQuantifier {
+
+ public FlexibleSearchSetQuantifierImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSetQuantifier(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortKeyImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortKeyImpl.java
new file mode 100644
index 000000000..e5bd2cf10
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortKeyImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSortKeyImpl extends ASTWrapperPsiElement implements FlexibleSearchSortKey {
+
+ public FlexibleSearchSortKeyImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSortKey(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchValueExpression getValueExpression() {
+ return findNotNullChildByClass(FlexibleSearchValueExpression.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortSpecificationImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortSpecificationImpl.java
new file mode 100644
index 000000000..0bc30b26b
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortSpecificationImpl.java
@@ -0,0 +1,47 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSortSpecificationImpl extends ASTWrapperPsiElement implements FlexibleSearchSortSpecification {
+
+ public FlexibleSearchSortSpecificationImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSortSpecification(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchNullOrdering getNullOrdering() {
+ return findChildByClass(FlexibleSearchNullOrdering.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchOrderingSpecification getOrderingSpecification() {
+ return findChildByClass(FlexibleSearchOrderingSpecification.class);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchSortKey getSortKey() {
+ return findNotNullChildByClass(FlexibleSearchSortKey.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortSpecificationListImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortSpecificationListImpl.java
new file mode 100644
index 000000000..c2b466c07
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSortSpecificationListImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSortSpecificationListImpl extends ASTWrapperPsiElement implements FlexibleSearchSortSpecificationList {
+
+ public FlexibleSearchSortSpecificationListImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSortSpecificationList(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getSortSpecificationList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchSortSpecification.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchStringValueExpressionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchStringValueExpressionImpl.java
new file mode 100644
index 000000000..00cba6703
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchStringValueExpressionImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchStringValueExpressionImpl extends ASTWrapperPsiElement implements FlexibleSearchStringValueExpression {
+
+ public FlexibleSearchStringValueExpressionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitStringValueExpression(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchGeneralLiteral getGeneralLiteral() {
+ return findNotNullChildByClass(FlexibleSearchGeneralLiteral.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchStringValueFunctionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchStringValueFunctionImpl.java
new file mode 100644
index 000000000..0a7657f6a
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchStringValueFunctionImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchStringValueFunctionImpl extends ASTWrapperPsiElement implements FlexibleSearchStringValueFunction {
+
+ public FlexibleSearchStringValueFunctionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitStringValueFunction(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchCharacterValueFunction getCharacterValueFunction() {
+ return findNotNullChildByClass(FlexibleSearchCharacterValueFunction.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSubqueryImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSubqueryImpl.java
new file mode 100644
index 000000000..eaa86e4ba
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchSubqueryImpl.java
@@ -0,0 +1,59 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchSubqueryImpl extends ASTWrapperPsiElement implements FlexibleSearchSubquery {
+
+ public FlexibleSearchSubqueryImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitSubquery(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchCorrelationName getCorrelationName() {
+ return findChildByClass(FlexibleSearchCorrelationName.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchQuerySpecification getQuerySpecification() {
+ return findChildByClass(FlexibleSearchQuerySpecification.class);
+ }
+
+ @Override
+ @NotNull
+ public List getSubqueryList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchSubquery.class);
+ }
+
+ @Override
+ @NotNull
+ public PsiElement getLeftDoubleBrace() {
+ return findNotNullChildByType(LEFT_DOUBLE_BRACE);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getRightDoubleBrace() {
+ return findChildByType(RIGHT_DOUBLE_BRACE);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableExpressionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableExpressionImpl.java
new file mode 100644
index 000000000..300d9d5b8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableExpressionImpl.java
@@ -0,0 +1,53 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchTableExpressionImpl extends ASTWrapperPsiElement implements FlexibleSearchTableExpression {
+
+ public FlexibleSearchTableExpressionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitTableExpression(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchFromClause getFromClause() {
+ return findNotNullChildByClass(FlexibleSearchFromClause.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchGroupByClause getGroupByClause() {
+ return findChildByClass(FlexibleSearchGroupByClause.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchOrderByClause getOrderByClause() {
+ return findChildByClass(FlexibleSearchOrderByClause.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchWhereClause getWhereClause() {
+ return findChildByClass(FlexibleSearchWhereClause.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableNameImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableNameImpl.java
new file mode 100644
index 000000000..1e4e8c1ca
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableNameImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.idea.plugin.hybris.flexibleSearch.references.TypeNameMixin;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchTableNameImpl extends TypeNameMixin implements FlexibleSearchTableName {
+
+ public FlexibleSearchTableNameImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitTableName(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public PsiElement getTableNameIdentifier() {
+ return findNotNullChildByType(TABLE_NAME_IDENTIFIER);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTablePrimaryImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTablePrimaryImpl.java
new file mode 100644
index 000000000..02d2cb7f4
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTablePrimaryImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchTablePrimaryImpl extends ASTWrapperPsiElement implements FlexibleSearchTablePrimary {
+
+ public FlexibleSearchTablePrimaryImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitTablePrimary(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchCorrelationName getCorrelationName() {
+ return findChildByClass(FlexibleSearchCorrelationName.class);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchTableName getTableName() {
+ return findNotNullChildByClass(FlexibleSearchTableName.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableReferenceImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableReferenceImpl.java
new file mode 100644
index 000000000..88c955f79
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableReferenceImpl.java
@@ -0,0 +1,41 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchTableReferenceImpl extends ASTWrapperPsiElement implements FlexibleSearchTableReference {
+
+ public FlexibleSearchTableReferenceImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitTableReference(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getJoinedTableList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchJoinedTable.class);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchTablePrimary getTablePrimary() {
+ return findNotNullChildByClass(FlexibleSearchTablePrimary.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableReferenceListImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableReferenceListImpl.java
new file mode 100644
index 000000000..76d527e7d
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableReferenceListImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchTableReferenceListImpl extends ASTWrapperPsiElement implements FlexibleSearchTableReferenceList {
+
+ public FlexibleSearchTableReferenceListImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitTableReferenceList(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public List getTableReferenceList() {
+ return PsiTreeUtil.getChildrenOfTypeAsList(this, FlexibleSearchTableReference.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableSubqueryImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableSubqueryImpl.java
new file mode 100644
index 000000000..233082874
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTableSubqueryImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchTableSubqueryImpl extends ASTWrapperPsiElement implements FlexibleSearchTableSubquery {
+
+ public FlexibleSearchTableSubqueryImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitTableSubquery(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @NotNull
+ public FlexibleSearchSubquery getSubquery() {
+ return findNotNullChildByClass(FlexibleSearchSubquery.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTruthValueImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTruthValueImpl.java
new file mode 100644
index 000000000..b06fc085c
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchTruthValueImpl.java
@@ -0,0 +1,29 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchTruthValueImpl extends ASTWrapperPsiElement implements FlexibleSearchTruthValue {
+
+ public FlexibleSearchTruthValueImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitTruthValue(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchValueExpressionImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchValueExpressionImpl.java
new file mode 100644
index 000000000..35e933c71
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchValueExpressionImpl.java
@@ -0,0 +1,65 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchValueExpressionImpl extends ASTWrapperPsiElement implements FlexibleSearchValueExpression {
+
+ public FlexibleSearchValueExpressionImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitValueExpression(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchColumnLocalization getColumnLocalization() {
+ return findChildByClass(FlexibleSearchColumnLocalization.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchColumnReference getColumnReference() {
+ return findChildByClass(FlexibleSearchColumnReference.class);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchParameterReference getParameterReference() {
+ return findChildByClass(FlexibleSearchParameterReference.class);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getLeftBrace() {
+ return findChildByType(LEFT_BRACE);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getNumber() {
+ return findChildByType(NUMBER);
+ }
+
+ @Override
+ @Nullable
+ public PsiElement getRightBrace() {
+ return findChildByType(RIGHT_BRACE);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchWhereClauseImpl.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchWhereClauseImpl.java
new file mode 100644
index 000000000..ad0891cd8
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/psi/impl/FlexibleSearchWhereClauseImpl.java
@@ -0,0 +1,35 @@
+// This is a generated file. Not intended for manual editing.
+package com.intellij.idea.plugin.hybris.flexibleSearch.psi.impl;
+
+import java.util.List;
+import org.jetbrains.annotations.*;
+import com.intellij.lang.ASTNode;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiElementVisitor;
+import com.intellij.psi.util.PsiTreeUtil;
+import static com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes.*;
+import com.intellij.extapi.psi.ASTWrapperPsiElement;
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.*;
+
+public class FlexibleSearchWhereClauseImpl extends ASTWrapperPsiElement implements FlexibleSearchWhereClause {
+
+ public FlexibleSearchWhereClauseImpl(@NotNull ASTNode node) {
+ super(node);
+ }
+
+ public void accept(@NotNull FlexibleSearchVisitor visitor) {
+ visitor.visitWhereClause(this);
+ }
+
+ public void accept(@NotNull PsiElementVisitor visitor) {
+ if (visitor instanceof FlexibleSearchVisitor) accept((FlexibleSearchVisitor)visitor);
+ else super.accept(visitor);
+ }
+
+ @Override
+ @Nullable
+ public FlexibleSearchSearchCondition getSearchCondition() {
+ return findChildByClass(FlexibleSearchSearchCondition.class);
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/references/ColumnReferenceMixin.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/references/ColumnReferenceMixin.kt
new file mode 100644
index 000000000..6017cb0d2
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/references/ColumnReferenceMixin.kt
@@ -0,0 +1,124 @@
+package com.intellij.idea.plugin.hybris.flexibleSearch.references
+
+import com.intellij.extapi.psi.ASTWrapperPsiElement
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchColumnReference
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchFromClause
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchQuerySpecification
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTableName
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTableReference
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTypes
+import com.intellij.idea.plugin.hybris.psi.references.TypeSystemReferenceBase
+import com.intellij.idea.plugin.hybris.type.system.meta.TSMetaModel
+import com.intellij.idea.plugin.hybris.type.system.model.Attribute
+import com.intellij.idea.plugin.hybris.type.system.model.RelationElement
+import com.intellij.lang.ASTNode
+import com.intellij.psi.PsiElement
+import com.intellij.psi.PsiReference
+import com.intellij.psi.ResolveResult
+import com.intellij.psi.impl.source.tree.LeafPsiElement
+import com.intellij.psi.util.PsiTreeUtil
+import com.intellij.util.xml.DomElement
+import java.util.Optional
+
+/**
+ * @author Nosov Aleksandr
+ */
+abstract class ColumnReferenceMixin(node: ASTNode) : ASTWrapperPsiElement(node), FlexibleSearchColumnReference {
+
+ private var reference: TypeSystemAttributeReference? = null
+
+ override fun getReferences(): Array {
+ if (reference == null) {
+ reference = TypeSystemAttributeReference(this)
+ }
+ return arrayOf(reference)
+ }
+
+ override fun clone(): Any {
+ val result = super.clone() as ColumnReferenceMixin
+ result.reference = null
+ return result
+ }
+
+}
+
+internal class TypeSystemAttributeReference(owner: FlexibleSearchColumnReference) : TypeSystemReferenceBase(owner) {
+
+ override fun multiResolve(incompleteCode: Boolean): Array {
+ val meta = typeSystemMeta
+ val featureName = element.text.replace("!", "")
+ if (hasPrefix(element)) {
+ return findReference(meta, deepSearchOfTypeReference(element, element.firstChild.text), element.lastChild.text)
+ }
+ return findReference(meta, findItemTypeReference(), featureName)
+ }
+
+ private fun hasPrefix(element: FlexibleSearchColumnReference) = ((element.firstChild as LeafPsiElement).elementType == FlexibleSearchTypes.TABLE_NAME_IDENTIFIER)
+
+ private fun findReference(meta: TSMetaModel, itemType: Optional, refName: String): Array {
+ val metaClass = itemType
+ .map { it.text.replace("!", "") }
+ .map { meta.findMetaClassByName(it) }
+
+ if (!metaClass.isPresent) {
+ return ResolveResult.EMPTY_ARRAY
+ }
+
+ val attributes = metaClass.get()
+ .findPropertiesByName(refName, true)
+ .mapNotNull { it.retrieveDom() }
+ .map { AttributeResolveResult(it) }.toList()
+
+ val relations = metaClass.get()
+ .findReferenceEndsByRole(refName, true)
+ .mapNotNull { it.retrieveDom() }
+ .map { RelationElementResolveResult(it) }
+
+ return (attributes + relations).toTypedArray()
+ }
+
+ private fun findItemTypeReference(): Optional {
+ return Optional.ofNullable(PsiTreeUtil.getParentOfType(element, FlexibleSearchQuerySpecification::class.java))
+ .map { PsiTreeUtil.findChildOfType(it, FlexibleSearchFromClause::class.java) }
+ .map { it!!.tableReferenceList }
+ .map { PsiTreeUtil.findChildOfType(it, FlexibleSearchTableName::class.java) }
+ }
+
+ private fun deepSearchOfTypeReference(elem: PsiElement, prefix: String): Optional {
+ val parent = PsiTreeUtil.getParentOfType(elem, FlexibleSearchQuerySpecification::class.java)
+ val tables = PsiTreeUtil.findChildrenOfType(parent, FlexibleSearchTableReference::class.java).toList()
+
+ val tableReference = tables.find {
+ val tableName = PsiTreeUtil.findChildOfAnyType(it, FlexibleSearchTableName::class.java)
+ val corName = findCorName(tableName)
+ prefix == corName
+ }
+ return if (tableReference == null && parent != null) {
+ deepSearchOfTypeReference(parent, prefix)
+ } else {
+ Optional.ofNullable(PsiTreeUtil.findChildOfType(tableReference, FlexibleSearchTableName::class.java))
+ }
+ }
+
+ private fun findCorName(tableName: FlexibleSearchTableName?) : String {
+ val corNameEl = PsiTreeUtil.findSiblingForward(tableName!!.originalElement, FlexibleSearchTypes.CORRELATION_NAME, null)
+ if (corNameEl == null) {
+ return tableName.text
+ }
+ return corNameEl.text
+ }
+
+
+ private class AttributeResolveResult(private val myDomAttribute: Attribute) : TypeSystemReferenceBase.TypeSystemResolveResult {
+ override fun getElement(): PsiElement? = myDomAttribute.qualifier.xmlAttributeValue
+ override fun isValidResult() = element != null
+ override fun getSemanticDomElement() = myDomAttribute
+ }
+
+ private class RelationElementResolveResult(private val myDomRelationEnd: RelationElement) : TypeSystemReferenceBase.TypeSystemResolveResult {
+ override fun getElement(): PsiElement? = myDomRelationEnd.qualifier.xmlAttributeValue
+ override fun isValidResult() = element != null
+ override fun getSemanticDomElement(): DomElement = myDomRelationEnd
+ }
+
+}
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/references/TypeSystemMixin.kt b/src/com/intellij/idea/plugin/hybris/flexibleSearch/references/TypeSystemMixin.kt
new file mode 100644
index 000000000..1f7772be1
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/references/TypeSystemMixin.kt
@@ -0,0 +1,78 @@
+package com.intellij.idea.plugin.hybris.flexibleSearch.references
+
+import com.intellij.extapi.psi.ASTWrapperPsiElement
+import com.intellij.idea.plugin.hybris.flexibleSearch.psi.FlexibleSearchTableName
+import com.intellij.idea.plugin.hybris.psi.references.TypeSystemReferenceBase
+import com.intellij.idea.plugin.hybris.type.system.model.ItemType
+import com.intellij.idea.plugin.hybris.type.system.model.Relation
+import com.intellij.lang.ASTNode
+import com.intellij.psi.PsiElement
+import com.intellij.psi.PsiReference
+import com.intellij.psi.ResolveResult
+import java.util.Optional
+import java.util.stream.Collectors
+import java.util.stream.Stream
+
+/**
+ * @author Nosov Aleksandr
+ */
+
+abstract class TypeNameMixin(astNode: ASTNode) : ASTWrapperPsiElement(astNode), FlexibleSearchTableName {
+
+ private var myReference: TypeSystemItemRef? = null
+
+ override fun getReferences(): Array {
+ if (myReference == null) {
+ myReference = TypeSystemItemRef(this)
+ }
+ return arrayOf(myReference!!)
+ }
+
+ override fun clone(): Any {
+ val result = super.clone() as TypeNameMixin
+ result.myReference = null
+ return result
+ }
+}
+
+class TypeSystemItemRef(owner: FlexibleSearchTableName) : TypeSystemReferenceBase(owner) {
+
+ override fun multiResolve(incompleteCode: Boolean): Array {
+ val meta = typeSystemMeta
+ val lookingForName = element.text.replace("!", "")
+ val res0 = Optional.ofNullable(meta.findMetaClassByName(lookingForName))
+ .map { it.retrieveAllDomsStream() }
+ .orElse(Stream.empty())
+ .map { ItemTypeResolveResult(it) }
+ .collect(Collectors.toList())
+
+ val res1 = meta.findRelationByName(lookingForName)
+ .distinctBy { it.name }
+ .map { it.retrieveDom() }
+ .map { RelationResolveResult(it) }
+ .toList()
+
+ return (res0 + res1).toTypedArray()
+ }
+
+ private class ItemTypeResolveResult(private val myDomItemType: ItemType) : ResolveResult {
+
+ override fun getElement(): PsiElement? {
+ val codeAttr = myDomItemType.code
+ return codeAttr.xmlAttributeValue
+ }
+
+ override fun isValidResult() = element != null
+ }
+
+ private class RelationResolveResult(private val myDomItemType: Relation) : ResolveResult {
+
+ override fun getElement(): PsiElement? {
+ val codeAttr = myDomItemType.code
+ return codeAttr.xmlAttributeValue
+ }
+
+ override fun isValidResult() = element != null
+ }
+
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/flexibleSearch/utils/FlexibleSearchParserUtils.java b/src/com/intellij/idea/plugin/hybris/flexibleSearch/utils/FlexibleSearchParserUtils.java
new file mode 100644
index 000000000..29ec7a8f2
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/flexibleSearch/utils/FlexibleSearchParserUtils.java
@@ -0,0 +1,1321 @@
+/*
+ * This file is part of "hybris integration" plugin for Intellij IDEA.
+ * Copyright (C) 2014-2016 Alexander Bartash
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.flexibleSearch.utils;
+
+import com.intellij.codeInsight.completion.impl.CamelHumpMatcher;
+import com.intellij.lang.ASTNode;
+import com.intellij.lang.BracePair;
+import com.intellij.lang.Language;
+import com.intellij.lang.LanguageBraceMatching;
+import com.intellij.lang.LighterASTNode;
+import com.intellij.lang.PairedBraceMatcher;
+import com.intellij.lang.PsiBuilder;
+import com.intellij.lang.PsiParser;
+import com.intellij.lang.WhitespacesAndCommentsBinder;
+import com.intellij.lang.WhitespacesBinders;
+import com.intellij.lang.impl.PsiBuilderAdapter;
+import com.intellij.lang.impl.PsiBuilderImpl;
+import com.intellij.lexer.Lexer;
+import com.intellij.openapi.diagnostic.Logger;
+import com.intellij.openapi.util.Comparing;
+import com.intellij.openapi.util.Key;
+import com.intellij.openapi.util.Pair;
+import com.intellij.openapi.util.text.StringHash;
+import com.intellij.psi.PsiFile;
+import com.intellij.psi.PsiReference;
+import com.intellij.psi.TokenType;
+import com.intellij.psi.impl.source.resolve.FileContextUtil;
+import com.intellij.psi.impl.source.tree.CompositePsiElement;
+import com.intellij.psi.tree.ICompositeElementType;
+import com.intellij.psi.tree.IElementType;
+import com.intellij.psi.tree.TokenSet;
+import com.intellij.util.Function;
+import com.intellij.util.PairProcessor;
+import com.intellij.util.containers.ContainerUtil;
+import com.intellij.util.containers.LimitedPool;
+import gnu.trove.THashSet;
+import org.jetbrains.annotations.Contract;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedList;
+
+import static com.intellij.openapi.util.text.StringUtil.first;
+import static com.intellij.openapi.util.text.StringUtil.isJavaIdentifierStart;
+import static com.intellij.openapi.util.text.StringUtil.isNotEmpty;
+import static com.intellij.openapi.util.text.StringUtil.isWhiteSpace;
+import static com.intellij.openapi.util.text.StringUtil.join;
+import static com.intellij.openapi.util.text.StringUtil.notNullize;
+import static com.intellij.openapi.util.text.StringUtil.parseInt;
+import static com.intellij.openapi.util.text.StringUtil.startsWithIgnoreCase;
+/**
+ * Created 1:01 PM 31 May 2015
+ *
+ * @author Alexander Bartash
+ *
+ *
+ * This class is just a temporary solution to disable FS error highlighting completely.
+ * It'll get reverted when we implement FS properly.
+ */
+public class FlexibleSearchParserUtils {
+ private static final Logger LOG = Logger.getInstance("com.intellij.idea.plugin.hybris.flexibleSearch.utils.FlexibleSearchParserUtils");
+
+ private static final int MAX_RECURSION_LEVEL = parseInt(System.getProperty("grammar.kit.gpub.max.level"), 1000);
+ private static final int MAX_VARIANTS_SIZE = 10000;
+ private static final int MAX_VARIANTS_TO_DISPLAY = 50;
+ private static final int MAX_ERROR_TOKEN_TEXT = 20;
+
+ private static final int INITIAL_VARIANTS_SIZE = 1000;
+ private static final int VARIANTS_POOL_SIZE = 10000;
+ private static final int FRAMES_POOL_SIZE = 500;
+
+ public static final IElementType DUMMY_BLOCK = new FlexibleSearchParserUtils.DummyBlockElementType();
+
+ public interface Parser {
+ boolean parse(PsiBuilder builder, int level);
+ }
+
+ public static final FlexibleSearchParserUtils.Parser TOKEN_ADVANCER = new FlexibleSearchParserUtils.Parser() {
+ @Override
+ public boolean parse(PsiBuilder builder, int level) {
+ if (builder.eof()) return false;
+ builder.advanceLexer();
+ return true;
+ }
+ };
+
+ public static final FlexibleSearchParserUtils.Parser TRUE_CONDITION = new FlexibleSearchParserUtils.Parser() {
+ @Override
+ public boolean parse(PsiBuilder builder, int level) {
+ return true;
+ }
+ };
+
+ public interface Hook {
+
+ @Contract("_,null,_->null")
+ PsiBuilder.Marker run(PsiBuilder builder, PsiBuilder.Marker marker, T param);
+
+ }
+
+ public static final FlexibleSearchParserUtils.Hook LEFT_BINDER =
+ new FlexibleSearchParserUtils.Hook() {
+ @Override
+ public PsiBuilder.Marker run(PsiBuilder builder,
+ PsiBuilder.Marker marker,
+ WhitespacesAndCommentsBinder param) {
+ if (marker != null) marker.setCustomEdgeTokenBinders(param, null);
+ return marker;
+ }
+ };
+
+ public static final FlexibleSearchParserUtils.Hook RIGHT_BINDER =
+ new FlexibleSearchParserUtils.Hook() {
+ @Override
+ public PsiBuilder.Marker run(PsiBuilder builder,
+ PsiBuilder.Marker marker,
+ WhitespacesAndCommentsBinder param) {
+ if (marker != null) marker.setCustomEdgeTokenBinders(null, param);
+ return marker;
+ }
+ };
+
+ public static final FlexibleSearchParserUtils.Hook WS_BINDERS =
+ new FlexibleSearchParserUtils.Hook() {
+ @Override
+ public PsiBuilder.Marker run(PsiBuilder builder,
+ PsiBuilder.Marker marker,
+ WhitespacesAndCommentsBinder[] param) {
+ if (marker != null) marker.setCustomEdgeTokenBinders(param[0], param[1]);
+ return marker;
+ }
+ };
+
+ public static final FlexibleSearchParserUtils.Hook LOG_HOOK = new FlexibleSearchParserUtils.Hook() {
+ @Override
+ public PsiBuilder.Marker run(PsiBuilder builder, PsiBuilder.Marker marker, String param) {
+ PsiBuilderImpl.ProductionMarker m = (PsiBuilderImpl.ProductionMarker)marker;
+ int start = m == null ? builder.getCurrentOffset() : m.getStartOffset();
+ int end = m == null ? start : m.getEndOffset();
+ String prefix = "[" + start + ", " + end + "]" + (m == null ? "" : " " + m.getTokenType());
+ builder.mark().error(prefix + ": " + param);
+ return marker;
+ }
+ };
+
+
+ public static boolean eof(PsiBuilder builder, int level) {
+ return builder.eof();
+ }
+
+ public static int current_position_(PsiBuilder builder) {
+ return builder.rawTokenIndex();
+ }
+
+ public static boolean recursion_guard_(PsiBuilder builder, int level, String funcName) {
+ if (level > MAX_RECURSION_LEVEL) {
+ builder.mark().error("Maximum recursion level (" + MAX_RECURSION_LEVEL + ") reached in '" + funcName + "'");
+ return false;
+ }
+ return true;
+ }
+
+ public static boolean empty_element_parsed_guard_(PsiBuilder builder, String funcName, int pos) {
+ if (pos == current_position_(builder)) {
+ // sometimes this is a correct situation, therefore no explicit marker
+ builder.error("Empty element parsed in '" + funcName + "' at offset " + builder.getCurrentOffset());
+ return false;
+ }
+ return true;
+ }
+
+ public static boolean invalid_left_marker_guard_(PsiBuilder builder, PsiBuilder.Marker marker, String funcName) {
+ //builder.error("Invalid left marker encountered in " + funcName_ +" at offset " + builder.getCurrentOffset());
+ boolean goodMarker = marker != null; // && ((LighterASTNode)marker).getTokenType() != TokenType.ERROR_ELEMENT;
+ if (!goodMarker) return false;
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+
+ return state.currentFrame != null;
+ }
+
+ public static TokenSet create_token_set_(IElementType... tokenTypes) {
+ return TokenSet.create(tokenTypes);
+ }
+
+ public static boolean leftMarkerIs(PsiBuilder builder, IElementType type) {
+ LighterASTNode marker = builder.getLatestDoneMarker();
+ return marker != null && marker.getTokenType() == type;
+ }
+
+ private static boolean consumeTokens(PsiBuilder builder, boolean smart, int pin, IElementType... tokens) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ if (state.completionState != null && state.predicateSign) {
+ addCompletionVariant(builder, state.completionState, tokens);
+ }
+ // suppress single token completion
+ FlexibleSearchParserUtils.CompletionState completionState = state.completionState;
+ state.completionState = null;
+ boolean result = true;
+ boolean pinned = false;
+ for (int i = 0, tokensLength = tokens.length; i < tokensLength; i++) {
+ if (pin > 0 && i == pin) pinned = result;
+ if (result || pinned) {
+ boolean fast = smart && i == 0;
+ if (!(fast ? consumeTokenFast(builder, tokens[i]) : consumeToken(builder, tokens[i]))) {
+ result = false;
+ if (pin < 0 || pinned) report_error_(builder, state, false);
+ }
+ }
+ }
+ state.completionState = completionState;
+ return pinned || result;
+ }
+
+ public static boolean consumeTokens(PsiBuilder builder, int pin, IElementType... token) {
+ return consumeTokens(builder, false, pin, token);
+ }
+
+ public static boolean consumeTokensSmart(PsiBuilder builder, int pin, IElementType... token) {
+ return consumeTokens(builder, true, pin, token);
+ }
+
+ public static boolean parseTokens(PsiBuilder builder, int pin, IElementType... tokens) {
+ return parseTokens(builder, false, pin, tokens);
+ }
+
+ public static boolean parseTokensSmart(PsiBuilder builder, int pin, IElementType... tokens) {
+ return parseTokens(builder, true, pin, tokens);
+ }
+
+ public static boolean parseTokens(PsiBuilder builder, boolean smart, int pin, IElementType... tokens) {
+ PsiBuilder.Marker marker = builder.mark();
+ boolean result = consumeTokens(builder, smart, pin, tokens);
+ if (!result) {
+ marker.rollbackTo();
+ }
+ else {
+ marker.drop();
+ }
+ return result;
+ }
+
+ public static boolean consumeTokenSmart(PsiBuilder builder, IElementType token) {
+ addCompletionVariantSmart(builder, token);
+ return consumeTokenFast(builder, token);
+ }
+
+ public static boolean consumeTokenSmart(PsiBuilder builder, String token) {
+ addCompletionVariantSmart(builder, token);
+ return consumeTokenFast(builder, token);
+ }
+
+ public static boolean consumeToken(PsiBuilder builder, IElementType token) {
+ addVariantSmart(builder, token, true);
+ if (nextTokenIsFast(builder, token)) {
+ builder.advanceLexer();
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean consumeTokenFast(PsiBuilder builder, IElementType token) {
+ if (nextTokenIsFast(builder, token)) {
+ builder.advanceLexer();
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean consumeToken(PsiBuilder builder, String text) {
+ return consumeToken(builder, text, FlexibleSearchParserUtils.ErrorState.get(builder).caseSensitive);
+ }
+
+ public static boolean consumeToken(PsiBuilder builder, String text, boolean caseSensitive) {
+ addVariantSmart(builder, text, true);
+ int count = nextTokenIsFast(builder, text, caseSensitive);
+ if (count > 0) {
+ while (count-- > 0) builder.advanceLexer();
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean consumeTokenFast(PsiBuilder builder, String text) {
+ int count = nextTokenIsFast(builder, text, FlexibleSearchParserUtils.ErrorState.get(builder).caseSensitive);
+ if (count > 0) {
+ while (count-- > 0) builder.advanceLexer();
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean nextTokenIsFast(PsiBuilder builder, IElementType token) {
+ return builder.getTokenType() == token;
+ }
+
+ public static boolean nextTokenIsFast(PsiBuilder builder, IElementType... tokens) {
+ IElementType tokenType = builder.getTokenType();
+ for (IElementType token : tokens) {
+ if (token == tokenType) return true;
+ }
+ return false;
+ }
+
+ public static boolean nextTokenIsSmart(PsiBuilder builder, IElementType token) {
+ return nextTokenIsFast(builder, token) || FlexibleSearchParserUtils.ErrorState.get(builder).completionState != null;
+ }
+
+ public static boolean nextTokenIsSmart(PsiBuilder builder, IElementType... tokens) {
+ return nextTokenIsFast(builder, tokens) || FlexibleSearchParserUtils.ErrorState.get(builder).completionState != null;
+ }
+
+ public static boolean nextTokenIs(PsiBuilder builder, String frameName, IElementType... tokens) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ if (state.completionState != null) return true;
+ boolean track = !state.suppressErrors && state.predicateCount < 2 && state.predicateSign;
+ return !track ? nextTokenIsFast(builder, tokens) : nextTokenIsSlow(builder, frameName, tokens);
+ }
+
+ public static boolean nextTokenIsSlow(PsiBuilder builder, String frameName, IElementType... tokens) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ IElementType tokenType = builder.getTokenType();
+ if (isNotEmpty(frameName)) {
+ addVariantInner(state, builder.rawTokenIndex(), frameName);
+ }
+ else {
+ for (IElementType token : tokens) {
+ addVariant(builder, state, token);
+ }
+ }
+ if (tokenType == null) return false;
+ for (IElementType token : tokens) {
+ if (tokenType == token) return true;
+ }
+ return false;
+ }
+
+ public static boolean nextTokenIs(PsiBuilder builder, IElementType token) {
+ if (!addVariantSmart(builder, token, false)) return true;
+ return nextTokenIsFast(builder, token);
+ }
+
+ public static boolean nextTokenIs(PsiBuilder builder, String tokenText) {
+ if (!addVariantSmart(builder, tokenText, false)) return true;
+ return nextTokenIsFast(builder, tokenText, FlexibleSearchParserUtils.ErrorState.get(builder).caseSensitive) > 0;
+ }
+
+ public static boolean nextTokenIsFast(PsiBuilder builder, String tokenText) {
+ return nextTokenIsFast(builder, tokenText, FlexibleSearchParserUtils.ErrorState.get(builder).caseSensitive) > 0;
+ }
+
+ public static int nextTokenIsFast(PsiBuilder builder, String tokenText, boolean caseSensitive) {
+ CharSequence sequence = builder.getOriginalText();
+ int offset = builder.getCurrentOffset();
+ int endOffset = offset + tokenText.length();
+ CharSequence subSequence = sequence.subSequence(offset, Math.min(endOffset, sequence.length()));
+
+ if (!Comparing.equal(subSequence, tokenText, caseSensitive)) return 0;
+
+ int count = 0;
+ while (true) {
+ int nextOffset = builder.rawTokenTypeStart(++count);
+ if (nextOffset > endOffset) {
+ return -count;
+ }
+ else if (nextOffset == endOffset) {
+ break;
+ }
+ }
+ return count;
+ }
+
+ private static void addCompletionVariantSmart(PsiBuilder builder, Object token) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ FlexibleSearchParserUtils.CompletionState completionState = state.completionState;
+ if (completionState != null && state.predicateSign) {
+ addCompletionVariant(builder, completionState, token);
+ }
+ }
+
+ private static boolean addVariantSmart(PsiBuilder builder, Object token, boolean force) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ // skip FIRST check in completion mode
+ if (state.completionState != null && !force) return false;
+ builder.eof();
+ if (!state.suppressErrors && state.predicateCount < 2) {
+ addVariant(builder, state, token);
+ }
+ return true;
+ }
+
+ public static void addVariant(PsiBuilder builder, String text) {
+ addVariant(builder, FlexibleSearchParserUtils.ErrorState.get(builder), text);
+ }
+
+ private static void addVariant(PsiBuilder builder, FlexibleSearchParserUtils.ErrorState state, Object o) {
+ builder.eof(); // skip whitespaces
+ addVariantInner(state, builder.rawTokenIndex(), o);
+
+ FlexibleSearchParserUtils.CompletionState completionState = state.completionState;
+ if (completionState != null && state.predicateSign) {
+ addCompletionVariant(builder, completionState, o);
+ }
+ }
+
+ private static void addVariantInner(FlexibleSearchParserUtils.ErrorState state, int pos, Object o) {
+ FlexibleSearchParserUtils.Variant variant = state.VARIANTS.alloc().init(pos, o);
+ if (state.predicateSign) {
+ state.variants.add(variant);
+ if (state.lastExpectedVariantPos < variant.position) {
+ state.lastExpectedVariantPos = variant.position;
+ }
+ }
+ else {
+ state.unexpected.add(variant);
+ }
+ }
+
+ private static void addCompletionVariant(@NotNull PsiBuilder builder, @NotNull FlexibleSearchParserUtils.CompletionState completionState, Object o) {
+ int offset = builder.getCurrentOffset();
+ if (!builder.eof() && offset == builder.rawTokenTypeStart(1)) return; // suppress for zero-length tokens
+ String text = completionState.convertItem(o);
+ int length = text == null ? 0 : text.length();
+ boolean add = length != 0 && completionState.prefixMatches(builder, text);
+ add = add && length > 1 && !(text.charAt(0) == '<' && text.charAt(length - 1) == '>') &&
+ !(text.charAt(0) == '\'' && text.charAt(length - 1) == '\'' && length < 5);
+ if (add) {
+ completionState.addItem(builder, text);
+ }
+ }
+
+ public static boolean isWhitespaceOrComment(@NotNull PsiBuilder builder, @Nullable IElementType type) {
+ return ((PsiBuilderImpl)((FlexibleSearchParserUtils.Builder)builder).getDelegate()).whitespaceOrComment(type);
+ }
+
+ private static boolean wasAutoSkipped(@NotNull PsiBuilder builder, int steps) {
+ for (int i = -1; i >= -steps; i--) {
+ if (!isWhitespaceOrComment(builder, builder.rawLookup(i))) return false;
+ }
+ return true;
+ }
+
+ // here's the new section API for compact parsers & less IntelliJ platform API exposure
+ public static final int _NONE_ = 0x0;
+ public static final int _COLLAPSE_ = 0x1;
+ public static final int _LEFT_ = 0x2;
+ public static final int _LEFT_INNER_ = 0x4;
+ public static final int _AND_ = 0x8;
+ public static final int _NOT_ = 0x10;
+ public static final int _UPPER_ = 0x20;
+
+ // simple enter/exit methods pair that doesn't require frame object
+ public static PsiBuilder.Marker enter_section_(PsiBuilder builder) {
+ FlexibleSearchParserUtils.ErrorState.get(builder).level++;
+ return builder.mark();
+ }
+
+ public static void exit_section_(PsiBuilder builder,
+ PsiBuilder.Marker marker,
+ @Nullable IElementType elementType,
+ boolean result) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ close_marker_impl_(state.currentFrame, marker, elementType, result);
+ run_hooks_impl_(builder, state, result ? elementType : null);
+ state.level--;
+ }
+
+ // complex enter/exit methods pair with frame object
+ public static PsiBuilder.Marker enter_section_(PsiBuilder builder, int level, int modifiers, String frameName) {
+ return enter_section_(builder, level, modifiers, null, frameName);
+ }
+
+ public static PsiBuilder.Marker enter_section_(PsiBuilder builder, int level, int modifiers) {
+ return enter_section_(builder, level, modifiers, null, null);
+ }
+
+ public static PsiBuilder.Marker enter_section_(PsiBuilder builder, int level, int modifiers, IElementType elementType, String frameName) {
+ PsiBuilder.Marker marker = builder.mark();
+ enter_section_impl_(builder, level, modifiers, elementType, frameName);
+ return marker;
+ }
+
+ private static void enter_section_impl_(PsiBuilder builder, int level, int modifiers, IElementType elementType, String frameName) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ state.level++;
+ FlexibleSearchParserUtils.Frame frame = state.FRAMES.alloc().init(builder, state, level, modifiers, elementType, frameName);
+ FlexibleSearchParserUtils.Frame prevFrame = state.currentFrame;
+ if (prevFrame != null && prevFrame.errorReportedAt > frame.position) {
+ // report error for previous unsuccessful frame
+ reportError(builder, state, frame, null, true, false);
+ }
+ if (((frame.modifiers & _LEFT_) | (frame.modifiers & _LEFT_INNER_)) != 0) {
+ PsiBuilder.Marker left = (PsiBuilder.Marker)builder.getLatestDoneMarker();
+ if (invalid_left_marker_guard_(builder, left, frameName)) {
+ frame.leftMarker = left;
+ }
+ }
+ state.currentFrame = frame;
+ if ((modifiers & _AND_) != 0) {
+ if (state.predicateCount == 0 && !state.predicateSign) {
+ throw new AssertionError("Incorrect false predicate sign");
+ }
+ state.predicateCount++;
+ }
+ else if ((modifiers & _NOT_) != 0) {
+ state.predicateSign = state.predicateCount != 0 && !state.predicateSign;
+ state.predicateCount++;
+ }
+ }
+
+ public static void exit_section_(PsiBuilder builder,
+ int level,
+ PsiBuilder.Marker marker,
+ boolean result,
+ boolean pinned,
+ @Nullable FlexibleSearchParserUtils.Parser eatMore) {
+ exit_section_(builder, level, marker, null, result, pinned, eatMore);
+ }
+
+ public static void exit_section_(PsiBuilder builder,
+ int level,
+ PsiBuilder.Marker marker,
+ @Nullable IElementType elementType,
+ boolean result,
+ boolean pinned,
+ @Nullable FlexibleSearchParserUtils.Parser eatMore) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+
+ FlexibleSearchParserUtils.Frame frame = state.currentFrame;
+ state.currentFrame = frame == null ? null : frame.parentFrame;
+ if (frame != null && frame.elementType != null) elementType = frame.elementType;
+ if (frame == null || level != frame.level) {
+ LOG.error("Unbalanced error section: got " + frame + ", expected level " + level);
+ if (frame != null) state.FRAMES.recycle(frame);
+ close_marker_impl_(frame, marker, elementType, result);
+ return;
+ }
+
+ if (((frame.modifiers & _AND_) | (frame.modifiers & _NOT_)) != 0) {
+ close_marker_impl_(frame, marker, null, false);
+ replace_variants_with_name_(state, frame, builder, result, pinned);
+ state.predicateCount--;
+ if ((frame.modifiers & _NOT_) != 0) state.predicateSign = !state.predicateSign;
+ }
+ else {
+ close_frame_impl_(state, frame, builder, marker, elementType, result, pinned);
+ exit_section_impl_(state, frame, builder, elementType, result, pinned, eatMore);
+ }
+ run_hooks_impl_(builder, state, pinned || result ? elementType : null);
+ state.FRAMES.recycle(frame);
+ state.level--;
+ }
+
+ public static void register_hook_(PsiBuilder builder, FlexibleSearchParserUtils.Hook hook, T param) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ state.hooks = FlexibleSearchParserUtils.Hooks.concat(hook, param, state.level, state.hooks);
+ }
+
+ @SafeVarargs
+ public static void register_hook_(PsiBuilder builder, FlexibleSearchParserUtils.Hook hook, T... param) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ state.hooks = FlexibleSearchParserUtils.Hooks.concat(hook, param, state.level, state.hooks);
+ }
+
+ private static void run_hooks_impl_(PsiBuilder builder, FlexibleSearchParserUtils.ErrorState state, @Nullable IElementType elementType) {
+ if (state.hooks == null) return;
+ PsiBuilder.Marker marker = elementType == null ? null : (PsiBuilder.Marker)builder.getLatestDoneMarker();
+ if (elementType != null && marker == null) {
+ builder.mark().error("No expected done marker at offset " + builder.getCurrentOffset());
+ }
+ while (state.hooks != null && state.hooks.level >= state.level) {
+ if (state.hooks.level == state.level) {
+ marker = ((FlexibleSearchParserUtils.Hook)state.hooks.hook).run(builder, marker, state.hooks.param);
+ }
+ state.hooks = state.hooks.next;
+ }
+ }
+
+ private static void exit_section_impl_(FlexibleSearchParserUtils.ErrorState state,
+ FlexibleSearchParserUtils.Frame frame,
+ PsiBuilder builder,
+ @Nullable IElementType elementType,
+ boolean result,
+ boolean pinned,
+ @Nullable FlexibleSearchParserUtils.Parser eatMore) {
+ int initialPos = builder.rawTokenIndex();
+ boolean willFail = !result && !pinned;
+ replace_variants_with_name_(state, frame, builder, result, pinned);
+ int lastErrorPos = getLastVariantPos(state, initialPos);
+ if (!state.suppressErrors && eatMore != null) {
+ state.suppressErrors = true;
+ final boolean eatMoreFlagOnce = !builder.eof() && eatMore.parse(builder, frame.level + 1);
+ boolean eatMoreFlag = eatMoreFlagOnce || !result && frame.position == initialPos && lastErrorPos > frame.position;
+
+ PsiBuilderImpl.ProductionMarker latestDoneMarker =
+ (pinned || result) && (state.altMode || elementType != null) &&
+ eatMoreFlagOnce ? (PsiBuilderImpl.ProductionMarker)builder.getLatestDoneMarker() : null;
+ PsiBuilder.Marker extensionMarker = null;
+ IElementType extensionTokenType = null;
+ // whitespace prefix makes the very first frame offset bigger than marker start offset which is always 0
+ if (latestDoneMarker != null &&
+ frame.position >= latestDoneMarker.getStartIndex() &&
+ frame.position <= latestDoneMarker.getEndIndex()) {
+ extensionMarker = ((PsiBuilder.Marker)latestDoneMarker).precede();
+ extensionTokenType = latestDoneMarker.getTokenType();
+ ((PsiBuilder.Marker)latestDoneMarker).drop();
+ }
+ // advance to the last error pos
+ // skip tokens until lastErrorPos. parseAsTree might look better here...
+ int parenCount = 0;
+ while ((eatMoreFlag || parenCount > 0) && builder.rawTokenIndex() < lastErrorPos) {
+ IElementType tokenType = builder.getTokenType();
+ if (state.braces != null) {
+ if (tokenType == state.braces[0].getLeftBraceType()) parenCount ++;
+ else if (tokenType == state.braces[0].getRightBraceType()) parenCount --;
+ }
+ if (!(builder.rawTokenIndex() < lastErrorPos)) break;
+ builder.advanceLexer();
+ eatMoreFlag = eatMore.parse(builder, frame.level + 1);
+ }
+ boolean errorReported = frame.errorReportedAt == initialPos || !result && frame.errorReportedAt >= frame.position;
+ if (errorReported) {
+ if (eatMoreFlag) {
+ builder.advanceLexer();
+ parseAsTree(state, builder, frame.level + 1, DUMMY_BLOCK, true, TOKEN_ADVANCER, eatMore);
+ }
+ }
+ else if (eatMoreFlag) {
+ errorReported = reportError(builder, state, frame, null, true, true);
+ parseAsTree(state, builder, frame.level + 1, DUMMY_BLOCK, true, TOKEN_ADVANCER, eatMore);
+ }
+ else if (eatMoreFlagOnce || (!result && frame.position != builder.rawTokenIndex()) || frame.errorReportedAt > initialPos) {
+ errorReported = reportError(builder, state, frame, null, true, false);
+ }
+ else if (!result && pinned && frame.errorReportedAt < 0) {
+ errorReported = reportError(builder, state, frame, elementType, false, false);
+ }
+ if (extensionMarker != null) {
+ extensionMarker.done(extensionTokenType);
+ }
+ state.suppressErrors = false;
+ if (errorReported || result) {
+ state.clearVariants(true, 0);
+ state.clearVariants(false, 0);
+ state.lastExpectedVariantPos = -1;
+ }
+ }
+ else if (!result && pinned && frame.errorReportedAt < 0) {
+ // do not report if there are errors beyond current position
+ if (lastErrorPos == initialPos) {
+ // do not force, inner recoverRoot might have skipped some tokens
+ reportError(builder, state, frame, elementType, false, false);
+ }
+ else if (lastErrorPos > initialPos) {
+ // set error pos here as if it is reported for future reference
+ frame.errorReportedAt = lastErrorPos;
+ }
+ }
+ // propagate errorReportedAt up the stack to avoid duplicate reporting
+ FlexibleSearchParserUtils.Frame prevFrame = willFail && eatMore == null ? null : state.currentFrame;
+ if (prevFrame != null && prevFrame.errorReportedAt < frame.errorReportedAt) {
+ prevFrame.errorReportedAt = frame.errorReportedAt;
+ }
+ }
+
+ private static void close_frame_impl_(FlexibleSearchParserUtils.ErrorState state,
+ FlexibleSearchParserUtils.Frame frame,
+ PsiBuilder builder,
+ PsiBuilder.Marker marker,
+ IElementType elementType,
+ boolean result,
+ boolean pinned) {
+ if (elementType != null && marker != null) {
+ if (result || pinned) {
+ if ((frame.modifiers & _COLLAPSE_) != 0) {
+ PsiBuilderImpl.ProductionMarker last = (PsiBuilderImpl.ProductionMarker)builder.getLatestDoneMarker();
+ if (last != null &&
+ last.getStartIndex() == frame.position &&
+ state.typeExtends(last.getTokenType(), elementType) &&
+ wasAutoSkipped(builder, builder.rawTokenIndex() - last.getEndIndex())) {
+ elementType = last.getTokenType();
+ ((PsiBuilder.Marker)last).drop();
+ }
+ }
+ if ((frame.modifiers & _UPPER_) != 0) {
+ marker.drop();
+ for (FlexibleSearchParserUtils.Frame f = frame.parentFrame; f != null; f = f.parentFrame) {
+ if (f.elementType == null) continue;
+ f.elementType = elementType;
+ break;
+ }
+ }
+ else if ((frame.modifiers & _LEFT_INNER_) != 0 && frame.leftMarker != null) {
+ marker.done(elementType);
+ frame.leftMarker.precede().done(((LighterASTNode)frame.leftMarker).getTokenType());
+ frame.leftMarker.drop();
+ }
+ else if ((frame.modifiers & _LEFT_) != 0 && frame.leftMarker != null) {
+ marker.drop();
+ frame.leftMarker.precede().done(elementType);
+ }
+ else {
+ if (frame.level == 0) builder.eof(); // skip whitespaces
+ marker.done(elementType);
+ }
+ }
+ else {
+ close_marker_impl_(frame, marker, null, false);
+ }
+ }
+ else if (result || pinned) {
+ if (marker != null) marker.drop();
+ if ((frame.modifiers & _LEFT_INNER_) != 0 && frame.leftMarker != null) {
+ frame.leftMarker.precede().done(((LighterASTNode)frame.leftMarker).getTokenType());
+ frame.leftMarker.drop();
+ }
+ }
+ else {
+ close_marker_impl_(frame, marker, null, false);
+ }
+ }
+
+ private static void close_marker_impl_(FlexibleSearchParserUtils.Frame frame, PsiBuilder.Marker marker, IElementType elementType, boolean result) {
+ if (marker == null) return;
+ if (result) {
+ if (elementType != null) {
+ marker.done(elementType);
+ }
+ else {
+ marker.drop();
+ }
+ }
+ else {
+ if (frame != null) {
+ int position = ((PsiBuilderImpl.ProductionMarker)marker).getStartIndex();
+ if (frame.errorReportedAt > position && frame.parentFrame != null) {
+ frame.errorReportedAt = frame.parentFrame.errorReportedAt;
+ }
+ }
+ marker.rollbackTo();
+ }
+ }
+
+ private static void replace_variants_with_name_(FlexibleSearchParserUtils.ErrorState state,
+ FlexibleSearchParserUtils.Frame frame,
+ PsiBuilder builder,
+ boolean result,
+ boolean pinned) {
+ int initialPos = builder.rawTokenIndex();
+ boolean willFail = !result && !pinned;
+ if (willFail && initialPos == frame.position && state.lastExpectedVariantPos == frame.position &&
+ frame.name != null && state.variants.size() - frame.variantCount > 1) {
+ state.clearVariants(true, frame.variantCount);
+ addVariantInner(state, initialPos, frame.name);
+ }
+ }
+
+ public static boolean report_error_(PsiBuilder builder, boolean result) {
+ if (!result) report_error_(builder, FlexibleSearchParserUtils.ErrorState.get(builder), false);
+ return result;
+ }
+
+ public static void report_error_(PsiBuilder builder, FlexibleSearchParserUtils.ErrorState state, boolean advance) {
+ FlexibleSearchParserUtils.Frame frame = state.currentFrame;
+ if (frame == null) {
+ LOG.error("unbalanced enter/exit section call: got null");
+ return;
+ }
+ int position = builder.rawTokenIndex();
+ if (frame.errorReportedAt < position && getLastVariantPos(state, position + 1) <= position) {
+ reportError(builder, state, frame, null, true, advance);
+ }
+ }
+
+ public static boolean withProtectedLastVariantPos(PsiBuilder builder, int level, FlexibleSearchParserUtils.Parser parser) {
+ FlexibleSearchParserUtils.ErrorState state = FlexibleSearchParserUtils.ErrorState.get(builder);
+ int backup = state.lastExpectedVariantPos;
+ boolean result = parser.parse(builder, level);
+ state.lastExpectedVariantPos = backup;
+ return result;
+ }
+
+ private static int getLastVariantPos(FlexibleSearchParserUtils.ErrorState state, int defValue) {
+ return state.lastExpectedVariantPos < 0? defValue : state.lastExpectedVariantPos;
+ }
+
+ private static boolean reportError(PsiBuilder builder,
+ FlexibleSearchParserUtils.ErrorState state,
+ FlexibleSearchParserUtils.Frame frame,
+ IElementType elementType,
+ boolean force,
+ boolean advance) {
+ String expectedText = state.getExpectedText(builder);
+ boolean notEmpty = isNotEmpty(expectedText);
+ if (!(force || notEmpty || advance)) return false;
+
+ String actual = "'" + first(notNullize(builder.getTokenText(), "null"), MAX_ERROR_TOKEN_TEXT, true) + "'";
+ String message = expectedText + (builder.eof() ? "unexpected end of file" : notEmpty ? "got " + actual : actual + " unexpected");
+ if (advance) {
+// PsiBuilder.Marker mark = builder.mark();
+ builder.advanceLexer();
+// mark.error(message);
+ }
+ else if (!force) {
+ PsiBuilder.Marker extensionMarker = null;
+ IElementType extensionTokenType = null;
+ PsiBuilderImpl.ProductionMarker latestDoneMarker = elementType == null ? null : (PsiBuilderImpl.ProductionMarker)builder.getLatestDoneMarker();
+ if (latestDoneMarker != null &&
+ frame.position >= latestDoneMarker.getStartIndex() &&
+ frame.position <= latestDoneMarker.getEndIndex()) {
+ extensionMarker = ((PsiBuilder.Marker)latestDoneMarker).precede();
+ extensionTokenType = latestDoneMarker.getTokenType();
+ ((PsiBuilder.Marker)latestDoneMarker).drop();
+ }
+// builder.error(message);
+ if (extensionMarker != null) extensionMarker.done(extensionTokenType);
+ }
+ else {
+ //builder.error(message);
+ }
+ builder.eof(); // skip whitespaces
+ frame.errorReportedAt = builder.rawTokenIndex();
+ return true;
+ }
+
+
+ public static final Key COMPLETION_STATE_KEY = Key.create("COMPLETION_STATE_KEY");
+
+ public static class CompletionState implements Function {
+ public final int offset;
+ public final Collection items = new THashSet<>();
+
+ public CompletionState(int offset_) {
+ offset = offset_;
+ }
+
+ @Nullable
+ public String convertItem(Object o) {
+ return o instanceof Object[] ? join((Object[]) o, this, " ") : o.toString();
+ }
+
+ @Override
+ public String fun(Object o) {
+ return convertItem(o);
+ }
+
+ public void addItem(@NotNull PsiBuilder builder, @NotNull String text) {
+ items.add(text);
+ }
+
+ public boolean prefixMatches(@NotNull PsiBuilder builder, @NotNull String text) {
+ int builderOffset = builder.getCurrentOffset();
+ int diff = offset - builderOffset;
+ int length = text.length();
+ if (diff == 0) {
+ return true;
+ }
+ else if (diff > 0 && diff <= length) {
+ CharSequence fragment = builder.getOriginalText().subSequence(builderOffset, offset);
+ return prefixMatches(fragment.toString(), text);
+ }
+ else if (diff < 0) {
+ for (int i=-1; ; i--) {
+ IElementType type = builder.rawLookup(i);
+ int tokenStart = builder.rawTokenTypeStart(i);
+ if (isWhitespaceOrComment(builder, type)) {
+ diff = offset - tokenStart;
+ }
+ else if (type != null && tokenStart < offset) {
+ CharSequence fragment = builder.getOriginalText().subSequence(tokenStart, offset);
+ if (prefixMatches(fragment.toString(), text)) {
+ diff = offset - tokenStart;
+ }
+ break;
+ }
+ else break;
+ }
+ return diff >= 0 && diff < length;
+ }
+ return false;
+ }
+
+ public boolean prefixMatches(@NotNull String prefix, @NotNull String variant) {
+ boolean matches = new CamelHumpMatcher(prefix, false).prefixMatches(variant.replace(' ', '_'));
+ if (matches && isWhiteSpace(prefix.charAt(prefix.length() - 1))) {
+ return startsWithIgnoreCase(variant, prefix);
+ }
+ return matches;
+ }
+ }
+
+ public static class Builder extends PsiBuilderAdapter {
+ public final FlexibleSearchParserUtils.ErrorState state;
+ public final PsiParser parser;
+
+ public Builder(PsiBuilder builder, FlexibleSearchParserUtils.ErrorState state_, PsiParser parser_) {
+ super(builder);
+ state = state_;
+ parser = parser_;
+ }
+
+ public Lexer getLexer() {
+ return ((PsiBuilderImpl)myDelegate).getLexer();
+ }
+ }
+
+ public static PsiBuilder adapt_builder_(IElementType root, PsiBuilder builder, PsiParser parser) {
+ return adapt_builder_(root, builder, parser, null);
+ }
+
+ public static PsiBuilder adapt_builder_(IElementType root, PsiBuilder builder, PsiParser parser, TokenSet[] extendsSets) {
+ FlexibleSearchParserUtils.ErrorState state = new FlexibleSearchParserUtils.ErrorState();
+ FlexibleSearchParserUtils.ErrorState.initState(state, builder, root, extendsSets);
+ return new FlexibleSearchParserUtils.Builder(builder, state, parser);
+ }
+
+ public static class ErrorState {
+ TokenSet[] extendsSets;
+ public PairProcessor altExtendsChecker;
+
+ int predicateCount;
+ int level;
+ boolean predicateSign = true;
+ boolean suppressErrors;
+ FlexibleSearchParserUtils.Hooks> hooks;
+ public FlexibleSearchParserUtils.Frame currentFrame;
+ public FlexibleSearchParserUtils.CompletionState completionState;
+
+ private boolean caseSensitive;
+ public BracePair[] braces;
+ public boolean altMode;
+
+ int lastExpectedVariantPos = -1;
+ FlexibleSearchParserUtils.MyList variants = new FlexibleSearchParserUtils.MyList<>(INITIAL_VARIANTS_SIZE);
+ FlexibleSearchParserUtils.MyList unexpected = new FlexibleSearchParserUtils.MyList<>(INITIAL_VARIANTS_SIZE / 10);
+
+ final LimitedPool VARIANTS = new LimitedPool<>(VARIANTS_POOL_SIZE, new LimitedPool.ObjectFactory() {
+ @NotNull
+ @Override
+ public FlexibleSearchParserUtils.Variant create() {
+ return new FlexibleSearchParserUtils.Variant();
+ }
+
+ @Override
+ public void cleanup(@NotNull FlexibleSearchParserUtils.Variant o) {
+ }
+ });
+ final LimitedPool