summaryrefslogtreecommitdiff
path: root/plugins/xpath/xpath-view/src/META-INF/plugin.xml
blob: 65a942a56ba36409fcad2b86f896890ceeed55e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<?xml version="1.0" encoding="ISO-8859-1" ?>

<idea-plugin version="2">

  <!-- Plugin name -->
  <id>XPathView</id>
  <name>XPathView + XSLT Support</name>

  <!-- Description -->
  <description><![CDATA[
    The XPath part of the plugin provides a possibility to evaluate XPath expressions against any XML document
    opened in IDEA. It can also generate and show an XPath expression that matches the current node.
    <p>
    The XSLT part adds syntax highlighting, analysis, completion, navigation and refactoring of XPath
    expressions and named templates for XSLT documents.</p>
  ]]>
  </description>

  <!-- Plugin version -->
  <version>4</version>

  <!-- Plugin's vendor -->
  <vendor email="sascha.weinreuter@cit.de">Sascha Weinreuter</vendor>

  <change-notes>
    <![CDATA[
      * Basic XPath 2.0 / XSLT 2.0 Support<br>
  ]]>
  </change-notes>

  <depends>com.intellij.modules.xml</depends>
  
  <!-- wasn't sure if the plugin manager correctly handles dependent plugins -->
  <!--<depends>XPathLanguage</depends>-->

  <extensionPoints>
    <!-- XPath Language -->
    <extensionPoint name="xpath.contextProviderExtension" interface="org.intellij.lang.xpath.context.ContextProviderExtension"/>
    <extensionPoint name="xpath.functionProvider" interface="org.intellij.lang.xpath.context.functions.XPathFunctionProvider"/>

    <!-- XSLT Support -->
    <extensionPoint name="xsltRunnerExtension" interface="org.intellij.lang.xpath.xslt.run.XsltRunnerExtension"/>
  </extensionPoints>

  <extensions defaultExtensionNs="com.intellij">
    <errorHandler implementation="com.intellij.diagnostic.ITNReporter" />

    <colorSettingsPage implementation="org.intellij.lang.xpath.XPathColorSettingsPage" />

    <configurationType implementation="org.intellij.lang.xpath.xslt.run.XsltRunConfigType" />
    <programRunner implementation="org.intellij.lang.xpath.xslt.run.XsltRunner"/>
    <configurationProducer implementation="org.intellij.lang.xpath.xslt.run.XsltConfigurationProducer" />

    <applicationService
        serviceInterface="org.intellij.plugins.xpathView.support.XPathSupport"
        serviceImplementation="org.intellij.plugins.xpathView.support.jaxen.XPathSupportImpl" />

    <applicationService
        serviceInterface="org.intellij.lang.xpath.xslt.psi.XsltElementFactory"
        serviceImplementation="org.intellij.lang.xpath.xslt.psi.impl.XsltElementFactoryImpl" />

    <projectConfigurable instance="org.intellij.lang.xpath.xslt.associations.impl.FileAssociationsConfigurable" id="xslt.associations" displayName="XSLT File Associations" nonDefaultProject="true" />

    <projectService
        serviceInterface="org.intellij.lang.xpath.xslt.associations.impl.FileAssociationsConfigurable$UIState"
        serviceImplementation="org.intellij.lang.xpath.xslt.associations.impl.FileAssociationsConfigurable$UIState" />

    <projectService
      serviceInterface="org.intellij.plugins.xpathView.XPathProjectComponent"
      serviceImplementation="org.intellij.plugins.xpathView.XPathProjectComponent"/>

    <annotator language="XPath" implementationClass="org.intellij.lang.xpath.validation.XPathAnnotator" />
    <lang.parserDefinition language="XPath" implementationClass="org.intellij.lang.xpath.XPathParserDefinition" />
    <lang.braceMatcher language="XPath" implementationClass="org.intellij.lang.xpath.XPathLanguage$XPathPairedBraceMatcher" />
    <lang.findUsagesProvider language="XPath" implementationClass="org.intellij.lang.xpath.XPathLanguage$XPathFindUsagesProvider" />
    <lang.namesValidator language="XPath" implementationClass="org.intellij.lang.xpath.XPathLanguage$XPathNamesValidator" />
    <lang.syntaxHighlighterFactory key="XPath" implementationClass="org.intellij.lang.xpath.XPathLanguage$XPathSyntaxHighlighterFactory" />

    <lang.parserDefinition language="XPath2" implementationClass="org.intellij.lang.xpath.XPath2ParserDefinition" />
    <lang.syntaxHighlighterFactory key="XPath2" implementationClass="org.intellij.lang.xpath.XPath2Language$XPathSyntaxHighlighterFactory" />
    <lang.commenter language="XPath2" implementationClass="org.intellij.lang.xpath.XPath2Language$XPath2Commenter" />

    <codeInsight.parameterInfo language="XPath" implementationClass="org.intellij.lang.xpath.XPathParameterInfoHandler" />
    <fileTypeFactory implementation="org.intellij.lang.xpath.XPathSupportLoader" />

    <localInspection language="XPath" shortName="CheckNodeTest" displayName="Check Node Test" groupName="XPath" enabledByDefault="true" level="WARNING"
                     implementationClass="org.intellij.lang.xpath.validation.inspections.CheckNodeTest"/>
    <localInspection language="XPath" shortName="ImplicitTypeConversion" displayName="Implicit Type Conversion" groupName="XPath" enabledByDefault="true"
                     level="WARNING" implementationClass="org.intellij.lang.xpath.validation.inspections.ImplicitTypeConversion"/>
    <localInspection language="XPath" shortName="RedundantTypeConversion" displayName="Redundant Type Conversion" groupName="XPath" enabledByDefault="true"
                     level="WARNING" implementationClass="org.intellij.lang.xpath.validation.inspections.RedundantTypeConversion"/>
    <localInspection language="XPath" shortName="IndexZeroUsage" displayName="Use of index 0 in XPath predicates" groupName="XPath" enabledByDefault="true"
                     level="WARNING" implementationClass="org.intellij.lang.xpath.validation.inspections.IndexZeroPredicate"/>
    <localInspection language="XPath" shortName="HardwiredNamespacePrefix" displayName="Hardwired Namespace Prefix" groupName="XPath" enabledByDefault="true"
                     level="WARNING" implementationClass="org.intellij.lang.xpath.validation.inspections.HardwiredNamespacePrefix"/>

    <quoteHandler fileType="XPath" className="org.intellij.lang.xpath.XPathQuoteHandler" />
    <quoteHandler fileType="XPath2" className="org.intellij.lang.xpath.XPathQuoteHandler" />
    <completion.contributor language="XPath" implementationClass="org.intellij.lang.xpath.completion.XPathCompletionContributor" />
    <completion.contributor language="XPath2" implementationClass="org.intellij.lang.xpath.completion.XPathCompletionContributor" />
    <typedHandler implementation="org.intellij.lang.xpath.XPathTypedHandler"/>
    <lookup.charFilter implementation="org.intellij.lang.xpath.completion.XPathCharFilter" />

    <fileBasedIndex implementation="org.intellij.lang.xpath.xslt.impl.XsltSymbolIndex" />
    <include.provider implementation="org.intellij.lang.xpath.xslt.impl.XsltIncludeProvider"/>
    
    <usageGroupingRuleProvider implementation="org.intellij.lang.xpath.xslt.impl.XsltStuffProvider" />
    <lang.refactoringSupport language="XPath" implementationClass="org.intellij.lang.xpath.xslt.refactoring.XPathRefactoringSupportProvider" />
    <lang.refactoringSupport language="XML" implementationClass="org.intellij.lang.xpath.xslt.refactoring.XsltRefactoringSupportProvider" />
    <inlineActionHandler implementation="org.intellij.lang.xpath.xslt.refactoring.VariableInlineHandler" />

    <extendWordSelectionHandler implementation="org.intellij.lang.xpath.XPathStringLiteralSelectioner"/>

    <localInspection shortName="XsltUnusedDeclaration" displayName="Unused Variable/Parameter" groupName="XSLT" enabledByDefault="true"
                     level="WARNING" implementationClass="org.intellij.lang.xpath.xslt.validation.inspections.UnusedElementInspection"/>
    <localInspection shortName="XsltTemplateInvocation" displayName="Template Invocation Problems" groupName="XSLT" enabledByDefault="true"
                     level="ERROR" implementationClass="org.intellij.lang.xpath.xslt.validation.inspections.TemplateInvocationInspection"/>
    <localInspection shortName="XsltDeclarations" displayName="Declaration Problems" groupName="XSLT" enabledByDefault="true" level="ERROR"
                     implementationClass="org.intellij.lang.xpath.xslt.validation.inspections.XsltDeclarationInspection"/>
    <localInspection shortName="XsltVariableShadowing" displayName="Variable Shadowing" groupName="XSLT" enabledByDefault="true"
                     level="WARNING" implementationClass="org.intellij.lang.xpath.xslt.validation.inspections.VariableShadowingInspection"/>

    <intentionAction>
      <className>org.intellij.lang.xpath.xslt.intentions.AddOptionalArgumentsIntention</className>
      <category>XSLT</category>
    </intentionAction>
    <intentionAction>
      <className>org.intellij.lang.xpath.xslt.intentions.ConvertIfToChooseIntention</className>
      <category>XSLT</category>
    </intentionAction>
    <intentionAction>
      <className>org.intellij.lang.xpath.xslt.intentions.ReplaceWithXslAttribute</className>
      <category>XSLT</category>
    </intentionAction>
    <intentionAction>
      <className>org.intellij.lang.xpath.xslt.intentions.InlineXslAttribute</className>
      <category>XSLT</category>
    </intentionAction>

    <applicationConfigurable instance="org.intellij.plugins.xpathView.XPathConfigurable" id="xpath.settings" displayName="XPath Viewer" />
    <applicationConfigurable instance="org.intellij.lang.xpath.xslt.impl.XsltConfigImpl$UIImpl" id="settings.xslt"
                             displayName="XSLT"/>

    <fileIconPatcher implementation="org.intellij.lang.xpath.xslt.impl.XsltIconProvider"/>
    <gotoSymbolContributor implementation="org.intellij.lang.xpath.xslt.impl.XsltChooseByNameContributor"/>
    <annotator language="XPath" implementationClass="org.intellij.lang.xpath.xslt.validation.XsltAnnotator"/>
    <annotator language="XML" implementationClass="org.intellij.lang.xpath.xslt.validation.XsltXmlAnnotator"/>

    <lang.documentationProvider language="XML" implementationClass="org.intellij.lang.xpath.xslt.impl.XsltDocumentationProvider"/>
    <lang.documentationProvider language="XPath" implementationClass="org.intellij.lang.xpath.xslt.impl.XsltDocumentationProvider"/>

    <!--
    <daemon.changeLocalityDetector implementation="org.intellij.lang.xpath.xslt.impl.XsltChangeLocalityDetector" />
    -->
    <multiHostInjector implementation="org.intellij.lang.xpath.xslt.impl.XPathLanguageInjector"/>

    <treeStructureProvider implementation="org.intellij.lang.xpath.xslt.impl.XsltTreeStructureProvider"/>

    <psi.referenceContributor language="XML" implementation="org.intellij.lang.xpath.xslt.impl.XsltReferenceContributor$XML"/>
    <psi.referenceContributor language="XPath" implementation="org.intellij.lang.xpath.xslt.impl.XsltReferenceContributor$XPath"/>
    <standardResourceProvider implementation="org.intellij.lang.xpath.xslt.impl.XsltResourceProvider"/>
    <defaultLiveTemplatesProvider implementation="org.intellij.plugins.xpathView.XPathAppComponent" />

    <implicitUsageProvider implementation="org.intellij.lang.xpath.xslt.impl.XsltImplicitUsagesProvider" />

    <renameInputValidator implementation="org.intellij.lang.xpath.xslt.impl.XsltRenameInputValidator"/>
  </extensions>

  <extensions defaultExtensionNs="XPathView">
    <xpath.functionProvider implementation="org.intellij.plugins.xpathView.support.jaxen.extensions.XPathFunctionProviderImpl" />

    <xpath.contextProviderExtension implementation="org.intellij.lang.xpath.xslt.context.Xslt1ContextProviderExtension" />
    <xpath.contextProviderExtension implementation="org.intellij.lang.xpath.xslt.context.Xslt2ContextProviderExtension" />

  </extensions>

  <!-- Plugin's application components -->
  <application-components>
    <!-- XPathView components -->
    <component>
      <implementation-class>org.intellij.plugins.xpathView.XPathAppComponent</implementation-class>
    </component>

    <!-- XSLT-Support components -->
    <component>
      <interface-class>org.intellij.lang.xpath.xslt.XsltConfig</interface-class>
      <implementation-class>org.intellij.lang.xpath.xslt.impl.XsltConfigImpl</implementation-class>
    </component>
  </application-components>

  <!-- Plugin's project components -->
  <project-components>
    <!-- XSLT integration -->
    <component>
      <interface-class>org.intellij.lang.xpath.xslt.associations.FileAssociationsManager</interface-class>
      <implementation-class>org.intellij.lang.xpath.xslt.associations.impl.FileAssociationsManagerImpl</implementation-class>
    </component>
  </project-components>

  <!-- Component's actions -->
  <actions>
    <action id="XPathView.Actions.Evaluate" class="org.intellij.plugins.xpathView.XPathEvalAction"
            text="Evaluate XPath..."
            description="Evaluate an XPath expression and highlight the result in the XML-Document">
      <keyboard-shortcut first-keystroke="control alt X" second-keystroke="E" keymap="$default" />
    </action>
    <action id="XPathView.Actions.ShowPath" class="org.intellij.plugins.xpathView.ShowXPathAction"
            text="Show unique XPath" description="Show XPath expression that matches the current node">
      <keyboard-shortcut first-keystroke="control alt X" second-keystroke="P" keymap="$default" />
    </action>

    <action id="XPathView.Actions.FindByExpression" class="org.intellij.plugins.xpathView.search.FindByXPathAction"
            text="Find by XPath..." description="Find Files by XPath Expression">
      <keyboard-shortcut first-keystroke="control alt X" second-keystroke="F" keymap="$default" />
    </action>

    <!-- Toolbar -->
    <!--<reference id="XPathView.Actions.Evaluate">-->
      <!--<add-to-group group-id="MainToolBar" anchor="before" relative-to-action="HelpTopics" />-->
    <!--</reference>-->

    <group id="XPathView.MainMenu.Search">
      <separator />
      <reference id="XPathView.Actions.Evaluate" />
      <reference id="XPathView.Actions.FindByExpression" />

      <add-to-group group-id="FindMenuGroup" anchor="after" relative-to-action="StructuralSearchActions" />
    </group>

    <reference id="XPathView.Actions.ShowPath">
      <add-to-group group-id="CodeEditorViewGroup" anchor="after" relative-to-action="ShowErrorDescription" />
    </reference>

    <!-- Editor Popup -->
    <group id="XPathView.EditorPopup" text="XPath Actions">
      <separator />
      <reference id="XPathView.Actions.Evaluate" />
      <reference id="XPathView.Actions.ShowPath" />

      <add-to-group group-id="EditorPopupMenu" anchor="after" relative-to-action="RefactoringMenu" />
    </group>

    <group id="XPathView.XSLT.Associations" popup="true"
           class="org.intellij.lang.xpath.xslt.associations.impl.AssociationsGroup" text="File Associations" >
      <add-to-group group-id="XPathView.EditorPopup" anchor="last"
                    relative-to-action="XPathView.Actions.ShowPathDescription" />
      <add-to-group group-id="ProjectViewPopupMenu" anchor="after" relative-to-action="AddAntBuildFile" />
    </group>
  </actions>
</idea-plugin>