Skip to content

Commit

Permalink
#780 | Introduced ysri live template for Spring @Resource declara…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
mlytvyn authored Nov 1, 2023
1 parent ba3aa04 commit df7ac4a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [2023.2.11]

### `Kotlin` enhancements
- Introduced `ysri` live template for Spring `@Resource` declaration [#780](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/780)

## [2023.2.10]

### `Project Import` enhancements
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ intellij.jvm.args=-ea -Xms512m -Xmx3G -XX:MaxMetaspaceSize=400m
intellij.update.since.until.build=true

intellij.plugin.name=SAP-Commerce-Developers-Toolset
intellij.plugin.version=2023.2.10
intellij.plugin.version=2023.2.11
intellij.plugin.since.build=232.9921.47
intellij.plugin.until.build=232.*

Expand Down
12 changes: 6 additions & 6 deletions resources/i18n/HybrisBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ hybris.toolwindow.solr.login=Solr admin name
hybris.toolwindow.solr.pswd=Solr admin password
hybris.toolwindow.solr.port=Solr port
hybris.toolwindow.solr.webroot.label=Solr webroot
hybris.toolwindow.remote.label=Remote Hybris Instance
hybris.toolwindow.diplay.name.label=Connection name
hybris.toolwindow.remote.label=Remote SAP Commerce Instance
hybris.toolwindow.display.name.label=Connection name
hybris.toolwindow.ip.label=Running instance IP address
hybris.toolwindow.port.label=Running instance port
hybris.toolwindow.preview.label=full URL preview
hybris.toolwindow.hac.webroot.label=HAC webroot
hybris.toolwindow.hac.login.label=HAC login name
hybris.toolwindow.hac.login.label=HAC username
hybris.toolwindow.hac.password.label=HAC password
hybris.toolwindow.hac.test.connection.button=Test connection
hybris.toolwindow.hac.test.connection.fail=Connection failed at {0}. Reason {1}
Expand Down Expand Up @@ -146,11 +146,11 @@ hybris.import.wizard.dbdriver.directory.override.tooltip=If you keep DB drivers
hybris.import.wizard.dbdriver.directory.override.filechooser=Overriding DB driver Directory
hybris.import.wizard.dbdriver.directory.override.label=DB driver Directory Override
hybris.import.wizard.dbdriver.directory.override.separator.label=The DB driver directory that contains DB driver jar files (used to execute Integration test from IDE)
hybris.import.wizard.hybris.distribution.directory.and.custom.directory.separator.label=If your custom directory is in bin/ext-* directory or is outside of the project root directory you can override it below
hybris.import.wizard.hybris.distribution.directory.and.custom.directory.separator.label=If your custom directory is in bin/ext-* directory or is outside the project root directory you can override it below
hybris.import.wizard.hybris.distribution.directory.label=SAP Commerce installation directory
hybris.import.wizard.hybris.distribution.directory.tooltip=It's the root directory where your SAP Commerce is located. By default the name of the directory is "hybris".
hybris.import.wizard.hybris.distribution.directory.tooltip=It's the root directory where your SAP Commerce is located. By default, the name of the directory is "hybris".
hybris.import.wizard.custom.extensions.directory.label=Custom Extensions Directory
hybris.import.wizard.custom.extensions.directory.tooltip=It's the directory where you keep all you custom directories. By default it is "bin/custom". This directory can contain subdirectories.
hybris.import.wizard.custom.extensions.directory.tooltip=It's the directory where you keep all you custom directories. By default, it is "bin/custom". This directory can contain subdirectories.
hybris.import.wizard.validation.hybris.distribution.directory.empty="SAP Commerce Installation Directory" parameter can not be empty.
hybris.import.wizard.validation.hybris.distribution.directory.does.not.exist=SAP Commerce installation directory does not exist or is not a directory.
hybris.import.wizard.validation.custom.extensions.directory.empty="Custom Extensions Directory" parameter can not be empty.
Expand Down
10 changes: 10 additions & 0 deletions resources/liveTemplates/Kotlin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,14 @@
<option name="KOTLIN_CLASS" value="true"/>
</context>
</template>
<template name="ysri"
value="@javax.annotation.Resource(name = &quot;$alias$&quot;) private lateinit var $var$: $type$"
description="Inject a Spring dependency annotated via @Resource annotation" toReformat="true" toShortenFQNames="true">
<variable name="type" expression="complete()" default="Any" alwaysStopAt="true"/>
<variable name="var" expression="decapitalize(type)" default="" alwaysStopAt="true"/>
<variable name="alias" expression="decapitalize(type)" default="" alwaysStopAt="true"/>
<context>
<option name="KOTLIN_CLASS" value="true"/>
</context>
</template>
</templateSet>
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<grid row="1" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="1" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="i18n/HybrisBundle" key="hybris.toolwindow.diplay.name.label"/>
<text resource-bundle="i18n/HybrisBundle" key="hybris.toolwindow.display.name.label"/>
</properties>
</component>
<component id="6c8d4" class="com.intellij.ui.components.OnOffButton" binding="sslButton">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="1" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="i18n/HybrisBundle" key="hybris.toolwindow.diplay.name.label"/>
<text resource-bundle="i18n/HybrisBundle" key="hybris.toolwindow.display.name.label"/>
</properties>
</component>
<component id="1276" class="javax.swing.JLabel" binding="sslLabel">
Expand Down

0 comments on commit df7ac4a

Please sign in to comment.