예제 #1
0
        Widget CreateContent(bool disassemblyNotSupported)
        {
            var fileName = GetFilename(DebuggingService.CurrentFrame?.SourceLocation?.FileName);
            var box      = new VBox();

            box.Margin  = 30;
            box.Spacing = 10;
            if (!string.IsNullOrEmpty(fileName))
            {
                ContentName = GettextCatalog.GetString("Source Not Found");
                var headerLabel = new Label();
                headerLabel.Markup = GettextCatalog.GetString("{0} file not found", $"<b>{fileName}</b>");
                box.PackStart(headerLabel);
                var actionsBox          = new HBox();
                var buttonBrowseAndFind = new Button(GettextCatalog.GetString("Browse and find {0}", fileName));
                buttonBrowseAndFind.Clicked += OpenFindSourceFileDialog;
                actionsBox.PackStart(buttonBrowseAndFind);
                box.PackStart(actionsBox);
                if (IdeApp.ProjectOperations.CurrentSelectedSolution != null)
                {
                    var manageLookupsLabel = new Label();
                    manageLookupsLabel.Markup       = GettextCatalog.GetString("Manage the locations used to find source files in the {0}", "<a href=\"clicked\">" + GettextCatalog.GetString("Solution Options") + "</a>");
                    manageLookupsLabel.LinkClicked += (sender, e) => {
                        if (IdeApp.ProjectOperations.CurrentSelectedSolution == null)
                        {
                            return;
                        }
                        IdeApp.ProjectOperations.ShowOptions(IdeApp.ProjectOperations.CurrentSelectedSolution, "DebugSourceFiles");
                    };
                    box.PackStart(manageLookupsLabel);
                }
                headerLabel.Font = headerLabel.Font.WithScaledSize(2);
            }
            else
            {
                ContentName = GettextCatalog.GetString("Source Not Available");
                var headerLabel = new Label(GettextCatalog.GetString("Source Not Available"));
                box.PackStart(headerLabel);
                var label = new Label(GettextCatalog.GetString("Source information is missing from the debug information for this module"));
                box.PackStart(label);
                headerLabel.Font = label.Font.WithScaledSize(2);
            }
            if (!disassemblyNotSupported)
            {
                var labelDisassembly = new Label();
                labelDisassembly.Markup       = GettextCatalog.GetString("View disassembly in the {0}", "<a href=\"clicked\">" + GettextCatalog.GetString("Disassembly Tab") + "</a>");
                labelDisassembly.LinkClicked += (sender, e) => {
                    DebuggingService.ShowDisassembly();
                    this.WorkbenchWindow.CloseWindow(false);
                };
                box.PackStart(labelDisassembly);
            }
            return(box);
        }
예제 #2
0
 protected override void Run()
 {
     DebuggingService.ShowDisassembly();
 }
예제 #3
0
		void OnGoToDisassemblyClicked (object sender, EventArgs e)
		{
			DebuggingService.ShowDisassembly ();
			Document.Close (false).Ignore ();
		}