mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
assertion: Language constructor must be non-public to avoid creating Language duplicates + test
GitOrigin-RevId: eb6954f444bf64bbc1d47b419af5e4db6fadf07e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d7d8c7af81
commit
ddf9b3da94
@@ -12,7 +12,7 @@ public class EcmaScriptRegexpLanguage extends Language {
|
||||
public static final EcmaScriptRegexpLanguage INSTANCE = new EcmaScriptRegexpLanguage();
|
||||
public static final String ID = "JSRegexp";
|
||||
|
||||
public EcmaScriptRegexpLanguage() {
|
||||
private EcmaScriptRegexpLanguage() {
|
||||
super(RegExpLanguage.INSTANCE, ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ public class EcmaScriptUnicodeRegexpLanguage extends Language {
|
||||
public static final EcmaScriptUnicodeRegexpLanguage INSTANCE = new EcmaScriptUnicodeRegexpLanguage();
|
||||
public static final String ID = "JSUnicodeRegexp";
|
||||
|
||||
public EcmaScriptUnicodeRegexpLanguage() {
|
||||
private EcmaScriptUnicodeRegexpLanguage() {
|
||||
super(RegExpLanguage.INSTANCE, ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.intellij.psi.impl.source.xml.XmlFileImpl
|
||||
import com.intellij.psi.tree.IFileElementType
|
||||
import org.jetbrains.annotations.NotNull
|
||||
|
||||
class SvgLanguage : XMLLanguage(XMLLanguage.INSTANCE, "SVG", "image/svg+xml") {
|
||||
class SvgLanguage private constructor(): XMLLanguage(XMLLanguage.INSTANCE, "SVG", "image/svg+xml") {
|
||||
companion object {
|
||||
@JvmField
|
||||
val INSTANCE = SvgLanguage()
|
||||
|
||||
@@ -10,7 +10,7 @@ public interface JspxFileViewProvider extends TemplateLanguageFileViewProvider {
|
||||
Language JAVA_HOLDER_METHOD_TREE_LANGUAGE = new JavaHolderMethodTreeLanguage();
|
||||
|
||||
class JavaHolderMethodTreeLanguage extends Language implements DependentLanguage{
|
||||
public JavaHolderMethodTreeLanguage() {
|
||||
JavaHolderMethodTreeLanguage() {
|
||||
super("JAVA_HOLDER_METHOD_TREE", "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import com.intellij.lang.Language;
|
||||
public class ManifestLanguage extends Language {
|
||||
public static final ManifestLanguage INSTANCE = new ManifestLanguage();
|
||||
|
||||
public ManifestLanguage() {
|
||||
private ManifestLanguage() {
|
||||
super("Manifest");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.intellij.lang.Language;
|
||||
public class PropertiesLanguage extends Language {
|
||||
public static final PropertiesLanguage INSTANCE = new PropertiesLanguage();
|
||||
|
||||
public PropertiesLanguage() {
|
||||
private PropertiesLanguage() {
|
||||
super("Properties", "text/properties");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.intellij.notification.NotificationGroupManager;
|
||||
public final class ShLanguage extends Language {
|
||||
public static final Language INSTANCE = new ShLanguage();
|
||||
|
||||
public ShLanguage() {
|
||||
private ShLanguage() {
|
||||
super("Shell Script", "application/x-bsh", "application/x-sh", "text/x-script.sh");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.intellij.lang.regexp.RegExpLanguage;
|
||||
public class PythonRegexpLanguage extends Language {
|
||||
public static final PythonRegexpLanguage INSTANCE = new PythonRegexpLanguage();
|
||||
|
||||
public PythonRegexpLanguage() {
|
||||
private PythonRegexpLanguage() {
|
||||
super(RegExpLanguage.INSTANCE, "PythonRegExp");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import org.intellij.lang.regexp.RegExpLanguage;
|
||||
public class PythonVerboseRegexpLanguage extends Language {
|
||||
public static final PythonVerboseRegexpLanguage INSTANCE = new PythonVerboseRegexpLanguage();
|
||||
|
||||
public PythonVerboseRegexpLanguage() {
|
||||
private PythonVerboseRegexpLanguage() {
|
||||
super(RegExpLanguage.INSTANCE, PyNames.VERBOSE_REG_EXP_LANGUAGE_ID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class HtmlCompatibleMetaLanguage extends MetaLanguage {
|
||||
() -> ContainerUtil.map2Set(EP_NAME.getExtensionList(), e -> e.language)
|
||||
), EP_NAME, null);
|
||||
|
||||
public HtmlCompatibleMetaLanguage() {
|
||||
private HtmlCompatibleMetaLanguage() {
|
||||
super("HtmlCompatible");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user