66import com .xwintop .xJavaFxTool .event .AppEvents ;
77import com .xwintop .xJavaFxTool .event .PluginEvent ;
88import com .xwintop .xJavaFxTool .model .PluginJarInfo ;
9- import com .xwintop .xJavaFxTool .newui .creator .CreatePluginProjectService ;
10- import com .xwintop .xJavaFxTool .newui .creator .PluginProjectInfo ;
119import com .xwintop .xJavaFxTool .plugin .PluginManager ;
1210import com .xwintop .xJavaFxTool .plugin .PluginParser ;
1311import com .xwintop .xJavaFxTool .services .index .SystemSettingService ;
1412import com .xwintop .xcore .javafx .FxApp ;
15- import com .xwintop .xcore .javafx .dialog .FxAlerts ;
1613import com .xwintop .xcore .javafx .dialog .FxDialog ;
1714import javafx .beans .Observable ;
15+ import javafx .scene .control .CheckMenuItem ;
16+ import javafx .scene .control .ContextMenu ;
17+ import javafx .scene .control .TabPane ;
1818import javafx .scene .control .TextField ;
19- import javafx .scene .control .*;
2019import javafx .scene .layout .VBox ;
2120import javafx .scene .web .WebView ;
2221import lombok .extern .slf4j .Slf4j ;
2524
2625import java .awt .*;
2726import java .io .File ;
28- import java .io .IOException ;
2927import java .net .URI ;
3028import java .util .ArrayList ;
3129import java .util .HashMap ;
@@ -45,8 +43,6 @@ public class NewLauncherController {
4543
4644 public TextField txtSearch ;
4745
48- public Hyperlink lnkCreatePlugin ;
49-
5046 private ContextMenu itemContextMenu ;
5147
5248 // 实现搜索用
@@ -189,32 +185,4 @@ public void openProjectUrl() {
189185 log .error ("打开项目地址失败" , e );
190186 }
191187 }
192-
193- public void openPluginCreator () {
194-
195- FxDialog <PluginCreatorController > dialog = new FxDialog <PluginCreatorController >()
196- .setTitle ("创建自己的插件" )
197- .setBodyFxml ("/com/xwintop/xJavaFxTool/fxmlView/newui/plugin-creator.fxml" )
198- .setOwner (FxApp .primaryStage )
199- .setResizable (true )
200- .setButtonTypes (ButtonType .OK , ButtonType .CANCEL );
201-
202- PluginCreatorController controller = dialog .show ();
203-
204- dialog
205- .setButtonHandler (ButtonType .OK , (actionEvent , stage ) -> {
206- if (controller .isStartCreation ()) {
207- try {
208- PluginProjectInfo info = controller .getPluginProjectInfo ();
209- CreatePluginProjectService .getInstance ().createProject (info );
210- FxAlerts .info ("创建成功" , "项目 '" + info .getArtifactId () + "' 已经创建完毕。" );
211- Desktop .getDesktop ().open (new File (info .getLocation ()));
212- } catch (IOException e ) {
213- FxAlerts .error ("打开目标文件夹失败" , e );
214- }
215- }
216- stage .close ();
217- })
218- .setButtonHandler (ButtonType .CANCEL , (actionEvent , stage ) -> stage .close ());
219- }
220188}
0 commit comments