diff options
Diffstat (limited to 'main/src/core/MonoDevelop.Ide')
20 files changed, 350 insertions, 176 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs index 9f8bd48c01..35c99558f2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelper.cs @@ -126,8 +126,10 @@ namespace MonoDevelop.Components.AtkCocoaHelper AXCell, AXColumn, AXGroup, + AXGrowArea, AXImage, AXLink, + AXList, AXMenuButton, AXPopUpButton, AXRadioButton, @@ -533,6 +535,7 @@ namespace MonoDevelop.Components.AtkCocoaHelper string Identifier { get; set; } string Help { get; set; } bool Hidden { get; set; } + int Index { get; set; } // For Navigable Static Text Func<string> Contents { set; } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs index dc0ddd15ec..6dedc4b8d9 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperMac.cs @@ -855,6 +855,26 @@ namespace MonoDevelop.Components.AtkCocoaHelper p.GetVisibleCharacterRange = value; } } + + public int Index { + get { + var p = realProxyElement; + if (p == null) { + throw new Exception ("Not proxy element"); + } + + return (int) p.AccessibilityIndex; + } + + set { + var p = realProxyElement; + if (p == null) { + throw new Exception ("Not a proxy element"); + } + + p.AccessibilityIndex = value; + } + } } class RealAccessibilityElementProxy : NSAccessibilityElement, INSAccessibility diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperNoOp.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperNoOp.cs index c73624c21d..6843a55a72 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperNoOp.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AtkCocoaHelper/AtkCocoaHelperNoOp.cs @@ -219,6 +219,14 @@ namespace MonoDevelop.Components.AtkCocoaHelper } } + public int Index { + get { + return 0; + } + set { + } + } + public Gtk.Widget GtkParent { get; set; } public Gdk.Rectangle FrameInGtkParent { get; set; } public Gdk.Rectangle FrameInParent { get; set; } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs index 25e57dc339..4a4aa06711 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs @@ -27,6 +27,7 @@ using System; #if MAC using AppKit; +using CoreGraphics; using Foundation; using MonoDevelop.Ide; #endif @@ -64,7 +65,6 @@ namespace MonoDevelop.Components } - static CoreGraphics.CGPoint lastOpenPositon; public static void ShowContextMenu (Gtk.Widget parent, int x, int y, NSMenu menu, bool selectFirstItem = false) { if (parent == null) @@ -96,11 +96,9 @@ namespace MonoDevelop.Components if (selectFirstItem) { var pt = new CoreGraphics.CGPoint (x, y); - lastOpenPositon = pt; menu.PopUpMenu (menu.ItemAt (0), pt, nsview); } else { var pt = new CoreGraphics.CGPoint (x, nswindow.Frame.Height - y - titleBarOffset); - lastOpenPositon = pt; var tmp_event = NSEvent.MouseEvent (NSEventType.LeftMouseDown, pt, 0, 0, @@ -123,10 +121,11 @@ namespace MonoDevelop.Components ShowContextMenu (parent, x, y, menu); } - static NSMenuItem CreateMenuItem (ContextMenuItem item) + static void AddMenuItem (NSLocationAwareMenu menu, ContextMenuItem item) { if (item.IsSeparator) { - return NSMenuItem.SeparatorItem; + menu.AddItem (NSMenuItem.SeparatorItem); + return; } var menuItem = new NSMenuItem (item.Label.Replace ("_",""), (s, e) => item.Click ()); @@ -144,60 +143,20 @@ namespace MonoDevelop.Components } if (item.SubMenu != null && item.SubMenu.Items.Count > 0) { - menuItem.Submenu = FromMenu (item.SubMenu, null); + var subMenu = FromMenu (item.SubMenu, null); + subMenu.Parent = menu; + menuItem.Submenu = subMenu; } - return menuItem; + menu.AddItem (menuItem); } - class ContextMenuDelegate : NSObject + static NSLocationAwareMenu FromMenu (ContextMenu menu, Action closeHandler) { - ContextMenu menu; - ContextMenuItem oldItem; - public ContextMenuDelegate (ContextMenu menu) - { - this.menu = menu; - } - - public Action CloseHandler { get; set; } - - [Export ("menuDidClose:")] - void MenuDidClose (NSMenu menu) - { - if (menu.Supermenu != null) - return; - if (CloseHandler != null) { - CloseHandler (); - } - this.menu.FireClosedEvent (); - } - - [Export ("menu:willHighlightItem:")] - void MenuWillHighlightItem (NSMenu menu, NSMenuItem willHighlightItem) - { - if (oldItem != null) { - oldItem.FireDeselectedEvent (); - oldItem = null; - } - if (willHighlightItem == null) - return; - int index = (int)menu.IndexOf (willHighlightItem); - if (index < 0) - return; - oldItem = this.menu.Items [index]; - - oldItem.FireSelectedEvent (new Xwt.Rectangle (lastOpenPositon.X, lastOpenPositon.Y, menu.Size.Width, menu.Size.Height)); - } - } - - static NSMenu FromMenu (ContextMenu menu, Action closeHandler) - { - var result = new NSMenu () { AutoEnablesItems = false }; - result.WeakDelegate = new ContextMenuDelegate (menu) { CloseHandler = closeHandler }; + var result = new NSLocationAwareMenu (menu, closeHandler) { AutoEnablesItems = false }; foreach (var menuItem in menu.Items) { - var item = CreateMenuItem (menuItem); - result.AddItem (item); + AddMenuItem (result, menuItem); } return result; @@ -209,6 +168,77 @@ namespace MonoDevelop.Components { return (NSImage)macToolkit.GetNativeImage (image); } + + class NSLocationAwareMenu : NSMenu + { + public CGPoint Location { get; private set; } + public NSLocationAwareMenu Parent { get; set; } + + public NSLocationAwareMenu (ContextMenu menu, Action closeHandler) + { + WeakDelegate = new ContextMenuDelegate (menu) { CloseHandler = closeHandler }; + } + + public override bool PopUpMenu (NSMenuItem item, CGPoint location, NSView view) + { + Location = location; + var parentMenu = item?.ParentItem?.Menu as NSLocationAwareMenu; + if (parentMenu != null) { + Location = new CGPoint ( + Location.X + parentMenu.Location.X, + Location.Y + parentMenu.Location.Y); + } + return base.PopUpMenu (item, location, view); + } + + class ContextMenuDelegate : NSObject + { + ContextMenu menu; + ContextMenuItem oldItem; + public ContextMenuDelegate (ContextMenu menu) + { + this.menu = menu; + } + + public Action CloseHandler { get; set; } + + [Export ("menuDidClose:")] + void MenuDidClose (NSMenu menu) + { + if (menu.Supermenu != null) + return; + if (CloseHandler != null) { + CloseHandler (); + } + this.menu.FireClosedEvent (); + } + + [Export ("menu:willHighlightItem:")] + void MenuWillHighlightItem (NSMenu menu, NSMenuItem willHighlightItem) + { + if (oldItem != null) { + oldItem.FireDeselectedEvent (); + oldItem = null; + } + if (willHighlightItem == null) + return; + int index = (int)menu.IndexOf (willHighlightItem); + if (index < 0) + return; + oldItem = this.menu.Items [index]; + nfloat x = 0, y = 0; + var locationAwareMenu = menu as NSLocationAwareMenu; + if (locationAwareMenu != null) { + while (locationAwareMenu.Parent != null) + locationAwareMenu = locationAwareMenu.Parent; + x = locationAwareMenu.Location.X; + y = locationAwareMenu.Location.Y; + menu = locationAwareMenu; + } + oldItem.FireSelectedEvent (new Xwt.Rectangle (x, y, menu.Size.Width, menu.Size.Height)); + } + } + } } #endif }
\ No newline at end of file diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/MiniButton.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/MiniButton.cs index 29a8b3ca9c..91df3fbd5e 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/MiniButton.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/MiniButton.cs @@ -27,6 +27,7 @@ using System; using Gtk; +using MonoDevelop.Components.AtkCocoaHelper; namespace MonoDevelop.Components { class MiniButton: Gtk.EventBox @@ -41,6 +42,10 @@ namespace MonoDevelop.Components { Events |= Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask; Clickable = true; + + Accessible.Role = Atk.Role.PushButton; + var actionHandler = new ActionDelegate (this); + actionHandler.PerformPress += PerformPress; } public MiniButton (Gtk.Widget label): this () @@ -102,7 +107,12 @@ namespace MonoDevelop.Components if (Clicked != null) Clicked (this, EventArgs.Empty); } - + + void PerformPress (object sender, EventArgs args) + { + OnClicked (); + } + protected override bool OnButtonPressEvent (Gdk.EventButton evnt) { if (!ClickOnRelease && Clickable && evnt.Button == 1 && !evnt.TriggersContextMenu ()) { diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs index 868f98a924..58e65dba0a 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs @@ -78,6 +78,7 @@ namespace MonoDevelop.Components get { if (accessible == null) { accessible = AccessibilityElementProxy.ButtonElementProxy (); + accessible.SetRole (AtkCocoa.Roles.AXPopUpButton); accessible.Identifier = "Breadcrumb"; accessible.PerformPress += OnPerformShowMenu; @@ -183,6 +184,8 @@ namespace MonoDevelop.Components Accessible.Name = "PathBar"; Accessible.SetLabel (GettextCatalog.GetString ("Breadcrumb Bar")); Accessible.Description = GettextCatalog.GetString ("Jump to definitions in the current file"); + Accessible.SetRole (AtkCocoa.Roles.AXList); + Accessible.SetOrientation (Orientation.Horizontal); CanFocus = true; @@ -302,6 +305,7 @@ namespace MonoDevelop.Components Gdk.Rectangle rect = new Gdk.Rectangle (x, y, width, height); entry.Accessible.FrameInGtkParent = rect; + entry.Accessible.FrameInParent = rect; } protected override bool OnExposeEvent (EventExpose evnt) diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs index 678374de8e..ab2b4d2d2b 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Tabstrip.cs @@ -128,6 +128,7 @@ namespace MonoDevelop.Components var proxies = new AtkCocoaHelper.AccessibilityElementProxy [tabs.Count]; foreach (var tab in tabs) { proxies [i] = tab.Accessible; + tab.Accessible.Index = i; i++; } @@ -204,7 +205,7 @@ namespace MonoDevelop.Components { requisition.Height = (int)Math.Ceiling (tabSizes.Max (p => p.Y)); } - + protected override bool OnExposeEvent (Gdk.EventExpose evnt) { using (var cr = Gdk.CairoHelper.Create (evnt.Window)) { @@ -367,7 +368,6 @@ namespace MonoDevelop.Components Gdk.Rectangle gdkRect = new Gdk.Rectangle ((int)allocation.X, (int)allocation.Y, (int)allocation.Width, (int)allocation.Height); Accessible.FrameInGtkParent = gdkRect; // If Y != 0, then we need to flip the y axis - Accessible.FrameInParent = gdkRect; } } @@ -406,8 +406,10 @@ namespace MonoDevelop.Components this.TabPosition = tabPosition; Accessible = AccessibilityElementProxy.ButtonElementProxy (); + Accessible.SetRole (AtkCocoa.Roles.AXRadioButton, "tab"); Accessible.Title = label; Accessible.GtkParent = parent; + Accessible.Identifier = "Tabstrip.Tab"; Accessible.PerformPress += OnTabPressed; } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json index d78fa1c2e6..cf06ce46e1 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json @@ -71,10 +71,10 @@ { "name": "Debugger Current Line Marker", "color": "#69684c", "bordercolor": "#69684c" }, { "name": "Debugger Stack Line Marker", "color": "#5c6b4d", "bordercolor": "#5c6b4d" }, - { "name": "Primary Link", "color": "foreground", "secondcolor": "#7f4a81" }, - { "name": "Primary Link(Highlighted)", "color": "foreground", "secondcolor": "#b167b3" }, - { "name": "Secondary Link", "color": "foreground", "secondcolor": "#262228" }, - { "name": "Secondary Link(Highlighted)", "color": "foreground", "secondcolor": "#4e4552" }, + { "name": "Primary Link", "color": "#7f4a81", "secondcolor": "#7f4a81" }, + { "name": "Primary Link(Highlighted)", "color": "#b167b3", "secondcolor": "#b167b3" }, + { "name": "Secondary Link", "color": "#262228", "secondcolor": "#262228" }, + { "name": "Secondary Link(Highlighted)", "color": "#4e4552", "secondcolor": "#4e4552" }, { "name": "Message Bubble Error Marker", "color": "#b28d37" }, { "name": "Message Bubble Error Tag", "color": "#e3a6a1", "secondcolor": "black" }, diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json index f750cb5951..f37696bc33 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json @@ -79,10 +79,10 @@ { "name": "Debugger Current Line Marker", "color": "#69684c", "bordercolor": "#69684c" }, { "name": "Debugger Stack Line Marker", "color": "#618336", "bordercolor": "#618336" }, - { "name": "Primary Link", "color": "monokai-white", "secondcolor": "#7f4a81" }, - { "name": "Primary Link(Highlighted)", "color": "monokai-white", "secondcolor": "#b167b3" }, - { "name": "Secondary Link", "color": "monokai-white", "secondcolor": "#262228" }, - { "name": "Secondary Link(Highlighted)", "color": "monokai-white", "secondcolor": "#4e4552" }, + { "name": "Primary Link", "color": "#4f4a81", "secondcolor": "#4f4a81" }, + { "name": "Primary Link(Highlighted)", "color": "#4147b3", "secondcolor": "#4147b3" }, + { "name": "Secondary Link", "color": "#262228", "secondcolor": "#262228" }, + { "name": "Secondary Link(Highlighted)", "color": "#4e4552", "secondcolor": "#4e4552" }, { "name": "Message Bubble Error Marker", "color": "#b28d37" }, { "name": "Message Bubble Error Tag", "color": "#e3a6a1", "secondcolor": "black" }, diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json index 383b3f67b6..21fdf806e2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json @@ -91,10 +91,10 @@ { "name": "Debugger Current Line Marker", "color": "#69684c", "bordercolor": "#69684c" }, { "name": "Debugger Stack Line Marker", "color": "#4a6429", "bordercolor": "#4a6429" }, - { "name": "Primary Link", "color": "chocolate1", "secondcolor": "chocolate3" }, - { "name": "Primary Link(Highlighted)", "color": "chocolate1", "secondcolor": "chocolate2" }, - { "name": "Secondary Link", "color": "white", "secondcolor": "aluminium6" }, - { "name": "Secondary Link(Highlighted)", "color": "aluminium1", "secondcolor": "aluminium5" }, + { "name": "Primary Link", "color": "chocolate3", "secondcolor": "chocolate3" }, + { "name": "Primary Link(Highlighted)", "color": "chocolate2", "secondcolor": "chocolate2" }, + { "name": "Secondary Link", "color": "aluminium6", "secondcolor": "aluminium6" }, + { "name": "Secondary Link(Highlighted)", "color": "aluminium5", "secondcolor": "aluminium5" }, { "name": "Message Bubble Error Marker", "color": "#b28d37" }, { "name": "Message Bubble Error Tag", "color": "#e3a6a1", "secondcolor": "black" }, diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json index 68223e0c50..3af8b35d14 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json @@ -83,10 +83,10 @@ { "name": "Debugger Current Line Marker", "color": "#69684c", "bordercolor": "#69684c" }, { "name": "Debugger Stack Line Marker", "color": "#5f7247", "bordercolor": "#5f7247" }, - { "name": "Primary Link", "color": "chocolate1", "secondcolor": "chocolate3" }, - { "name": "Primary Link(Highlighted)", "color": "chocolate1", "secondcolor": "chocolate2" }, - { "name": "Secondary Link", "color": "white", "secondcolor": "aluminium6" }, - { "name": "Secondary Link(Highlighted)", "color": "aluminium1", "secondcolor": "aluminium5" }, + { "name": "Primary Link", "color": "chocolate3", "secondcolor": "chocolate3" }, + { "name": "Primary Link(Highlighted)", "color": "chocolate2", "secondcolor": "chocolate2" }, + { "name": "Secondary Link", "color": "aluminium6", "secondcolor": "aluminium6" }, + { "name": "Secondary Link(Highlighted)", "color": "aluminium5", "secondcolor": "aluminium5" }, { "name": "Message Bubble Error Marker", "color": "#b28d37" }, { "name": "Message Bubble Error Tag", "color": "#e3a6a1", "secondcolor": "black" }, diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json index ca411840d2..cc513b6a86 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json @@ -77,6 +77,11 @@ { "name": "Debugger Current Line Marker", "color": "#69684c", "bordercolor": "#69684c" }, { "name": "Debugger Stack Line Marker", "color": "#54653f", "bordercolor": "#54653f" }, + { "name": "Primary Link", "color": "base2", "secondcolor": "base2" }, + { "name": "Primary Link(Highlighted)", "color": "base2", "secondcolor": "base2" }, + { "name": "Secondary Link", "color": "base02", "secondcolor": "base02" }, + { "name": "Secondary Link(Highlighted)", "color": "base02", "secondcolor": "base02" }, + { "name": "Message Bubble Error Marker", "color": "#b28d37" }, { "name": "Message Bubble Error Tag", "color": "#e3a6a1", "secondcolor": "black" }, { "name": "Message Bubble Error Counter", "color": "black", "secondcolor": "#e3a6a1" }, diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json index 293e2d814e..926f48db6c 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json @@ -68,6 +68,11 @@ { "name": "Debugger Stack Line Marker", "color": "#c9e1a9", "bordercolor": "#c9e1a9" }, + { "name": "Primary Link", "color": "base02", "secondcolor": "base02" }, + { "name": "Primary Link(Highlighted)", "color": "base02", "secondcolor": "base02" }, + { "name": "Secondary Link", "color": "base2", "secondcolor": "base2" }, + { "name": "Secondary Link(Highlighted)", "color": "base2", "secondcolor": "base2" }, + { "name": "Message Bubble Error Marker", "color": "#b28d37" }, { "name": "Message Bubble Error Tag", "color": "#e3a6a1", "secondcolor": "black" }, { "name": "Message Bubble Error Counter", "color": "black", "secondcolor": "#e3a6a1" }, diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopStatusBar.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopStatusBar.cs index 669aa6dcdb..4f211b52ec 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopStatusBar.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/MonoDevelopStatusBar.cs @@ -35,6 +35,7 @@ using System.Collections.Generic; using MonoDevelop.Components.Docking; using MonoDevelop.Ide.Gui.Dialogs; using MonoDevelop.Components; +using MonoDevelop.Components.AtkCocoaHelper; using MonoDevelop.Components.MainToolbar; namespace MonoDevelop.Ide @@ -52,13 +53,19 @@ namespace MonoDevelop.Ide Spacing = 0; HasResizeGrip = true; + Accessible.Role = Atk.Role.Filler; + HeaderBox hb = new HeaderBox (1, 0, 0, 0); + hb.Accessible.Role = Atk.Role.Filler; hb.StyleSet += (o, args) => { hb.BorderColor = Styles.DockSeparatorColor.ToGdkColor (); hb.BackgroundColor = Styles.DockBarBackground.ToGdkColor (); }; var mainBox = new HBox (); - mainBox.PackStart (new Label (""), true, true, 0); + mainBox.Accessible.Role = Atk.Role.Filler; + var alignment = new Alignment (0f, 0f, 0f, 0f); + alignment.Accessible.Role = Atk.Role.Filler; + mainBox.PackStart (alignment, true, true, 0); hb.Add (mainBox); hb.ShowAll (); PackStart (hb, true, true, 0); @@ -67,15 +74,26 @@ namespace MonoDevelop.Ide if (FeedbackService.Enabled) { CustomFrame fr = new CustomFrame (0, 0, 1, 0); + fr.Accessible.Role = Atk.Role.Filler; var px = Xwt.Drawing.Image.FromResource ("feedback-16.png"); HBox b = new HBox (false, 3); - b.PackStart (new Xwt.ImageView (px).ToGtkWidget ()); - b.PackStart (new Gtk.Label ("Feedback")); + b.Accessible.Role = Atk.Role.Filler; + + var im = new Xwt.ImageView (px).ToGtkWidget (); + im.Accessible.Role = Atk.Role.Filler; + b.PackStart (im); + var label = new Gtk.Label (GettextCatalog.GetString ("Feedback")); + label.Accessible.Role = Atk.Role.Filler; + b.PackStart (label); Gtk.Alignment al = new Gtk.Alignment (0f, 0f, 1f, 1f); + al.Accessible.Role = Atk.Role.Filler; al.RightPadding = 5; al.LeftPadding = 3; al.Add (b); feedbackButton = new MiniButton (al); + feedbackButton.Accessible.SetLabel (GettextCatalog.GetString ("Feedback")); + feedbackButton.Accessible.Description = GettextCatalog.GetString ("Click to send feedback to the development team"); + //feedbackButton.BackroundColor = new Gdk.Color (200, 200, 255); fr.Add (feedbackButton); mainBox.PackStart (fr, false, false, 0); @@ -99,6 +117,7 @@ namespace MonoDevelop.Ide // Dock area CustomFrame dfr = new CustomFrame (0, 0, 1, 0); + dfr.Accessible.Role = Atk.Role.Filler; dfr.StyleSet += (o, args) => { dfr.BorderColor = Styles.DockSeparatorColor.ToGdkColor (); }; @@ -113,6 +132,7 @@ namespace MonoDevelop.Ide // Resize grip + resizeGrip.Accessible.SetRole (AtkCocoa.Roles.AXGrowArea); resizeGrip.WidthRequest = ResizeGripWidth; resizeGrip.HeightRequest = 0; resizeGrip.VisibleWindow = false; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs index 08f596c6aa..b887e4d0da 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs @@ -354,11 +354,42 @@ namespace MonoDevelop.Ide.Gui static IEnumerable<Gtk.Widget> GetFocussableWidgets (Gtk.Widget widget) { var c = widget as Container; - if (widget.CanFocus) + + if (widget.CanFocus) { yield return widget; + } + if (c != null) { - foreach (var f in c.FocusChain.SelectMany (GetFocussableWidgets).Where (y => y != null)) + foreach (var f in c.FocusChain.SelectMany (GetFocussableWidgets).Where (y => y != null)) { yield return f; + } + } + + if (c?.Children?.Length != 0) { + foreach (var f in c.Children) { + var container = f as Container; + if (container != null) { + foreach (var child in GetFocussableChildren (container)) { + yield return child; + } + } + } + } + } + + static IEnumerable<Gtk.Widget> GetFocussableChildren (Gtk.Container container) + { + if (container.CanFocus) { + yield return container; + } + + foreach (var f in container.Children) { + var c = f as Container; + if (c != null) { + foreach (var child in GetFocussableChildren (c)) { + yield return child; + } + } } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs index 9a9944290d..a1c6bb1584 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs @@ -585,7 +585,6 @@ namespace MonoDevelop.Ide.Gui if (info.Options.HasFlag (OpenDocumentOptions.BringToFront)) { doc.Select (); - doc.Window.SelectWindow (); NavigationHistoryService.LogActiveDocument (); } return doc; diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs index 1cd80fb20f..98fa93ede2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs @@ -42,13 +42,12 @@ namespace MonoDevelop.Ide.Projects.OptionPanels { return widget = new GeneralProjectOptionsWidget (ConfiguredProject, ParentDialog); } - + public override void ApplyChanges() { widget.Store (); } } - partial class GeneralProjectOptionsWidget : Gtk.Bin { Project project; @@ -57,12 +56,9 @@ namespace MonoDevelop.Ide.Projects.OptionPanels public GeneralProjectOptionsWidget (Project project, OptionsDialog dialog) { Build (); - this.project = project; this.dialog = dialog; - nameLabel.UseUnderline = true; - descriptionLabel.UseUnderline = true; projectNameEntry.Text = project.Name; @@ -76,7 +72,6 @@ namespace MonoDevelop.Ide.Projects.OptionPanels defaultNamespaceLabel.Visible = false; projectDefaultNamespaceEntry.Visible = false; } - entryVersion.Text = project.Version; checkSolutionVersion.Active = project.SyncVersionWithSolution; entryVersion.Sensitive = !project.SyncVersionWithSolution; @@ -86,6 +81,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels void SetAccessibilityAttributes () { + label55.Accessible.Role = Atk.Role.Filler; informationHeaderLabel.Accessible.SetTitleFor (table11.Accessible); table11.Accessible.SetTitleUIElement (informationHeaderLabel.Accessible); @@ -117,7 +113,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels GettextCatalog.GetString ("Enter the default namespace for the project")); defaultNamespaceLabel.Accessible.SetTitleFor (projectDescriptionTextView.Accessible); } - + public void Store () { if (projectNameEntry.Text != project.Name) { @@ -125,7 +121,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels if (project.ParentSolution != null) dialog.ModifiedObjects.Add (project.ParentSolution); } - + project.Description = projectDescriptionTextView.Buffer.Text; if (project is DotNetProject) { ((DotNetProject)project).DefaultNamespace = projectDefaultNamespaceEntry.Text; @@ -151,4 +147,3 @@ namespace MonoDevelop.Ide.Projects.OptionPanels } } - diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs index afb3211a3f..8e9ea17f25 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/OutputOptionsPanel.cs @@ -94,6 +94,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels void SetupAccessibility () { + label91.Accessible.Role = Atk.Role.Filler; assemblyNameEntry.SetCommonAccessibilityAttributes ("OutputOptionsPanel.AssemblyEntry", GettextCatalog.GetString ("Assembly Name"), GettextCatalog.GetString ("Enter the name of the output assembly")); diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj index 46070369fe..a20132179f 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj @@ -1,10 +1,8 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <Import Project="..\..\..\MonoDevelop.props" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.30703</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{27096E7F-C91C-4AC6-B289-6897A701DF21}</ProjectGuid> <OutputType>Library</OutputType> <AssemblyName>MonoDevelop.Ide</AssemblyName> @@ -102,21 +100,10 @@ <NoWarn>1591;1573</NoWarn> </PropertyGroup> <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Data" /> - <Reference Include="System.Web.Services" /> - <Reference Include="Mono.Posix" /> - <Reference Include="System.Runtime.Remoting" /> - <Reference Include="monodoc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> - <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> - <SpecificVersion>False</SpecificVersion> - </Reference> <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> <SpecificVersion>False</SpecificVersion> </Reference> - <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> + <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> <SpecificVersion>False</SpecificVersion> </Reference> <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> @@ -125,29 +112,68 @@ <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> <SpecificVersion>False</SpecificVersion> </Reference> - <Reference Include="System.Core" /> - <Reference Include="Mono.Cairo" /> - <Reference Include="System.Web" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Design" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Runtime.Serialization" /> - <Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <HintPath>..\..\..\packages\System.Threading.Tasks.Dataflow.4.7.0\lib\netstandard1.0\System.Threading.Tasks.Dataflow.dll</HintPath> - <Private>True</Private> + <Reference Include="ICSharpCode.SharpZipLib"> + <HintPath>..\..\..\packages\JetBrains.SharpZipLib.Stripped.0.87.20170615.10\lib\net40\ICSharpCode.SharpZipLib.dll</HintPath> </Reference> - <Reference Include="Xamarin.Mac" Condition=" '$(Configuration)' == 'DebugMac' Or '$(Configuration)' == 'ReleaseMac' "> - <HintPath>..\..\..\external\Xamarin.Mac.dll</HintPath> + <Reference Include="Microsoft.CodeAnalysis"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.Common.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.CSharp"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.CSharp.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.CSharp.Features"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.CSharp.Features.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Features.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Workspaces.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.EditorFeatures"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.EditorFeatures.2.3.0-beta1\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.EditorFeatures.Text"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.EditorFeatures.Text.2.3.0-beta1\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.Text.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.Elfie"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.Elfie.1.0.0-rc9\lib\net45\Microsoft.CodeAnalysis.Elfie.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.Features"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.Features.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.Features.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.VisualBasic"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.VisualBasic.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.VisualBasic.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.VisualBasic.Features"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.VisualBasic.Features.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.VisualBasic.Features.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.2.3.0-beta1\lib\netstandard1.3\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.Workspaces"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.3.0-beta1\lib\net46\Microsoft.CodeAnalysis.Workspaces.dll</HintPath> + </Reference> + <Reference Include="Microsoft.CodeAnalysis.Workspaces.Desktop"> + <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.3.0-beta1\lib\net46\Microsoft.CodeAnalysis.Workspaces.Desktop.dll</HintPath> + </Reference> + <Reference Include="Microsoft.TemplateEngine.Abstractions"> + <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Abstractions.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Abstractions.dll</HintPath> + </Reference> + <Reference Include="Microsoft.TemplateEngine.Core"> + <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Core.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Core.dll</HintPath> + </Reference> + <Reference Include="Microsoft.TemplateEngine.Core.Contracts"> + <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Core.Contracts.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Core.Contracts.dll</HintPath> + </Reference> + <Reference Include="Microsoft.TemplateEngine.Edge"> + <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Edge.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Edge.dll</HintPath> + </Reference> + <Reference Include="Microsoft.TemplateEngine.Orchestrator.RunnableProjects"> + <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Orchestrator.RunnableProjects.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll</HintPath> + </Reference> + <Reference Include="Microsoft.TemplateEngine.Utils"> + <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Utils.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Utils.dll</HintPath> </Reference> - <Reference Include="System.Windows" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> - <Reference Include="PresentationCore" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> - <Reference Include="PresentationFramework" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> - <Reference Include="WindowsBase" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> - <Reference Include="WindowsFormsIntegration" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> - <Reference Include="System.Xaml" /> <Reference Include="Microsoft.VisualStudio.Composition, Version=15.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <HintPath>..\..\..\packages\Microsoft.VisualStudio.Composition.15.3.38\lib\net45\Microsoft.VisualStudio.Composition.dll</HintPath> - <Private>True</Private> </Reference> <Reference Include="Microsoft.VisualStudio.CoreUtility"> <HintPath>..\..\..\packages\Microsoft.VisualStudio.CoreUtility.15.0.26201\lib\net45\Microsoft.VisualStudio.CoreUtility.dll</HintPath> @@ -165,71 +191,67 @@ <HintPath>..\..\..\packages\Microsoft.VisualStudio.Validation.15.3.15\lib\net45\Microsoft.VisualStudio.Validation.dll</HintPath> <Private>True</Private> </Reference> - <Reference Include="System.ComponentModel.Composition" /> - <Reference Include="ICSharpCode.SharpZipLib"> - <HintPath>..\..\..\packages\JetBrains.SharpZipLib.Stripped.0.87.20170615.10\lib\net40\ICSharpCode.SharpZipLib.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="System.Collections.Immutable"> - <HintPath>..\..\..\build\bin\System.Collections.Immutable.dll</HintPath> - </Reference> - <Reference Include="System.Reflection.Metadata"> - <HintPath>..\..\..\build\bin\System.Reflection.Metadata.dll</HintPath> - </Reference> - <Reference Include="Microsoft.CodeAnalysis"> - <HintPath>..\..\..\build\bin\Microsoft.CodeAnalysis.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="Microsoft.CodeAnalysis.Workspaces"> - <HintPath>..\..\..\build\bin\Microsoft.CodeAnalysis.Workspaces.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="Microsoft.CodeAnalysis.Workspaces.Desktop"> - <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.3.0-beta1\lib\net46\Microsoft.CodeAnalysis.Workspaces.Desktop.dll</HintPath> + <Reference Include="Mono.Cairo" /> + <Reference Include="Mono.Posix" /> + <Reference Include="monodoc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> + <Reference Include="mscorlib" /> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> <Private>False</Private> </Reference> - <Reference Include="Microsoft.CodeAnalysis.EditorFeatures.Text"> - <HintPath>..\..\..\packages\Microsoft.CodeAnalysis.EditorFeatures.Text.2.3.0-beta1\lib\net46\Microsoft.CodeAnalysis.EditorFeatures.Text.dll</HintPath> - <Private>False</Private> + <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> + <SpecificVersion>False</SpecificVersion> </Reference> - <Reference Include="ICSharpCode.SharpZipLib"> - <HintPath>..\..\..\packages\JetBrains.SharpZipLib.Stripped.0.87.20170615.10\lib\net40\ICSharpCode.SharpZipLib.dll</HintPath> + <Reference Include="PresentationCore" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> + <Reference Include="PresentationFramework" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> + <Reference Include="System" /> + <Reference Include="System.Collections.Immutable"> + <HintPath>..\..\..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath> </Reference> + <Reference Include="System.ComponentModel.Composition" /> <Reference Include="System.Composition.AttributedModel"> <HintPath>..\..\..\packages\System.Composition.AttributedModel.1.0.31\lib\netstandard1.0\System.Composition.AttributedModel.dll</HintPath> </Reference> + <Reference Include="System.Composition.Convention"> + <HintPath>..\..\..\packages\Microsoft.Composition.1.0.30\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath> + </Reference> + <Reference Include="System.Composition.Hosting"> + <HintPath>..\..\..\packages\System.Composition.Hosting.1.0.31\lib\netstandard1.0\System.Composition.Hosting.dll</HintPath> + </Reference> <Reference Include="System.Composition.Runtime"> <HintPath>..\..\..\packages\System.Composition.Runtime.1.0.31\lib\netstandard1.0\System.Composition.Runtime.dll</HintPath> </Reference> - <Reference Include="YamlDotNet"> - <HintPath>..\..\..\packages\YamlDotNet.Signed.4.0.1-pre291\lib\net35\YamlDotNet.dll</HintPath> - </Reference> - <Reference Include="Microsoft.CodeAnalysis.Features"> - <HintPath>..\..\..\build\bin\Microsoft.CodeAnalysis.Features.dll</HintPath> - <Private>False</Private> + <Reference Include="System.Composition.TypedParts"> + <HintPath>..\..\..\packages\System.Composition.TypedParts.1.0.31\lib\netstandard1.0\System.Composition.TypedParts.dll</HintPath> </Reference> + <Reference Include="System.Core" /> + <Reference Include="System.Data" /> + <Reference Include="System.Design" /> + <Reference Include="System.Drawing" /> <Reference Include="System.IO.Compression" /> - <Reference Include="Microsoft.TemplateEngine.Abstractions"> - <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Abstractions.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Abstractions.dll</HintPath> - </Reference> - <Reference Include="Microsoft.TemplateEngine.Core.Contracts"> - <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Core.Contracts.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Core.Contracts.dll</HintPath> - </Reference> - <Reference Include="Microsoft.TemplateEngine.Utils"> - <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Utils.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Utils.dll</HintPath> - </Reference> - <Reference Include="Microsoft.TemplateEngine.Core"> - <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Core.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Core.dll</HintPath> + <Reference Include="System.Reflection.Metadata"> + <HintPath>..\..\..\packages\System.Reflection.Metadata.1.4.2\lib\netstandard1.1\System.Reflection.Metadata.dll</HintPath> </Reference> - <Reference Include="Microsoft.TemplateEngine.Orchestrator.RunnableProjects"> - <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Orchestrator.RunnableProjects.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Orchestrator.RunnableProjects.dll</HintPath> + <Reference Include="System.Runtime.Remoting" /> + <Reference Include="System.Runtime.Serialization" /> + <Reference Include="System.Threading.Tasks.Dataflow, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <HintPath>..\..\..\packages\System.Threading.Tasks.Dataflow.4.7.0\lib\netstandard1.0\System.Threading.Tasks.Dataflow.dll</HintPath> + <Private>True</Private> </Reference> - <Reference Include="Microsoft.TemplateEngine.Edge"> - <HintPath>..\..\..\packages\Microsoft.TemplateEngine.Edge.1.0.0-beta2-20170523-241\lib\net45\Microsoft.TemplateEngine.Edge.dll</HintPath> + <Reference Include="System.Web" /> + <Reference Include="System.Web.Services" /> + <Reference Include="System.Windows" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xaml" /> + <Reference Include="System.Xml" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="WindowsBase" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> + <Reference Include="WindowsFormsIntegration" Condition=" '$(Configuration)' == 'DebugWin32' Or '$(Configuration)' == 'ReleaseWin32' " /> + <Reference Include="Xamarin.Mac" Condition=" '$(Configuration)' == 'DebugMac' Or '$(Configuration)' == 'ReleaseMac' "> + <HintPath>..\..\..\external\Xamarin.Mac.dll</HintPath> </Reference> - <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> - <Private>False</Private> + <Reference Include="YamlDotNet"> + <HintPath>..\..\..\packages\YamlDotNet.Signed.4.0.1-pre291\lib\net35\YamlDotNet.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -9533,6 +9555,6 @@ </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Target Name="AfterBuild"> - <Copy SourceFiles="@(Data)" DestinationFolder="..\..\..\build\data\%(Data.RelativeDir)" /> + <Copy SourceFiles="@(Data)" DestinationFolder="..\..\..\build\data\%(Data.RelativeDir)" SkipUnchangedFiles="true" /> </Target> </Project> diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs index 19e3b067ca..a88c448dfc 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs @@ -1182,7 +1182,7 @@ namespace MonoDevelop.Ide BuildResult res = null; try { tt.Trace ("Cleaning item"); - res = await entry.Clean (monitor, IdeApp.Workspace.ActiveConfiguration, operationContext); + res = await entry.Clean (monitor, IdeApp.Workspace.ActiveConfiguration, InitOperationContext (entry, operationContext)); } catch (Exception ex) { monitor.ReportError (GettextCatalog.GetString ("Clean failed."), ex); } finally { @@ -1435,13 +1435,13 @@ namespace MonoDevelop.Ide var sei = target as Project; if (sei != null) { - if (sei.FastCheckNeedsBuild (configuration)) + if (sei.FastCheckNeedsBuild (configuration, InitOperationContext (target, new TargetEvaluationContext ()))) return true; //TODO: respect solution level dependencies var deps = new HashSet<SolutionItem> (); CollectReferencedItems (sei, deps, configuration); foreach (var dep in deps.OfType<Project> ()) { - if (dep.FastCheckNeedsBuild (configuration)) + if (dep.FastCheckNeedsBuild (configuration, InitOperationContext (target, new TargetEvaluationContext ()))) return true; } return false; @@ -1450,7 +1450,7 @@ namespace MonoDevelop.Ide var sln = target as Solution; if (sln != null) { foreach (var item in sln.GetAllProjects ()) { - if (item.FastCheckNeedsBuild (configuration)) + if (item.FastCheckNeedsBuild (configuration, InitOperationContext (target, new TargetEvaluationContext ()))) return true; } return false; @@ -1517,7 +1517,7 @@ namespace MonoDevelop.Ide if (skipPrebuildCheck || result.ErrorCount == 0) { tt.Trace ("Building item"); - result = await entry.Build (monitor, IdeApp.Workspace.ActiveConfiguration, true, operationContext); + result = await entry.Build (monitor, IdeApp.Workspace.ActiveConfiguration, true, InitOperationContext (entry, operationContext)); } } catch (Exception ex) { monitor.ReportError (GettextCatalog.GetString ("Build failed."), ex); @@ -1534,6 +1534,25 @@ namespace MonoDevelop.Ide return result; } + + /// <summary> + /// Initializes the context to be used for build operations. It currently just initializes + /// it with the currently selected execution target. + /// </summary> + T InitOperationContext<T> (IBuildTarget target, T context) where T:OperationContext + { + OperationContext ctx = context; + if (ctx == null) + ctx = new OperationContext (); + if (ctx.ExecutionTarget == null) { + var item = target as SolutionItem; + if (item != null) + ctx.ExecutionTarget = IdeApp.Workspace.GetActiveExecutionTarget (item); + else + ctx.ExecutionTarget = IdeApp.Workspace.ActiveExecutionTarget; + } + return (T)ctx; + } // Note: This must run in the main thread async Task PromptForSave (BuildResult result) |