[remdev + json] IJPL-159355 Move shared classes and extensions to the new json.split module

GitOrigin-RevId: 591c01c811152497a6cf8182207e364029d74375
This commit is contained in:
Nikita Katkov
2024-08-06 16:40:28 +02:00
committed by intellij-monorepo-bot
parent 1059d63e64
commit a74ffa0e10
75 changed files with 44 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
<idea-plugin>
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- No package, there are two top level packages available :( -->
<name>JSON</name>
<!-- The plugin id is intentionally kept equal to its main module id
@@ -13,7 +13,7 @@
<a href="https://json-schema.org/overview/what-is-jsonschema">JSON Schema</a> languages
]]></description>
<!--<xi:include href="/intellij.json.split.xml" xpointer="xpointer(/idea-plugin/*)"/>-->
<xi:include href="/intellij.json.split.xml" xpointer="xpointer(/idea-plugin/*)"/>
<actions resource-bundle="messages.JsonBundle">
<action id="JsonCopyPointer" class="com.intellij.json.editor.JsonCopyPointerAction">
@@ -34,22 +34,8 @@
<registryKey key="json.schema.object.v2" defaultValue="true" description="Use lightweight implementation of JsonSchemaObject"/>
<registryKey key="remote.schema.cache.validity.duration" defaultValue="1"
description="The time period (in minutes) a file is being kept in cache for. Applicable to references that contain remote URLs."/>
<fileType name="JSON" extensions="har;json;jsonc"
implementationClass="com.intellij.json.JsonFileType" fieldName="INSTANCE"
language="JSON"/>
<fileType name="JSON5" extensions="json5"
implementationClass="com.intellij.json.json5.Json5FileType" fieldName="INSTANCE"
language="JSON5"/>
<fileType name="JSON-lines" extensions="jsonl;jsonlines;ldjson;ndjson"
implementationClass="com.intellij.json.jsonLines.JsonLinesFileType" fieldName="INSTANCE"
language="JSON Lines"/>
<fileIconProvider implementation="com.jetbrains.jsonSchema.JsonSchemaIconProvider"/>
<lang.parserDefinition language="JSON" implementationClass="com.intellij.json.JsonParserDefinition"/>
<lang.parserDefinition language="JSON5" implementationClass="com.intellij.json.json5.Json5ParserDefinition"/>
<lang.parserDefinition language="JSON Lines" implementationClass="com.intellij.json.jsonLines.JsonLinesParserDefinition"/>
<lang.syntaxHighlighterFactory language="JSON" implementationClass="com.intellij.json.highlighting.JsonSyntaxHighlighterFactory"/>
<lang.syntaxHighlighterFactory language="JSON5" implementationClass="com.intellij.json.json5.highlighting.Json5SyntaxHighlightingFactory"/>
<outerLanguageRangePatcher language="JSON" implementationClass="com.intellij.psi.templateLanguages.DefaultOuterLanguagePatcher"/>
<statusBarWidgetFactory id="JSONSchemaSelector" implementation="com.jetbrains.jsonSchema.widget.JsonSchemaStatusWidgetFactory"
order="after CodeStyleStatusBarWidget, before ReadOnlyAttribute"/>
@@ -58,7 +44,6 @@
<!-- Code style and formatting -->
<codeStyleSettingsProvider implementation="com.intellij.json.formatter.JsonCodeStyleSettingsProvider"/>
<langCodeStyleSettingsProvider implementation="com.intellij.json.formatter.JsonLanguageCodeStyleSettingsProvider"/>
<colorSettingsPage implementation="com.intellij.json.highlighting.JsonColorsPage"/>
<lang.formatter language="JSON" implementationClass="com.intellij.json.formatter.JsonFormattingBuilderModel"/>
<preFormatProcessor implementation="com.intellij.json.formatter.JsonTrailingCommaRemover"/>
<lang.braceMatcher language="JSON" implementationClass="com.intellij.json.JsonBraceMatcher"/>
@@ -126,8 +111,6 @@
enabledByDefault="true" level="WARNING"
implementationClass="com.jetbrains.jsonSchema.impl.inspections.JsonSchemaRefReferenceInspection" />
<lang.elementManipulator forClass="com.intellij.json.psi.JsonStringLiteral"
implementationClass="com.intellij.json.psi.JsonStringLiteralManipulator"/>
<projectService serviceImplementation="com.jetbrains.jsonSchema.JsonSchemaMappingsProjectConfiguration"/>
<projectConfigurable groupId="preferences.externalResources" id="settings.json.schema"
bundle="messages.JsonBundle"

