Files
spring-tools/eclipse-language-servers/org.springframework.tooling.boot.ls/plugin.xml

438 lines
17 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.lsp4e.languageServer">
<server
class="org.springframework.tooling.boot.ls.DelegatingStreamConnectionProvider"
clientImpl="org.springframework.tooling.ls.eclipse.commons.STS4LanguageClientImpl"
id="org.eclipse.languageserver.languages.springboot"
label="Spring Boot Language Server"
lastDocumentDisconnectedTimeout="10">
</server>
<contentTypeMapping
contentType="org.eclipse.jdt.core.javaSource"
id="org.eclipse.languageserver.languages.springboot">
</contentTypeMapping>
<contentTypeMapping
contentType="org.springframework.boot.ide.properties.application.properties"
id="org.eclipse.languageserver.languages.springboot"
languageId="spring-boot-properties">
</contentTypeMapping>
<contentTypeMapping
contentType="org.springframework.boot.ide.properties.application.yml"
id="org.eclipse.languageserver.languages.springboot"
languageId="spring-boot-properties-yaml">
</contentTypeMapping>
<contentTypeMapping
contentType="org.springframework.boot.ide.xmlconfig"
id="org.eclipse.languageserver.languages.springboot">
</contentTypeMapping>
</extension>
<extension
point="org.eclipse.core.contenttype.contentTypes">
<!--
WARNING!
TLDR; Always put
base-type="org.eclipse.core.runtime.text"
in *every* content type definiton.
Longer explanation:
Do not use
base-type="org.eclipse.jdt.core.javaProperties"
this causes reconciling of *any* properties file
as if it was a boot properties file.
Similarly
base-type="org.eclipse.core.runtime.xml"
causes reconciling of *any* XML file
as if it was a Spring xml config file.
Also to avoid some suspected bug/weirdness in Lsp4e
which I do not really understand, a base-type must allways
be added. Therefore the only possible choice
that makes everything work is
"org.eclipse.core.runtime.text".
See: https://github.com/spring-projects/sts4/issues/320
-->
<content-type
base-type="org.eclipse.core.runtime.text"
default-charset="ISO-8859-1"
file-names="application.properties,application-dev.properties"
file-patterns="application-*.properties"
id="org.springframework.boot.ide.properties.application.properties"
name="Spring Properties File"
priority="high">
</content-type>
<content-type
base-type="org.eclipse.core.runtime.text"
default-charset="UTF-8"
file-names="application.yml,bootstrap.yml,application-dev.yml,application.yaml,bootstrap.yaml,application-dev.yaml"
file-patterns="application-*.yml,application-*.yaml"
id="org.springframework.boot.ide.properties.application.yml"
name="Spring Yaml Properties File"
priority="high">
</content-type>
<content-type
base-type="org.eclipse.core.runtime.xml"
default-charset="UTF-8"
id="org.springframework.boot.ide.xmlconfig"
name="Spring XML Config File"
priority="normal">
<describer class="org.springframework.tooling.boot.ls.xml.XMLRootElementContentDescriber2">
<parameter name="element" value="beans"/>
</describer>
</content-type>
<file-association
content-type="org.springframework.boot.ide.properties.application.properties"
file-names="application.properties,application-dev.properties"
file-patterns="application-*.properties">
</file-association>
<file-association
content-type="org.springframework.boot.ide.properties.application.yml"
file-names="application.yml,bootstrap.yml,application-dev.yml,application.yaml,bootstrap.yaml,application-dev.yaml"
file-patterns="application-*.yml,application-*.yaml">
</file-association>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
category="org.springframework.tooling.boot.ls.preferences"
class="org.springframework.tooling.boot.ls.prefs.RemoteAppsPrefsPage"
id="org.springframework.tooling.boot.ls.prefs.RemoteAppsPrefsPage"
name="Remote Boot Apps">
</page>
<page
category="org.springframework.tooling.boot.ls.preferences"
class="org.springframework.tooling.boot.ls.XmlConfigPreferencePage"
id="org.springframework.tooling.boot.xml.ls.preferences"
name="Spring XML Config">
</page>
<page
category="org.springframework.tooling.ls.eclipse.commons.console.preferences"
class="org.springframework.tooling.boot.ls.BootJavaPreferencesPage"
id="org.springframework.tooling.boot.ls.preferences"
name="Spring Boot Language Server">
</page>
<page
category="org.springframework.tooling.boot.ls.preferences"
class="org.springframework.tooling.boot.ls.RewritePreferencePage"
id="org.springframework.tooling.boot.ls.rewrite"
name="Rewrite">
</page>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
<initializer
class="org.springframework.tooling.boot.ls.PrefsInitializer">
</initializer>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="org.springframework.tooling.boot.ls.commands.ToggleComment"
commandId="org.springframework.tooling.boot.ls.ToggleComment">
<activeWhen>
<with variable="activeEditorId">
<or>
<equals value="SpringBootPropertyEditor"/>
<equals value="SpringBootYMLPropertyEditor"/>
</or>
</with>
</activeWhen>
</handler>
<handler
class="org.springframework.tooling.boot.ls.commands.RewriteRefactoringsHandler"
commandId="org.springframework.tooling.boot.ls.Rewrite">
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<!-- !!! category for command is required or keybindings don't work !!! -->
<category
description="Spring Language Server Commands"
id="org.springframework.ide.eclipse.commands"
name="Spring Generic Text Editor">
</category>
<command
id="org.springframework.tooling.boot.ls.ToggleComment"
categoryId="org.springframework.ide.eclipse.commands"
name="Toggle Comment">
</command>
<command
categoryId="org.springframework.ide.eclipse.commands"
description="Rewrite Refactorings for Spring Boot projects"
id="org.springframework.tooling.boot.ls.Rewrite"
name="Rewrite Refactorings...">
</command>
</extension>
<extension
point="org.eclipse.ui.bindings">
<!-- win32: M1=CTRL, M2=SHIFT, M3=ALT, M4=-
carbon: M1=COMMAND, M2=SHIFT, M3=ALT, M4=CTRL -->
<key
sequence="M1+M2+C"
contextId="org.eclipse.ui.textEditorScope"
commandId="org.springframework.tooling.boot.ls.ToggleComment"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<key
sequence="M1+/"
contextId="org.eclipse.ui.textEditorScope"
commandId="org.springframework.tooling.boot.ls.ToggleComment"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
</extension>
<!-- Note: locationURI below adds this to 'edit' menu. Not a great place. Decided instead to just
disable this. If we want to show this in a menu somewhere we should decide where and figure out how/if we
can make it apear there. -->
<!-- <extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:edit?after=selectAll">
<command
commandId="org.springframework.tooling.boot.ls.ToggleComment"
label="Toggle Comment Spring"
style="push">
<visibleWhen
checkEnabled="false">
<with
variable="activePartId">
<equals
value="SpringBootPropertyEditor">
</equals>
</with>
</visibleWhen>
</command>
</menuContribution>
</extension> -->
<extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
icon="icons/spring_obj.gif"
id="SpringBootPropertyEditor"
name="Generic Editor - Spring Properties"
symbolicFontName="org.eclipse.jdt.ui.PropertiesFileEditor.textfont">
<contentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.properties"
/>
</editor>
</extension>
<extension
point="org.eclipse.ui.editors">
<editor
class="org.springframework.tooling.ls.eclipse.commons.YamlGenericEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
icon="icons/spring_yml.png"
id="SpringBootYMLPropertyEditor"
name="Generic Editor - Spring YAML Properties"
symbolicFontName="org.eclipse.jdt.ui.PropertiesFileEditor.textfont">
<contentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.yml"
/>
</editor>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.eclipse.tm4e.ui.text.TMPresentationReconciler"
contentType="org.springframework.boot.ide.properties.application.properties">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.ui.genericeditor.presentationReconcilers">
<presentationReconciler
class="org.eclipse.tm4e.ui.text.TMPresentationReconciler"
contentType="org.springframework.boot.ide.properties.application.yml">
</presentationReconciler>
</extension>
<extension
point="org.eclipse.tm4e.registry.grammars">
<grammar
scopeName="source.yaml"
path="./syntaxes/YAML.tmLanguage" >
</grammar>
<scopeNameContentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.yml"
scopeName="source.yaml">
</scopeNameContentTypeBinding>
</extension>
<extension
point="org.eclipse.tm4e.registry.grammars">
<grammar
scopeName="source.java-properties"
path="./syntaxes/JavaProperties.tmLanguage" >
</grammar>
<scopeNameContentTypeBinding
contentTypeId="org.springframework.boot.ide.properties.application.properties"
scopeName="source.java-properties">
</scopeNameContentTypeBinding>
</extension>
<extension
id="springxml-completion-computer"
point="org.eclipse.wst.sse.ui.completionProposal">
<proposalCategory
id="org.springframework.boot.ide.xmlconfig.contentassist"
name="Spring XML Content Assist">
</proposalCategory>
<proposalComputer
activate="true"
categoryId="org.springframework.boot.ide.xmlconfig.contentassist"
class="org.springframework.tooling.boot.ls.xml.XMLContentAssistProposalComputer"
id="org.springframework.boot.ide.xmlconfig.contentassist.proposalcomputer">
<contentType id="org.springframework.boot.ide.xmlconfig"/>
</proposalComputer>
</extension>
<!-- what is this for? Commented it out but everything seems to work
<extension
point="org.eclipse.core.filebuffers.documentSetup">
<participant
class="org.eclipse.lsp4e.ConnectDocumentToLanguageServerSetupParticipant"
contentTypeId="org.springframework.boot.ide.properties.application.properties">
</participant>
</extension>
<extension
point="org.eclipse.core.filebuffers.documentSetup">
<participant
class="org.eclipse.lsp4e.ConnectDocumentToLanguageServerSetupParticipant"
contentTypeId="org.springframework.boot.ide.properties.application.yml">
</participant>
</extension>
<extension
point="org.eclipse.core.filebuffers.documentSetup">
<participant
class="org.eclipse.lsp4e.ConnectDocumentToLanguageServerSetupParticipant"
contentTypeId="org.springframework.boot.ide.xmlconfig">
</participant>
</extension>
-->
<extension
point="org.eclipse.ui.quickAccess">
<computer
class="org.springframework.tooling.boot.ls.commands.LiveProcessCommandsQuickAccessProvider"
name="Spring - Live Process Information"
requiresUIAccess="false"/>
<computer
class="org.springframework.tooling.boot.ls.commands.RewriteCommandsQuickAccessProvider"
name="Spring - Rewrite Recipes">
</computer>
</extension>
<extension
point="org.springsource.ide.eclipse.commons.boot.ls.remoteapps.RemoteBootAppsDataHolder.Contributor">
<injection
class="org.springframework.tooling.boot.ls.prefs.RemoteAppsFromPrefsDataContributor">
</injection>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="popup:org.springframework.ide.eclipse.ui.tools?after=boot">
<command
commandId="org.springframework.tooling.boot.ls.Rewrite"
id="org.springframework.tooling.boot.ls.Rewrite"
label="Rewrite Refactorings..."
style="push">
<visibleWhen
checkEnabled="false">
<and>
<count
value="1">
</count>
<iterate>
<or>
<adapt
type="org.eclipse.core.resources.IResource">
<and>
<test
forcePluginActivation="true"
property="org.springsource.ide.eclipse.boot.isBootResource">
</test>
<or>
<test
property="org.eclipse.core.resources.name"
value="pom.xml">
</test>
<adapt
type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.core.resources.projectNature"
value="org.eclipse.m2e.core.maven2Nature">
</test>
</adapt>
</or>
</and>
</adapt>
<and>
<instanceof
value="org.eclipse.jdt.core.IJavaProject">
</instanceof>
<test
property="org.springsource.ide.eclipse.commons.java.projectNature"
value="org.eclipse.m2e.core.maven2Nature">
</test>
<test
forcePluginActivation="true"
property="org.springsource.ide.eclipse.boot.javaelement.isBootProject">
</test>
</and>
</or>
</iterate>
<systemTest
property="sts.rewrite.recipes"
value="true">
</systemTest>
</and>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!--
<extension
point="org.eclipse.wildwebdeveloper.xml.lemminxExtension">
<jar
path="jars/commons-lsp-extensions.jar">
</jar>
<jar
path="jars/xml-ls-extension.jar">
</jar>
</extension>
-->
</plugin>