Skip to content

Commit

Permalink
adjust structure
Browse files Browse the repository at this point in the history
  • Loading branch information
xdd666t committed Jun 18, 2023
1 parent 46bdcc8 commit a408d3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package action

import com.google.common.base.CaseFormat
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
Expand All @@ -8,13 +10,11 @@ import com.intellij.openapi.ui.Messages
import helper.DataService
import helper.GetXName
import helper.TemplateInfo
import view.GetXListener
import view.GetXTemplateView
import java.io.*
import java.util.*


class NewGetX : AnAction() {
class NewGetXAction : AnAction() {
private var project: Project? = null
private lateinit var psiPath: String
private var data = DataService.instance
Expand All @@ -33,12 +33,12 @@ class NewGetX : AnAction() {
}

private fun initView() {
GetXTemplateView(object : GetXListener {
NewGetXView(object : GetXListener {
override fun onSave(): Boolean {
return save()
}

override fun onDataChange(view: GetXTemplateView) {
override fun onDataChange(view: NewGetXView) {
//module name
moduleName = view.nameTextField.text

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package view
package action

import com.intellij.ui.JBColor
import com.intellij.ui.components.JBTabbedPane
Expand All @@ -13,7 +13,7 @@ import java.awt.event.KeyListener
import javax.swing.*


open class GetXTemplateView(private val getXListener: GetXListener) {
open class NewGetXView(private val getXListener: GetXListener) {
private val data = DataService.instance

/**
Expand Down Expand Up @@ -339,5 +339,5 @@ open class GetXTemplateView(private val getXListener: GetXListener) {
interface GetXListener {
fun onSave(): Boolean

fun onDataChange(view: GetXTemplateView)
fun onDataChange(view: NewGetXView)
}
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<!-- Write plugin actions -->
<actions>
<!-- Add your actions here -->
<action id="com.tao.NewGetX" class="NewGetX" text="GetX" description="Create getX template code"
<action id="com.xdd.NewGetX" class="action.NewGetXAction" text="GetX" description="Create getX template code"
icon="/image/getx_icon.png">
<add-to-group group-id="NewGroup" anchor="first"/>
</action>
Expand Down

0 comments on commit a408d3d

Please sign in to comment.