//Setup the current project with arguments
 public void SetupProject(string args)
 {
     if (CurrentProject != null)
     {
         System.Console.WriteLine("Setting up project: " + CurrentProject);
         AddConsoleText("Setting up project: " + CurrentProject);
         string editor = SetupProjectMenu.ShowSetupProjectMenu();
         //string editor = Microsoft.VisualBasic.Interaction.InputBox("Enter either idea or eclipse", "What editor are you using?");
         if (!string.IsNullOrEmpty(editor))
         {
             if (editor.ToLower().Contains("eclipse"))
             {
                 System.Console.WriteLine("Setting editor to " + editor.ToLower());
                 AddConsoleText("Setting editor to " + editor.ToLower());
                 RunGradle("setupDecompWorkspace " + editor.ToLower() + args);
                 return;
             }
             else if (editor.ToLower().Contains("idea"))
             {
                 System.Console.WriteLine("Setting editor to idea");
                 AddConsoleText("Setting editor to idea");
                 RunGradle("setupDecompWorkspace " + "idea" + args);
                 RunGradle("genIntellijRuns");
                 return;
             }
             else
             {
                 MessageBox.Show("Please enter a valid editor. It must be either idea or eclipse", "Invalid Editor", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
     else
     {
         MessageBox.Show("Please open a project!", "No open project", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
示例#2
0
        public static string ShowSetupProjectMenu()
        {
            SetupProjectMenu menu = new SetupProjectMenu();

            return(menu.ShowDialog() == DialogResult.OK ? menu.Editor.Text : "");
        }