Exemplo n.º 1
0
        protected override void Run(object dataItem)
        {
            var p = Ide.IdeApp.Workbench.GetPad <MonoDevelop.Ide.Gui.Pads.ProjectPad.ProjectSolutionPad>();

            if (p == null && !(p.Content is ProjectSolutionPad))
            {
                return;
            }

            var psp          = (ProjectSolutionPad)p.Content;
            var selectedItem = psp.TreeView.GetSelectedNode();

            if (selectedItem == null)
            {
                return;
            }

            if (selectedItem.DataItem is DProject)
            {
                var prj = (DProject)selectedItem.DataItem;
                var cfg = prj.GetConfiguration(Ide.IdeApp.Workspace.ActiveConfiguration) as DProjectConfiguration;

                if (cfg != null)
                {
                    var file = "";
                    MakefileGeneration.GenerateMakefile(prj, cfg, ref file);

                    MessageService.ShowMessage("Makefile generated", "See " + file);
                }
                else
                {
                    MessageService.ShowError("Makefile could not be generated!");
                }
            }
        }
Exemplo n.º 2
0
        protected override void Run(object dataItem)
        {
            var prj = GetSelectedProject() as DProject;

            if (prj != null)
            {
                var cfg = prj.GetConfiguration(Ide.IdeApp.Workspace.ActiveConfiguration) as DProjectConfiguration;

                if (cfg != null)
                {
                    var file = "";
                    MakefileGeneration.GenerateMakefile(prj, cfg, ref file);

                    MessageService.ShowMessage("Makefile generated", "See " + file);
                }
                else
                {
                    MessageService.ShowError("Makefile could not be generated!");
                }
            }
        }