aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2019-12-10 21:32:56 +0100
committerLaria Carolin Chabowski <laria@laria.me>2019-12-10 21:32:56 +0100
commit16ee529be06429129c6aa43b0fb9b3e9af103a67 (patch)
tree00abb901c6afc0de48baad1258e5b94f4faa4872
parent47250273e2bb1980c213561307e5f0501975e852 (diff)
downloadidea_caseconv-16ee529be06429129c6aa43b0fb9b3e9af103a67.tar.gz
idea_caseconv-16ee529be06429129c6aa43b0fb9b3e9af103a67.tar.bz2
idea_caseconv-16ee529be06429129c6aa43b0fb9b3e9af103a67.zip
Add dot.case conversionv0.5.2
-rw-r--r--README.md1
-rw-r--r--build.gradle2
-rw-r--r--src/main/java/me/laria/code/idea_caseconv/DotCaseAction.java10
-rw-r--r--src/main/resources/META-INF/plugin.xml10
4 files changed, 19 insertions, 4 deletions
diff --git a/README.md b/README.md
index 926f648..e09319b 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ The plugin provides actions to convert to these cases:
- `lower case`
- `fLIP cASE`
- `Title Case`
+- `dot.case`
The Plugin was inspired by the [Case Conversion Plugin for SublimeText](https://packagecontrol.io/packages/Case%20Conversion).
diff --git a/build.gradle b/build.gradle
index f2cfa25..7785693 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,7 +4,7 @@ plugins {
}
group 'me.laria.code'
-version '0.5.1'
+version '0.5.2'
sourceCompatibility = 1.8
diff --git a/src/main/java/me/laria/code/idea_caseconv/DotCaseAction.java b/src/main/java/me/laria/code/idea_caseconv/DotCaseAction.java
new file mode 100644
index 0000000..e49c42b
--- /dev/null
+++ b/src/main/java/me/laria/code/idea_caseconv/DotCaseAction.java
@@ -0,0 +1,10 @@
+package me.laria.code.idea_caseconv;
+
+import java.util.Optional;
+
+public class DotCaseAction extends SelectionReplacerAction {
+ @Override
+ protected String replace(String s) {
+ return WordSplitConverter.convert(s, ".", (i, part) -> Optional.of(part.toLowerCase()));
+ }
+}
diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml
index 9ab02a7..9f60c29 100644
--- a/src/main/resources/META-INF/plugin.xml
+++ b/src/main/resources/META-INF/plugin.xml
@@ -1,7 +1,7 @@
<idea-plugin>
<id>me.laria.code.idea_caseconv</id>
<name>Case conversion</name>
- <version>0.5.1</version>
+ <version>0.5.2</version>
<vendor email="laria@laria.me" url="https://code.laria.me">Laria Chabowski</vendor>
<description><![CDATA[<html>
@@ -17,11 +17,11 @@
<li>lower case</li>
<li>fLIP cASE</li>
<li>Title Case</li>
+ <li>dot.case</li>
</ul>
</html>]]></description>
- <change-notes><![CDATA[]]>
- </change-notes>
+ <change-notes><![CDATA[<html><p><strong>Version 0.5.2</strong>: Add <code>Convert case: dot.case</code> action</p></html>]]></change-notes>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
<idea-version since-build="173.0"/>
@@ -76,6 +76,10 @@
text="Convert Case: Title Case">
<add-to-group group-id="EditMenu" anchor="first"/>
</action>
+ <action id="me.laria.code.idea_caseconv.DotCaseAction" class="me.laria.code.idea_caseconv.DotCaseAction"
+ text="Convert Case: dot.case">
+ <add-to-group group-id="EditMenu" anchor="first"/>
+ </action>
</actions>
</idea-plugin> \ No newline at end of file