Skip to content

Commit

Permalink
add "open folder" action for instances
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed Mar 16, 2016
1 parent 2855035 commit af7f105
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions AEMManager/AemActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public static void AddOpenMenuItems(Menu.MenuItemCollection pParent, AemInstance
item.Click += new EventHandler(OpenFelixConsole);
menuItems.Add(item);

item = new MenuItem();
item.Text = "Open Folder";
item.Click += new EventHandler(OpenFolder);
menuItems.Add(item);

if (pInstance.AemInstanceType == AemInstanceType.AEM54) {
item = new MenuItem();
item.Text = "Open Servlet Engine Admin";
Expand Down Expand Up @@ -119,6 +124,20 @@ private static void OpenFelixConsole(object sender, EventArgs e) {
OpenUrl(instance.UrlWithContextPath + "/system/console", instance);
}

private static void OpenFolder(object sender, EventArgs e) {
AemInstance instance = Program.GetActionInstance(sender);
if (instance == null) {
return;
}

string folder = instance.PathWithoutFilename;
if (!Directory.Exists(folder)) {
return;
}
mLog.Info("Open Folder: " + folder);
System.Diagnostics.Process.Start(folder);
}

private static void OpenServletEngineAdmin(object sender, EventArgs e) {
AemInstance instance = Program.GetActionInstance(sender);
if (instance == null) {
Expand Down

0 comments on commit af7f105

Please sign in to comment.