View File

@@ -18,5 +18,6 @@
<orderEntry type="module" module-name="intellij.platform.lang.impl" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.editor" />
<orderEntry type="library" name="caffeine" level="project" />
</component>
</module>

View File

@@ -1,5 +1,28 @@
<idea-plugin package="com.intellij.json.split">
<idea-plugin >
<module value="intellij.json.split"/>
<extensions defaultExtensionNs="com.intellij">
<fileType name="JSON" extensions="har;json;jsonc"
implementationClass="com.intellij.json.JsonFileType" fieldName="INSTANCE"
language="JSON"/>
<fileType name="JSON5" extensions="json5"
implementationClass="com.intellij.json.json5.Json5FileType" fieldName="INSTANCE"
language="JSON5"/>
<fileType name="JSON-lines" extensions="jsonl;jsonlines;ldjson;ndjson"
implementationClass="com.intellij.json.jsonLines.JsonLinesFileType" fieldName="INSTANCE"
language="JSON Lines"/>
<lang.parserDefinition language="JSON" implementationClass="com.intellij.json.JsonParserDefinition"/>
<lang.parserDefinition language="JSON5" implementationClass="com.intellij.json.json5.Json5ParserDefinition"/>
<lang.parserDefinition language="JSON Lines" implementationClass="com.intellij.json.jsonLines.JsonLinesParserDefinition"/>
<colorSettingsPage implementation="com.intellij.json.highlighting.JsonColorsPage"/>
<lang.syntaxHighlighterFactory language="JSON" implementationClass="com.intellij.json.highlighting.JsonSyntaxHighlighterFactory"/>
<lang.syntaxHighlighterFactory language="JSON5" implementationClass="com.intellij.json.json5.highlighting.Json5SyntaxHighlightingFactory"/>
<lang.elementManipulator forClass="com.intellij.json.psi.JsonStringLiteral"
implementationClass="com.intellij.json.psi.JsonStringLiteralManipulator"/>
</extensions>
</idea-plugin>

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.DynamicBundle;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.lang.Language;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.psi.tree.IElementType;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.icons.AllIcons;

View File

@@ -1,3 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.lang.Language;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.lexer.FlexAdapter;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.json.psi.impl.JsonFileImpl;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.psi.tree.TokenSet;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.psi.tree.IElementType;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json;
import com.intellij.ide.scratch.RootType;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json.json5;
import com.intellij.json.JsonBundle;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json.json5;
import com.intellij.json.JsonLanguage;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json.json5;
import com.intellij.lexer.FlexAdapter;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json.json5;
import com.intellij.json.JsonParserDefinition;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json.jsonLines
import com.intellij.icons.AllIcons

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json.jsonLines
import com.intellij.json.JsonLanguage

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.json.jsonLines
import com.intellij.json.JsonParserDefinition

View File

@@ -5,7 +5,6 @@ import com.intellij.icons.AllIcons;
import com.intellij.json.JsonBundle;
import com.intellij.json.JsonDialectUtil;
import com.intellij.json.JsonLanguage;
import com.intellij.json.codeinsight.JsonStandardComplianceInspection;
import com.intellij.json.psi.*;
import com.intellij.lang.ASTNode;
import com.intellij.lang.Language;