From 2157a5c77c163c9c70a5d01cfdbea23f4235f9f2 Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 24 Jul 2015 11:56:47 -0700 Subject: [PATCH] [Creator] Add menu options to open the test data folders. --- .../launcher/creator/controller/PackManagerController.java | 7 ++++++- .../skcraft/launcher/creator/dialog/PackManagerFrame.java | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/creator-tools/src/main/java/com/skcraft/launcher/creator/controller/PackManagerController.java b/creator-tools/src/main/java/com/skcraft/launcher/creator/controller/PackManagerController.java index 16a81b4..c05d4c0 100644 --- a/creator-tools/src/main/java/com/skcraft/launcher/creator/controller/PackManagerController.java +++ b/creator-tools/src/main/java/com/skcraft/launcher/creator/controller/PackManagerController.java @@ -67,6 +67,7 @@ public class PackManagerController { @Getter private final File workspaceFile; @Getter private final File dataDir; @Getter private final File distDir; + @Getter private final File launcherDir; @Getter private File webRoot; @Getter private Workspace workspace; @Getter private final Launcher launcher; @@ -85,7 +86,7 @@ public class PackManagerController { workspaceFile = Workspace.getWorkspaceFile(workspaceDir); this.distDir = new File(workspaceDir, "_upload"); - File launcherDir = new File(dataDir, "staging/launcher"); + launcherDir = new File(dataDir, "staging/launcher"); File launcherConfigDir = new File(creator.getDataDir(), "launcher"); this.webRoot = new File(dataDir, "staging/www"); @@ -563,6 +564,10 @@ public class PackManagerController { frame.getOpenOutputFolderMenuItem().addActionListener(e -> SwingHelper.browseDir(distDir, frame)); + frame.getOpenLauncherFolderMenuItem().addActionListener(e1 -> SwingHelper.browseDir(launcherDir, frame)); + + frame.getOpenWebRootMenuItem().addActionListener(e1 -> SwingHelper.browseDir(webRoot, frame)); + frame.getOpenConsoleMenuItem().addActionListener(e -> { ConsoleFrame.showMessages(); }); diff --git a/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java b/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java index 6082c1c..59742f6 100644 --- a/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java +++ b/creator-tools/src/main/java/com/skcraft/launcher/creator/dialog/PackManagerFrame.java @@ -47,6 +47,8 @@ public class PackManagerFrame extends JFrame { @Getter private final JMenuItem deployServerMenuItem = new JMenuItem("Deploy Server..."); @Getter private final JMenuItem generatePackagesMenuItem = new JMenuItem("Generate packages.json..."); @Getter private final JMenuItem openOutputFolderMenuItem = new JMenuItem("Open Upload Folder"); + @Getter private final JMenuItem openLauncherFolderMenuItem = new JMenuItem("Open Test Launcher Folder"); + @Getter private final JMenuItem openWebRootMenuItem = new JMenuItem("Open Test Web Server Folder"); @Getter private final JMenuItem openConsoleMenuItem = new JMenuItem("Open Console"); @Getter private final JMenuItem docsMenuItem = new JMenuItem("Documentation"); @Getter private final JMenuItem aboutMenuItem = new JMenuItem("About"); @@ -165,6 +167,9 @@ public class PackManagerFrame extends JFrame { menu = new JMenu("Tools"); menu.setMnemonic('t'); menuBar.add(menu); + menu.add(openLauncherFolderMenuItem); + menu.add(openWebRootMenuItem); + menu.addSeparator(); menu.add(openConsoleMenuItem); menu = new JMenu("Help");