Merge pull request #394 from marhali/fix/illegal-dependency-usage
Fix/illegal dependency usage
This commit is contained in:
commit
30fa22b256
@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Remove JavaScript usage on non-js-compliant platforms
|
||||||
|
|
||||||
## [4.5.0] - 2024-04-10
|
## [4.5.0] - 2024-04-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -4,7 +4,7 @@ pluginGroup = de.marhali.easyi18n
|
|||||||
pluginName = easy-i18n
|
pluginName = easy-i18n
|
||||||
pluginRepositoryUrl = https://github.com/marhali/easy-i18n
|
pluginRepositoryUrl = https://github.com/marhali/easy-i18n
|
||||||
# SemVer format -> https://semver.org
|
# SemVer format -> https://semver.org
|
||||||
pluginVersion = 4.5.0
|
pluginVersion = 4.5.1
|
||||||
|
|
||||||
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
||||||
pluginSinceBuild = 223
|
pluginSinceBuild = 223
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
package de.marhali.easyi18n.assistance.folding;
|
||||||
|
|
||||||
|
import com.intellij.lang.ASTNode;
|
||||||
|
import com.intellij.openapi.util.Pair;
|
||||||
|
import com.intellij.psi.PsiElement;
|
||||||
|
import com.intellij.psi.util.PsiTreeUtil;
|
||||||
|
import com.intellij.psi.xml.XmlAttributeValue;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class XmlFoldingBuilder extends AbstractFoldingBuilder {
|
||||||
|
@Override
|
||||||
|
@NotNull List<Pair<String, PsiElement>> extractRegions(@NotNull PsiElement root) {
|
||||||
|
return PsiTreeUtil.findChildrenOfType(root, XmlAttributeValue.class)
|
||||||
|
.stream()
|
||||||
|
.map((attributeValue -> Pair.pair(attributeValue.getValue(), (PsiElement) attributeValue)))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nullable String extractText(@NotNull ASTNode node) {
|
||||||
|
XmlAttributeValue attributeValue = node.getPsi(XmlAttributeValue.class);
|
||||||
|
return attributeValue.getValue();
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<extensions defaultExtensionNs="com.intellij">
|
<extensions defaultExtensionNs="com.intellij">
|
||||||
<lang.foldingBuilder
|
<lang.foldingBuilder
|
||||||
language="HTML"
|
language="HTML"
|
||||||
implementationClass="de.marhali.easyi18n.assistance.folding.JsFoldingBuilder"
|
implementationClass="de.marhali.easyi18n.assistance.folding.XmlFoldingBuilder"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<lang.documentationProvider
|
<lang.documentationProvider
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<depends optional="true" config-file="de.marhali.easyi18n-kotlin.xml">org.jetbrains.kotlin</depends>
|
<depends optional="true" config-file="de.marhali.easyi18n-kotlin.xml">org.jetbrains.kotlin</depends>
|
||||||
<depends optional="true" config-file="de.marhali.easyi18n-javascript.xml">JavaScript</depends>
|
<depends optional="true" config-file="de.marhali.easyi18n-javascript.xml">JavaScript</depends>
|
||||||
<depends optional="true" config-file="de.marhali.easyi18n-html.xml">com.intellij.modules.xml</depends>
|
<depends optional="true" config-file="de.marhali.easyi18n-xml.xml">com.intellij.modules.xml</depends>
|
||||||
<depends optional="true" config-file="de.marhali.easyi18n-java.xml">com.intellij.java</depends>
|
<depends optional="true" config-file="de.marhali.easyi18n-java.xml">com.intellij.java</depends>
|
||||||
<depends optional="true" config-file="de.marhali.easyi18n-php.xml">com.jetbrains.php</depends>
|
<depends optional="true" config-file="de.marhali.easyi18n-php.xml">com.jetbrains.php</depends>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user