-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jsonpath] IDEA-321687 Extract JsonPath plugin
GitOrigin-RevId: 322f27fa98def5b2adb4eba0dbbc16be147ebb15
- Loading branch information
1 parent
f16513c
commit 09003c4
Showing
135 changed files
with
233 additions
and
158 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?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$"> | ||
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" /> | ||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" /> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="library" name="kotlin-stdlib" level="project" /> | ||
<orderEntry type="library" name="jsonpath" level="project" /> | ||
<orderEntry type="module" module-name="intellij.platform.core" /> | ||
<orderEntry type="module" module-name="intellij.platform.analysis" /> | ||
<orderEntry type="module" module-name="intellij.json" /> | ||
<orderEntry type="module" module-name="intellij.platform.ide" /> | ||
<orderEntry type="module" module-name="intellij.platform.util.ui" /> | ||
<orderEntry type="module" module-name="intellij.platform.lang.impl" /> | ||
<orderEntry type="module" module-name="intellij.spellchecker" /> | ||
<orderEntry type="module" module-name="intellij.platform.core.ui" /> | ||
<orderEntry type="module" module-name="intellij.platform.structuralSearch" scope="RUNTIME" /> | ||
<orderEntry type="library" name="fastutil-min" level="project" /> | ||
<orderEntry type="library" name="Guava" level="project" /> | ||
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" /> | ||
<orderEntry type="module" module-name="intellij.platform.langInjection" scope="TEST" /> | ||
<orderEntry type="module" module-name="intellij.platform.testExtensions" scope="TEST" /> | ||
</component> | ||
</module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<idea-plugin package="com.intellij.jsonpath"> | ||
<id>com.intellij.jsonpath</id> | ||
<name>JSONPath</name> | ||
<vendor>JetBrains</vendor> | ||
<category>JavaScript Frameworks and Tools</category> | ||
<description><![CDATA[ | ||
<p>Provides JSONPath language for injected code fragments and dedicated Evaluate JSONPath tool window.</p> | ||
<p>Go to menu <b>Edit - Find - Evaluate JSONPath Expression...</b> to to evaluate expressions with a snippet or JSON file.</p> | ||
]]></description> | ||
|
||
<dependencies> | ||
<plugin id="com.intellij.modules.json"/> | ||
</dependencies> | ||
|
||
<resource-bundle>messages.JsonPathBundle</resource-bundle> | ||
|
||
<extensions defaultExtensionNs="com.intellij"> | ||
<lang.parserDefinition language="JSONPath" implementationClass="com.intellij.jsonpath.psi.JsonPathParserDefinition"/> | ||
<lang.braceMatcher language="JSONPath" implementationClass="com.intellij.jsonpath.JsonPathPairedBraceMatcher"/> | ||
<lang.quoteHandler language="JSONPath" implementationClass="com.intellij.jsonpath.JsonPathQuoteHandler"/> | ||
<lang.syntaxHighlighterFactory language="JSONPath" implementationClass="com.intellij.jsonpath.JsonPathSyntaxHighlighterFactory"/> | ||
<annotator language="JSONPath" implementationClass="com.intellij.jsonpath.JsonPathFunctionCallAnnotator"/> | ||
<colorSettingsPage implementation="com.intellij.jsonpath.JsonPathColorSettingsPage"/> | ||
<completion.contributor language="JSONPath" order="last" implementationClass="com.intellij.jsonpath.JsonPathCompletionContributor"/> | ||
<spellchecker.support language="JSONPath" implementationClass="com.intellij.jsonpath.JsonPathSpellcheckerStrategy"/> | ||
|
||
<localInspection language="JSONPath" shortName="JsonPathUnknownFunction" | ||
implementationClass="com.intellij.jsonpath.inspections.JsonPathUnknownFunctionInspection" | ||
bundle="messages.JsonBundle" key="inspection.jsonpath.unknown.function" | ||
groupBundle="messages.JsonBundle" groupKey="json.inspection.group" | ||
level="WARNING" enabledByDefault="true"/> | ||
<localInspection language="JSONPath" shortName="JsonPathUnknownOperator" | ||
implementationClass="com.intellij.jsonpath.inspections.JsonPathUnknownOperatorInspection" | ||
bundle="messages.JsonBundle" key="inspection.jsonpath.unknown.operator" | ||
groupBundle="messages.JsonBundle" groupKey="json.inspection.group" | ||
level="WARNING" enabledByDefault="true"/> | ||
<localInspection language="JSONPath" shortName="JsonPathEvaluateUnknownKey" | ||
implementationClass="com.intellij.jsonpath.inspections.JsonPathEvaluateUnknownKeyInspection" | ||
bundle="messages.JsonBundle" key="inspection.jsonpath.unknown.key" | ||
groupBundle="messages.JsonBundle" groupKey="json.inspection.group" | ||
level="WARNING" enabledByDefault="true"/> | ||
|
||
<toolWindowAllowlist id="JSONPathEvaluate"/> | ||
|
||
<intentionAction> | ||
<language>JSONPath</language> | ||
<className>com.intellij.jsonpath.ui.JsonPathEvaluateIntentionAction</className> | ||
<bundleName>messages.JsonBundle</bundleName> | ||
<categoryKey>json.intention.category.name</categoryKey> | ||
</intentionAction> | ||
</extensions> | ||
|
||
<actions> | ||
<action id="JsonPathEvaluateAction" class="com.intellij.jsonpath.ui.JsonPathEvaluateAction" icon="AllIcons.FileTypes.Json"> | ||
<add-to-group group-id="FindMenuGroup" anchor="after" relative-to-action="StructuralSearchActions"/> | ||
<add-to-group group-id="EditorPopupMenu" anchor="last"/> | ||
</action> | ||
|
||
<action id="JsonPathExportEvaluateResultAction" class="com.intellij.jsonpath.ui.JsonPathExportEvaluateResultAction" | ||
use-shortcut-of="ExportToTextFile" icon="AllIcons.Actions.MenuSaveall"> | ||
<add-to-group group-id="EditorContextBarMenu"/> | ||
</action> | ||
</actions> | ||
</idea-plugin> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 50 additions & 0 deletions
50
plugins/jsonpath/resources/messages/JsonPathBundle.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
settings.display.name.jsonpath=JSONPath | ||
|
||
jsonpath.color.page.keyword=Keyword | ||
jsonpath.color.page.identifier=Identifier | ||
jsonpath.color.page.string=String | ||
jsonpath.color.page.number=Number | ||
jsonpath.color.page.boolean=Boolean | ||
jsonpath.color.page.function=Function call | ||
jsonpath.color.page.context=Context variable | ||
jsonpath.color.page.brackets=Braces and Operators//Brackets | ||
jsonpath.color.page.braces=Braces and Operators//Braces | ||
jsonpath.color.page.colon=Braces and Operators//Colon | ||
jsonpath.color.page.comma=Braces and Operators//Comma | ||
jsonpath.color.page.dot=Braces and Operators//Dot | ||
jsonpath.color.page.operation.sign=Braces and Operators//Operation sign | ||
jsonpath.color.page.parentheses=Braces and Operators//Parentheses | ||
|
||
jsonpath.completion.key=key | ||
jsonpath.evaluate.no.result=Evaluate expression to see result | ||
jsonpath.toolwindow.evaluate.stripe=Evaluate JSONPath | ||
jsonpath.toolwindow.evaluate.on.snippet=Snippet | ||
jsonpath.toolwindow.evaluate.on.snippet.n=Snippet ({0}) | ||
jsonpath.toolwindow.evaluate.on.file=File {0} | ||
jsonpath.evaluate.intention=Evaluate JSONPath Expression | ||
jsonpath.evaluate.export.result=Export Result of JSONPath Evaluate | ||
jsonpath.evaluate.progress.export.result=Exporting JSONPath Evaluate Result | ||
|
||
jsonpath.evaluate.add.tab.text=New Tab | ||
jsonpath.evaluate.input=JSON input: | ||
jsonpath.evaluate.result=Result: | ||
|
||
jsonpath.evaluate.options=Options | ||
jsonpath.evaluate.output.option=Output: | ||
jsonpath.evaluate.output.values=Matching Values | ||
jsonpath.evaluate.output.paths=Path Expressions | ||
|
||
jsonpath.evaluate.suppress.exceptions=Suppress Exceptions During Evaluate | ||
jsonpath.evaluate.return.list=Always Return Result List | ||
jsonpath.evaluate.nullize.missing.leaf=Return Null for Missing Leaf | ||
jsonpath.evaluate.require.all.properties=Require All Properties | ||
jsonpath.evaluate.file.not.found=Input file not found | ||
|
||
inspection.message.jsonpath.unknown.function.name=Unknown function name ''{0}'' | ||
inspection.message.jsonpath.unknown.operator.name=Unknown operator ''{0}'' | ||
inspection.message.jsonpath.unknown.key=Property key ''{0}'' is not defined in the source JSON document | ||
inspection.message.jsonpath.unsupported.jayway.function=Function {0} is not supported in Jayway JSONPath implementation | ||
inspection.message.jsonpath.unsupported.jayway.operator=Operator {0} is not supported in Jayway JSONPath implementation | ||
|
||
action.JsonPathEvaluateAction.text=Evaluate JSONPath Expression... | ||
action.JsonPathExportEvaluateResultAction.text=Export Result |
26 changes: 26 additions & 0 deletions
26
plugins/jsonpath/src/com/intellij/jsonpath/JsonPathBundle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// 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. | ||
package com.intellij.jsonpath; | ||
|
||
import com.intellij.DynamicBundle; | ||
import org.jetbrains.annotations.Nls; | ||
import org.jetbrains.annotations.NonNls; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.PropertyKey; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public final class JsonPathBundle { | ||
public static final @NonNls String BUNDLE = "messages.JsonPathBundle"; | ||
private static final DynamicBundle INSTANCE = new DynamicBundle(JsonPathBundle.class, BUNDLE); | ||
|
||
private JsonPathBundle() { | ||
} | ||
|
||
public static @NotNull @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { | ||
return INSTANCE.getMessage(key, params); | ||
} | ||
|
||
public static @NotNull Supplier<@Nls String> messagePointer(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) { | ||
return INSTANCE.getLazyMessage(key, params); | ||
} | ||
} |
Oops, something went wrong.