mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
move js injections to intellilang plugin
This commit is contained in:
@@ -162,6 +162,7 @@ def layoutFull(String home, String targetDirectory) {
|
||||
module("IntelliLang")
|
||||
module("IntelliLang-java")
|
||||
module("IntelliLang-xml")
|
||||
module("IntelliLang-js")
|
||||
module("IntelliLang-javaee")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/js-support">
|
||||
<sourceFolder url="file://$MODULE_DIR$/js-support" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="IntelliLang" />
|
||||
<orderEntry type="module" module-name="lang-api" />
|
||||
<orderEntry type="module" module-name="JavaScriptLanguage" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.intellij.plugins.intelliLang.inject;
|
||||
|
||||
import com.intellij.lang.javascript.patterns.JSPatterns;
|
||||
import com.intellij.lang.javascript.psi.JSElement;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import org.intellij.plugins.intelliLang.inject.AbstractLanguageInjectionSupport;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Eugene.Kudelevsky
|
||||
*/
|
||||
public class JSLanguageInjectionSupport extends AbstractLanguageInjectionSupport {
|
||||
@NonNls private static final String SUPPORT_ID = "js";
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getId() {
|
||||
return SUPPORT_ID;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Class[] getPatternClasses() {
|
||||
return new Class[] {JSPatterns.class};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useDefaultInjector(PsiElement host) {
|
||||
return host instanceof JSElement;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component name="LanguageInjectionConfiguration">
|
||||
<injection language="SQLite" injector-id="js">
|
||||
<display-name><<< SQLite</display-name>
|
||||
<place><![CDATA[jsLiteralExpression().and(jsArgument("executeSql", 0))]]></place>
|
||||
</injection>
|
||||
</component>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<idea-plugin version="2">
|
||||
|
||||
<extensions defaultExtensionNs="org.intellij.intelliLang">
|
||||
<languageSupport implementation="com.intellij.plugins.intelliLang.inject.JSLanguageInjectionSupport"
|
||||
config="/resources/jsInjections.xml"/>
|
||||
</extensions>
|
||||
|
||||
</idea-plugin>
|
||||
@@ -9,6 +9,7 @@
|
||||
<depends optional="true" config-file="intellilang-java-support.xml">com.intellij.modules.java</depends>
|
||||
<depends optional="true" config-file="intellilang-javaee-support.xml">com.intellij.javaee</depends>
|
||||
<depends optional="true" config-file="intellilang-xml-support.xml">com.intellij.modules.xml</depends>
|
||||
<depends optional="true" config-file="intellilang-js-support.xml">JavaScript</depends>
|
||||
|
||||
<vendor email="sascha.weinreuter@cit.de" logo="/org/intellij/plugins/intelliLang/icon_small.png">Sascha Weinreuter</vendor>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user