diff --git a/src/main/java/com/sjhy/plugin/ui/SelectSavePath.form b/src/main/java/com/sjhy/plugin/ui/SelectSavePath.form index b8a87f2..cd3c4fd 100644 --- a/src/main/java/com/sjhy/plugin/ui/SelectSavePath.form +++ b/src/main/java/com/sjhy/plugin/ui/SelectSavePath.form @@ -8,7 +8,7 @@ - + @@ -18,13 +18,13 @@ - + - + @@ -33,7 +33,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -66,16 +66,15 @@ - + - - + - + @@ -83,44 +82,20 @@ - + - - - - - - - - - + - - - - - - - - - - - - - - - - - + @@ -129,35 +104,36 @@ - + - - - - - - - - - - + - + - + - + + + + + + + + + + + diff --git a/src/main/java/com/sjhy/plugin/ui/SelectSavePath.java b/src/main/java/com/sjhy/plugin/ui/SelectSavePath.java index 916f261..5679744 100644 --- a/src/main/java/com/sjhy/plugin/ui/SelectSavePath.java +++ b/src/main/java/com/sjhy/plugin/ui/SelectSavePath.java @@ -14,22 +14,23 @@ import com.sjhy.plugin.dict.GlobalDict; import com.sjhy.plugin.dto.SettingsStorageDTO; import com.sjhy.plugin.entity.TableInfo; import com.sjhy.plugin.entity.Template; -import com.sjhy.plugin.entity.TemplateGroup; import com.sjhy.plugin.service.CodeGenerateService; import com.sjhy.plugin.service.SettingsStorageService; import com.sjhy.plugin.service.TableInfoService; -import com.sjhy.plugin.tool.*; +import com.sjhy.plugin.tool.CacheDataUtils; +import com.sjhy.plugin.tool.ModuleUtils; +import com.sjhy.plugin.tool.ProjectUtils; +import com.sjhy.plugin.tool.StringUtils; +import com.sjhy.plugin.ui.component.TemplateSelectComponent; import org.jetbrains.annotations.Nullable; import javax.swing.*; import java.awt.*; -import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -69,10 +70,6 @@ public class SelectSavePath extends DialogWrapper { * 路径选择按钮 */ private JButton pathChooseButton; - /** - * 模板全选框 - */ - private JCheckBox allCheckBox; /** * 模板面板 */ @@ -85,22 +82,10 @@ public class SelectSavePath extends DialogWrapper { * 禁止提示复选框 */ private JCheckBox titleConfig; - /** - * 分组选择框 - */ - private JComboBox groupComboBox; - /** - * 所有模板复选框 - */ - private List checkBoxList = new ArrayList<>(); /** * 数据缓存工具类 */ private CacheDataUtils cacheDataUtils = CacheDataUtils.getInstance(); - /** - * 模板组对象 - */ - private TemplateGroup templateGroup; /** * 表信息服务 */ @@ -123,6 +108,11 @@ public class SelectSavePath extends DialogWrapper { */ private boolean entityMode; + /** + * 模板选择组件 + */ + private TemplateSelectComponent templateSelectComponent; + /** * 构造方法 */ @@ -146,7 +136,6 @@ public class SelectSavePath extends DialogWrapper { this.project = project; this.tableInfoService = TableInfoService.getInstance(project); this.codeGenerateService = CodeGenerateService.getInstance(project); - this.templateGroup = CurrGroupUtils.getCurrTemplateGroup(); // 初始化module,存在资源路径的排前面 this.moduleList = new LinkedList<>(); for (Module module : ModuleManager.getInstance(project).getModules()) { @@ -157,48 +146,32 @@ public class SelectSavePath extends DialogWrapper { this.moduleList.add(module); } } - initPanel(); + this.initPanel(); + this.refreshData(); + this.initEvent(); init(); setTitle(GlobalDict.TITLE_INFO); } + private void initEvent() { + + } + + private void refreshData() { + + } + @Override protected void doOKAction() { onOK(); super.doOKAction(); } - /** - * 获取已经选中的模板 - * - * @return 模板对象集合 - */ - private List