From ae8c2106a2f37bc4c2406b7b35ee5822720dcf15 Mon Sep 17 00:00:00 2001 From: Adekola Akano Date: Tue, 3 Dec 2024 11:31:32 +0000 Subject: [PATCH] Clean up preparation for Java code generation --- .DS_Store | Bin 8196 -> 8196 bytes .../ClassCreator.kt | 3 --- .../CleanArchitectureTemplateName.kt | 7 ++----- .../CodeGeneratorClass.kt | 3 +-- .../CreateCleanArchitectureTemplate.kt | 2 +- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.DS_Store b/.DS_Store index 810ef7bc6b751e8a9fdaa3dd3b1f92138a11edd0..551f66ecc0c94106e72f6659a1c013ad7e9acc58 100644 GIT binary patch delta 347 zcmZp1XmQw}Di9~nB*DPIz`~%%kj{|FP?DSP;*yk;p9B=+(3{ME(Kqv$BdUA~UipFy z!{Frn+ybB;1_rHy$;|@mxfq>xJ_GXD8T2MAh)A%p2d|p2%5!pqpvdGrK^_EGp`OuA z0i=x;=$K4~6oyoW#GG^_;}}J}P-T%FYrTrs$2=G8SS0}1 ML=ooA>=J+30k^DM4*&oF delta 347 zcmZp1XmQw}Di9~zbBuw3frUYjA)O(Up(Hoo#U&{xKM5$t!Ln@G#0Jx2j;Qh}c;yQ+ z41<&Na|?ia7#I`+CN~SL=VCCCjsWu58T2MAh)A%#S2K{_WHPxyP-JqRAP<78P|skx z0i=x;=$K4~6oyoW#GG^_;~3l9FV6zW(c{ki!F=VDiZ?P#G$Rd)tS7-7pVJWuMbAPMqO(*XXmVq(v2+J@FI$W6iTX-RpwASQ#A|Z?g8xuvC KH?vFpWd{KHqFQGF diff --git a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/ClassCreator.kt b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/ClassCreator.kt index 8d6e0e5..0a14210 100644 --- a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/ClassCreator.kt +++ b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/ClassCreator.kt @@ -86,7 +86,4 @@ object ClassCreator { return newSubdirectory } - - - } diff --git a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CleanArchitectureTemplateName.kt b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CleanArchitectureTemplateName.kt index a0cd943..abbaac0 100644 --- a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CleanArchitectureTemplateName.kt +++ b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CleanArchitectureTemplateName.kt @@ -8,13 +8,10 @@ import com.intellij.psi.PsiDirectory import com.intellij.psi.PsiManager import com.intellij.util.ui.JBUI import java.awt.Dimension -import java.awt.FlowLayout import java.awt.GridBagConstraints import java.awt.GridBagLayout -import java.awt.Insets import javax.swing.Box import javax.swing.ButtonGroup -import javax.swing.JButton import javax.swing.JComponent import javax.swing.JLabel import javax.swing.JPanel @@ -30,8 +27,8 @@ class CleanArchitectureTemplateName( private lateinit var panel: JPanel private val featureNameTextField: JTextField = JTextField() - private val responseNameTextField: JTextField = JTextField() - private val bodyNameTextField: JTextField = JTextField() +// private val responseNameTextField: JTextField = JTextField() +// private val bodyNameTextField: JTextField = JTextField() private val javaRadioButton: JRadioButton = JRadioButton("Java") private val flutterRadioButton: JRadioButton = JRadioButton("Flutter") diff --git a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CodeGeneratorClass.kt b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CodeGeneratorClass.kt index 3592f64..74c12f4 100644 --- a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CodeGeneratorClass.kt +++ b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CodeGeneratorClass.kt @@ -14,8 +14,7 @@ object CodeGeneratorClass { val featureNameLowerCase = featureName!!.replaceFirstChar { it.lowercase() } val featureNameUpperCase = featureName.replaceFirstChar { it.uppercase() } - - return when (selectedLanguage) { + when (selectedLanguage) { LanguageSelection.JAVA -> { return """package ${packageName}.${featureNameLowerCase}.ui diff --git a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CreateCleanArchitectureTemplate.kt b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CreateCleanArchitectureTemplate.kt index c7e5a1e..ab3d041 100644 --- a/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CreateCleanArchitectureTemplate.kt +++ b/src/main/kotlin/com/github/dekola/androidcleanarchitecturetemplateplugin/CreateCleanArchitectureTemplate.kt @@ -16,7 +16,7 @@ class CreateCleanArchitectureTemplate : AnAction() { println("Selected directory: ${selectedFile.toNioPath()}") println("Selected directory: ${selectedFile.presentableUrl}") println("Selected directory: $selectedFile") - CleanArchitectureTemplateName(event, selectedFile).show() + .CleanArchitectureTemplateName(event, selectedFile).show() // Implement the logic you want to perform on the selected directory } else { // Handle cases where the selection is not a directory