diff --git a/activiti-intellij-plugin/src/main/resources/META-INF/activiti-bpmn-visualizer-with-java.xml b/activiti-intellij-plugin/src/main/resources/META-INF/activiti-bpmn-visualizer-with-java.xml
index 0904389fa..0f890722d 100644
--- a/activiti-intellij-plugin/src/main/resources/META-INF/activiti-bpmn-visualizer-with-java.xml
+++ b/activiti-intellij-plugin/src/main/resources/META-INF/activiti-bpmn-visualizer-with-java.xml
@@ -1,3 +1,6 @@
-
+
+
+
+
diff --git a/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml b/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml
index 7da08771a..ce3fc9786 100644
--- a/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml
+++ b/activiti-intellij-plugin/src/main/resources/META-INF/plugin.xml
@@ -230,7 +230,6 @@
-
diff --git a/bpmn-intellij-plugin-commons/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/commons/langinjection/xml/DefaultXmlInjector.kt b/bpmn-intellij-plugin-commons/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/commons/langinjection/xml/DefaultXmlInjector.kt
index 2bcf44a75..5be62db5b 100644
--- a/bpmn-intellij-plugin-commons/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/commons/langinjection/xml/DefaultXmlInjector.kt
+++ b/bpmn-intellij-plugin-commons/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/commons/langinjection/xml/DefaultXmlInjector.kt
@@ -10,6 +10,7 @@ import com.intellij.psi.xml.XmlAttribute
import com.intellij.psi.xml.XmlAttributeValue
import com.intellij.psi.xml.XmlTag
import com.intellij.psi.xml.XmlText
+import com.valb3r.bpmn.intellij.plugin.core.settings.currentSettings
abstract class DefaultXmlInjector: MultiHostInjector {
@@ -37,7 +38,13 @@ abstract class DefaultXmlInjector: MultiHostInjector {
}
protected open fun invalidXmlFileExtension(context: PsiLanguageInjectionHost): Boolean {
- return !context.containingFile.name.endsWith("bpmn20.xml") && context.containingFile?.context?.containingFile?.name?.endsWith("bpmn20.xml") != true
+ return isValidFileName(context.containingFile.name)
+ }
+
+ private fun isValidFileName(fileName: String?): Boolean {
+ val name = fileName ?: return false
+ val allowedExt = currentSettings().openExtensions
+ return allowedExt.any { name.endsWith(it) }
}
private fun tryToInjectSkipExpression(context: XmlAttributeValue, asHost: PsiLanguageInjectionHost, registrar: MultiHostRegistrar): Boolean {
diff --git a/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/langinjection/xml/XmlCamundaInjector.kt b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/langinjection/xml/XmlCamundaInjector.kt
index 762e38168..49e71e94f 100644
--- a/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/langinjection/xml/XmlCamundaInjector.kt
+++ b/camunda-intellij-plugin/src/main/kotlin/com/valb3r/bpmn/intellij/plugin/camunda/langinjection/xml/XmlCamundaInjector.kt
@@ -3,9 +3,4 @@ package com.valb3r.bpmn.intellij.plugin.camunda.langinjection.xml
import com.intellij.psi.PsiLanguageInjectionHost
import com.valb3r.bpmn.intellij.plugin.commons.langinjection.xml.DefaultXmlInjector
-class CamundaXmlCamundaInjector: DefaultXmlInjector() {
-
- override fun invalidXmlFileExtension(context: PsiLanguageInjectionHost): Boolean {
- return !context.containingFile.name.endsWith("bpmn") && context.containingFile?.context?.containingFile?.name?.endsWith("bpmn") != true
- }
-}
\ No newline at end of file
+class CamundaXmlCamundaInjector: DefaultXmlInjector()
\ No newline at end of file
diff --git a/camunda-intellij-plugin/src/main/resources/META-INF/camunda-bpmn-visualizer-with-java.xml b/camunda-intellij-plugin/src/main/resources/META-INF/camunda-bpmn-visualizer-with-java.xml
index 6fb76a662..f52202b59 100644
--- a/camunda-intellij-plugin/src/main/resources/META-INF/camunda-bpmn-visualizer-with-java.xml
+++ b/camunda-intellij-plugin/src/main/resources/META-INF/camunda-bpmn-visualizer-with-java.xml
@@ -1,2 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml b/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml
index 66863f294..9a9202d05 100644
--- a/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml
+++ b/camunda-intellij-plugin/src/main/resources/META-INF/plugin.xml
@@ -230,7 +230,6 @@
-
diff --git a/flowable-intellij-plugin/src/main/resources/META-INF/flowable-bpmn-visualizer-with-java.xml b/flowable-intellij-plugin/src/main/resources/META-INF/flowable-bpmn-visualizer-with-java.xml
index 6fb76a662..a177b59d3 100644
--- a/flowable-intellij-plugin/src/main/resources/META-INF/flowable-bpmn-visualizer-with-java.xml
+++ b/flowable-intellij-plugin/src/main/resources/META-INF/flowable-bpmn-visualizer-with-java.xml
@@ -1,2 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml b/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml
index def764eee..7596494f1 100644
--- a/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml
+++ b/flowable-intellij-plugin/src/main/resources/META-INF/plugin.xml
@@ -230,7 +230,6 @@
-