Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2014-06-27 13:57:20 +0400
committerMike Krüger <mkrueger@xamarin.com>2014-06-27 13:57:20 +0400
commit5aaf473ee8fb097fc88165097c8cede1e362768f (patch)
treecf1e9bdc27864ca7804b51e943f47076f425d36d /main/src/core
parent3a9df9bc6875aff7bb03f7736bee780b4f071d91 (diff)
parent29e49044b88eece48606cc128d779e7dbf2d622c (diff)
Merge branch 'master' into retina-editor
Conflicts: main/src/addins/CSharpBinding/MonoDevelop.CSharp.CodeGeneration/ExportCodeGenerator.cs main/src/addins/CSharpBinding/MonoDevelop.CSharp.Completion/CSharpCompletionTextEditorExtension.cs main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpTextEditorIndentation.cs main/src/addins/CSharpBinding/MonoDevelop.CSharp.Parser/TypeSystemProvider.cs main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring.CodeActions/MDRefactoringContext.cs main/src/addins/CSharpBinding/MonoDevelop.CSharp/ExpandSelectionHandler.cs main/src/addins/CSharpBinding/MonoDevelop.CSharp/PathedDocumentTextEditorExtension.cs main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs main/src/addins/MonoDevelop.DocFood/MonoDevelop.DocFood/DocFoodTextEditorExtension.cs main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.csproj main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/Gui/ResultMarker.cs main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeAnalysisBatchRunner.cs main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/CodeIssuePanelWidget.cs main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindDerivedSymbolsHandler.cs main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringOptions.cs main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoringPreviewDialog.cs main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/RefactoryCommands.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskOverviewMode.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.QuickTasks/QuickTaskStrip.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/AbstractUsagesExtension.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/DebugValueTooltipProvider.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorView.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/SourceEditorWidget.cs main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/TextMarker/DebugTextMarker.cs main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs main/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor/TextLinkModeEventArgs.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj main/tests/UnitTests/MonoDevelop.SourceEditor/DebugTooltipTests.cs
Diffstat (limited to 'main/src/core')
-rw-r--r--main/src/core/Makefile.am3
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs5
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ChunkStyle.cs39
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs32
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/IStreamProvider.cs8
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs5
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs5
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs117
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs4
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActions.cs12
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs3
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViWordFindStrategy.cs57
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor.csproj4
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/DeleteActions.cs6
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs4
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Document/FoldSegment.cs10
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Document/ILineSplitter.cs2
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs12
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Document/PrimitiveLineSplitter.cs12
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs5
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs2
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs43
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs47
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs52
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs2
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs49
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/HelperMethods.cs19
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/InsertionCursorEditMode.cs3
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs3
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs8
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs5
-rw-r--r--main/src/core/Mono.Texteditor/Styles/DefaultStyle.json479
-rw-r--r--main/src/core/Mono.Texteditor/Styles/MonokaiStyle.json452
-rw-r--r--main/src/core/Mono.Texteditor/Styles/NightshadeStyle.json525
-rw-r--r--main/src/core/Mono.Texteditor/Styles/OblivionStyle.json476
-rw-r--r--main/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json453
-rw-r--r--main/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json454
-rw-r--r--main/src/core/Mono.Texteditor/Styles/TangoStyle.json461
-rw-r--r--main/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json267
-rw-r--r--main/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml34
-rw-r--r--main/src/core/Mono.Texteditor/SyntaxModes/JavascriptSyntaxMode.xml2
-rw-r--r--main/src/core/Mono.Texteditor/SyntaxModes/TypescriptSyntaxMode.xml3
-rw-r--r--main/src/core/MonoDevelop.Core/BuildVariables.gen.cs8
-rw-r--r--main/src/core/MonoDevelop.Core/Makefile.am3
-rw-r--r--main/src/core/MonoDevelop.Core/Mono.Options.cs13
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs7
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs128
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/IAssemblyContext.cs4
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoFrameworkBackend.cs3
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs7
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs18
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionTarget.cs10
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/IDebugConsole.cs (renamed from main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/TextWeight.cs)27
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs13
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ConsoleProgressMonitor.cs73
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialProviderExtensions.cs46
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialStore.cs88
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialType.cs19
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialCache.cs26
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialProvider.cs25
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IHttpWebResponse.cs26
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyAuthenticationHandler.cs63
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyCache.cs21
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/MemoryCache.cs150
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/NullCredentialProvider.cs30
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ProxyCache.cs19
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs582
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/STSAuthHelper.cs153
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/StringExtensions.cs29
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/Utility.cs25
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WIFTypeProvider.cs163
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WebService.cs65
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml21
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj42
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs2
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs154
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs36
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/MacSystemInformation.cs2
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs2
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs6
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs4
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs2
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserProfile.cs3
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Core/WebRequestHelper.cs196
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/ISolutionItemHandler.cs14
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs5
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/IMSBuildGlobalPropertyProvider.cs (renamed from main/src/core/Mono.Texteditor/Mono.TextEditor/Annotatable.cs)28
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildExtension.cs49
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildFileFormat.cs6
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildHandler.cs17
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs94
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs286
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs56
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs31
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/SlnFileFormat.cs8
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyService.cs25
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs7
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyTypeAttribute.cs1
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs288
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectBinding.cs58
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildExtension.cs94
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildHandler.cs139
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs1
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CompiledAssemblyProject.cs10
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CustomCommandExtension.cs4
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs7
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs67
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectImport.cs62
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ExecutionContext.cs4
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/GenericProject.cs9
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs1
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IDotNetFileContainer.cs36
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs9
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs12
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs6
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs18
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectModelDataItemAttribute.cs1
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs56
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs78
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs73
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs53
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs48
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs41
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownProject.cs12
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownSolutionItem.cs5
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs13
-rw-r--r--main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs42
-rw-r--r--main/src/core/MonoDevelop.Core/frameworks/framework_NET_2_0.xml1
-rw-r--r--main/src/core/MonoDevelop.Core/frameworks/framework_NET_3_5_client.xml1
-rw-r--r--main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0.xml1
-rw-r--r--main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml1
-rw-r--r--main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_5.xml1
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml4
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/DefaultPolicyPanels.addin.xml10
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/GlobalOptionsDialog.addin.xml32
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml22
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml10
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/MimeTypes.addin.xml3
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml14
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/Pads.addin.xml3
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml642
-rw-r--r--main/src/core/MonoDevelop.Ide/Makefile.am8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs87
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ConfigurationMerger.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs114
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupSearchPattern.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs45
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CellRendererImage.cs37
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs75
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs133
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBox.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FileFilterSet.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FolderListSelector.cs3
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageLoader.cs212
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageView.cs21
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/GtkMacInterop.cs (renamed from main/src/core/Mono.Texteditor/Mono.TextEditor/IBackgroundMarker.cs)39
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs75
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/SearchEntry.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs7
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs22
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs17
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs3
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs71
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/ProjectActiveCondition.cs3
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/SolutionPadCodon.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs39
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/PublicResXFileCodeGenerator.cs51
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs59
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs19
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs55
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs5
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs13
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs24
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs112
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs91
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/DragOperation.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs43
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs110
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TransactedTreeBuilder.cs21
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TreeBuilder.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/IOpenNamedElementHandler.cs (renamed from main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/IUrlHandler.cs)8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs10
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/GtkAlertDialog.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/LoadSavePanel.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs13
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs93
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs37
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs9
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SapNodeBuilder.cs57
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ShowAllFilesBuilderExtension.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SolutionFolderFileNodeBuilder.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/CommonTextEditorOptions.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs13
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs26
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs19
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs10
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs5
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StockIcons.cs5
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Styles.cs14
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs32
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/DocumentNavigationPoint.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs1
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationPoint.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/OnlineTemplateService.cs149
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/ProjectTemplateIndex.cs164
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs77
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/GeneralProjectOptions.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs19
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/StartupOptionsPanel.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportSolutionDialog.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs7
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewPolicySetDialog.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs90
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectOptionsWidget.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/FileTemplate.cs5
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ParentProjectFileTemplateCondition.cs3
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs16
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatePackageInstaller.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs13
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs134
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/Style.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj539
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs23
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/FeedbackService.cs27
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs5
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs9
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs242
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs50
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs80
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportSolutionDialog.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewPolicySetDialog.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewProjectDialog.cs793
-rw-r--r--main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic4
-rw-r--r--main/src/core/MonoDevelop.Ide/gtkrc.win321
-rw-r--r--main/src/core/MonoDevelop.Ide/gtkrc.win32-vista344
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/assembly-project-16.pngbin1401 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/compiler-options-16.pngbin721 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/custom-commands-16.pngbin996 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/drive-16.pngbin424 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/element-method-new-16.pngbin620 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/formatting-16.pngbin732 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/hammer-16.pngbin575 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/keyboard-shortcuts-16.pngbin461 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/letters-16.pngbin312 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/add-16.pngbin445 -> 424 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/add-16@2x.pngbin858 -> 848 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16.pngbin0 -> 497 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16@2x.pngbin0 -> 938 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16.pngbin871 -> 940 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16@2x.pngbin2456 -> 2618 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16.pngbin896 -> 857 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16@2x.pngbin2537 -> 2172 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16.pngbin882 -> 947 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16@2x.pngbin2475 -> 2613 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16.pngbin893 -> 932 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16@2x.pngbin2359 -> 2485 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16.pngbin293 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16@2x.pngbin687 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16.pngbin343 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16@2x.pngbin778 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16.pngbin562 -> 684 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16@2x.pngbin1257 -> 1595 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16.pngbin731 -> 794 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16@2x.pngbin2136 -> 2333 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/copy-16.pngbin0 -> 388 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/copy-16@2x.pngbin0 -> 724 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/done-16.pngbin846 -> 825 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/done-16@2x.pngbin2003 -> 1943 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/edit-16.pngbin0 -> 838 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/edit-16@2x.pngbin0 -> 2128 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-exception-16.pngbin0 -> 399 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-exception-16@2x.pngbin0 -> 869 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16.pngbin0 -> 450 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16@2x.pngbin0 -> 817 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16.pngbin0 -> 479 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16@2x.pngbin0 -> 1002 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-module-16.pngbin0 -> 455 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-module-16@2x.pngbin0 -> 967 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16.pngbin0 -> 557 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16@2x.pngbin0 -> 1090 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-type-16.pngbin0 -> 408 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/element-type-16@2x.pngbin0 -> 742 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-16.pngbin830 -> 894 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-16@2x.pngbin1854 -> 1967 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-24.pngbin1348 -> 1398 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-24@2x.pngbin2901 -> 3092 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-32.pngbin1854 -> 1967 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-32@2x.pngbin4097 -> 4309 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-48.pngbin2901 -> 3092 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/error-48@2x.pngbin6497 -> 6846 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/file-script-16.pngbin0 -> 478 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/file-script-16@2x.pngbin0 -> 1014 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/file-script-32.pngbin0 -> 1014 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/file-script-32@2x.pngbin0 -> 2249 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/find-16.pngbin0 -> 826 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/find-16@2x.pngbin0 -> 2045 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16.pngbin0 -> 869 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16@2x.pngbin0 -> 2184 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-back-16.pngbin0 -> 435 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-back-16@2x.pngbin0 -> 833 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-down-16.pngbin0 -> 466 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-down-16@2x.pngbin0 -> 867 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-forward-16.pngbin0 -> 441 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-forward-16@2x.pngbin0 -> 824 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-up-16.pngbin0 -> 452 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/go-up-16@2x.pngbin0 -> 905 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/home-16.pngbin0 -> 494 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/home-16@2x.pngbin0 -> 1140 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-16.pngbin795 -> 793 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-16@2x.pngbin1878 -> 1870 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-24.pngbin0 -> 1219 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-24@2x.pngbin0 -> 2948 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-32.pngbin0 -> 1870 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-32@2x.pngbin0 -> 4322 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-48.pngbin0 -> 2948 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/information-48@2x.pngbin0 -> 6933 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/jump-to-16.pngbin0 -> 453 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/jump-to-16@2x.pngbin0 -> 1100 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/media-play-16.pngbin0 -> 642 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/media-play-16@2x.pngbin0 -> 1319 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/missing-image-16.pngbin0 -> 453 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/missing-image-16@2x.pngbin0 -> 1379 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/open-16.pngbin0 -> 637 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-16.pngbin0 -> 448 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-16@2x.pngbin0 -> 984 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-22.pngbin678 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-22@2x.pngbin1256 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-24.pngbin0 -> 701 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-24@2x.pngbin0 -> 1390 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-source-16.pngbin0 -> 657 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/package-source-16@2x.pngbin0 -> 1254 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/parser-16.pngbin0 -> 574 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/parser-16@2x.pngbin0 -> 1216 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16.pngbin0 -> 609 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16@2x.pngbin0 -> 1626 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16.pngbin0 -> 471 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16@2x.pngbin0 -> 1228 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16.pngbin0 -> 408 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16@2x.pngbin0 -> 768 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16.pngbin0 -> 305 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16@2x.pngbin0 -> 574 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16.pngbin0 -> 482 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16@2x.pngbin0 -> 1033 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16.pngbin0 -> 477 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16@2x.pngbin0 -> 932 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16.pngbin0 -> 512 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16@2x.pngbin0 -> 1117 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16.pngbin0 -> 516 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16@2x.pngbin0 -> 1124 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16.pngbin0 -> 538 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16@2x.pngbin0 -> 1518 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16.pngbin0 -> 656 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16@2x.pngbin0 -> 1719 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16.pngbin0 -> 598 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16@2x.pngbin0 -> 1732 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16.pngbin0 -> 377 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16@2x.pngbin0 -> 738 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16.pngbin0 -> 437 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16@2x.pngbin0 -> 888 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16.pngbin0 -> 526 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16@2x.pngbin0 -> 1253 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16.pngbin0 -> 351 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16@2x.pngbin0 -> 771 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16.pngbin0 -> 364 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16@2x.pngbin0 -> 703 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16.pngbin0 -> 402 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16@2x.pngbin0 -> 822 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16.pngbin0 -> 797 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16@2x.pngbin0 -> 1922 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32.pngbin0 -> 542 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32@2x.pngbin0 -> 1199 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32.pngbin0 -> 654 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32@2x.pngbin0 -> 2081 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-16.pngbin0 -> 820 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-16@2x.pngbin0 -> 2021 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-24.pngbin0 -> 1289 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-24@2x.pngbin0 -> 3120 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-32.pngbin0 -> 2021 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-32@2x.pngbin0 -> 4515 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-48.pngbin0 -> 3120 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/question-48@2x.pngbin0 -> 7283 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/refresh-16.pngbin0 -> 788 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/refresh-16@2x.pngbin0 -> 1825 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/remove-16.pngbin567 -> 583 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/remove-16@2x.pngbin1248 -> 1355 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/save-16.pngbin0 -> 536 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/save-all-16.pngbin0 -> 561 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16.pngbin349 -> 578 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16@2x.pngbin723 -> 1191 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16.pngbin646 -> 728 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16@2x.pngbin1791 -> 1995 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1.pngbin0 -> 369 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1@2x.pngbin0 -> 1002 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2.pngbin0 -> 458 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2@2x.pngbin0 -> 1338 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3.pngbin0 -> 441 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3@2x.pngbin0 -> 1312 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4.pngbin0 -> 491 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4@2x.pngbin0 -> 1312 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5.pngbin0 -> 443 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5@2x.pngbin0 -> 1325 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1.pngbin0 -> 549 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1@2x.pngbin0 -> 1431 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2.pngbin0 -> 623 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2@2x.pngbin0 -> 1953 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3.pngbin0 -> 653 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3@2x.pngbin0 -> 1906 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4.pngbin0 -> 631 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4@2x.pngbin0 -> 1901 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5.pngbin0 -> 605 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5@2x.pngbin0 -> 1921 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/stop-16.pngbin613 -> 648 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/stop-16@2x.pngbin1368 -> 1408 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/undo-16.pngbin0 -> 785 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/undo-16@2x.pngbin0 -> 1958 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/updates-16.pngbin811 -> 797 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/updates-16@2x.pngbin1942 -> 1922 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/warning-8.pngbin0 -> 243 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/warning-8@2x.pngbin0 -> 669 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16.pngbin561 -> 671 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16@2x.pngbin1225 -> 1519 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16.pngbin731 -> 785 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16@2x.pngbin2085 -> 2248 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16.pngbin0 -> 428 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16@2x.pngbin0 -> 1018 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16.pngbin0 -> 354 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16@2x.pngbin0 -> 828 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/locale-16.pngbin410 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/markers-rulers-16.pngbin729 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/monkey-16.pngbin1677 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/parser-16.pngbin696 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/save-all-16.pngbin471 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/sdk-locations-16.pngbin488 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/syntax-highlighting-16.pngbin573 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/text-editor-16.pngbin574 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/icons/text-editor-behavior-16.pngbin750 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/text-quickfix-16.pngbin739 -> 0 bytes
-rwxr-xr-xmain/src/core/MonoDevelop.Ide/icons/tools-external-tools-16.pngbin907 -> 0 bytes
-rw-r--r--main/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml16
-rw-r--r--main/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml20
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/Main.cs2
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.csproj4
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v12.0.csproj4
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v4.0.csproj4
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj4
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs38
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs41
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs2
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IBuildEngine.cs4
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IProjectBuilder.cs7
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/LocalLogger.cs8
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildEvaluatedItem.cs (renamed from main/src/core/Mono.Texteditor/Mono.TextEditor/IIconBarMarker.cs)34
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildResult.cs111
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildTargetResult.cs114
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs82
-rw-r--r--main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs92
-rw-r--r--main/src/core/MonoDevelop.TextEditor.Tests/Makefile.am1
-rw-r--r--main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests.DefaultEditActions/DeleteActionTests.cs41
-rw-r--r--main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/HtmlWriterTests.cs15
-rw-r--r--main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/RtfWriterTests.cs15
-rw-r--r--main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/SyntaxHighlightingTests.cs9
494 files changed, 9359 insertions, 5496 deletions
diff --git a/main/src/core/Makefile.am b/main/src/core/Makefile.am
index 3b02756b8e..a71f67828c 100644
--- a/main/src/core/Makefile.am
+++ b/main/src/core/Makefile.am
@@ -2,5 +2,6 @@ SUBDIRS = \
MonoDevelop.Projects.Formats.MSBuild \
MonoDevelop.Core \
Mono.Texteditor \
- MonoDevelop.Ide MonoDevelop.Startup
+ MonoDevelop.Ide MonoDevelop.Startup \
+ MonoDevelop.TextEditor.Tests
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs
index e267acb14e..2f41c21d08 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Chunk.cs
@@ -85,5 +85,10 @@ namespace Mono.TextEditor
{
return new TextSegment (chunk.Offset, chunk.Length);
}
+
+ public override string ToString ()
+ {
+ return string.Format ("[Chunk: Style={0}, Offset={1}, Length={2}]", Style, Offset, Length);
+ }
}
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ChunkStyle.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ChunkStyle.cs
index a03ea599cf..4db67b67ba 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ChunkStyle.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ChunkStyle.cs
@@ -54,48 +54,9 @@ namespace Mono.TextEditor.Highlighting
}
}
- [Obsolete("Will be removed - use FontWeight")]
- public TextWeight Weight {
- get {
- TextWeight weight = TextWeight.None;
- if (FontWeight == FontWeight.Bold)
- weight |= TextWeight.Bold;
- if (FontStyle == FontStyle.Italic)
- weight |= TextWeight.Italic;
- return weight;
- }
- set {
- if (value.HasFlag (TextWeight.Bold)) {
- FontWeight = FontWeight.Bold;
- } else {
- FontWeight = FontWeight.Normal;
- }
-
- if (value.HasFlag (TextWeight.Italic)) {
- FontStyle = FontStyle.Italic;
- } else {
- FontStyle = FontStyle.Normal;
- }
- }
- }
-
public FontWeight FontWeight { get; set; }
public FontStyle FontStyle { get; set; }
-
- [Obsolete("Will be removed - use FontWeight")]
- public bool Bold {
- get {
- return FontWeight == FontWeight.Bold;
- }
- }
-
- [Obsolete("Will be removed - use FontStyle")]
- public bool Italic {
- get {
- return FontStyle == FontStyle.Italic;
- }
- }
public bool Underline {
get; set;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
index a7b15bf3d2..79dc77fd34 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/ColorScheme.cs
@@ -45,6 +45,7 @@ namespace Mono.TextEditor.Highlighting
public string FileName { get; set; }
#region Ambient Colors
+
[ColorDescription("Background(Read Only)",VSSetting="color=Plain Text/Background")]
public AmbientColor BackgroundReadOnly { get; private set; }
@@ -117,16 +118,16 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Changing usages(Rectangle)", VSSetting="color=MarkerFormatDefinition/HighlightedReference/Background,secondcolor=MarkerFormatDefinition/HighlightedReference/Background,bordercolor=MarkerFormatDefinition/HighlightedReference/Background")]
public AmbientColor ChangingUsagesRectangle { get; private set; }
- [ColorDescription("Breakpoint Marker")]
+ [ColorDescription("Breakpoint Marker", VSSetting = "color=Breakpoint (Enabled)/Background")]
public AmbientColor BreakpointMarker { get; private set; }
- [ColorDescription("Breakpoint Marker(Invalid)")]
- public AmbientColor InvalidBreakpointMarker { get; private set; }
+ [ColorDescription("Breakpoint Marker(Invalid)", VSSetting = "color=Breakpoint (Disabled)/Background")]
+ public AmbientColor BreakpointMarkerInvalid { get; private set; }
[ColorDescription("Breakpoint Marker(Disabled)")]
public AmbientColor BreakpointMarkerDisabled { get; private set; }
- [ColorDescription("Debugger Current Line Marker")]
+ [ColorDescription("Debugger Current Line Marker", VSSetting = "color=Current Statement/Background")]
public AmbientColor DebuggerCurrentLineMarker { get; private set; }
[ColorDescription("Debugger Stack Line Marker")]
@@ -198,17 +199,6 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Message Bubble Warning IconMargin")]
public AmbientColor MessageBubbleWarningIconMargin { get; private set; }
- [ColorDescription("Code Analysis Status All Good")]
- public AmbientColor AnalysisStatusAllGoodIcon { get; private set; }
-
- [ColorDescription("Code Analysis Status Suggestions")]
- public AmbientColor AnalysisStatusSuggestionsIcon { get; private set; }
-
- [ColorDescription("Code Analysis Status Warnings")]
- public AmbientColor AnalysisStatusWarningsIcon { get; private set; }
-
- [ColorDescription("Code Analysis Status Errors")]
- public AmbientColor AnalysisStatusErrorsIcon { get; private set; }
#endregion
#region Text Colors
@@ -423,16 +413,12 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Breakpoint Text", VSSetting = "Breakpoint (Enabled)")]
public ChunkStyle BreakpointText { get; private set; }
- [ColorDescription("Breakpoint Text(Invalid)", VSSetting = "Breakpoint (Disabled)")]
- public ChunkStyle BreakpointTextInvalid { get; private set; }
-
[ColorDescription("Debugger Current Statement", VSSetting = "Current Statement")]
public ChunkStyle DebuggerCurrentLine { get; private set; }
[ColorDescription("Debugger Stack Line")] // not defined
public ChunkStyle DebuggerStackLine { get; private set; }
-
[ColorDescription("Diff Line(Added)")] //not defined
public ChunkStyle DiffLineAdded { get; private set; }
@@ -484,7 +470,6 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Razor Code", VSSetting="Razor Code")]
public ChunkStyle RazorCode { get; private set; }
-
[ColorDescription("Css Comment", VSSetting="CSS Comment")]
public ChunkStyle CssComment { get; private set; }
@@ -521,7 +506,6 @@ namespace Mono.TextEditor.Highlighting
[ColorDescription("Script String", VSSetting="Script String")]
public ChunkStyle ScriptString { get; private set; }
-
#endregion
public class PropertyDecsription
@@ -633,7 +617,7 @@ namespace Mono.TextEditor.Highlighting
// The fields we'd like to extract
result.Name = root.XPathSelectElement("name").Value;
- if (result.Name != "Default")
+ if (result.Name != TextEditorOptions.DefaultColorStyle)
result.CopyValues (SyntaxModeService.DefaultColorStyle);
var version = Version.Parse (root.XPathSelectElement("version").Value);
@@ -731,7 +715,7 @@ namespace Mono.TextEditor.Highlighting
if (!string.IsNullOrEmpty (BaseScheme))
writer.WriteLine ("\t\"baseScheme\":\"{0}\",", BaseScheme);
- var baseStyle = SyntaxModeService.GetColorStyle (BaseScheme ?? "Default");
+ var baseStyle = SyntaxModeService.GetColorStyle (BaseScheme ?? TextEditorOptions.DefaultColorStyle);
writer.WriteLine ("\t\"colors\":[");
bool first = true;
@@ -928,7 +912,7 @@ namespace Mono.TextEditor.Highlighting
result.TooltipBorder = new AmbientColor ();
result.TooltipBorder.Colors.Add (Tuple.Create ("color", AlphaBlend (result.PlainText.Foreground, result.PlainText.Background, 0.5)));
- var defaultStyle = SyntaxModeService.GetColorStyle (HslColor.Brightness (result.PlainText.Background) < 0.5 ? "Monokai" : "Default");
+ var defaultStyle = SyntaxModeService.GetColorStyle (HslColor.Brightness (result.PlainText.Background) < 0.5 ? "Monokai" : TextEditorOptions.DefaultColorStyle);
foreach (var color in textColors.Values) {
if (color.Info.GetValue (result, null) == null)
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/IStreamProvider.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/IStreamProvider.cs
index a2a38be631..d26527622c 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/IStreamProvider.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/IStreamProvider.cs
@@ -36,14 +36,6 @@ namespace Mono.TextEditor.Highlighting
Stream Open ();
}
- [Obsolete("Do not use this anymore. Use ResourceStreamProvider.")]
- public class ResourceXmlProvider : ResourceStreamProvider
- {
- public ResourceXmlProvider (Assembly assembly, string manifestResourceName) : base(assembly, manifestResourceName)
- {
-
- }
- }
public class ResourceStreamProvider : IStreamProvider
{
Assembly assembly;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
index 2754e7ee02..71b3ac3bb9 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/Rule.cs
@@ -155,11 +155,6 @@ namespace Mono.TextEditor.Highlighting
public Rule ()
{
}
-
- [Obsolete("This constructor is obsolete use parameterless constructor instead.")]
- public Rule (SyntaxMode obsolteMode)
- {
- }
public virtual Rule GetRule (TextDocument doc, string name)
{
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
index 76484611fe..b180208ace 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxMode.cs
@@ -367,9 +367,8 @@ namespace Mono.TextEditor.Highlighting
if ((span.BeginFlags & SpanBeginFlags.FirstNonWs) == SpanBeginFlags.FirstNonWs)
mismatch = CurText.Take (i).Any (ch => !char.IsWhiteSpace (ch));
if ((span.BeginFlags & SpanBeginFlags.NewWord) == SpanBeginFlags.NewWord) {
- if (i - 1 > 0 && i - 1 < CurText.Length) {
- mismatch = !char.IsWhiteSpace (CurText[i - 1]);
- }
+ if (textOffset - 1 > 0 && textOffset - 1 < CurText.Length)
+ mismatch = !char.IsWhiteSpace (CurText [textOffset - 1]);
}
if (mismatch)
continue;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
index ba3c7054c1..d1415b8bf6 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/SyntaxModeService.cs
@@ -74,7 +74,7 @@ namespace Mono.TextEditor.Highlighting
LoadStyle (name);
return GetColorStyle (name);
}
- return GetColorStyle ("Default");
+ return GetColorStyle (TextEditorOptions.DefaultColorStyle);
}
public static IStreamProvider GetProvider (SyntaxMode mode)
@@ -259,62 +259,67 @@ namespace Mono.TextEditor.Highlighting
public void InnerRun ()
{
- bool doUpdate = false;
- int startLine = doc.OffsetToLineNumber (startOffset);
- if (startLine < 0 || mode.Document == null)
- return;
try {
- var lineSegment = doc.GetLine (startLine);
- if (lineSegment == null)
- return;
- var span = lineSegment.StartSpan;
- if (span == null)
+ bool doUpdate = false;
+ int startLine = doc.OffsetToLineNumber (startOffset);
+ if (startLine < 0 || mode.Document == null)
return;
-
- var spanStack = span.Clone ();
-
- SyntaxMode.SpanParser parser = mode.CreateSpanParser(null, spanStack);
-
- foreach (var line in doc.GetLinesStartingAt (startLine)) {
- if (line == null)
+ try {
+ var lineSegment = doc.GetLine (startLine);
+ if (lineSegment == null)
return;
-
- if (line.Offset > endOffset) {
- span = line.StartSpan;
- if (span == null)
+ var span = lineSegment.StartSpan;
+ if (span == null)
+ return;
+
+ var spanStack = span.Clone ();
+
+ SyntaxMode.SpanParser parser = mode.CreateSpanParser(null, spanStack);
+
+ foreach (var line in doc.GetLinesStartingAt (startLine)) {
+ if (line == null)
return;
-
- bool equal = span.Equals(spanStack);
-
- doUpdate |= !equal;
-
- if (equal)
-
- break;
-
+
+ if (line.Offset > endOffset) {
+ span = line.StartSpan;
+ if (span == null)
+ return;
+
+ bool equal = span.Equals(spanStack);
+
+ doUpdate |= !equal;
+
+ if (equal)
+
+ break;
+
+ }
+
+ line.StartSpan = spanStack.Clone();
+
+ parser.ParseSpans(line.Offset, line.LengthIncludingDelimiter);
+
+ while (spanStack.Count > 0 && !EndsWithContinuation(spanStack.Peek(), line))
+
+ parser.PopSpan();
+
}
-
- line.StartSpan = spanStack.Clone();
-
- parser.ParseSpans(line.Offset, line.LengthIncludingDelimiter);
-
- while (spanStack.Count > 0 && !EndsWithContinuation(spanStack.Peek(), line))
-
- parser.PopSpan();
-
+
+ } catch (Exception e) {
+ Console.WriteLine ("Syntax highlighting exception:" + e);
}
-
- } catch (Exception e) {
- Console.WriteLine ("Syntax highlighting exception:" + e);
- }
- if (doUpdate) {
- Gtk.Application.Invoke (delegate {
- doc.RequestUpdate (new UpdateAll ());
- doc.CommitDocumentUpdate ();
- });
+ if (doUpdate) {
+ var storedDoc = doc;
+ Gtk.Application.Invoke (delegate {
+ storedDoc.CommitUpdateAll ();
+ });
+ }
+ IsFinished = true;
+ ManualResetEvent.Set ();
+ } finally {
+ doc = null;
+ mode = null;
}
- IsFinished = true;
- ManualResetEvent.Set ();
}
}
@@ -344,7 +349,11 @@ namespace Mono.TextEditor.Highlighting
lock (updateQueue) {
worker = updateQueue.Dequeue ();
}
- worker.InnerRun ();
+ try {
+ worker.InnerRun ();
+ } catch (Exception e) {
+ Console.WriteLine ("Exception in syntax mode update thread:" + e);
+ }
}
queueSignal.WaitOne ();
}
@@ -423,6 +432,8 @@ namespace Mono.TextEditor.Highlighting
} else if (file.EndsWith (".json", StringComparison.Ordinal)) {
using (var stream = File.OpenRead (file)) {
string styleName = ScanStyle (stream);
+ if (styleName == TextEditorOptions.DefaultColorStyle)
+ continue;
if (!string.IsNullOrEmpty (styleName)) {
styleLookup [styleName] = new UrlStreamProvider (file);
} else {
@@ -432,6 +443,8 @@ namespace Mono.TextEditor.Highlighting
} else if (file.EndsWith (".vssettings", StringComparison.Ordinal)) {
using (var stream = File.OpenRead (file)) {
string styleName = Path.GetFileNameWithoutExtension (file);
+ if (styleName == TextEditorOptions.DefaultColorStyle)
+ continue;
styleLookup [styleName] = new UrlStreamProvider (file);
}
}
@@ -526,7 +539,7 @@ namespace Mono.TextEditor.Highlighting
public static ColorScheme DefaultColorStyle {
get {
- return GetColorStyle ("Default");
+ return GetColorStyle (TextEditorOptions.DefaultColorStyle);
}
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs
index 317d247137..fb0c3eb14c 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs
@@ -90,6 +90,10 @@ namespace Mono.TextEditor.Vi
return CaretMoveActions.PreviousWord;
case 'l':
return ViActions.Right;
+ case 'e':
+ return ViActions.NextSubwordEnd;
+ case 'E':
+ return ViActions.NextWordEnd;
case 'w':
return CaretMoveActions.NextSubword;
case 'W':
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActions.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActions.cs
index 95bb9d5823..dab41c1bd5 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActions.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActions.cs
@@ -32,10 +32,18 @@ using System.Text;
namespace Mono.TextEditor.Vi
{
-
-
public static class ViActions
{
+ public static void NextSubwordEnd (TextEditorData data)
+ {
+ data.Caret.Offset = ViWordFindStrategy.FindNextSubwordEndOffset (data.Document, data.Caret.Offset);
+ }
+
+ public static void NextWordEnd (TextEditorData data)
+ {
+ data.Caret.Offset = ViWordFindStrategy.FindNextWordEndOffset (data.Document, data.Caret.Offset);
+ }
+
public static void MoveToNextEmptyLine (TextEditorData data)
{
if (data.Caret.Line == data.Document.LineCount) {
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs
index 6c65fa3e27..6c768d7935 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViStatusArea.cs
@@ -75,7 +75,8 @@ namespace Mono.TextEditor.Vi
if (!Visible)
Show ();
allocation.Height -= (int)textArea.LineHeight;
- if (lastAllocation == allocation)
+ if (lastAllocation.Width == allocation.Width &&
+ lastAllocation.Height == allocation.Height || allocation.Height <= 1)
return;
lastAllocation = allocation;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViWordFindStrategy.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViWordFindStrategy.cs
index 45fd8a3604..de2efa4548 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViWordFindStrategy.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViWordFindStrategy.cs
@@ -116,7 +116,62 @@ namespace Mono.TextEditor.Vi
}
#endregion
-
+
+ private static bool OffsetIsWithinBounds (TextDocument doc, int offset)
+ {
+ return (offset >= 0 && offset <= doc.TextLength - 1);
+ }
+
+ public static int FindNextSubwordEndOffset (TextDocument doc, int offset)
+ {
+ int myoffset = offset + 1;
+
+ if (!OffsetIsWithinBounds (doc, myoffset)) {
+ return myoffset;
+ }
+
+ char c = doc.GetCharAt (myoffset);
+ // skip whitespace
+ while (char.IsWhiteSpace (c)) {
+ if (OffsetIsWithinBounds (doc, ++myoffset)) {
+ c = doc.GetCharAt (myoffset);
+ } else {
+ return offset;
+ }
+ }
+ var initialClass = ViWordFindStrategy.GetCharacterClass (c);
+ while (ViWordFindStrategy.GetCharacterClass (c) == initialClass && 0 <= myoffset && doc.TextLength-1 > myoffset) {
+ c = doc.GetCharAt (++myoffset);
+ }
+
+ return System.Math.Max (offset, myoffset - 1);
+ }
+
+ public static int FindNextWordEndOffset (TextDocument doc, int offset)
+ {
+ int myoffset = offset + 1;
+
+ if (!OffsetIsWithinBounds (doc, myoffset)) {
+ return myoffset;
+ }
+
+ char c = doc.GetCharAt (myoffset);
+ // skip whitespace
+ while (char.IsWhiteSpace (c)) {
+ if (OffsetIsWithinBounds (doc, ++myoffset)) {
+ c = doc.GetCharAt (myoffset);
+ } else {
+ return offset;
+ }
+ }
+
+ while (!char.IsWhiteSpace (c) && 0 <= myoffset && doc.TextLength-1 > myoffset) {
+ c = doc.GetCharAt (++myoffset);
+ }
+
+ return System.Math.Max (offset, myoffset - 1);
+ }
+
/// <summary>
/// Gets the character class for a given character.
/// </summary>
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.csproj b/main/src/core/Mono.Texteditor/Mono.TextEditor.csproj
index fb42425a1b..86bec61c55 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.csproj
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.csproj
@@ -140,7 +140,6 @@
<Compile Include="Mono.TextEditor\TextMarkerEvent.cs" />
<Compile Include="Mono.TextEditor.Utils\RedBlackTree.cs" />
<Compile Include="Mono.TextEditor\HeightTree.cs" />
- <Compile Include="Mono.TextEditor\Annotatable.cs" />
<Compile Include="Mono.TextEditor\IndentStyle.cs" />
<Compile Include="Mono.TextEditor\IIndentationTracker.cs" />
<Compile Include="Mono.TextEditor.Highlighting\ISyntaxMode.cs" />
@@ -213,7 +212,6 @@
<Compile Include="Mono.TextEditor.PopupWindow\WindowTransparencyDecorator.cs" />
<Compile Include="Mono.TextEditor.Highlighting\SyntaxModeService.cs" />
<Compile Include="Mono.TextEditor.Highlighting\ChunkStyle.cs" />
- <Compile Include="Mono.TextEditor.Highlighting\TextWeight.cs" />
<Compile Include="Mono.TextEditor.Highlighting\ColorDescriptionAttribute.cs" />
<Compile Include="Mono.TextEditor.Highlighting\ColorScheme.cs" />
<Compile Include="Mono.TextEditor.Highlighting\IStreamProvider.cs" />
@@ -224,9 +222,7 @@
<Compile Include="Mono.TextEditor.Vi\ViStatusArea.cs" />
<Compile Include="Mono.TextEditor\MarginMarker.cs" />
<Compile Include="Mono.TextEditor\UnderlineMarker.cs" />
- <Compile Include="Mono.TextEditor\IBackgroundMarker.cs" />
<Compile Include="Mono.TextEditor\LineBackgroundMarker.cs" />
- <Compile Include="Mono.TextEditor\IIconBarMarker.cs" />
<Compile Include="Mono.TextEditor\UrlMarker.cs" />
<Compile Include="Mono.TextEditor\StyleTextLineMarker.cs" />
<Compile Include="Mono.TextEditor\Standalone\UnicodeNewline.cs" />
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/DeleteActions.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/DeleteActions.cs
index d4bdc37775..ce3e4c3b98 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/DeleteActions.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/DeleteActions.cs
@@ -137,6 +137,12 @@ namespace Mono.TextEditor
if (data.Document.LineCount <= 1 || !data.CanEdit (data.Caret.Line))
return;
using (var undo = data.OpenUndoGroup ()) {
+ if (data.IsSomethingSelected) {
+ var startLine = data.GetLine (data.MainSelection.Start.Line);
+ var endLine = data.GetLine (data.MainSelection.End.Line);
+ data.Remove (startLine.Offset, endLine.EndOffsetIncludingDelimiter - startLine.Offset);
+ return;
+ }
var start = GetStartOfLineOffset (data, data.Caret.Location);
var end = GetEndOfLineOffset (data, data.Caret.Location);
data.Remove (start, end - start);
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs
index b4e2c54cd9..c40ea22edf 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/BookmarkMarker.cs
@@ -51,9 +51,11 @@ namespace Mono.TextEditor
public override void DrawForeground (TextEditor editor, Cairo.Context cr, MarginDrawMetrics metrics)
{
- DrawIcon (editor, cr, LineSegment, metrics.X, metrics.Y, metrics.Width, metrics.Height);
+ DrawBookmarkFunc (editor, cr, LineSegment, metrics.X, metrics.Y, metrics.Width, metrics.Height);
}
+ public static Action<TextEditor, Cairo.Context, DocumentLine, double, double, double, double> DrawBookmarkFunc = DrawIcon;
+
static void DrawIcon (TextEditor editor, Cairo.Context cr, DocumentLine lineSegment, double x, double y, double width, double height)
{
if (lineSegment.IsBookmarked) {
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/FoldSegment.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/FoldSegment.cs
index e2b994ddad..4ae6afd272 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/FoldSegment.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/FoldSegment.cs
@@ -73,13 +73,19 @@ namespace Mono.TextEditor
public DocumentLine StartLine {
get {
- return doc.GetLineByOffset (Offset);
+ return doc.GetLineByOffset (System.Math.Min (doc.TextLength, System.Math.Max (0, Offset)));
}
}
public DocumentLine EndLine {
get {
- return doc.GetLineByOffset (EndOffset);
+ return doc.GetLineByOffset (System.Math.Min (doc.TextLength, System.Math.Max (0, EndOffset)));
+ }
+ }
+
+ public bool IsInvalid {
+ get {
+ return Offset < 0;
}
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/ILineSplitter.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/ILineSplitter.cs
index 33b990b373..01cdb77312 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/ILineSplitter.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/ILineSplitter.cs
@@ -24,7 +24,7 @@ namespace Mono.TextEditor
/// Initializes the splitter with a new text. No events are fired during this process.
/// </summary>
/// <param name="text"></param>
- void Initalize (string text);
+ void Initalize (string text, out DocumentLine longestLine);
DocumentLine Get (int number);
DocumentLine GetLineByOffset (int offset);
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs
index c0a88a394e..ba1ff1e007 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/LineSplitter.cs
@@ -137,23 +137,29 @@ namespace Mono.TextEditor
}
//bool inInit;
- public void Initalize (string text)
+ public void Initalize (string text, out DocumentLine longestLine)
{
LineEndingMismatch = false;
Clear ();
+ longestLine = Get (1);
if (string.IsNullOrEmpty (text))
return;
var nodes = new List<TreeNode> ();
var delimiterType = UnicodeNewline.Unknown;
- int offset = 0;
+ int offset = 0, maxLength = 0;
while (true) {
var delimiter = NextDelimiter (text, offset);
if (delimiter.IsInvalid)
break;
int delimiterEndOffset = delimiter.Offset + delimiter.Length;
- var newLine = new TreeNode (delimiterEndOffset - offset, delimiter.UnicodeNewline);
+ var length = delimiterEndOffset - offset;
+ var newLine = new TreeNode (length, delimiter.UnicodeNewline);
nodes.Add (newLine);
+ if (length > maxLength) {
+ maxLength = length;
+ longestLine = newLine;
+ }
if (offset > 0) {
LineEndingMismatch |= delimiterType != delimiter.UnicodeNewline;
} else {
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/PrimitiveLineSplitter.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/PrimitiveLineSplitter.cs
index ed13a9bfac..25e119c629 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/PrimitiveLineSplitter.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/PrimitiveLineSplitter.cs
@@ -61,21 +61,25 @@ namespace Mono.TextEditor
get { return GetLinesStartingAt (DocumentLocation.MinLine); }
}
- public void Initalize (string text)
+ public void Initalize (string text, out DocumentLine longestLine)
{
delimiters = new List<LineSplitter.Delimiter> ();
- int offset = 0;
+ int offset = 0, maxLength = 0, maxLine = 0;
while (true) {
var delimiter = LineSplitter.NextDelimiter (text, offset);
if (delimiter.IsInvalid)
break;
+ var length = delimiter.EndOffset - offset;
+ if (length > maxLength) {
+ maxLength = length;
+ maxLine = delimiters.Count;
+ }
delimiters.Add (delimiter);
-
offset = delimiter.EndOffset;
}
-
+ longestLine = Get (maxLine);
textLength = text.Length;
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs
index 2d64a1e558..49afcd0593 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Document/TextDocument.cs
@@ -197,7 +197,8 @@ namespace Mono.TextEditor
}
public bool SuppressHighlightUpdate { get; set; }
-
+ internal DocumentLine longestLineAtTextSet;
+
public string Text {
get {
return buffer.Text;
@@ -208,7 +209,7 @@ namespace Mono.TextEditor
OnTextReplacing (args);
buffer.Text = value;
extendingTextMarkers = new List<TextLineMarker> ();
- splitter.Initalize (value);
+ splitter.Initalize (value, out longestLineAtTextSet);
ClearFoldSegments ();
OnTextReplaced (args);
versionProvider = new TextSourceVersionProvider ();
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs
index 88c8122f5d..172e11d8c3 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/FoldingScreenbackgroundRenderer.cs
@@ -100,6 +100,8 @@ namespace Mono.TextEditor
const int rightMarginPadding = 16;
for (int i = foldSegments.Count - 1; i >= 0 ; i--) {
var segment = foldSegments [i];
+ if (segment.IsInvalid)
+ continue;
var segmentStartLine = segment.StartLine;
var segmentEndLine = segment.EndLine;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs
index c661fdd1ca..b3dcc07170 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/GtkWorkarounds.cs
@@ -717,24 +717,6 @@ namespace Mono.TextEditor
}
list.Add (item);
}
-
- /// <summary>Map raw GTK key input to work around platform bugs and decompose accelerator keys</summary>
- /// <param name='evt'>The raw key event</param>
- /// <param name='key'>The decomposed accelerator key</param>
- /// <param name='mod'>The decomposed accelerator modifiers</param>
- /// <param name='keyval'>The fully mapped keyval</param>
- [Obsolete ("Use MapKeys")]
- public static void MapRawKeys (Gdk.EventKey evt, out Gdk.Key key, out Gdk.ModifierType mod, out uint keyval)
- {
- Gdk.Key mappedKey;
- Gdk.ModifierType mappedMod;
- KeyboardShortcut[] accels;
- MapKeys (evt, out mappedKey, out mappedMod, out accels);
-
- keyval = (uint) mappedKey;
- key = accels[0].Key;
- mod = accels[0].Modifier;
- }
[System.Runtime.InteropServices.DllImport (PangoUtil.LIBGDK, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gdk_win32_drawable_get_handle (IntPtr drawable);
@@ -1093,22 +1075,22 @@ namespace Mono.TextEditor
static bool supportsHiResIcons = true;
- [DllImport (PangoUtil.LIBQUARTZ)]
+ [DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_icon_source_set_scale (IntPtr source, double scale);
- [DllImport (PangoUtil.LIBQUARTZ)]
+ [DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_icon_source_set_scale_wildcarded (IntPtr source, bool setting);
- [DllImport (PangoUtil.LIBGTK)]
+ [DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
static extern double gtk_widget_get_scale_factor (IntPtr widget);
- [DllImport (PangoUtil.LIBGDK)]
+ [DllImport (PangoUtil.LIBGDK, CallingConvention = CallingConvention.Cdecl)]
static extern double gdk_screen_get_monitor_scale_factor (IntPtr widget, int monitor);
- [DllImport (PangoUtil.LIBGOBJECT)]
+ [DllImport (PangoUtil.LIBGOBJECT, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_get_data (IntPtr source, string name);
- [DllImport (PangoUtil.LIBGTK)]
+ [DllImport (PangoUtil.LIBGTK, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_icon_set_render_icon_scaled (IntPtr handle, IntPtr style, int direction, int state, int size, IntPtr widget, IntPtr intPtr, ref double scale);
public static bool SetSourceScale (Gtk.IconSource source, double scale)
@@ -1190,6 +1172,19 @@ namespace Mono.TextEditor
supportsHiResIcons = false;
return 1;
}
+
+ public static double GetScaleFactor ()
+ {
+ return GetScaleFactor (Gdk.Screen.Default, 0);
+ }
+
+ public static double GetPixelScale ()
+ {
+ if (Platform.IsWindows)
+ return GetScaleFactor ();
+ else
+ return 1d;
+ }
public static Gdk.Pixbuf RenderIcon (this Gtk.IconSet iconset, Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail, double scale)
{
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs
index 3f9e4378b3..89f264056d 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/IconMargin.cs
@@ -1,4 +1,4 @@
-// BookmarkMargin.cs
+// IconMargin.cs
//
// Author:
// Mike Krüger <mkrueger@novell.com>
@@ -35,13 +35,11 @@ namespace Mono.TextEditor
{
TextEditor editor;
Cairo.Color backgroundColor, separatorColor;
- Pango.Layout layout;
- int marginWidth = 18;
+ const int marginWidth = 22;
public IconMargin (TextEditor editor)
{
this.editor = editor;
- layout = PangoUtil.CreateLayout (editor);
}
public override double Width {
@@ -50,22 +48,10 @@ namespace Mono.TextEditor
}
}
- public override void Dispose ()
- {
- layout = layout.Kill ();
- }
-
internal protected override void OptionsChanged ()
{
backgroundColor = editor.ColorStyle.IndicatorMargin.Color;
separatorColor = editor.ColorStyle.IndicatorMarginSeparator.Color;
-
- layout.FontDescription = editor.Options.Font;
- layout.SetText ("!");
- int tmp;
- layout.GetPixelSize (out tmp, out this.marginWidth);
- marginWidth *= 12;
- marginWidth /= 10;
}
internal protected override void MousePressed (MarginMouseEventArgs args)
@@ -78,11 +64,6 @@ namespace Mono.TextEditor
var marginMarker = marker as MarginMarker;
if (marginMarker != null)
marginMarker.InformMousePress (editor, this, args);
-
-#pragma warning disable 618
- if (marker is IIconBarMarker)
- ((IIconBarMarker)marker).MousePress (args);
-#pragma warning restore 618
}
}
}
@@ -97,11 +78,6 @@ namespace Mono.TextEditor
var marginMarker = marker as MarginMarker;
if (marginMarker != null)
marginMarker.InformMouseRelease (editor, this, args);
-
-#pragma warning disable 618
- if (marker is IIconBarMarker)
- ((IIconBarMarker)marker).MouseRelease (args);
-#pragma warning restore 618
}
}
}
@@ -116,11 +92,6 @@ namespace Mono.TextEditor
var marginMarker = marker as MarginMarker;
if (marginMarker != null)
marginMarker.InformMouseHover (editor, this, args);
-
-#pragma warning disable 618
- if (marker is IIconBarMarker)
- ((IIconBarMarker)marker).MouseHover (args);
-#pragma warning restore 618
}
}
}
@@ -134,15 +105,6 @@ namespace Mono.TextEditor
if (marginMarker != null && marginMarker.CanDrawBackground (this)) {
backgroundIsDrawn = marginMarker.DrawBackground (editor, ctx, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
}
-
-#pragma warning disable 618
- var iconMarker = marker as IIconBarMarker;
- if (iconMarker == null || !iconMarker.CanDrawBackground)
- continue;
- iconMarker.DrawBackground (editor, ctx, lineSegment, line, x, y, (int)Width, editor.LineHeight);
- backgroundIsDrawn = true;
- break;
-#pragma warning restore 618
}
}
@@ -163,11 +125,6 @@ namespace Mono.TextEditor
if (marginMarker != null && marginMarker.CanDrawForeground (this)) {
marginMarker.DrawForeground (editor, ctx, new MarginDrawMetrics (this, area, lineSegment, line, x, y, lineHeight));
}
-
-#pragma warning disable 618
- if (marker is IIconBarMarker)
- ((IIconBarMarker)marker).DrawIcon (editor, ctx, lineSegment, line, x, y, (int)Width, editor.LineHeight);
-#pragma warning restore 618
}
if (DrawEvent != null)
DrawEvent (this, new BookmarkMarginDrawEventArgs (editor, ctx, lineSegment, line, x, y));
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
index a42598f7b5..f69c3d4f23 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
@@ -1,5 +1,5 @@
//
-// TextEditor.cs
+// TextArea.cs
//
// Author:
// Mike Krüger <mkrueger@novell.com>
@@ -202,8 +202,8 @@ namespace Mono.TextEditor
HideTooltip (false);
double value = this.textEditorData.HAdjustment.Value;
if (value != System.Math.Round (value)) {
- this.textEditorData.HAdjustment.Value = System.Math.Round (value);
- return;
+ value = System.Math.Round (value);
+ this.textEditorData.HAdjustment.Value = value;
}
textViewMargin.HideCodeSegmentPreviewWindow ();
QueueDrawArea ((int)this.textViewMargin.XOffset, 0, this.Allocation.Width - (int)this.textViewMargin.XOffset, this.Allocation.Height);
@@ -226,8 +226,8 @@ namespace Mono.TextEditor
textViewMargin.HideCodeSegmentPreviewWindow ();
double value = this.textEditorData.VAdjustment.Value;
if (value != System.Math.Round (value)) {
- this.textEditorData.VAdjustment.Value = System.Math.Round (value);
- return;
+ value = System.Math.Round (value);
+ this.textEditorData.VAdjustment.Value = value;
}
if (isMouseTrapped)
FireMotionEvent (mx + textViewMargin.XOffset, my, lastState);
@@ -801,24 +801,6 @@ namespace Mono.TextEditor
base.OnDestroyed ();
}
-
- [Obsolete("This method has been moved to TextEditorData. Will be removed in future versions.")]
- public void ClearTooltipProviders ()
- {
- textEditorData.ClearTooltipProviders ();
- }
-
- [Obsolete("This method has been moved to TextEditorData. Will be removed in future versions.")]
- public void AddTooltipProvider (TooltipProvider provider)
- {
- textEditorData.AddTooltipProvider (provider);
- }
-
- [Obsolete("This method has been moved to TextEditorData. Will be removed in future versions.")]
- public void RemoveTooltipProvider (TooltipProvider provider)
- {
- textEditorData.RemoveTooltipProvider (provider);
- }
public void RedrawMargin (Margin margin)
{
@@ -1718,7 +1700,7 @@ namespace Mono.TextEditor
if (this.textEditorData.VAdjustment != null) {
double maxY = textEditorData.HeightTree.TotalHeight;
// if (maxY > allocation.Height)
- maxY += allocation.Height - LineHeight;
+ maxY += allocation.Height / 2 - LineHeight;
foreach (var containerChild in editor.containerChildren.Concat (containerChildren)) {
maxY = System.Math.Max (maxY, containerChild.Y + containerChild.Child.SizeRequest().Height);
@@ -1866,9 +1848,6 @@ namespace Mono.TextEditor
animation.Drawer.Draw (cr);
}
- if (HasFocus)
- textViewMargin.DrawCaret (e.Window, e.Area);
-
OnPainted (new PaintEventArgs (cr, cairoArea));
}
@@ -2647,11 +2626,6 @@ namespace Mono.TextEditor
#endregion
#region Tooltips
- [Obsolete("This property has been moved to TextEditorData. Will be removed in future versions.")]
- public IEnumerable<TooltipProvider> TooltipProviders {
- get { return textEditorData.TooltipProviders; }
- }
-
// Tooltip fields
const int TooltipTimeout = 650;
TooltipItem tipItem;
@@ -2803,6 +2777,7 @@ namespace Mono.TextEditor
}
tipWindow.Destroy ();
tipWindow = null;
+ tipItem = null;
}
}
@@ -2838,16 +2813,9 @@ namespace Mono.TextEditor
void OnTextSet (object sender, EventArgs e)
{
- DocumentLine longest = longestLine;
- foreach (DocumentLine line in Document.Lines) {
- if (longest == null || line.Length > longest.Length)
- longest = line;
- }
- if (longest != longestLine) {
- var layoutWrapper = textViewMargin.GetLayout (longest);
- int width = (int)(layoutWrapper.Width);
- if (layoutWrapper.IsUncached)
- layoutWrapper.Dispose ();
+ DocumentLine longest = Document.longestLineAtTextSet;
+ if (longest != longestLine && longest != null) {
+ int width = (int)(longest.Length * textViewMargin.CharWidth);
if (width > this.longestLineWidth) {
this.longestLineWidth = width;
this.longestLine = longest;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs
index c564ef065c..7039fd1c57 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextEditor.cs
@@ -277,7 +277,7 @@ namespace Mono.TextEditor
void SetChildrenPositions (Rectangle allocation)
{
foreach (EditorContainerChild child in containerChildren.ToArray ()) {
- if (child.Child == textArea)
+ if (child.Child == textArea || child.Child is Mono.TextEditor.Vi.ViStatusArea)
continue;
ResizeChild (allocation, child);
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
index abd4bf3146..a465bac8e4 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextViewMargin.cs
@@ -699,10 +699,10 @@ namespace Mono.TextEditor
var curRect = new Gdk.Rectangle ((int)caretX, (int)caretY, (int)this.charWidth, (int)LineHeight - 1);
if (curRect != caretRectangle) {
caretRectangle = curRect;
- textEditor.TextArea.QueueDrawArea (caretRectangle.X - (int)textEditor.Options.Zoom,
- (int)(caretRectangle.Y + (-textEditor.VAdjustment.Value + caretVAdjustmentValue)),
- caretRectangle.Width + (int)textEditor.Options.Zoom,
- caretRectangle.Height + 1);
+// textEditor.TextArea.QueueDrawArea (caretRectangle.X - (int)textEditor.Options.Zoom,
+// (int)(caretRectangle.Y + (-textEditor.VAdjustment.Value + caretVAdjustmentValue)),
+// caretRectangle.Width + (int)textEditor.Options.Zoom,
+// caretRectangle.Height + 1);
caretVAdjustmentValue = textEditor.VAdjustment.Value;
}
@@ -1578,10 +1578,6 @@ namespace Mono.TextEditor
}
}
-
- bool drawBg = true;
- bool drawText = true;
-
var metrics = new LineMetrics {
LineSegment = line,
Layout = layout,
@@ -1608,15 +1604,6 @@ namespace Mono.TextEditor
if (marker.DrawBackground (textEditor, cr, metrics)) {
isSelectionDrawn |= (marker.Flags & TextLineMarkerFlags.DrawsSelection) == TextLineMarkerFlags.DrawsSelection;
}
-
-#pragma warning disable 618
- var bgMarker = marker as IBackgroundMarker;
- if (bgMarker != null) {
- isSelectionDrawn |= (marker.Flags & TextLineMarkerFlags.DrawsSelection) == TextLineMarkerFlags.DrawsSelection;
- drawText &= bgMarker.DrawBackground (textEditor, cr, metrics.Layout, metrics.SelectionStart, metrics.SelectionEnd, metrics.TextStartOffset, metrics.TextEndOffset, y, metrics.TextRenderStartPosition, metrics.TextRenderEndPosition, ref drawBg);
- continue;
- }
-#pragma warning restore 618
}
foreach (var marker in Document.GetTextSegmentMarkersAt (line).Where (m => m.IsVisible)) {
@@ -2006,7 +1993,7 @@ namespace Mono.TextEditor
}
mouseSelectionMode = MouseSelectionMode.SingleChar;
- if (textEditor.IsSomethingSelected && textEditor.SelectionRange.Offset <= offset && offset < textEditor.SelectionRange.EndOffset && clickLocation != textEditor.Caret.Location) {
+ if (textEditor.IsSomethingSelected && IsInsideSelection (clickLocation) && clickLocation != textEditor.Caret.Location) {
inDrag = true;
} else {
if ((args.ModifierState & Gdk.ModifierType.ShiftMask) == ModifierType.ShiftMask) {
@@ -2060,6 +2047,19 @@ namespace Mono.TextEditor
}
}
+ bool IsInsideSelection (DocumentLocation clickLocation)
+ {
+ var selection = textEditor.MainSelection;
+ if (selection.SelectionMode == SelectionMode.Block) {
+ int minColumn = System.Math.Min (selection.Anchor.Column, selection.Lead.Column);
+ int maxColumn = System.Math.Max (selection.Anchor.Column, selection.Lead.Column);
+
+ return selection.MinLine <= clickLocation.Line && clickLocation.Line <= selection.MaxLine &&
+ minColumn <= clickLocation.Column && clickLocation.Column <= maxColumn;
+ }
+ return selection.Start <= clickLocation && clickLocation < selection.End;
+ }
+
protected internal override void MouseReleased (MarginMouseEventArgs args)
{
if (args.Button != 2 && !InSelectionDrag)
@@ -2644,6 +2644,8 @@ namespace Mono.TextEditor
// Check if line is beyond the document length
if (line == null) {
+ DrawScrollShadow (cr, x, y, _lineHeight);
+
var marker = Document.GetExtendingTextMarker (lineNr);
if (marker != null)
marker.Draw (textEditor, cr, lineNr, lineArea);
@@ -2855,17 +2857,22 @@ namespace Mono.TextEditor
}
lastLineRenderWidth = position;
+ DrawScrollShadow (cr, x, y, _lineHeight);
+ if (wrapper != null && wrapper.IsUncached)
+ wrapper.Dispose ();
+ }
+
+ void DrawScrollShadow (Cairo.Context cr, double x, double y, double _lineHeight)
+ {
if (textEditor.HAdjustment.Value > 0) {
cr.LineWidth = textEditor.Options.Zoom;
for (int i = 0; i < verticalShadowAlphaTable.Length; i++) {
- cr.SetSourceRGBA (0, 0, 0, 1 - verticalShadowAlphaTable[i]);
+ cr.SetSourceRGBA (0, 0, 0, 1 - verticalShadowAlphaTable [i]);
cr.MoveTo (x + i * cr.LineWidth + 0.5, y);
cr.LineTo (x + i * cr.LineWidth + 0.5, y + 1 + _lineHeight);
cr.Stroke ();
}
}
- if (wrapper != null && wrapper.IsUncached)
- wrapper.Dispose ();
}
static double[] verticalShadowAlphaTable = new [] { 0.71, 0.84, 0.95 };
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/HelperMethods.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/HelperMethods.cs
index 50583be5f1..29c68acd36 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/HelperMethods.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/HelperMethods.cs
@@ -149,24 +149,5 @@ namespace Mono.TextEditor
{
cr.SetSourceRGBA (color.R, color.G, color.B, color.A);
}
-
- //this is needed for building against old Mono.Cairo versions
- [Obsolete]
- public static void SetSource (this Cairo.Context cr, Cairo.Pattern pattern)
- {
- cr.Pattern = pattern;
- }
-
- [Obsolete]
- public static Cairo.Surface GetTarget (this Cairo.Context cr)
- {
- return cr.Target;
- }
-
- [Obsolete]
- public static void Dispose (this Cairo.Context cr)
- {
- ((IDisposable)cr).Dispose ();
- }
}
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/InsertionCursorEditMode.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/InsertionCursorEditMode.cs
index a992a476d8..b23ade4f51 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/InsertionCursorEditMode.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/InsertionCursorEditMode.cs
@@ -121,7 +121,6 @@ namespace Mono.TextEditor
editor.Destroyed += HandleEditorDestroy;
HelpWindow.ShowAll ();
editor.TextArea.AddTopLevelWidget (HelpWindow, 0, 0);
- ((TextEditor.EditorContainerChild)editor.TextArea[HelpWindow]).FixedPosition = true;
if (positionWindow) {
PositionHelpWindow ();
@@ -271,7 +270,7 @@ namespace Mono.TextEditor
const int HelpWindowMargin = 2;
void SetHelpWindowPosition ()
{
- int y = (int)(editor.LineToY (insertionPoints [CurIndex].Location.Line) - editor.VAdjustment.Value);
+ int y = (int)(editor.LineToY (insertionPoints [CurIndex].Location.Line));
PositionHelpWindow (editor.Allocation.Width - HelpWindow.Allocation.Width - HelpWindowMargin, y);
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
index 3cf8d8c8a7..3028e70c6d 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
@@ -61,7 +61,8 @@ namespace Mono.TextEditor
bool removeTrailingWhitespaces = true;
bool allowTabsAfterNonTabs = true;
string fontName = DEFAULT_FONT;
- string colorStyle = "Default";
+ public static string DefaultColorStyle = "Default";
+ string colorStyle = DefaultColorStyle;
Pango.FontDescription font, gutterFont;
double zoom = 1d;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs
index 27cddbbe71..f1224ac474 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLineMarker.cs
@@ -134,17 +134,9 @@ namespace Mono.TextEditor
public TextLineMarker ()
{
}
-
- [Obsolete("Use Draw (TextEditor editor, Cairo.Context cr, double y, LineMetrics metrics) instead.")]
- public virtual void Draw (TextEditor editor, Cairo.Context cr, Pango.Layout layout, bool selected, int startOffset, int endOffset, double y, double startXPos, double endXPos)
- {
- }
public virtual void Draw (TextEditor editor, Cairo.Context cr, LineMetrics metrics)
{
-#pragma warning disable 618
- Draw (editor, cr, metrics.Layout.Layout, false, metrics.TextStartOffset, metrics.TextEndOffset, metrics.LineYRenderStartPosition, metrics.TextRenderStartPosition, metrics.TextRenderEndPosition);
-#pragma warning restore 618
}
public virtual ChunkStyle GetStyle (ChunkStyle baseStyle)
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs
index 01e5ac2361..80ff0e47b4 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs
@@ -341,9 +341,8 @@ namespace Mono.TextEditor
wasReplaced = true;
int offset = e.Offset - baseOffset;
int delta = e.ChangeDelta;
- if (!IsInUpdate && !links.Where (link => link.Links.Where (segment => segment.Contains (offset)
- || segment.EndOffset == offset).
- Any ()).Any ()) {
+ if (!IsInUpdate && !links.Any (link => link.Links.Any (segment => segment.Contains (offset)
+ || segment.EndOffset == offset))) {
SetCaretPosition = false;
ExitTextLinkMode ();
return;
diff --git a/main/src/core/Mono.Texteditor/Styles/DefaultStyle.json b/main/src/core/Mono.Texteditor/Styles/DefaultStyle.json
index b23d632de8..1bc505a61c 100644
--- a/main/src/core/Mono.Texteditor/Styles/DefaultStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/DefaultStyle.json
@@ -1,246 +1,237 @@
{
- "name":"Default",
- "version":"1.0",
- "description": "Bright and friendly, just like Xamarin.",
- "originator": "Xamarin Inc. (http://xamarin.com)",
-
- "palette":[
- { "name":"butter2", "value":"#edd400" },
- { "name":"chameleon1", "value":"#8ae234" },
- { "name":"chameleon2", "value":"#73d216" },
- { "name":"chameleon3", "value":"#4e9a06" },
- { "name":"chocolate1", "value":"#e9b96e" },
- { "name":"chocolate2", "value":"#c17d11" },
- { "name":"chocolate3", "value":"#8f5902" },
- { "name":"skyblue1", "value":"#729fcf" },
- { "name":"skyblue2", "value":"#3465a4" },
- { "name":"plum2", "value":"#75507b" },
- { "name":"scarletred1", "value":"#ef2929" },
- { "name":"aluminium1", "value":"#eeeeec" },
- { "name":"aluminium2", "value":"#d3d7cf" },
- { "name":"aluminium3", "value":"#babdb6" },
- { "name":"aluminium4", "value":"#888a85" },
- { "name":"aluminium5", "value":"#555753" },
- { "name":"aluminium6", "value":"#2e3436" },
-
- { "name":"text-black", "value":"#333" },
- { "name":"comment-gray", "value":"#888" },
- { "name":"literal-orange", "value":"#F57E00" },
- { "name":"literal-escape", "value":"#A53E00" },
- { "name":"keyword-teal", "value":"#009695" },
- { "name":"selection-bg", "value":"#b5d5ff" },
- { "name":"invalid-red", "value":"#C44D58" },
-
- { "name":"orangesicle", "value":"#fdab75" },
- { "name":"orangesicle-light", "value":"#fed9c0" }
- ],
-
- "colors":[
- { "name": "Background(Read Only)", "color":"white" },
-
- { "name": "Search result background", "color":"#F6B94D" },
- { "name": "Search result background (highlighted)", "color":"#E5992F" },
-
- { "name": "Column Ruler", "color":"aluminium3" },
-
- { "name": "Fold Square", "color":"aluminium4", "secondcolor":"white" },
- { "name": "Fold Cross", "color":"aluminium4", "secondcolor":"white" },
-
- { "name": "Indentation Guide", "color":"aluminium2" },
-
- { "name": "Indicator Margin", "color":"aluminium1" },
- { "name": "Indicator Margin(Separator)", "color":"aluminium3" },
-
- { "name": "Tooltip Border", "color":"#b2b2b2" },
- { "name": "Tooltip Pager Top", "color":"#ffffff" },
- { "name": "Tooltip Pager Bottom", "color":"#f5f5f5" },
- { "name": "Tooltip Pager Triangle", "color":"#737373" },
- { "name": "Tooltip Pager Text", "color":"#828282" },
-
- { "name": "Notification Border", "color":"#D2B457" },
-
- { "name": "Completion Matching Substring", "color":"#BA3373" },
- { "name": "Completion Border", "color":"#C9C9C9" },
- { "name": "Completion Border(Inactive)", "color":"#666666" },
-
- { "name": "Bookmarks", "color":"white", "secondcolor":"skyblue" },
-
- { "name": "Underline(Error)", "color":"#E896A0" },
- { "name": "Underline(Warning)", "color":"#FEB958" },
- { "name": "Underline(Suggestion)", "color":"#9CC0EA" },
- { "name": "Underline(Hint)", "color":"#9CC0EA" },
-
- { "name": "Quick Diff(Dirty)", "color":"orangesicle-light" },
- { "name": "Quick Diff(Changed)", "color":"orangesicle" },
-
- { "name": "Brace Matching(Rectangle)", "color":"orangesicle", "secondcolor":"orangesicle-light" },
- { "name": "Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9", "bordercolor":"#B1DFF9" },
- { "name": "Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD", "bordercolor":"#FFD6DD" },
-
- { "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Disabled)", "color":"#AB616B", "secondcolor":"white" },
- { "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
-
- { "name": "Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2"},
- { "name": "Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
-
- { "name": "Message Bubble Error Marker", "color":"#df6962"},
- { "name": "Message Bubble Error Tag", "color":"#d83f3f", "secondcolor":"white"},
- { "name": "Message Bubble Error Counter", "color":"white", "secondcolor":"#d83f3f"},
- { "name": "Message Bubble Error IconMargin", "color":"#d83f3f", "bordercolor":"#b12a2a"},
- { "name": "Message Bubble Error Line", "color":"#fbe4e6"},
- { "name": "Message Bubble Error Tooltip", "color":"#D10B0B"},
-
- { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
- { "name": "Message Bubble Warning Tag", "color":"#e68100", "secondcolor":"white"},
- { "name": "Message Bubble Warning Counter", "color":"white", "secondcolor":"#e68100"},
- { "name": "Message Bubble Warning IconMargin", "color":"#e68100", "bordercolor":"#c76f00"},
- { "name": "Message Bubble Warning Line", "color":"#fff1da"},
- { "name": "Message Bubble Warning Tooltip", "color":"#D1590B"},
-
- { "name": "Code Analysis Status All Good", "color":"#B1E479", "bordercolor":"#7CCD2F"},
- { "name": "Code Analysis Status Suggestions", "color":"#77ABE9", "bordercolor":"#4A90E2"},
- { "name": "Code Analysis Status Warnings", "color":"#F7C46F", "bordercolor":"#F5A623"},
- { "name": "Code Analysis Status Errors", "color":"#E67A79", "bordercolor":"#E05F5E"}
- ],
-
- "text":[
- { "name": "Plain Text", "fore":"text-black", "back":"white" },
- { "name": "Selected Text", "back":"selection-bg" },
- { "name": "Selected Text(Inactive)", "back":"aluminium2" },
-
- { "name": "Collapsed Text", "fore":"aluminium4", "back":"white" },
-
- { "name": "Line Numbers", "fore":"aluminium4", "back":"white"},
-
- { "name": "Punctuation", "fore":"text-black" },
- { "name": "Punctuation(Brackets)", "fore":"text-black" },
-
- { "name": "Comment(Line)", "fore":"comment-gray", "style":"italic" },
- { "name": "Comment(Block)", "fore":"comment-gray", "style":"italic" },
- { "name": "Comment(Doc)", "fore":"comment-gray", "style":"italic" },
- { "name": "Comment(DocTag)", "fore":"comment-gray", "style":"italic" },
- { "name": "Comment Tag", "fore":"comment-gray", "weight":"bold" },
- { "name": "Excluded Code", "fore":"comment-gray" },
-
- { "name": "String", "fore":"literal-orange"},
- { "name": "String(Escape)", "fore":"literal-escape"},
- { "name": "String(C# @ Verbatim)", "fore":"literal-orange"},
-
- { "name": "Number", "fore":"literal-orange"},
-
- { "name": "Preprocessor", "fore":"#c12dad" },
- { "name": "Preprocessor(Region Name)", "fore":"#c12dad" },
-
- { "name": "Xml Text", "fore":"text-black" },
- { "name": "Xml Delimiter", "fore":"text-black" },
- { "name": "Xml Name", "fore":"skyblue2" },
- { "name": "Xml Attribute", "fore":"text-black" },
- { "name": "Xml Attribute Quotes", "fore":"literal-orange" },
- { "name": "Xml Attribute Value", "fore":"literal-orange" },
- { "name": "Xml Comment", "fore":"comment-gray" },
- { "name": "Xml CData Section", "fore":"text-black" },
-
- { "name": "Html Attribute Name", "fore":"text-black" },
- { "name": "Html Attribute Value", "fore":"literal-orange" },
- { "name": "Html Comment", "fore":"comment-gray" },
- { "name": "Html Element Name", "fore":"skyblue2" },
- { "name": "Html Entity", "fore":"#c12dad" },
- { "name": "Html Operator", "fore":"skyblue2" },
- { "name": "Html Server-Side Script", "fore":"text-black", "back":"#fdf0bd" },
- { "name": "Html Tag Delimiter", "fore":"skyblue2" },
- { "name": "Razor Code", "fore":"text-black", "back":"#fdfaed" },
-
- { "name": "Tooltip Text", "fore":"text-black", "back":"#feffe9" },
- { "name": "Notification Text", "fore":"text-black", "back":"#feffe9" },
-
- { "name": "Completion Text", "fore":"#434343", "back":"#F0F6F8" },
- { "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
- { "name": "Completion Selected Text(Inactive)", "fore":"#434343", "back":"#FFFFFF" },
-
- { "name": "Keyword(Access)", "fore":"keyword-teal" },
- { "name": "Keyword(Type)", "fore":"keyword-teal" },
- { "name": "Keyword(Operator)", "fore":"keyword-teal" },
- { "name": "Keyword(Selection)", "fore":"keyword-teal" },
- { "name": "Keyword(Iteration)", "fore":"keyword-teal" },
- { "name": "Keyword(Jump)", "fore":"keyword-teal" },
- { "name": "Keyword(Context)", "fore":"keyword-teal" },
- { "name": "Keyword(Exception)", "fore":"keyword-teal" },
- { "name": "Keyword(Modifiers)", "fore":"keyword-teal" },
- { "name": "Keyword(Constants)", "fore":"keyword-teal" },
- { "name": "Keyword(Void)", "fore":"keyword-teal" },
- { "name": "Keyword(Namespace)", "fore":"keyword-teal" },
- { "name": "Keyword(Property)", "fore":"keyword-teal" },
- { "name": "Keyword(Declaration)", "fore":"keyword-teal" },
- { "name": "Keyword(Parameter)", "fore":"keyword-teal" },
- { "name": "Keyword(Operator Declaration)", "fore":"keyword-teal" },
- { "name": "Keyword(Other)", "fore":"keyword-teal" },
-
- { "name": "User Types", "fore":"skyblue2" },
- { "name": "User Types(Enums)", "fore":"skyblue2" },
- { "name": "User Types(Interfaces)", "fore":"skyblue2" },
- { "name": "User Types(Delegates)", "fore":"skyblue2" },
- { "name": "User Types(Value types)", "fore":"skyblue2" },
- { "name": "User Types(Type parameters)", "fore":"skyblue2" },
-
- { "name": "User Field Usage", "fore":"text-black" },
- { "name": "User Field Declaration", "fore":"text-black" },
-
- { "name": "User Property Usage", "fore":"text-black" },
- { "name": "User Property Declaration", "fore":"text-black" },
-
- { "name": "User Event Usage", "fore":"text-black" },
- { "name": "User Event Declaration", "fore":"text-black" },
-
- { "name": "User Method Usage", "fore":"text-black" },
- { "name": "User Method Declaration", "fore":"text-black" },
-
- { "name": "User Parameter Usage", "fore":"text-black" },
- { "name": "User Parameter Declaration", "fore":"text-black" },
-
- { "name": "User Variable Usage", "fore":"text-black" },
- { "name": "User Variable Declaration", "fore":"text-black" },
-
- { "name": "String Format Items", "fore":"#FF0000" },
-
- { "name": "Syntax Error", "fore":"invalid-red" },
-
- { "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
- { "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
-
- { "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
- { "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
-
- { "name": "Diff Line(Added)", "fore":"skyblue2" },
- { "name": "Diff Line(Removed)", "fore":"scarletred1" },
- { "name": "Diff Line(Changed)", "fore":"plum2" },
- { "name": "Diff Header", "fore":"chameleon3" },
- { "name": "Diff Header(Separator)", "fore":"chameleon3", "weight":"bold" },
- { "name": "Diff Header(Old)", "fore":"scarletred1", "weight":"bold" },
- { "name": "Diff Header(New)", "fore":"skyblue2", "weight":"bold" },
- { "name": "Diff Location", "fore":"plum2", "weight":"bold" },
-
- { "name": "Css Comment", "fore":"comment-gray", "weight":"bold" },
- { "name": "Css Property Name", "fore":"black", "weight":"bold" },
- { "name": "Css Property Value", "fore":"literal-orange", "weight":"bold" },
- { "name": "Css Selector", "fore":"comment-gray", "weight":"bold" },
- { "name": "Css String Value", "fore":"literal-orange", "weight":"bold" },
- { "name": "Css Keyword", "fore":"keyword-teal", "weight":"bold" },
-
- { "name": "Script Comment", "fore":"comment-gray" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"keyword-teal" },
- { "name": "Script Number", "fore":"literal-orange" },
- { "name": "Script Operator" },
- { "name": "Script String", "fore":"literal-orange" }
- ]
+ "name":"Default",
+ "version":"1.3",
+ "description":"Bright and friendly, just like Xamarin.",
+ "originator":"Xamarin Inc. (http://xamarin.com)",
+
+ "palette":[
+ { "name":"butter2", "value":"#edd400" },
+ { "name":"chameleon1", "value":"#8ae234" },
+ { "name":"chameleon2", "value":"#73d216" },
+ { "name":"chameleon3", "value":"#4e9a06" },
+ { "name":"chocolate1", "value":"#e9b96e" },
+ { "name":"chocolate2", "value":"#c17d11" },
+ { "name":"chocolate3", "value":"#8f5902" },
+ { "name":"skyblue1", "value":"#729fcf" },
+ { "name":"skyblue2", "value":"#3465a4" },
+ { "name":"plum2", "value":"#75507b" },
+ { "name":"scarletred1", "value":"#ef2929" },
+ { "name":"aluminium1", "value":"#eeeeec" },
+ { "name":"aluminium2", "value":"#d3d7cf" },
+ { "name":"aluminium3", "value":"#babdb6" },
+ { "name":"aluminium4", "value":"#888a85" },
+ { "name":"aluminium5", "value":"#555753" },
+ { "name":"aluminium6", "value":"#2e3436" },
+ { "name":"text-black", "value":"#333" },
+ { "name":"comment-gray", "value":"#888" },
+ { "name":"literal-orange", "value":"#F57E00" },
+ { "name":"literal-escape", "value":"#A53E00" },
+ { "name":"keyword-teal", "value":"#009695" },
+ { "name":"selection-bg", "value":"#b5d5ff" },
+ { "name":"invalid-red", "value":"#C44D58" },
+ { "name":"orangesicle", "value":"#fdab75" },
+ { "name":"orangesicle-light", "value":"#fed9c0" }
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"white" },
+
+ { "name":"Search result background", "color":"#F6B94D" },
+ { "name":"Search result background (highlighted)", "color":"#E5992F" },
+
+ { "name":"Column Ruler", "color":"aluminium3" },
+
+ { "name":"Fold Square", "color":"aluminium4", "secondcolor":"white" },
+ { "name":"Fold Cross", "color":"aluminium4", "secondcolor":"white" },
+
+ { "name":"Indentation Guide", "color":"aluminium2" },
+
+ { "name":"Indicator Margin", "color":"aluminium1" },
+ { "name":"Indicator Margin(Separator)", "color":"aluminium3" },
+
+ { "name":"Tooltip Border", "color":"#b2b2b2" },
+ { "name":"Tooltip Pager Top", "color":"#ffffff" },
+ { "name":"Tooltip Pager Bottom", "color":"#f5f5f5" },
+ { "name":"Tooltip Pager Triangle", "color":"#737373" },
+ { "name":"Tooltip Pager Text", "color":"#828282" },
+
+ { "name":"Notification Border", "color":"#D2B457" },
+
+ { "name":"Completion Matching Substring", "color":"#BA3373" },
+ { "name":"Completion Border", "color":"#C9C9C9" },
+ { "name":"Completion Border(Inactive)", "color":"#666666" },
+
+ { "name":"Bookmarks", "color":"white", "secondcolor":"skyblue" },
+
+ { "name":"Underline(Error)", "color":"#E896A0" },
+ { "name":"Underline(Warning)", "color":"#FEB958" },
+ { "name":"Underline(Suggestion)", "color":"#9CC0EA" },
+ { "name":"Underline(Hint)", "color":"#9CC0EA" },
+
+ { "name":"Quick Diff(Dirty)", "color":"orangesicle-light" },
+ { "name":"Quick Diff(Changed)", "color":"orangesicle" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"orangesicle", "secondcolor":"orangesicle-light" },
+ { "name":"Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9", "bordercolor":"#B1DFF9" },
+ { "name":"Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD", "bordercolor":"#FFD6DD" },
+
+ { "name":"Breakpoint Marker", "color":"#f9dbda", "bordercolor":"#ebcccb" },
+ { "name":"Breakpoint Marker(Disabled)", "color":"#e9e9e9", "bordercolor":"#dbdbdb" },
+ { "name":"Breakpoint Marker(Invalid)", "color":"#f1e3e3", "bordercolor":"#e3d5d5" },
+
+ { "name":"Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2" },
+ { "name":"Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3" },
+
+ { "name":"Debugger Current Line Marker", "color":"#f8f4a1", "bordercolor":"#ede993" },
+ { "name":"Debugger Stack Line Marker", "color":"#ccfca6", "bordercolor":"#bff197" },
+
+ { "name":"Primary Link", "color":"chameleon3", "secondcolor":"chameleon2" },
+ { "name":"Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1" },
+ { "name":"Secondary Link", "color":"aluminium2", "secondcolor":"white" },
+ { "name":"Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1" },
+
+ { "name":"Message Bubble Error Marker", "color":"#df6962" },
+ { "name":"Message Bubble Error Tag", "color":"#d83f3f", "secondcolor":"white" },
+ { "name":"Message Bubble Error Counter", "color":"white", "secondcolor":"#d83f3f" },
+ { "name":"Message Bubble Error IconMargin", "color":"#d83f3f", "bordercolor":"#b12a2a" },
+ { "name":"Message Bubble Error Line", "color":"#fbe4e6" },
+ { "name":"Message Bubble Error Tooltip", "color":"#D10B0B" },
+
+ { "name":"Message Bubble Warning Marker", "color":"#b28d37" },
+ { "name":"Message Bubble Warning Tag", "color":"#e68100", "secondcolor":"white" },
+ { "name":"Message Bubble Warning Counter", "color":"white", "secondcolor":"#e68100" },
+ { "name":"Message Bubble Warning IconMargin", "color":"#e68100", "bordercolor":"#c76f00" },
+ { "name":"Message Bubble Warning Line", "color":"#fff1da" },
+ { "name":"Message Bubble Warning Tooltip", "color":"#D1590B" }
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"text-black", "back":"white" },
+ { "name":"Selected Text", "back":"selection-bg" },
+ { "name":"Selected Text(Inactive)", "back":"aluminium2" },
+
+ { "name":"Collapsed Text", "fore":"aluminium4", "back":"white" },
+
+ { "name":"Line Numbers", "fore":"aluminium4", "back":"white" },
+
+ { "name":"Punctuation", "fore":"text-black" },
+ { "name":"Punctuation(Brackets)", "fore":"text-black" },
+
+ { "name":"Comment(Line)", "fore":"comment-gray", "style":"italic" },
+ { "name":"Comment(Block)", "fore":"comment-gray", "style":"italic" },
+ { "name":"Comment(Doc)", "fore":"comment-gray", "style":"italic" },
+ { "name":"Comment(DocTag)", "fore":"comment-gray", "style":"italic" },
+ { "name":"Comment Tag", "fore":"comment-gray", "weight":"bold" },
+ { "name":"Excluded Code", "fore":"comment-gray" },
+
+ { "name":"String", "fore":"literal-orange" },
+ { "name":"String(Escape)", "fore":"literal-escape" },
+ { "name":"String(C# @ Verbatim)", "fore":"literal-orange" },
+
+ { "name":"Number", "fore":"literal-orange" },
+
+ { "name":"Preprocessor", "fore":"#c12dad" },
+ { "name":"Preprocessor(Region Name)", "fore":"#c12dad" },
+
+ { "name":"Xml Text", "fore":"text-black" },
+ { "name":"Xml Delimiter", "fore":"text-black" },
+ { "name":"Xml Name", "fore":"skyblue2" },
+ { "name":"Xml Attribute", "fore":"text-black" },
+ { "name":"Xml Attribute Quotes", "fore":"literal-orange" },
+ { "name":"Xml Attribute Value", "fore":"literal-orange" },
+ { "name":"Xml Comment", "fore":"comment-gray" },
+ { "name":"Xml CData Section", "fore":"text-black" },
+
+ { "name":"Html Attribute Name", "fore":"text-black" },
+ { "name":"Html Attribute Value", "fore":"literal-orange" },
+ { "name":"Html Comment", "fore":"comment-gray" },
+ { "name":"Html Element Name", "fore":"skyblue2" },
+ { "name":"Html Entity", "fore":"#c12dad" },
+ { "name":"Html Operator", "fore":"skyblue2" },
+ { "name":"Html Server-Side Script", "fore":"text-black", "back":"#fdf0bd" },
+ { "name":"Html Tag Delimiter", "fore":"skyblue2" },
+ { "name":"Razor Code", "fore":"text-black", "back":"#fdfaed" },
+
+ { "name":"Tooltip Text", "fore":"text-black", "back":"#feffe9" },
+ { "name":"Notification Text", "fore":"text-black", "back":"#feffe9" },
+
+ { "name":"Completion Text", "fore":"#434343", "back":"#F0F6F8" },
+ { "name":"Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
+ { "name":"Completion Selected Text(Inactive)", "fore":"#434343", "back":"#FFFFFF" },
+
+ { "name":"Keyword(Access)", "fore":"keyword-teal" },
+ { "name":"Keyword(Type)", "fore":"keyword-teal" },
+ { "name":"Keyword(Operator)", "fore":"keyword-teal" },
+ { "name":"Keyword(Selection)", "fore":"keyword-teal" },
+ { "name":"Keyword(Iteration)", "fore":"keyword-teal" },
+ { "name":"Keyword(Jump)", "fore":"keyword-teal" },
+ { "name":"Keyword(Context)", "fore":"keyword-teal" },
+ { "name":"Keyword(Exception)", "fore":"keyword-teal" },
+ { "name":"Keyword(Modifiers)", "fore":"keyword-teal" },
+ { "name":"Keyword(Constants)", "fore":"keyword-teal" },
+ { "name":"Keyword(Void)", "fore":"keyword-teal" },
+ { "name":"Keyword(Namespace)", "fore":"keyword-teal" },
+ { "name":"Keyword(Property)", "fore":"keyword-teal" },
+ { "name":"Keyword(Declaration)", "fore":"keyword-teal" },
+ { "name":"Keyword(Parameter)", "fore":"keyword-teal" },
+ { "name":"Keyword(Operator Declaration)", "fore":"keyword-teal" },
+ { "name":"Keyword(Other)", "fore":"keyword-teal" },
+
+ { "name":"User Types", "fore":"skyblue2" },
+ { "name":"User Types(Enums)", "fore":"skyblue2" },
+ { "name":"User Types(Interfaces)", "fore":"skyblue2" },
+ { "name":"User Types(Delegates)", "fore":"skyblue2" },
+ { "name":"User Types(Value types)", "fore":"skyblue2" },
+ { "name":"User Types(Type parameters)", "fore":"skyblue2" },
+
+ { "name":"User Field Usage", "fore":"text-black" },
+ { "name":"User Field Declaration", "fore":"text-black" },
+
+ { "name":"User Property Usage", "fore":"text-black" },
+ { "name":"User Property Declaration", "fore":"text-black" },
+
+ { "name":"User Event Usage", "fore":"text-black" },
+ { "name":"User Event Declaration", "fore":"text-black" },
+
+ { "name":"User Method Usage", "fore":"text-black" },
+ { "name":"User Method Declaration", "fore":"text-black" },
+
+ { "name":"User Parameter Usage", "fore":"text-black" },
+ { "name":"User Parameter Declaration", "fore":"text-black" },
+
+ { "name":"User Variable Usage", "fore":"text-black" },
+ { "name":"User Variable Declaration", "fore":"text-black" },
+
+ { "name":"Syntax Error", "fore":"invalid-red" },
+
+ { "name":"String Format Items", "fore":"#FF0000" },
+
+ { "name":"Breakpoint Text", "fore":"text-black", "back":"#ffe8e7" },
+
+ { "name":"Debugger Current Statement", "fore":"text-black", "back":"#f8f4a1" },
+ { "name":"Debugger Stack Line", "fore":"text-black", "back":"#ccfca6" },
+
+ { "name":"Diff Line(Added)", "fore":"skyblue2" },
+ { "name":"Diff Line(Removed)", "fore":"scarletred1" },
+ { "name":"Diff Line(Changed)", "fore":"plum2" },
+ { "name":"Diff Header", "fore":"chameleon3" },
+ { "name":"Diff Header(Separator)", "fore":"chameleon3", "weight":"bold" },
+ { "name":"Diff Header(Old)", "fore":"scarletred1", "weight":"bold" },
+ { "name":"Diff Header(New)", "fore":"skyblue2", "weight":"bold" },
+ { "name":"Diff Location", "fore":"plum2", "weight":"bold" },
+
+ { "name":"Css Comment", "fore":"comment-gray", "weight":"bold" },
+ { "name":"Css Property Name", "fore":"black", "weight":"bold" },
+ { "name":"Css Property Value", "fore":"literal-orange", "weight":"bold" },
+ { "name":"Css Selector", "fore":"comment-gray", "weight":"bold" },
+ { "name":"Css String Value", "fore":"literal-orange", "weight":"bold" },
+ { "name":"Css Keyword", "fore":"keyword-teal", "weight":"bold" },
+
+ { "name":"Script Comment", "fore":"comment-gray" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"keyword-teal" },
+ { "name":"Script Number", "fore":"literal-orange" },
+ { "name":"Script Operator" },
+ { "name":"Script String", "fore":"literal-orange" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/Styles/MonokaiStyle.json b/main/src/core/Mono.Texteditor/Styles/MonokaiStyle.json
index 16b3df37f3..c56cbe1ba3 100644
--- a/main/src/core/Mono.Texteditor/Styles/MonokaiStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/MonokaiStyle.json
@@ -1,229 +1,227 @@
{
- "name":"Monokai",
- "version":"1.0",
- "description": "A smooth, dusky scheme.",
- "originator": "Xamarin Inc. (http://xamarin.com)",
-
- "palette":[
- { "name":"monokai-white", "value":"#F8F8F2" },
- { "name":"monokai-selection", "value":"#49483E" },
- { "name":"monokai-background", "value":"#272822" },
- { "name":"monokai-comment", "value":"#75715E" },
- { "name":"monokai-string", "value":"#E6DB74" },
- { "name":"monokai-constant", "value":"#AE81FF" },
- { "name":"monokai-keyword", "value":"#F92672" },
- { "name":"monokai-type", "value":"#66d9ef" },
- { "name":"monokai-classname", "value":"#A6E22E" },
- { "name":"monokai-functionargument", "value":"#FD971F" },
- { "name":"monokai-invalid", "value":"#F8F8F0" },
- { "name":"monokai-invalidBackground", "value":"#F92672" },
- { "name":"skyblue1", "value":"#729fcf" },
- { "name":"chameleon1", "value":"#8ae234" },
- { "name":"chameleon2", "value":"#73d216" },
- { "name":"chameleon3", "value":"#4e9a06" }
- ],
-
- "colors":[
- { "name": "Background(Read Only)", "color":"#252620" },
-
- { "name": "Search result background", "color":"#006060" },
- { "name": "Search result background (highlighted)", "color":"#008080" },
-
- { "name": "Column Ruler", "color":"#575852" },
-
- { "name": "Fold Square", "color":"monokai-comment", "secondcolor":"monokai-background" },
- { "name": "Fold Cross", "color":"white", "secondcolor":"monokai-background" },
-
- { "name": "Indentation Guide", "color":"monokai-comment" },
-
- { "name": "Indicator Margin", "color":"#3B3A32" },
- { "name": "Indicator Margin(Separator)", "color":"#3B3A32" },
-
- { "name": "Tooltip Border", "color":"#989892" },
- { "name": "Tooltip Pager Top", "color":"#292A25" },
- { "name": "Tooltip Pager Bottom", "color":"#292A25" },
- { "name": "Tooltip Pager Triangle", "color":"#C8C8C2" },
- { "name": "Tooltip Pager Text", "color":"#C8C8C2" },
-
- { "name": "Notification Border", "color":"#989892" },
-
- { "name": "Completion Matching Substring", "color":"#BA3373" },
- { "name": "Completion Border", "color":"#C9C9C9" },
- { "name": "Completion Border(Inactive)", "color":"#bebebe" },
-
- { "name": "Bookmarks", "color":"#FDD99B", "secondcolor":"#816647 " },
-
- { "name": "Underline(Error)", "color":"red" },
- { "name": "Underline(Warning)", "color":"skyblue1" },
- { "name": "Underline(Suggestion)", "color":"chameleon3" },
- { "name": "Underline(Hint)", "color":"chameleon1" },
-
- { "name": "Quick Diff(Dirty)", "color":"monokai-string" },
- { "name": "Quick Diff(Changed)", "color":"#A4E22E" },
-
- { "name": "Brace Matching(Rectangle)", "color":"#6699CC", "secondcolor":"#AACCEE" },
- { "name": "Usages(Rectangle)", "color":"#527F99", "secondcolor":"#527F99", "bordercolor":"#527F99" },
- { "name": "Changing usages(Rectangle)", "color":"#996E75", "secondcolor":"#996E75", "bordercolor":"#996E75" },
-
- { "name": "Breakpoint Marker", "color":"white", "secondcolor":"#762C2C" },
- { "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#eddcdc" },
- { "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
-
- { "name": "Current Line Marker", "color":"#323229", "secondcolor":"#323229"},
- { "name": "Current Line Marker(Inactive)", "color":"#2F2F28", "secondcolor":"#2F2F28"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffff00", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "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": "Message Bubble Error Marker", "color":"#b28d37"},
- { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
- { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
- { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
- { "name": "Message Bubble Error Line", "color":"#7b645c"},
- { "name": "Message Bubble Error Tooltip", "color":"#e3a6a1"},
-
- { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
- { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
- { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
- { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
- { "name": "Message Bubble Warning Line", "color":"#807e5c"},
- { "name": "Message Bubble Warning Tooltip", "color":"#efe89d"}
- ],
-
- "text":[
- { "name": "Plain Text", "fore":"monokai-white", "back":"monokai-background" },
- { "name": "Selected Text", "back":"monokai-selection" },
- { "name": "Selected Text(Inactive)", "back":"#383830" },
-
- { "name": "Collapsed Text", "fore":"monokai-comment", "back":"monokai-background" },
-
- { "name": "Line Numbers", "fore":"#BCBCBC", "back":"monokai-background"},
-
- { "name": "Punctuation", "fore":"monokai-white" },
- { "name": "Punctuation(Brackets)", "fore":"monokai-white" },
-
- { "name": "Comment(Line)", "fore":"monokai-comment" },
- { "name": "Comment(Block)", "fore":"monokai-comment" },
- { "name": "Comment(Doc)", "fore":"monokai-comment" },
- { "name": "Comment(DocTag)", "fore":"monokai-comment" },
- { "name": "Comment Tag", "fore":"monokai-comment", "weight":"bold" },
- { "name": "Excluded Code", "fore":"monokai-comment" },
-
- { "name": "String", "fore":"monokai-string"},
- { "name": "String(Escape)", "fore":"#A6AB34"},
- { "name": "String(C# @ Verbatim)", "fore":"monokai-string"},
-
- { "name": "Number", "fore":"monokai-constant"},
-
- { "name": "Preprocessor", "fore":"monokai-classname" },
- { "name": "Preprocessor(Region Name)", "fore":"monokai-classname" },
-
- { "name": "Xml Text", "fore":"monokai-white" },
- { "name": "Xml Delimiter", "fore":"monokai-white" },
- { "name": "Xml Name", "fore":"monokai-keyword" },
- { "name": "Xml Attribute", "fore":"monokai-white" },
- { "name": "Xml Attribute Quotes", "fore":"monokai-string" },
- { "name": "Xml Attribute Value", "fore":"monokai-string" },
- { "name": "Xml Comment", "fore":"monokai-comment" },
- { "name": "Xml CData Section", "fore":"monokai-white" },
-
- { "name": "Html Attribute Name", "fore":"monokai-white" },
- { "name": "Html Attribute Value", "fore":"monokai-string" },
- { "name": "Html Comment", "fore":"monokai-comment" },
- { "name": "Html Element Name", "fore":"monokai-keyword" },
- { "name": "Html Entity", "fore":"monokai-classname" },
- { "name": "Html Operator", "fore":"monokai-keyword" },
- { "name": "Html Server-Side Script", "fore":"monokai-white", "back":"#373832" },
- { "name": "Html Tag Delimiter", "fore":"monokai-white" },
- { "name": "Razor Code", "fore":"monokai-white", "back":"#373832" },
-
- { "name": "Tooltip Text", "fore":"monokai-white", "back":"#272725" },
- { "name": "Notification Text", "fore":"monokai-white", "back":"#272725" },
-
- { "name": "Completion Text", "fore":"#434343", "back":"#F0F6F8" },
- { "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
- { "name": "Completion Selected Text(Inactive)", "fore":"white", "back":"white" },
-
- { "name": "Keyword(Access)", "fore":"monokai-constant" },
- { "name": "Keyword(Type)", "fore":"monokai-keyword" },
- { "name": "Keyword(Operator)", "fore":"monokai-keyword" },
- { "name": "Keyword(Selection)", "fore":"monokai-keyword" },
- { "name": "Keyword(Iteration)", "fore":"monokai-keyword" },
- { "name": "Keyword(Jump)", "fore":"monokai-keyword" },
- { "name": "Keyword(Context)", "fore":"monokai-keyword" },
- { "name": "Keyword(Exception)", "fore":"monokai-keyword" },
- { "name": "Keyword(Modifiers)", "fore":"monokai-keyword" },
- { "name": "Keyword(Constants)", "fore":"monokai-constant" },
- { "name": "Keyword(Void)", "fore":"monokai-keyword" },
- { "name": "Keyword(Namespace)", "fore":"monokai-keyword" },
- { "name": "Keyword(Property)", "fore":"monokai-keyword" },
- { "name": "Keyword(Declaration)", "fore":"monokai-keyword" },
- { "name": "Keyword(Parameter)", "fore":"monokai-keyword" },
- { "name": "Keyword(Operator Declaration)", "fore":"monokai-keyword" },
- { "name": "Keyword(Other)", "fore":"monokai-keyword" },
-
- { "name": "User Types", "fore":"monokai-type" },
- { "name": "User Types(Enums)", "fore":"monokai-type" },
- { "name": "User Types(Interfaces)", "fore":"monokai-type" },
- { "name": "User Types(Delegates)", "fore":"monokai-type" },
- { "name": "User Types(Value types)", "fore":"monokai-type" },
- { "name": "User Types(Type parameters)", "fore":"monokai-type" },
-
- { "name": "User Field Usage", "fore":"#2EE2A6" },
- { "name": "User Field Declaration", "fore":"#2EE2A6" },
-
- { "name": "User Property Usage", "fore":"#2EE2A6" },
- { "name": "User Property Declaration", "fore":"#2EE2A6" },
-
- { "name": "User Event Usage", "fore":"#FFAE81" },
- { "name": "User Event Declaration", "fore":"#FFAE81" },
-
- { "name": "User Method Usage", "fore":"monokai-functionargument" },
- { "name": "User Method Declaration", "fore":"monokai-functionargument" },
-
- { "name": "User Parameter Usage", "fore":"monokai-white" },
- { "name": "User Parameter Declaration", "fore":"monokai-white" },
-
- { "name": "User Variable Usage", "fore":"monokai-white" },
- { "name": "User Variable Declaration", "fore":"monokai-white" },
-
- { "name": "Syntax Error", "fore":"monokai-invalid", "back":"monokai-invalidBackground" },
-
- { "name": "String Format Items", "fore":"monokai-white" },
-
- { "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
- { "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
-
- { "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
- { "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
-
- { "name": "Diff Line(Added)", "fore":"#008A8B" },
- { "name": "Diff Line(Removed)", "fore":"line-removed" },
- { "name": "Diff Line(Changed)", "fore":"line-changed" },
- { "name": "Diff Header", "fore":"#008000" },
- { "name": "Diff Header(Separator)", "fore":"#0000FF", "weight":"bold" },
- { "name": "Diff Header(Old)", "fore":"#008000", "weight":"bold" },
- { "name": "Diff Header(New)", "fore":"#008000", "weight":"bold" },
- { "name": "Diff Location", "fore":"#FB8B00", "weight":"bold" },
-
- { "name": "Css Comment", "fore":"monokai-comment", "weight":"bold" },
- { "name": "Css Property Name", "fore":"black", "weight":"bold" },
- { "name": "Css Property Value", "fore":"monokai-string", "weight":"bold" },
- { "name": "Css Selector", "fore":"monokai-comment", "weight":"bold" },
- { "name": "Css String Value", "fore":"literal-orange", "weight":"bold" },
- { "name": "Css Keyword", "fore":"monokai-keyword", "weight":"bold" },
-
- { "name": "Script Comment", "fore":"monokai-comment" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"monokai-keyword" },
- { "name": "Script Number", "fore":"monokai-constant" },
- { "name": "Script Operator" },
- { "name": "Script String", "fore":"monokai-string" }
- ]
+ "name":"Monokai",
+ "version":"1.1",
+ "description":"A smooth, dusky scheme.",
+ "originator":"Xamarin Inc. (http://xamarin.com)",
+
+ "palette":[
+ { "name":"monokai-white", "value":"#F8F8F2" },
+ { "name":"monokai-selection", "value":"#49483E" },
+ { "name":"monokai-background", "value":"#272822" },
+ { "name":"monokai-comment", "value":"#75715E" },
+ { "name":"monokai-string", "value":"#E6DB74" },
+ { "name":"monokai-constant", "value":"#AE81FF" },
+ { "name":"monokai-keyword", "value":"#F92672" },
+ { "name":"monokai-type", "value":"#66d9ef" },
+ { "name":"monokai-classname", "value":"#A6E22E" },
+ { "name":"monokai-functionargument", "value":"#FD971F" },
+ { "name":"monokai-invalid", "value":"#F8F8F0" },
+ { "name":"monokai-invalidBackground", "value":"#F92672" },
+ { "name":"skyblue1", "value":"#729fcf" },
+ { "name":"chameleon1", "value":"#8ae234" },
+ { "name":"chameleon2", "value":"#73d216" },
+ { "name":"chameleon3", "value":"#4e9a06" }
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"#252620" },
+
+ { "name":"Search result background", "color":"#006060" },
+ { "name":"Search result background (highlighted)", "color":"#008080" },
+
+ { "name":"Column Ruler", "color":"#575852" },
+
+ { "name":"Fold Square", "color":"monokai-comment", "secondcolor":"monokai-background" },
+ { "name":"Fold Cross", "color":"white", "secondcolor":"monokai-background" },
+
+ { "name":"Indentation Guide", "color":"monokai-comment" },
+
+ { "name":"Indicator Margin", "color":"#3B3A32" },
+ { "name":"Indicator Margin(Separator)", "color":"#3B3A32" },
+
+ { "name":"Tooltip Border", "color":"#989892" },
+ { "name":"Tooltip Pager Top", "color":"#292A25" },
+ { "name":"Tooltip Pager Bottom", "color":"#292A25" },
+ { "name":"Tooltip Pager Triangle", "color":"#C8C8C2" },
+ { "name":"Tooltip Pager Text", "color":"#C8C8C2" },
+
+ { "name":"Notification Border", "color":"#989892" },
+
+ { "name":"Completion Matching Substring", "color":"#BA3373" },
+ { "name":"Completion Border", "color":"#C9C9C9" },
+ { "name":"Completion Border(Inactive)", "color":"#bebebe" },
+
+ { "name":"Bookmarks", "color":"#FDD99B", "secondcolor":"#816647 " },
+
+ { "name":"Underline(Error)", "color":"red" },
+ { "name":"Underline(Warning)", "color":"skyblue1" },
+ { "name":"Underline(Suggestion)", "color":"chameleon3" },
+ { "name":"Underline(Hint)", "color":"chameleon1" },
+
+ { "name":"Quick Diff(Dirty)", "color":"monokai-string" },
+ { "name":"Quick Diff(Changed)", "color":"#A4E22E" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"#6699CC", "secondcolor":"#AACCEE" },
+ { "name":"Usages(Rectangle)", "color":"#527F99", "secondcolor":"#527F99", "bordercolor":"#527F99" },
+ { "name":"Changing usages(Rectangle)", "color":"#996E75", "secondcolor":"#996E75", "bordercolor":"#996E75" },
+
+ { "name":"Breakpoint Marker", "color":"#6f3535", "bordercolor":"#7a3a3a" },
+ { "name":"Breakpoint Marker(Disabled)", "color":"#707070", "bordercolor":"#7b7b7b" },
+ { "name":"Breakpoint Marker(Invalid)", "color":"#604343", "bordercolor":"#6a4a4a" },
+
+ { "name":"Current Line Marker", "color":"#323229"},
+ { "name":"Current Line Marker(Inactive)", "color":"#2F2F28"},
+
+ { "name":"Debugger Current Line Marker", "color":"#69684c", "bordercolor":"#747354" },
+ { "name":"Debugger Stack Line Marker", "color":"#5c6b4d", "bordercolor":"#657655"},
+
+ { "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":"Message Bubble Error Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name":"Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name":"Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name":"Message Bubble Error Line", "color":"#7b645c"},
+ { "name":"Message Bubble Error Tooltip", "color":"#e3a6a1"},
+
+ { "name":"Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name":"Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name":"Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name":"Message Bubble Warning Line", "color":"#807e5c"},
+ { "name":"Message Bubble Warning Tooltip", "color":"#efe89d"}
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"monokai-white", "back":"monokai-background" },
+ { "name":"Selected Text", "back":"monokai-selection" },
+ { "name":"Selected Text(Inactive)", "back":"#383830" },
+
+ { "name":"Collapsed Text", "fore":"monokai-comment", "back":"monokai-background" },
+
+ { "name":"Line Numbers", "fore":"#BCBCBC", "back":"monokai-background"},
+
+ { "name":"Punctuation", "fore":"monokai-white" },
+ { "name":"Punctuation(Brackets)", "fore":"monokai-white" },
+
+ { "name":"Comment(Line)", "fore":"monokai-comment" },
+ { "name":"Comment(Block)", "fore":"monokai-comment" },
+ { "name":"Comment(Doc)", "fore":"monokai-comment" },
+ { "name":"Comment(DocTag)", "fore":"monokai-comment" },
+ { "name":"Comment Tag", "fore":"monokai-comment", "weight":"bold" },
+ { "name":"Excluded Code", "fore":"monokai-comment" },
+
+ { "name":"String", "fore":"monokai-string"},
+ { "name":"String(Escape)", "fore":"#A6AB34"},
+ { "name":"String(C# @ Verbatim)", "fore":"monokai-string"},
+
+ { "name":"Number", "fore":"monokai-constant"},
+
+ { "name":"Preprocessor", "fore":"monokai-classname" },
+ { "name":"Preprocessor(Region Name)", "fore":"monokai-classname" },
+
+ { "name":"Xml Text", "fore":"monokai-white" },
+ { "name":"Xml Delimiter", "fore":"monokai-white" },
+ { "name":"Xml Name", "fore":"monokai-keyword" },
+ { "name":"Xml Attribute", "fore":"monokai-white" },
+ { "name":"Xml Attribute Quotes", "fore":"monokai-string" },
+ { "name":"Xml Attribute Value", "fore":"monokai-string" },
+ { "name":"Xml Comment", "fore":"monokai-comment" },
+ { "name":"Xml CData Section", "fore":"monokai-white" },
+
+ { "name":"Html Attribute Name", "fore":"monokai-white" },
+ { "name":"Html Attribute Value", "fore":"monokai-string" },
+ { "name":"Html Comment", "fore":"monokai-comment" },
+ { "name":"Html Element Name", "fore":"monokai-keyword" },
+ { "name":"Html Entity", "fore":"monokai-classname" },
+ { "name":"Html Operator", "fore":"monokai-keyword" },
+ { "name":"Html Server-Side Script", "fore":"monokai-white", "back":"#373832" },
+ { "name":"Html Tag Delimiter", "fore":"monokai-white" },
+ { "name":"Razor Code", "fore":"monokai-white", "back":"#373832" },
+
+ { "name":"Tooltip Text", "fore":"monokai-white", "back":"#272725" },
+ { "name":"Notification Text", "fore":"monokai-white", "back":"#272725" },
+
+ { "name":"Completion Text", "fore":"#434343", "back":"#F0F6F8" },
+ { "name":"Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
+ { "name":"Completion Selected Text(Inactive)", "fore":"white", "back":"white" },
+
+ { "name":"Keyword(Access)", "fore":"monokai-constant" },
+ { "name":"Keyword(Type)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Operator)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Selection)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Iteration)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Jump)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Context)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Exception)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Modifiers)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Constants)", "fore":"monokai-constant" },
+ { "name":"Keyword(Void)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Namespace)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Property)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Declaration)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Parameter)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Operator Declaration)", "fore":"monokai-keyword" },
+ { "name":"Keyword(Other)", "fore":"monokai-keyword" },
+
+ { "name":"User Types", "fore":"monokai-type" },
+ { "name":"User Types(Enums)", "fore":"monokai-type" },
+ { "name":"User Types(Interfaces)", "fore":"monokai-type" },
+ { "name":"User Types(Delegates)", "fore":"monokai-type" },
+ { "name":"User Types(Value types)", "fore":"monokai-type" },
+ { "name":"User Types(Type parameters)", "fore":"monokai-type" },
+
+ { "name":"User Field Usage", "fore":"#2EE2A6" },
+ { "name":"User Field Declaration", "fore":"#2EE2A6" },
+
+ { "name":"User Property Usage", "fore":"#2EE2A6" },
+ { "name":"User Property Declaration", "fore":"#2EE2A6" },
+
+ { "name":"User Event Usage", "fore":"#FFAE81" },
+ { "name":"User Event Declaration", "fore":"#FFAE81" },
+
+ { "name":"User Method Usage", "fore":"monokai-functionargument" },
+ { "name":"User Method Declaration", "fore":"monokai-functionargument" },
+
+ { "name":"User Parameter Usage", "fore":"monokai-white" },
+ { "name":"User Parameter Declaration", "fore":"monokai-white" },
+
+ { "name":"User Variable Usage", "fore":"monokai-white" },
+ { "name":"User Variable Declaration", "fore":"monokai-white" },
+
+ { "name":"Syntax Error", "fore":"monokai-invalid", "back":"monokai-invalidBackground" },
+
+ { "name":"String Format Items", "fore":"monokai-white" },
+
+ { "name":"Breakpoint Text", "fore":"white", "back":"#6f3535" },
+
+ { "name":"Debugger Current Statement", "fore":"white", "back":"#69684c" },
+ { "name":"Debugger Stack Line", "fore":"white", "back":"#5c6b4d" },
+
+ { "name":"Diff Line(Added)", "fore":"#008A8B" },
+ { "name":"Diff Line(Removed)", "fore":"line-removed" },
+ { "name":"Diff Line(Changed)", "fore":"line-changed" },
+ { "name":"Diff Header", "fore":"#008000" },
+ { "name":"Diff Header(Separator)", "fore":"#0000FF", "weight":"bold" },
+ { "name":"Diff Header(Old)", "fore":"#008000", "weight":"bold" },
+ { "name":"Diff Header(New)", "fore":"#008000", "weight":"bold" },
+ { "name":"Diff Location", "fore":"#FB8B00", "weight":"bold" },
+
+ { "name":"Css Comment", "fore":"monokai-comment", "weight":"bold" },
+ { "name":"Css Property Name", "fore":"black", "weight":"bold" },
+ { "name":"Css Property Value", "fore":"monokai-string", "weight":"bold" },
+ { "name":"Css Selector", "fore":"monokai-comment", "weight":"bold" },
+ { "name":"Css String Value", "fore":"literal-orange", "weight":"bold" },
+ { "name":"Css Keyword", "fore":"monokai-keyword", "weight":"bold" },
+
+ { "name":"Script Comment", "fore":"monokai-comment" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"monokai-keyword" },
+ { "name":"Script Number", "fore":"monokai-constant" },
+ { "name":"Script Operator" },
+ { "name":"Script String", "fore":"monokai-string" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/Styles/NightshadeStyle.json b/main/src/core/Mono.Texteditor/Styles/NightshadeStyle.json
index 938f1930e9..11aeb07916 100644
--- a/main/src/core/Mono.Texteditor/Styles/NightshadeStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/NightshadeStyle.json
@@ -1,266 +1,263 @@
{
- "name":"Nightshade",
- "version":"1.0",
- "description": "An inky scheme with vibrant highlights.",
- "originator": "Anirudh Sanjeev <anirudh@anirudhsanjeev.org>",
-
- "palette":[
- { "name":"butter1", "value":"#fce94f" },
- { "name":"butter2", "value":"#edd400" },
- { "name":"butter3", "value":"#c4a000" },
- { "name":"orange1", "value":"#fcaf3e" },
- { "name":"orange2", "value":"#f57900" },
- { "name":"orange3", "value":"#ce5c00" },
- { "name":"chocolate1", "value":"#e9b96e" },
- { "name":"chocolate2", "value":"#c17d11" },
- { "name":"chocolate3", "value":"#8f5902" },
- { "name":"chameleon1", "value":"#8ae234" },
- { "name":"chameleon2", "value":"#73d216" },
- { "name":"chameleon3", "value":"#4e9a06" },
- { "name":"skyblue1", "value":"#729fcf" },
- { "name":"skyblue2", "value":"#3465a4" },
- { "name":"skyblue3", "value":"#204a87" },
- { "name":"plum1", "value":"#ad7fa8" },
- { "name":"plum2", "value":"#75507b" },
- { "name":"plum3", "value":"#5c3566" },
- { "name":"scarletred1", "value":"#ef2929" },
- { "name":"scarletred2", "value":"#cc0000" },
- { "name":"scarletred3", "value":"#a40000" },
- { "name":"aluminium1", "value":"#eeeeec" },
- { "name":"aluminium2", "value":"#d3d7cf" },
- { "name":"aluminium3", "value":"#babdb6" },
- { "name":"aluminium4", "value":"#888a85" },
- { "name":"aluminium5", "value":"#555753" },
- { "name":"aluminium6", "value":"#2e3436" },
-
- { "name":"NormalVim", "value":"#f6f3e8" },
- { "name":"NonTextVim", "value":"#070707" },
- { "name":"CursorVim", "value":"#000000" },
- { "name":"CursorLineBGVim", "value":"#121212" },
- { "name":"MatchParenVim", "value":"#f6f3e8" },
- { "name":"SearchVim", "value":"#f6f3e8" },
- { "name":"CommentVim", "value":"#7C7C7C" },
- { "name":"StringVim", "value":"#A8FF60" },
- { "name":"StringSingleQuoteVim", "value":"#FF8080" },
- { "name":"NumberVim", "value":"#FF73FD" },
- { "name":"PreProcVim", "value":"#96CBFE" },
- { "name":"ConditionalVim", "value":"#6699CC" },
- { "name":"TodoVim", "value":"#8f8f8f" },
- { "name":"ConstantVim", "value":"#99CC99" },
- { "name":"IdentifierVim", "value":"#C6C5FE" },
- { "name":"FunctionVim", "value":"#FFD2A7" },
- { "name":"TypeVim", "value":"#FFFFB6" },
- { "name":"StatementVim", "value":"#6699CC" },
- { "name":"SpecialVim", "value":"#E18964" },
- { "name":"KeywordSemanticVim", "value":"#E18964" },
- { "name":"DelimiterVim", "value":"#00A0A0" },
- { "name":"OperatorVim", "value":"#ffffff" },
- { "name":"BlackVim", "value":"#000000" },
- { "name":"VisualBGVim", "value":"#262D51" },
- { "name":"LineNrVim", "value":"#3D3D3D" }
- ],
-
- "colors":[
- { "name": "Background(Read Only)", "color":"BlackVim" },
-
- { "name": "Search result background", "color":"VisualBGVim" },
- { "name": "Search result background (highlighted)", "color":"VisualBGVim" },
-
- { "name": "Column Ruler", "color":"aluminium5" },
-
- { "name": "Fold Square", "color":"white", "secondcolor":"BlackVim" },
- { "name": "Fold Cross", "color":"white", "secondcolor":"BlackVim" },
-
- { "name": "Indentation Guide", "color":"aluminium5" },
-
- { "name": "Indicator Margin", "color":"aluminium7" },
- { "name": "Indicator Margin(Separator)", "color":"aluminium6" },
-
- { "name": "Tooltip Border", "color":"#989892" },
- { "name": "Tooltip Pager Top", "color":"BlackVim" },
- { "name": "Tooltip Pager Bottom", "color":"BlackVim" },
- { "name": "Tooltip Pager Triangle", "color":"NormalVim" },
- { "name": "Tooltip Pager Text", "color":"NormalVim" },
-
- { "name": "Notification Border", "color":"#989892" },
-
- { "name": "Completion Matching Substring", "color":"#BA3373" },
- { "name": "Completion Border", "color":"#C9C9C9" },
- { "name": "Completion Border(Inactive)", "color":"#666666" },
-
- { "name": "Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
-
- { "name": "Underline(Error)", "color":"invalid-red" },
- { "name": "Underline(Warning)", "color":"skyblue1" },
- { "name": "Underline(Suggestion)", "color":"chameleon3" },
- { "name": "Underline(Hint)", "color":"chameleon1" },
-
- { "name": "Quick Diff(Dirty)", "color":"butter2" },
- { "name": "Quick Diff(Changed)", "color":"StringVim" },
-
- { "name": "Brace Matching(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
- { "name": "Usages(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5", "bordercolor":"aluminium5" },
- { "name": "Changing usages(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5", "bordercolor":"aluminium5" },
-
- { "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
-
- { "name": "Current Line Marker", "color":"CursorLineBGVim", "secondcolor":"CursorLineBGVim"},
- { "name": "Current Line Marker(Inactive)", "color":"CursorLineBGVim", "secondcolor":"CursorLineBGVim"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "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": "Message Bubble Error Marker", "color":"#b28d37"},
- { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
- { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
- { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
- { "name": "Message Bubble Error Line", "color":"#7b645c"},
- { "name": "Message Bubble Error Tooltip", "color":"#e3a6a1"},
-
- { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
- { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
- { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
- { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
- { "name": "Message Bubble Warning Line", "color":"#807e5c"},
- { "name": "Message Bubble Warning Tooltip", "color":"#efe89d"}
-
- ],
-
- "text":[
- { "name": "Plain Text", "fore":"NormalVim", "back":"BlackVim" },
- { "name": "Selected Text", "back":"#2647DD" },
- { "name": "Selected Text(Inactive)", "back":"aluminium4" },
-
- { "name": "Collapsed Text", "fore":"aluminium3", "back":"BlackVim" },
-
- { "name": "Line Numbers", "fore":"LineNrVim", "back":"BlackVim"},
-
- { "name": "Punctuation", "fore":"StringVim" },
- { "name": "Punctuation(Brackets)", "fore":"StringVim" },
-
- { "name": "Comment(Line)", "fore":"CommentVim" },
- { "name": "Comment(Block)", "fore":"CommentVim" },
- { "name": "Comment(Doc)", "fore":"CommentVim" },
- { "name": "Comment(DocTag)", "fore":"CommentVim"},
- { "name": "Comment Tag", "fore":"TodoVim", "weight":"bold" },
- { "name": "Excluded Code", "fore":"CommentVim" },
-
- { "name": "String", "fore":"StringVim"},
- { "name": "String(Escape)", "fore":"StringVim"},
- { "name": "String(C# @ Verbatim)", "fore":"StringVim"},
-
- { "name": "Number", "fore":"NumberVim"},
-
- { "name": "Preprocessor", "fore":"PreProcVim" },
- { "name": "Preprocessor(Region Name)", "fore":"PreProcVim" },
-
- { "name": "Xml Text", "fore":"NormalVim" },
- { "name": "Xml Delimiter", "fore":"NormalVim" },
- { "name": "Xml Name", "fore":"PreProcVim" },
- { "name": "Xml Attribute", "fore":"NormalVim" },
- { "name": "Xml Attribute Quotes", "fore":"StringVim" },
- { "name": "Xml Attribute Value", "fore":"StringVim" },
- { "name": "Xml Comment", "fore":"CommentVim" },
- { "name": "Xml CData Section", "fore":"PreProcVim" },
-
- { "name": "Html Attribute Name", "fore":"NormalVim" },
- { "name": "Html Attribute Value", "fore":"StringVim" },
- { "name": "Html Comment", "fore":"CommentVim" },
- { "name": "Html Element Name", "fore":"PreProcVim" },
- { "name": "Html Entity", "fore":"PreProcVim" },
- { "name": "Html Operator", "fore":"PreProcVim" },
- { "name": "Html Server-Side Script", "fore":"NormalVim", "back":"aluminium6" },
- { "name": "Html Tag Delimiter", "fore":"PreProcVim" },
- { "name": "Razor Code", "fore":"NormalVim", "back":"aluminium6" },
-
- { "name": "Tooltip Text", "fore":"NormalVim", "back":"#0a0a0a" },
- { "name": "Notification Text", "fore":"NormalVim", "back":"#0a0a0a" },
-
- { "name": "Completion Text", "fore":"#434343", "back":"#F0F6F8" },
- { "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
- { "name": "Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
-
- { "name": "Keyword(Access)", "fore":"TypeVim" },
- { "name": "Keyword(Type)", "fore":"TypeVim" },
- { "name": "Keyword(Operator)", "fore":"ConstantVim" },
- { "name": "Keyword(Selection)", "fore":"StatementVim" },
- { "name": "Keyword(Iteration)", "fore":"StatementVim" },
- { "name": "Keyword(Jump)", "fore":"StatementVim" },
- { "name": "Keyword(Context)", "fore":"StatementVim" },
- { "name": "Keyword(Exception)", "fore":"StatementVim" },
- { "name": "Keyword(Modifiers)", "fore":"TypeVim" },
- { "name": "Keyword(Constants)", "fore":"SpecialVim" },
- { "name": "Keyword(Void)", "fore":"SpecialVim" },
- { "name": "Keyword(Namespace)", "fore":"TypeVim", "weight":"Bold" },
- { "name": "Keyword(Property)", "fore":"TypeVim" },
- { "name": "Keyword(Declaration)", "fore":"TypeVim", "weight":"Bold" },
- { "name": "Keyword(Parameter)", "fore":"TypeVim" },
- { "name": "Keyword(Operator Declaration)", "fore":"TypeVim", "weight":"Bold" },
- { "name": "Keyword(Other)", "fore":"SpecialVim" },
-
- { "name": "User Types", "fore":"IdentifierVim" },
- { "name": "User Types(Enums)", "fore":"IdentifierVim" },
- { "name": "User Types(Interfaces)", "fore":"IdentifierVim" },
- { "name": "User Types(Delegates)", "fore":"IdentifierVim" },
- { "name": "User Types(Value types)", "fore":"IdentifierVim" },
- { "name": "User Types(Type parameters)", "fore":"IdentifierVim" },
-
- { "name": "User Field Usage", "fore":"NormalVim" },
- { "name": "User Field Declaration", "fore":"NormalVim" },
-
- { "name": "User Property Usage", "fore":"NormalVim" },
- { "name": "User Property Declaration", "fore":"NormalVim" },
-
- { "name": "User Event Usage", "fore":"NormalVim" },
- { "name": "User Event Declaration", "fore":"NormalVim" },
-
- { "name": "User Method Usage", "fore":"NormalVim" },
- { "name": "User Method Declaration", "fore":"NormalVim" },
-
- { "name": "User Parameter Usage", "fore":"NormalVim" },
- { "name": "User Parameter Declaration", "fore":"NormalVim" },
-
- { "name": "User Variable Usage", "fore":"NormalVim" },
- { "name": "User Variable Declaration", "fore":"NormalVim" },
-
- { "name": "Syntax Error", "fore":"scarletred1" },
-
- { "name": "String Format Items", "fore":"NormalVim" },
-
- { "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
- { "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
-
- { "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
- { "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
- { "name": "Diff Line(Added)", "fore":"butter2" },
- { "name": "Diff Line(Removed)", "fore":"skyblue1" },
- { "name": "Diff Line(Changed)", "fore":"plum1" },
- { "name": "Diff Header", "fore":"chameleon1", "weight":"bold" },
- { "name": "Diff Header(Separator)", "fore":"aluminium4" },
- { "name": "Diff Header(Old)", "fore":"chameleon1", "weight":"bold" },
- { "name": "Diff Header(New)", "fore":"chameleon1", "weight":"bold" },
- { "name": "Diff Location", "fore":"chameleon1", "weight":"bold" },
-
- { "name": "Css Comment", "fore":"CommentVim" },
- { "name": "Css Property Name", "fore":"NormalVim" },
- { "name": "Css Property Value", "fore":"StringVim" },
- { "name": "Css Selector", "fore":"CommentVim" },
- { "name": "Css String Value", "fore":"StringVim" },
- { "name": "Css Keyword", "fore":"StatementVim" },
-
- { "name": "Script Comment", "fore":"CommentVim" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"StatementVim" },
- { "name": "Script Number", "fore":"NumberVim" },
- { "name": "Script Operator" },
- { "name": "Script String", "fore":"StringVim" }
- ]
+ "name":"Nightshade",
+ "version":"1.1",
+ "description":"An inky scheme with vibrant highlights.",
+ "originator":"Anirudh Sanjeev <anirudh@anirudhsanjeev.org>",
+
+ "palette":[
+ { "name":"butter1", "value":"#fce94f" },
+ { "name":"butter2", "value":"#edd400" },
+ { "name":"butter3", "value":"#c4a000" },
+ { "name":"orange1", "value":"#fcaf3e" },
+ { "name":"orange2", "value":"#f57900" },
+ { "name":"orange3", "value":"#ce5c00" },
+ { "name":"chocolate1", "value":"#e9b96e" },
+ { "name":"chocolate2", "value":"#c17d11" },
+ { "name":"chocolate3", "value":"#8f5902" },
+ { "name":"chameleon1", "value":"#8ae234" },
+ { "name":"chameleon2", "value":"#73d216" },
+ { "name":"chameleon3", "value":"#4e9a06" },
+ { "name":"skyblue1", "value":"#729fcf" },
+ { "name":"skyblue2", "value":"#3465a4" },
+ { "name":"skyblue3", "value":"#204a87" },
+ { "name":"plum1", "value":"#ad7fa8" },
+ { "name":"plum2", "value":"#75507b" },
+ { "name":"plum3", "value":"#5c3566" },
+ { "name":"scarletred1", "value":"#ef2929" },
+ { "name":"scarletred2", "value":"#cc0000" },
+ { "name":"scarletred3", "value":"#a40000" },
+ { "name":"aluminium1", "value":"#eeeeec" },
+ { "name":"aluminium2", "value":"#d3d7cf" },
+ { "name":"aluminium3", "value":"#babdb6" },
+ { "name":"aluminium4", "value":"#888a85" },
+ { "name":"aluminium5", "value":"#555753" },
+ { "name":"aluminium6", "value":"#2e3436" },
+ { "name":"NormalVim", "value":"#f6f3e8" },
+ { "name":"NonTextVim", "value":"#070707" },
+ { "name":"CursorVim", "value":"#000000" },
+ { "name":"CursorLineBGVim", "value":"#121212" },
+ { "name":"MatchParenVim", "value":"#f6f3e8" },
+ { "name":"SearchVim", "value":"#f6f3e8" },
+ { "name":"CommentVim", "value":"#7C7C7C" },
+ { "name":"StringVim", "value":"#A8FF60" },
+ { "name":"StringSingleQuoteVim", "value":"#FF8080" },
+ { "name":"NumberVim", "value":"#FF73FD" },
+ { "name":"PreProcVim", "value":"#96CBFE" },
+ { "name":"ConditionalVim", "value":"#6699CC" },
+ { "name":"TodoVim", "value":"#8f8f8f" },
+ { "name":"ConstantVim", "value":"#99CC99" },
+ { "name":"IdentifierVim", "value":"#C6C5FE" },
+ { "name":"FunctionVim", "value":"#FFD2A7" },
+ { "name":"TypeVim", "value":"#FFFFB6" },
+ { "name":"StatementVim", "value":"#6699CC" },
+ { "name":"SpecialVim", "value":"#E18964" },
+ { "name":"KeywordSemanticVim", "value":"#E18964" },
+ { "name":"DelimiterVim", "value":"#00A0A0" },
+ { "name":"OperatorVim", "value":"#ffffff" },
+ { "name":"BlackVim", "value":"#000000" },
+ { "name":"VisualBGVim", "value":"#262D51" },
+ { "name":"LineNrVim", "value":"#3D3D3D" }
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"BlackVim" },
+
+ { "name":"Search result background", "color":"VisualBGVim" },
+ { "name":"Search result background (highlighted)", "color":"VisualBGVim" },
+
+ { "name":"Column Ruler", "color":"aluminium5" },
+
+ { "name":"Fold Square", "color":"white", "secondcolor":"BlackVim" },
+ { "name":"Fold Cross", "color":"white", "secondcolor":"BlackVim" },
+
+ { "name":"Indentation Guide", "color":"aluminium5" },
+
+ { "name":"Indicator Margin", "color":"aluminium7" },
+ { "name":"Indicator Margin(Separator)", "color":"aluminium6" },
+
+ { "name":"Tooltip Border", "color":"#989892" },
+ { "name":"Tooltip Pager Top", "color":"BlackVim" },
+ { "name":"Tooltip Pager Bottom", "color":"BlackVim" },
+ { "name":"Tooltip Pager Triangle", "color":"NormalVim" },
+ { "name":"Tooltip Pager Text", "color":"NormalVim" },
+
+ { "name":"Notification Border", "color":"#989892" },
+
+ { "name":"Completion Matching Substring", "color":"#BA3373" },
+ { "name":"Completion Border", "color":"#C9C9C9" },
+ { "name":"Completion Border(Inactive)", "color":"#666666" },
+
+ { "name":"Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
+
+ { "name":"Underline(Error)", "color":"invalid-red" },
+ { "name":"Underline(Warning)", "color":"skyblue1" },
+ { "name":"Underline(Suggestion)", "color":"chameleon3" },
+ { "name":"Underline(Hint)", "color":"chameleon1" },
+
+ { "name":"Quick Diff(Dirty)", "color":"butter2" },
+ { "name":"Quick Diff(Changed)", "color":"StringVim" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
+ { "name":"Usages(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5", "bordercolor":"aluminium5" },
+ { "name":"Changing usages(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5", "bordercolor":"aluminium5" },
+
+ { "name":"Breakpoint Marker", "color":"#6f3535", "bordercolor":"#7a3a3a" },
+ { "name":"Breakpoint Marker(Disabled)", "color":"#707070", "bordercolor":"#7b7b7b" },
+ { "name":"Breakpoint Marker(Invalid)", "color":"#604343", "bordercolor":"#6a4a4a" },
+
+ { "name":"Current Line Marker", "color":"CursorLineBGVim"},
+ { "name":"Current Line Marker(Inactive)", "color":"CursorLineBGVim"},
+
+ { "name":"Debugger Current Line Marker", "color":"#69684c", "bordercolor":"#747354" },
+ { "name":"Debugger Stack Line Marker", "color":"#5c6b4d", "bordercolor":"#657655"},
+
+ { "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":"Message Bubble Error Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name":"Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name":"Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name":"Message Bubble Error Line", "color":"#7b645c"},
+ { "name":"Message Bubble Error Tooltip", "color":"#e3a6a1"},
+
+ { "name":"Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name":"Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name":"Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name":"Message Bubble Warning Line", "color":"#807e5c"},
+ { "name":"Message Bubble Warning Tooltip", "color":"#efe89d"}
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"NormalVim", "back":"BlackVim" },
+ { "name":"Selected Text", "back":"#2647DD" },
+ { "name":"Selected Text(Inactive)", "back":"aluminium4" },
+
+ { "name":"Collapsed Text", "fore":"aluminium3", "back":"BlackVim" },
+
+ { "name":"Line Numbers", "fore":"LineNrVim", "back":"BlackVim"},
+
+ { "name":"Punctuation", "fore":"StringVim" },
+ { "name":"Punctuation(Brackets)", "fore":"StringVim" },
+
+ { "name":"Comment(Line)", "fore":"CommentVim" },
+ { "name":"Comment(Block)", "fore":"CommentVim" },
+ { "name":"Comment(Doc)", "fore":"CommentVim" },
+ { "name":"Comment(DocTag)", "fore":"CommentVim"},
+ { "name":"Comment Tag", "fore":"TodoVim", "weight":"bold" },
+ { "name":"Excluded Code", "fore":"CommentVim" },
+
+ { "name":"String", "fore":"StringVim"},
+ { "name":"String(Escape)", "fore":"StringVim"},
+ { "name":"String(C# @ Verbatim)", "fore":"StringVim"},
+
+ { "name":"Number", "fore":"NumberVim"},
+
+ { "name":"Preprocessor", "fore":"PreProcVim" },
+ { "name":"Preprocessor(Region Name)", "fore":"PreProcVim" },
+
+ { "name":"Xml Text", "fore":"NormalVim" },
+ { "name":"Xml Delimiter", "fore":"NormalVim" },
+ { "name":"Xml Name", "fore":"PreProcVim" },
+ { "name":"Xml Attribute", "fore":"NormalVim" },
+ { "name":"Xml Attribute Quotes", "fore":"StringVim" },
+ { "name":"Xml Attribute Value", "fore":"StringVim" },
+ { "name":"Xml Comment", "fore":"CommentVim" },
+ { "name":"Xml CData Section", "fore":"PreProcVim" },
+
+ { "name":"Html Attribute Name", "fore":"NormalVim" },
+ { "name":"Html Attribute Value", "fore":"StringVim" },
+ { "name":"Html Comment", "fore":"CommentVim" },
+ { "name":"Html Element Name", "fore":"PreProcVim" },
+ { "name":"Html Entity", "fore":"PreProcVim" },
+ { "name":"Html Operator", "fore":"PreProcVim" },
+ { "name":"Html Server-Side Script", "fore":"NormalVim", "back":"aluminium6" },
+ { "name":"Html Tag Delimiter", "fore":"PreProcVim" },
+ { "name":"Razor Code", "fore":"NormalVim", "back":"aluminium6" },
+
+ { "name":"Tooltip Text", "fore":"NormalVim", "back":"#0a0a0a" },
+ { "name":"Notification Text", "fore":"NormalVim", "back":"#0a0a0a" },
+
+ { "name":"Completion Text", "fore":"#434343", "back":"#F0F6F8" },
+ { "name":"Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
+ { "name":"Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
+
+ { "name":"Keyword(Access)", "fore":"TypeVim" },
+ { "name":"Keyword(Type)", "fore":"TypeVim" },
+ { "name":"Keyword(Operator)", "fore":"ConstantVim" },
+ { "name":"Keyword(Selection)", "fore":"StatementVim" },
+ { "name":"Keyword(Iteration)", "fore":"StatementVim" },
+ { "name":"Keyword(Jump)", "fore":"StatementVim" },
+ { "name":"Keyword(Context)", "fore":"StatementVim" },
+ { "name":"Keyword(Exception)", "fore":"StatementVim" },
+ { "name":"Keyword(Modifiers)", "fore":"TypeVim" },
+ { "name":"Keyword(Constants)", "fore":"SpecialVim" },
+ { "name":"Keyword(Void)", "fore":"SpecialVim" },
+ { "name":"Keyword(Namespace)", "fore":"TypeVim", "weight":"Bold" },
+ { "name":"Keyword(Property)", "fore":"TypeVim" },
+ { "name":"Keyword(Declaration)", "fore":"TypeVim", "weight":"Bold" },
+ { "name":"Keyword(Parameter)", "fore":"TypeVim" },
+ { "name":"Keyword(Operator Declaration)", "fore":"TypeVim", "weight":"Bold" },
+ { "name":"Keyword(Other)", "fore":"SpecialVim" },
+
+ { "name":"User Types", "fore":"IdentifierVim" },
+ { "name":"User Types(Enums)", "fore":"IdentifierVim" },
+ { "name":"User Types(Interfaces)", "fore":"IdentifierVim" },
+ { "name":"User Types(Delegates)", "fore":"IdentifierVim" },
+ { "name":"User Types(Value types)", "fore":"IdentifierVim" },
+ { "name":"User Types(Type parameters)", "fore":"IdentifierVim" },
+
+ { "name":"User Field Usage", "fore":"NormalVim" },
+ { "name":"User Field Declaration", "fore":"NormalVim" },
+
+ { "name":"User Property Usage", "fore":"NormalVim" },
+ { "name":"User Property Declaration", "fore":"NormalVim" },
+
+ { "name":"User Event Usage", "fore":"NormalVim" },
+ { "name":"User Event Declaration", "fore":"NormalVim" },
+
+ { "name":"User Method Usage", "fore":"NormalVim" },
+ { "name":"User Method Declaration", "fore":"NormalVim" },
+
+ { "name":"User Parameter Usage", "fore":"NormalVim" },
+ { "name":"User Parameter Declaration", "fore":"NormalVim" },
+
+ { "name":"User Variable Usage", "fore":"NormalVim" },
+ { "name":"User Variable Declaration", "fore":"NormalVim" },
+
+ { "name":"Syntax Error", "fore":"scarletred1" },
+
+ { "name":"String Format Items", "fore":"NormalVim" },
+
+ { "name":"Breakpoint Text", "fore":"white", "back":"#6f3535" },
+
+ { "name":"Debugger Current Statement", "fore":"white", "back":"#69684c" },
+ { "name":"Debugger Stack Line", "fore":"white", "back":"#5c6b4d" },
+
+ { "name":"Diff Line(Added)", "fore":"butter2" },
+ { "name":"Diff Line(Removed)", "fore":"skyblue1" },
+ { "name":"Diff Line(Changed)", "fore":"plum1" },
+ { "name":"Diff Header", "fore":"chameleon1", "weight":"bold" },
+ { "name":"Diff Header(Separator)", "fore":"aluminium4" },
+ { "name":"Diff Header(Old)", "fore":"chameleon1", "weight":"bold" },
+ { "name":"Diff Header(New)", "fore":"chameleon1", "weight":"bold" },
+ { "name":"Diff Location", "fore":"chameleon1", "weight":"bold" },
+
+ { "name":"Css Comment", "fore":"CommentVim" },
+ { "name":"Css Property Name", "fore":"NormalVim" },
+ { "name":"Css Property Value", "fore":"StringVim" },
+ { "name":"Css Selector", "fore":"CommentVim" },
+ { "name":"Css String Value", "fore":"StringVim" },
+ { "name":"Css Keyword", "fore":"StatementVim" },
+
+ { "name":"Script Comment", "fore":"CommentVim" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"StatementVim" },
+ { "name":"Script Number", "fore":"NumberVim" },
+ { "name":"Script Operator" },
+ { "name":"Script String", "fore":"StringVim" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/Styles/OblivionStyle.json b/main/src/core/Mono.Texteditor/Styles/OblivionStyle.json
index 704b1c5aa7..e7064c653c 100644
--- a/main/src/core/Mono.Texteditor/Styles/OblivionStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/OblivionStyle.json
@@ -1,241 +1,239 @@
{
- "name":"Oblivion",
- "version":"1.0",
- "description": "'...where the soul at last is lost in utter peace'",
- "originator": "Xamarin Inc. (http://xamarin.com)",
-
- "palette":[
- { "name":"butter1", "value":"#fce94f" },
- { "name":"butter2", "value":"#edd400" },
- { "name":"butter3", "value":"#c4a000" },
- { "name":"orange1", "value":"#fcaf3e" },
- { "name":"orange2", "value":"#f57900" },
- { "name":"orange3", "value":"#ce5c00" },
- { "name":"chocolate1", "value":"#e9b96e" },
- { "name":"chocolate2", "value":"#c17d11" },
- { "name":"chocolate3", "value":"#8f5902" },
- { "name":"chameleon1", "value":"#8ae234" },
- { "name":"chameleon2", "value":"#73d216" },
- { "name":"chameleon3", "value":"#4e9a06" },
- { "name":"skyblue1", "value":"#729fcf" },
- { "name":"skyblue2", "value":"#3465a4" },
- { "name":"skyblue3", "value":"#204a87" },
- { "name":"plum1", "value":"#ad7fa8" },
- { "name":"plum2", "value":"#75507b" },
- { "name":"plum3", "value":"#5c3566" },
- { "name":"scarletred1", "value":"#ef2929" },
- { "name":"scarletred2", "value":"#cc0000" },
- { "name":"scarletred3", "value":"#a40000" },
- { "name":"aluminium1", "value":"#eeeeec" },
- { "name":"aluminium2", "value":"#d3d7cf" },
- { "name":"aluminium3", "value":"#babdb6" },
- { "name":"aluminium4", "value":"#888a85" },
- { "name":"aluminium5", "value":"#555753" },
- { "name":"aluminium6", "value":"#2e3436" },
- { "name":"aluminium7", "value":"#202424" }
- ],
-
- "colors":[
- { "name": "Background(Read Only)", "color":"aluminium7" },
-
- { "name": "Search result background", "color":"#006060" },
- { "name": "Search result background (highlighted)", "color":"#008080" },
-
- { "name": "Column Ruler", "color":"aluminium5" },
-
- { "name": "Fold Square", "color":"white", "secondcolor":"aluminium7" },
- { "name": "Fold Cross", "color":"white", "secondcolor":"aluminium7" },
-
- { "name": "Indentation Guide", "color":"aluminium5" },
-
- { "name": "Indicator Margin", "color":"aluminium7" },
- { "name": "Indicator Margin(Separator)", "color":"aluminium6" },
-
- { "name": "Tooltip Border", "color":"aluminium1" },
- { "name": "Tooltip Pager Top", "color":"aluminium5" },
- { "name": "Tooltip Pager Bottom", "color":"aluminium5" },
- { "name": "Tooltip Pager Triangle", "color":"aluminium2" },
- { "name": "Tooltip Pager Text", "color":"aluminium2" },
-
- { "name": "Notification Border", "color":"aluminium1" },
-
- { "name": "Completion Matching Substring", "color":"#BA3373" },
- { "name": "Completion Border", "color":"#C9C9C9" },
- { "name": "Completion Border(Inactive)", "color":"#bebebe" },
-
- { "name": "Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
-
- { "name": "Underline(Error)", "color":"scarletred2" },
- { "name": "Underline(Warning)", "color":"skyblue1" },
- { "name": "Underline(Suggestion)", "color":"chameleon3" },
- { "name": "Underline(Hint)", "color":"chameleon1" },
-
- { "name": "Quick Diff(Dirty)", "color":"butter2" },
- { "name": "Quick Diff(Changed)", "color":"chameleon2" },
-
- { "name": "Brace Matching(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
- { "name": "Usages(Rectangle)", "color":"#527F99", "secondcolor":"#527F99", "bordercolor":"#527F99" },
- { "name": "Changing usages(Rectangle)", "color":"#996E75", "secondcolor":"#996E75", "bordercolor":"#996E75" },
-
- { "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
-
- { "name": "Current Line Marker", "color":"aluminium7", "secondcolor":"aluminium7"},
- { "name": "Current Line Marker(Inactive)", "color":"aluminium7", "secondcolor":"aluminium7"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "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": "Message Bubble Error Marker", "color":"#b28d37"},
- { "name": "Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
- { "name": "Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
- { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
- { "name": "Message Bubble Error Line", "color":"#7b645c"},
- { "name": "Message Bubble Error Tooltip", "color":"#e3a6a1"},
-
- { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
- { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
- { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
- { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
- { "name": "Message Bubble Warning Line", "color":"#807e5c"},
- { "name": "Message Bubble Warning Tooltip", "color":"#efe89d"}
- ],
-
- "text":[
- { "name": "Plain Text", "fore":"aluminium2", "back":"aluminium6" },
- { "name": "Selected Text", "back":"aluminium5" },
- { "name": "Selected Text(Inactive)", "back":"aluminium7" },
-
- { "name": "Collapsed Text", "fore":"aluminium3", "back":"aluminium6" },
-
- { "name": "Line Numbers", "fore":"aluminium5", "back":"black"},
-
- { "name": "Punctuation", "fore":"aluminium2" },
- { "name": "Punctuation(Brackets)", "fore":"aluminium2" },
-
- { "name": "Comment(Line)", "fore":"aluminium4" },
- { "name": "Comment(Block)", "fore":"aluminium4" },
- { "name": "Comment(Doc)", "fore":"aluminium4" },
- { "name": "Comment(DocTag)", "fore":"aluminium4" },
- { "name": "Comment Tag", "fore":"aluminium4", "back":"butter1", "weight":"bold" },
- { "name": "Excluded Code", "fore":"aluminium4" },
-
- { "name": "String", "fore":"butter2"},
- { "name": "String(Escape)", "fore":"butter3"},
- { "name": "String(C# @ Verbatim)", "fore":"butter2"},
-
- { "name": "Number", "fore":"butter2"},
-
- { "name": "Preprocessor", "fore":"skyblue1", "style":"italic" },
- { "name": "Preprocessor(Region Name)", "fore":"skyblue1", "style":"italic" },
-
- { "name": "Xml Text", "fore":"aluminium2" },
- { "name": "Xml Delimiter", "fore":"aluminium2" },
- { "name": "Xml Name", "fore":"plum1" },
- { "name": "Xml Attribute", "fore":"skyblue1" },
- { "name": "Xml Attribute Quotes", "fore":"butter2" },
- { "name": "Xml Attribute Value", "fore":"butter2" },
- { "name": "Xml Comment", "fore":"aluminium4" },
- { "name": "Xml CData Section", "fore":"aluminium2" },
-
- { "name": "Html Attribute Name", "fore":"aluminium2" },
- { "name": "Html Attribute Value", "fore":"butter2" },
- { "name": "Html Comment", "fore":"aluminium4" },
- { "name": "Html Element Name", "fore":"plum1" },
- { "name": "Html Entity", "fore":"skyblue1" },
- { "name": "Html Operator", "fore":"aluminium2" },
- { "name": "Html Server-Side Script", "fore":"butter2", "back":"black" },
- { "name": "Html Tag Delimiter", "fore":"aluminium2" },
- { "name": "Razor Code", "fore":"aluminium2", "back":"aluminium7" },
-
- { "name": "Tooltip Text", "fore":"aluminium2", "back":"aluminium5" },
- { "name": "Notification Text", "fore":"aluminium2", "back":"aluminium5" },
-
- { "name": "Completion Text", "fore":"#434343", "back":"#F0F6F8" },
- { "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
- { "name": "Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
-
- { "name": "Keyword(Access)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Type)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Operator)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Selection)", "fore":"white", "weight":"bold" },
- { "name": "Keyword(Iteration)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Jump)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Context)", "fore":"white", "weight":"bold" },
- { "name": "Keyword(Exception)", "fore":"white", "weight":"bold" },
- { "name": "Keyword(Modifiers)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Constants)", "fore":"orange3", "weight":"bold" },
- { "name": "Keyword(Void)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Namespace)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Property)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Declaration)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Parameter)", "fore":"white", "weight":"bold" },
- { "name": "Keyword(Operator Declaration)", "fore":"plum1", "weight":"bold" },
- { "name": "Keyword(Other)", "fore":"white", "weight":"bold" },
-
- { "name": "User Types", "fore":"chameleon1" },
- { "name": "User Types(Enums)", "fore":"chameleon1" },
- { "name": "User Types(Interfaces)", "fore":"chameleon1" },
- { "name": "User Types(Delegates)", "fore":"chameleon1" },
- { "name": "User Types(Value types)", "fore":"chameleon1" },
- { "name": "User Types(Type parameters)", "fore":"chameleon1" },
-
- { "name": "User Field Usage", "fore":"aluminium2", "style":"italic" },
- { "name": "User Field Declaration", "fore":"aluminium2", "style":"italic" },
-
- { "name": "User Property Usage", "fore":"aluminium2", "style":"italic" },
- { "name": "User Property Declaration", "fore":"aluminium2", "style":"italic" },
-
- { "name": "User Event Usage", "fore":"aluminium2", "style":"italic" },
- { "name": "User Event Declaration", "fore":"aluminium2", "style":"italic" },
-
- { "name": "User Method Usage", "fore":"aluminium2", "style":"italic" },
- { "name": "User Method Declaration", "fore":"aluminium2", "style":"italic" },
-
- { "name": "User Parameter Usage", "fore":"aluminium2" },
- { "name": "User Parameter Declaration", "fore":"aluminium2" },
-
- { "name": "User Variable Usage", "fore":"aluminium2" },
- { "name": "User Variable Declaration", "fore":"aluminium2" },
-
- { "name": "Syntax Error", "fore":"scarletred1" },
-
- { "name": "String Format Items", "fore":"chocolate2" },
-
- { "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
- { "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
-
- { "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
- { "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
-
- { "name": "Diff Line(Added)", "fore":"butter2" },
- { "name": "Diff Line(Removed)", "fore":"skyblue1" },
- { "name": "Diff Line(Changed)", "fore":"plum1" },
- { "name": "Diff Header", "fore":"chameleon1", "weight":"bold" },
- { "name": "Diff Header(Separator)", "fore":"aluminium4" },
- { "name": "Diff Header(Old)", "fore":"chameleon1", "weight":"bold" },
- { "name": "Diff Header(New)", "fore":"chameleon1", "weight":"bold" },
- { "name": "Diff Location", "fore":"chameleon1", "weight":"bold" },
-
- { "name": "Css Comment", "fore":"aluminium4", "weight":"bold" },
- { "name": "Css Property Name", "fore":"aluminium2", "weight":"bold" },
- { "name": "Css Property Value", "fore":"butter2", "weight":"bold" },
- { "name": "Css Selector", "fore":"aluminium2", "weight":"bold" },
- { "name": "Css String Value", "fore":"butter2", "weight":"bold" },
- { "name": "Css Keyword", "fore":"plum1", "weight":"bold" },
-
- { "name": "Script Comment", "fore":"aluminium4" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"plum1" },
- { "name": "Script Number", "fore":"butter2" },
- { "name": "Script Operator" },
- { "name": "Script String", "fore":"butter2" }
- ]
+ "name":"Oblivion",
+ "version":"1.1",
+ "description":"'...where the soul at last is lost in utter peace'",
+ "originator":"Xamarin Inc. (http://xamarin.com)",
+
+ "palette":[
+ { "name":"butter1", "value":"#fce94f" },
+ { "name":"butter2", "value":"#edd400" },
+ { "name":"butter3", "value":"#c4a000" },
+ { "name":"orange1", "value":"#fcaf3e" },
+ { "name":"orange2", "value":"#f57900" },
+ { "name":"orange3", "value":"#ce5c00" },
+ { "name":"chocolate1", "value":"#e9b96e" },
+ { "name":"chocolate2", "value":"#c17d11" },
+ { "name":"chocolate3", "value":"#8f5902" },
+ { "name":"chameleon1", "value":"#8ae234" },
+ { "name":"chameleon2", "value":"#73d216" },
+ { "name":"chameleon3", "value":"#4e9a06" },
+ { "name":"skyblue1", "value":"#729fcf" },
+ { "name":"skyblue2", "value":"#3465a4" },
+ { "name":"skyblue3", "value":"#204a87" },
+ { "name":"plum1", "value":"#ad7fa8" },
+ { "name":"plum2", "value":"#75507b" },
+ { "name":"plum3", "value":"#5c3566" },
+ { "name":"scarletred1", "value":"#ef2929" },
+ { "name":"scarletred2", "value":"#cc0000" },
+ { "name":"scarletred3", "value":"#a40000" },
+ { "name":"aluminium1", "value":"#eeeeec" },
+ { "name":"aluminium2", "value":"#d3d7cf" },
+ { "name":"aluminium3", "value":"#babdb6" },
+ { "name":"aluminium4", "value":"#888a85" },
+ { "name":"aluminium5", "value":"#555753" },
+ { "name":"aluminium6", "value":"#2e3436" },
+ { "name":"aluminium7", "value":"#202424" }
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"aluminium7" },
+
+ { "name":"Search result background", "color":"#006060" },
+ { "name":"Search result background (highlighted)", "color":"#008080" },
+
+ { "name":"Column Ruler", "color":"aluminium5" },
+
+ { "name":"Fold Square", "color":"white", "secondcolor":"aluminium7" },
+ { "name":"Fold Cross", "color":"white", "secondcolor":"aluminium7" },
+
+ { "name":"Indentation Guide", "color":"aluminium5" },
+
+ { "name":"Indicator Margin", "color":"aluminium7" },
+ { "name":"Indicator Margin(Separator)", "color":"aluminium6" },
+
+ { "name":"Tooltip Border", "color":"aluminium1" },
+ { "name":"Tooltip Pager Top", "color":"aluminium5" },
+ { "name":"Tooltip Pager Bottom", "color":"aluminium5" },
+ { "name":"Tooltip Pager Triangle", "color":"aluminium2" },
+ { "name":"Tooltip Pager Text", "color":"aluminium2" },
+
+ { "name":"Notification Border", "color":"aluminium1" },
+
+ { "name":"Completion Matching Substring", "color":"#BA3373" },
+ { "name":"Completion Border", "color":"#C9C9C9" },
+ { "name":"Completion Border(Inactive)", "color":"#bebebe" },
+
+ { "name":"Bookmarks", "color":"aluminium1", "secondcolor":"aluminium4" },
+
+ { "name":"Underline(Error)", "color":"scarletred2" },
+ { "name":"Underline(Warning)", "color":"skyblue1" },
+ { "name":"Underline(Suggestion)", "color":"chameleon3" },
+ { "name":"Underline(Hint)", "color":"chameleon1" },
+
+ { "name":"Quick Diff(Dirty)", "color":"butter2" },
+ { "name":"Quick Diff(Changed)", "color":"chameleon2" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"aluminium4", "secondcolor":"aluminium5" },
+ { "name":"Usages(Rectangle)", "color":"#527F99", "secondcolor":"#527F99", "bordercolor":"#527F99" },
+ { "name":"Changing usages(Rectangle)", "color":"#996E75", "secondcolor":"#996E75", "bordercolor":"#996E75" },
+
+ { "name":"Breakpoint Marker", "color":"#6f3535", "bordercolor":"#7a3a3a" },
+ { "name":"Breakpoint Marker(Disabled)", "color":"#707070", "bordercolor":"#7b7b7b" },
+ { "name":"Breakpoint Marker(Invalid)", "color":"#604343", "bordercolor":"#6a4a4a" },
+
+ { "name":"Current Line Marker", "color":"aluminium7"},
+ { "name":"Current Line Marker(Inactive)", "color":"aluminium7"},
+
+ { "name":"Debugger Current Line Marker", "color":"#69684c", "bordercolor":"#747354" },
+ { "name":"Debugger Stack Line Marker", "color":"#5c6b4d", "bordercolor":"#657655"},
+
+ { "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":"Message Bubble Error Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Error Tag", "color":"#e3a6a1", "secondcolor":"black"},
+ { "name":"Message Bubble Error Counter", "color":"black", "secondcolor":"#e3a6a1"},
+ { "name":"Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name":"Message Bubble Error Line", "color":"#7b645c"},
+ { "name":"Message Bubble Error Tooltip", "color":"#e3a6a1"},
+
+ { "name":"Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name":"Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name":"Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name":"Message Bubble Warning Line", "color":"#807e5c"},
+ { "name":"Message Bubble Warning Tooltip", "color":"#efe89d"}
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"aluminium2", "back":"aluminium6" },
+ { "name":"Selected Text", "back":"aluminium5" },
+ { "name":"Selected Text(Inactive)", "back":"aluminium7" },
+
+ { "name":"Collapsed Text", "fore":"aluminium3", "back":"aluminium6" },
+
+ { "name":"Line Numbers", "fore":"aluminium5", "back":"black"},
+
+ { "name":"Punctuation", "fore":"aluminium2" },
+ { "name":"Punctuation(Brackets)", "fore":"aluminium2" },
+
+ { "name":"Comment(Line)", "fore":"aluminium4" },
+ { "name":"Comment(Block)", "fore":"aluminium4" },
+ { "name":"Comment(Doc)", "fore":"aluminium4" },
+ { "name":"Comment(DocTag)", "fore":"aluminium4" },
+ { "name":"Comment Tag", "fore":"aluminium4", "back":"butter1", "weight":"bold" },
+ { "name":"Excluded Code", "fore":"aluminium4" },
+
+ { "name":"String", "fore":"butter2"},
+ { "name":"String(Escape)", "fore":"butter3"},
+ { "name":"String(C# @ Verbatim)", "fore":"butter2"},
+
+ { "name":"Number", "fore":"butter2"},
+
+ { "name":"Preprocessor", "fore":"skyblue1", "style":"italic" },
+ { "name":"Preprocessor(Region Name)", "fore":"skyblue1", "style":"italic" },
+
+ { "name":"Xml Text", "fore":"aluminium2" },
+ { "name":"Xml Delimiter", "fore":"aluminium2" },
+ { "name":"Xml Name", "fore":"plum1" },
+ { "name":"Xml Attribute", "fore":"skyblue1" },
+ { "name":"Xml Attribute Quotes", "fore":"butter2" },
+ { "name":"Xml Attribute Value", "fore":"butter2" },
+ { "name":"Xml Comment", "fore":"aluminium4" },
+ { "name":"Xml CData Section", "fore":"aluminium2" },
+
+ { "name":"Html Attribute Name", "fore":"aluminium2" },
+ { "name":"Html Attribute Value", "fore":"butter2" },
+ { "name":"Html Comment", "fore":"aluminium4" },
+ { "name":"Html Element Name", "fore":"plum1" },
+ { "name":"Html Entity", "fore":"skyblue1" },
+ { "name":"Html Operator", "fore":"aluminium2" },
+ { "name":"Html Server-Side Script", "fore":"butter2", "back":"black" },
+ { "name":"Html Tag Delimiter", "fore":"aluminium2" },
+ { "name":"Razor Code", "fore":"aluminium2", "back":"aluminium7" },
+
+ { "name":"Tooltip Text", "fore":"aluminium2", "back":"aluminium5" },
+ { "name":"Notification Text", "fore":"aluminium2", "back":"aluminium5" },
+
+ { "name":"Completion Text", "fore":"#434343", "back":"#F0F6F8" },
+ { "name":"Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
+ { "name":"Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
+
+ { "name":"Keyword(Access)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Type)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Operator)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Selection)", "fore":"white", "weight":"bold" },
+ { "name":"Keyword(Iteration)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Jump)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Context)", "fore":"white", "weight":"bold" },
+ { "name":"Keyword(Exception)", "fore":"white", "weight":"bold" },
+ { "name":"Keyword(Modifiers)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Constants)", "fore":"orange3", "weight":"bold" },
+ { "name":"Keyword(Void)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Namespace)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Property)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Declaration)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Parameter)", "fore":"white", "weight":"bold" },
+ { "name":"Keyword(Operator Declaration)", "fore":"plum1", "weight":"bold" },
+ { "name":"Keyword(Other)", "fore":"white", "weight":"bold" },
+
+ { "name":"User Types", "fore":"chameleon1" },
+ { "name":"User Types(Enums)", "fore":"chameleon1" },
+ { "name":"User Types(Interfaces)", "fore":"chameleon1" },
+ { "name":"User Types(Delegates)", "fore":"chameleon1" },
+ { "name":"User Types(Value types)", "fore":"chameleon1" },
+ { "name":"User Types(Type parameters)", "fore":"chameleon1" },
+
+ { "name":"User Field Usage", "fore":"aluminium2", "style":"italic" },
+ { "name":"User Field Declaration", "fore":"aluminium2", "style":"italic" },
+
+ { "name":"User Property Usage", "fore":"aluminium2", "style":"italic" },
+ { "name":"User Property Declaration", "fore":"aluminium2", "style":"italic" },
+
+ { "name":"User Event Usage", "fore":"aluminium2", "style":"italic" },
+ { "name":"User Event Declaration", "fore":"aluminium2", "style":"italic" },
+
+ { "name":"User Method Usage", "fore":"aluminium2", "style":"italic" },
+ { "name":"User Method Declaration", "fore":"aluminium2", "style":"italic" },
+
+ { "name":"User Parameter Usage", "fore":"aluminium2" },
+ { "name":"User Parameter Declaration", "fore":"aluminium2" },
+
+ { "name":"User Variable Usage", "fore":"aluminium2" },
+ { "name":"User Variable Declaration", "fore":"aluminium2" },
+
+ { "name":"Syntax Error", "fore":"scarletred1" },
+
+ { "name":"String Format Items", "fore":"chocolate2" },
+
+ { "name":"Breakpoint Text", "fore":"white", "back":"#6f3535" },
+
+ { "name":"Debugger Current Statement", "fore":"white", "back":"#69684c" },
+ { "name":"Debugger Stack Line", "fore":"white", "back":"#5c6b4d" },
+
+ { "name":"Diff Line(Added)", "fore":"butter2" },
+ { "name":"Diff Line(Removed)", "fore":"skyblue1" },
+ { "name":"Diff Line(Changed)", "fore":"plum1" },
+ { "name":"Diff Header", "fore":"chameleon1", "weight":"bold" },
+ { "name":"Diff Header(Separator)", "fore":"aluminium4" },
+ { "name":"Diff Header(Old)", "fore":"chameleon1", "weight":"bold" },
+ { "name":"Diff Header(New)", "fore":"chameleon1", "weight":"bold" },
+ { "name":"Diff Location", "fore":"chameleon1", "weight":"bold" },
+
+ { "name":"Css Comment", "fore":"aluminium4", "weight":"bold" },
+ { "name":"Css Property Name", "fore":"aluminium2", "weight":"bold" },
+ { "name":"Css Property Value", "fore":"butter2", "weight":"bold" },
+ { "name":"Css Selector", "fore":"aluminium2", "weight":"bold" },
+ { "name":"Css String Value", "fore":"butter2", "weight":"bold" },
+ { "name":"Css Keyword", "fore":"plum1", "weight":"bold" },
+
+ { "name":"Script Comment", "fore":"aluminium4" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"plum1" },
+ { "name":"Script Number", "fore":"butter2" },
+ { "name":"Script Operator" },
+ { "name":"Script String", "fore":"butter2" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json b/main/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json
index 754eea80e6..920197e99f 100644
--- a/main/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/SolarizedDarkStyle.json
@@ -1,229 +1,228 @@
{
- "name":"Solarized Dark",
- "version":"1.0",
- "description": "An artful, dark scheme that's easy on the eyes.",
- "originator": "Xamarin Inc. (http://xamarin.com)",
-
- "palette":[
- { "name":"base03", "value":"#002b36" },
- { "name":"base02", "value":"#073642" },
- { "name":"base01", "value":"#586e75" },
- { "name":"base00", "value":"#657b83" },
- { "name":"base0", "value":"#839496" },
- { "name":"base1", "value":"#93a1a1" },
- { "name":"base2", "value":"#eee8d5" },
- { "name":"base3", "value":"#fdf6e3" },
- { "name":"yellow", "value":"#b58900" },
- { "name":"orange", "value":"#cb4b16" },
- { "name":"red", "value":"#dc322f" },
- { "name":"magenta", "value":"#d33682" },
- { "name":"violet", "value":"#6c71c4" },
- { "name":"blue", "value":"#268bd2" },
- { "name":"cyan", "value":"#2aa198" },
- { "name":"green", "value":"#859900" },
- { "name":"invalid-red", "value":"#ff0000"}
- ],
-
- "colors":[
- { "name": "Background(Read Only)", "color":"base02" },
-
- { "name": "Search result background", "color":"base02" },
- { "name": "Search result background (highlighted)", "color":"base02" },
-
- { "name": "Column Ruler", "color":"base1" },
-
- { "name": "Fold Square", "color":"base01", "secondcolor":"base02" },
- { "name": "Fold Cross", "color":"base01", "secondcolor":"base02" },
-
- { "name": "Indentation Guide", "color":"#354243" },
-
- { "name": "Indicator Margin", "color":"base03" },
- { "name": "Indicator Margin(Separator)", "color":"base02" },
-
- { "name": "Tooltip Border", "color":"base1" },
- { "name": "Tooltip Pager Top", "color":"base2" },
- { "name": "Tooltip Pager Bottom", "color":"base2" },
- { "name": "Tooltip Pager Triangle", "color":"base00" },
- { "name": "Tooltip Pager Text", "color":"base00" },
-
- { "name": "Notification Border", "color":"base1" },
-
- { "name": "Completion Matching Substring", "color":"#BA3373" },
- { "name": "Completion Border", "color":"#C9C9C9" },
- { "name": "Completion Border(Inactive)", "color":"#bebebe" },
-
- { "name": "Bookmarks", "color":"base3", "secondcolor":"blue" },
-
- { "name": "Underline(Error)", "color":"red" },
- { "name": "Underline(Warning)", "color":"orange" },
- { "name": "Underline(Suggestion)", "color":"blue" },
- { "name": "Underline(Hint)", "color":"green" },
-
- { "name": "Quick Diff(Dirty)", "color":"yellow" },
- { "name": "Quick Diff(Changed)", "color":"green" },
-
- { "name": "Brace Matching(Rectangle)", "color":"base1", "secondcolor":"base02" },
- { "name": "Usages(Rectangle)", "color":"base02", "secondcolor":"base02", "bordercolor":"base02" },
- { "name": "Changing usages(Rectangle)", "color":"base02", "secondcolor":"base02", "bordercolor":"base02" },
-
- { "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
-
- { "name": "Current Line Marker", "color":"base02", "secondcolor":"base02"},
- { "name": "Current Line Marker(Inactive)", "color":"base02", "secondcolor":"base02"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
-
- { "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"},
- { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
- { "name": "Message Bubble Error Line", "color":"#7b645c"},
- { "name": "Message Bubble Error Tooltip", "color":"#e3a6a1"},
-
- { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
- { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
- { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
- { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
- { "name": "Message Bubble Warning Line", "color":"#807e5c"},
- { "name": "Message Bubble Warning Tooltip", "color":"#efe89d"}
- ],
-
- "text":[
- { "name": "Plain Text", "fore":"base00", "back":"base03" },
- { "name": "Selected Text", "back":"base02" },
- { "name": "Selected Text(Inactive)", "back":"base3" },
-
- { "name": "Collapsed Text", "fore":"base01", "back":"base03" },
-
- { "name": "Line Numbers", "fore":"base00", "back":"base02"},
-
- { "name": "Punctuation", "fore":"base00" },
- { "name": "Punctuation(Brackets)", "fore":"base00" },
-
- { "name": "Comment(Line)", "fore":"base01" },
- { "name": "Comment(Block)", "fore":"base01" },
- { "name": "Comment(Doc)", "fore":"base01" },
- { "name": "Comment(DocTag)", "fore":"base01" },
- { "name": "Comment Tag", "fore":"base01", "style":"italic" },
- { "name": "Excluded Code", "fore":"base01" },
-
- { "name": "String", "fore":"cyan"},
- { "name": "String(Escape)", "fore":"lightcyan"},
- { "name": "String(C# @ Verbatim)", "fore":"cyan"},
-
- { "name": "Number", "fore":"violet"},
-
- { "name": "Preprocessor", "fore":"orange" },
- { "name": "Preprocessor(Region Name)", "fore":"orange" },
-
- { "name": "Xml Text", "fore":"base00" },
- { "name": "Xml Delimiter", "fore":"base00" },
- { "name": "Xml Name", "fore":"blue" },
- { "name": "Xml Attribute", "fore":"base00" },
- { "name": "Xml Attribute Quotes", "fore":"cyan" },
- { "name": "Xml Attribute Value", "fore":"cyan" },
- { "name": "Xml Comment", "fore":"base01" },
- { "name": "Xml CData Section", "fore":"cyan" },
-
- { "name": "Html Attribute Name", "fore":"base00" },
- { "name": "Html Attribute Value", "fore":"cyan" },
- { "name": "Html Comment", "fore":"base01" },
- { "name": "Html Element Name", "fore":"blue" },
- { "name": "Html Entity", "fore":"orange" },
- { "name": "Html Operator", "fore":"base00" },
- { "name": "Html Server-Side Script", "fore":"magenta", "back":"base02" },
- { "name": "Html Tag Delimiter", "fore":"base00" },
- { "name": "Razor Code", "fore":"black", "back":"base02" },
-
- { "name": "Tooltip Text", "fore":"black", "back":"#feffe9" },
- { "name": "Notification Text", "fore":"black", "back":"#feffe9" },
-
- { "name": "Completion Text", "fore":"#434343", "back":"#F0F6F8" },
- { "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
- { "name": "Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
-
- { "name": "Keyword(Access)", "fore":"violet" },
- { "name": "Keyword(Type)", "fore":"green" },
- { "name": "Keyword(Operator)", "fore":"green" },
- { "name": "Keyword(Selection)", "fore":"green" },
- { "name": "Keyword(Iteration)", "fore":"green" },
- { "name": "Keyword(Jump)", "fore":"green" },
- { "name": "Keyword(Context)", "fore":"green" },
- { "name": "Keyword(Exception)", "fore":"green" },
- { "name": "Keyword(Modifiers)", "fore":"green" },
- { "name": "Keyword(Constants)", "fore":"green" },
- { "name": "Keyword(Void)", "fore":"yellow" },
- { "name": "Keyword(Namespace)", "fore":"green" },
- { "name": "Keyword(Property)", "fore":"green" },
- { "name": "Keyword(Declaration)", "fore":"green" },
- { "name": "Keyword(Parameter)", "fore":"green" },
- { "name": "Keyword(Operator Declaration)", "fore":"green" },
- { "name": "Keyword(Other)", "fore":"green" },
-
- { "name": "User Types", "fore":"yellow" },
- { "name": "User Types(Enums)", "fore":"yellow" },
- { "name": "User Types(Interfaces)", "fore":"yellow" },
- { "name": "User Types(Delegates)", "fore":"yellow" },
- { "name": "User Types(Value types)", "fore":"yellow" },
- { "name": "User Types(Type parameters)", "fore":"yellow" },
-
- { "name": "User Field Usage", "fore":"blue" },
- { "name": "User Field Declaration", "fore":"blue" },
-
- { "name": "User Property Usage", "fore":"blue" },
- { "name": "User Property Declaration", "fore":"blue" },
-
- { "name": "User Event Usage", "fore":"blue" },
- { "name": "User Event Declaration", "fore":"blue" },
-
- { "name": "User Method Usage", "fore":"blue" },
- { "name": "User Method Declaration", "fore":"blue" },
-
- { "name": "User Parameter Usage", "fore":"base00" },
- { "name": "User Parameter Declaration", "fore":"base00" },
-
- { "name": "User Variable Usage", "fore":"base00" },
- { "name": "User Variable Declaration", "fore":"base00" },
-
- { "name": "Syntax Error", "fore":"invalid-red" },
-
- { "name": "String Format Items", "fore":"base00" },
-
- { "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
- { "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
-
- { "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
- { "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
- { "name": "Diff Line(Added)", "fore":"Blue" },
- { "name": "Diff Line(Removed)", "fore":"Red" },
- { "name": "Diff Line(Changed)", "fore":"Green" },
- { "name": "Diff Header", "fore":"Magenta" },
- { "name": "Diff Header(Separator)", "fore":"Magenta", "weight":"bold" },
- { "name": "Diff Header(Old)", "fore":"Red", "weight":"bold" },
- { "name": "Diff Header(New)", "fore":"Blue", "weight":"bold" },
- { "name": "Diff Location", "fore":"Magenta", "weight":"bold" },
-
- { "name": "Css Comment", "fore":"base01", "weight":"bold" },
- { "name": "Css Property Name", "fore":"black", "weight":"bold" },
- { "name": "Css Property Value", "fore":"cyan", "weight":"bold" },
- { "name": "Css Selector", "fore":"base01", "weight":"bold" },
- { "name": "Css String Value", "fore":"cyan", "weight":"bold" },
- { "name": "Css Keyword", "fore":"keyword-teal", "weight":"bold" },
-
- { "name": "Script Comment", "fore":"base01" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"green" },
- { "name": "Script Number", "fore":"violet" },
- { "name": "Script Operator" },
- { "name": "Script String", "fore":"cyan" }
- ]
+ "name":"Solarized Dark",
+ "version":"1.1",
+ "description":"An artful, dark scheme that's easy on the eyes.",
+ "originator":"Xamarin Inc. (http://xamarin.com)",
+
+ "palette":[
+ { "name":"base03", "value":"#002b36" },
+ { "name":"base02", "value":"#073642" },
+ { "name":"base01", "value":"#586e75" },
+ { "name":"base00", "value":"#657b83" },
+ { "name":"base0", "value":"#839496" },
+ { "name":"base1", "value":"#93a1a1" },
+ { "name":"base2", "value":"#eee8d5" },
+ { "name":"base3", "value":"#fdf6e3" },
+ { "name":"yellow", "value":"#b58900" },
+ { "name":"orange", "value":"#cb4b16" },
+ { "name":"red", "value":"#dc322f" },
+ { "name":"magenta", "value":"#d33682" },
+ { "name":"violet", "value":"#6c71c4" },
+ { "name":"blue", "value":"#268bd2" },
+ { "name":"cyan", "value":"#2aa198" },
+ { "name":"green", "value":"#859900" },
+ { "name":"invalid-red", "value":"#ff0000"}
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"base02" },
+
+ { "name":"Search result background", "color":"base02" },
+ { "name":"Search result background (highlighted)", "color":"base02" },
+
+ { "name":"Column Ruler", "color":"base1" },
+
+ { "name":"Fold Square", "color":"base01", "secondcolor":"base02" },
+ { "name":"Fold Cross", "color":"base01", "secondcolor":"base02" },
+
+ { "name":"Indentation Guide", "color":"#354243" },
+
+ { "name":"Indicator Margin", "color":"base03" },
+ { "name":"Indicator Margin(Separator)", "color":"base02" },
+
+ { "name":"Tooltip Border", "color":"base1" },
+ { "name":"Tooltip Pager Top", "color":"base2" },
+ { "name":"Tooltip Pager Bottom", "color":"base2" },
+ { "name":"Tooltip Pager Triangle", "color":"base00" },
+ { "name":"Tooltip Pager Text", "color":"base00" },
+
+ { "name":"Notification Border", "color":"base1" },
+
+ { "name":"Completion Matching Substring", "color":"#BA3373" },
+ { "name":"Completion Border", "color":"#C9C9C9" },
+ { "name":"Completion Border(Inactive)", "color":"#bebebe" },
+
+ { "name":"Bookmarks", "color":"base3", "secondcolor":"blue" },
+
+ { "name":"Underline(Error)", "color":"red" },
+ { "name":"Underline(Warning)", "color":"orange" },
+ { "name":"Underline(Suggestion)", "color":"blue" },
+ { "name":"Underline(Hint)", "color":"green" },
+
+ { "name":"Quick Diff(Dirty)", "color":"yellow" },
+ { "name":"Quick Diff(Changed)", "color":"green" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"base1", "secondcolor":"base02" },
+ { "name":"Usages(Rectangle)", "color":"base02", "secondcolor":"base02", "bordercolor":"base02" },
+ { "name":"Changing usages(Rectangle)", "color":"base02", "secondcolor":"base02", "bordercolor":"base02" },
+
+ { "name":"Breakpoint Marker", "color":"#6f3535", "bordercolor":"#7a3a3a" },
+ { "name":"Breakpoint Marker(Disabled)", "color":"#707070", "bordercolor":"#7b7b7b" },
+ { "name":"Breakpoint Marker(Invalid)", "color":"#604343", "bordercolor":"#6a4a4a" },
+
+ { "name":"Current Line Marker", "color":"base02"},
+ { "name":"Current Line Marker(Inactive)", "color":"base02"},
+
+ { "name":"Debugger Current Line Marker", "color":"#69684c", "bordercolor":"#747354" },
+ { "name":"Debugger Stack Line Marker", "color":"#5c6b4d", "bordercolor":"#657655"},
+
+ { "name":"Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
+ { "name":"Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
+ { "name":"Secondary Link", "color":"aluminium2", "secondcolor":"white"},
+ { "name":"Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
+
+ { "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"},
+ { "name":"Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name":"Message Bubble Error Line", "color":"#7b645c"},
+ { "name":"Message Bubble Error Tooltip", "color":"#e3a6a1"},
+
+ { "name":"Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name":"Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name":"Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name":"Message Bubble Warning Line", "color":"#807e5c"},
+ { "name":"Message Bubble Warning Tooltip", "color":"#efe89d"}
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"base00", "back":"base03" },
+ { "name":"Selected Text", "back":"base02" },
+ { "name":"Selected Text(Inactive)", "back":"base3" },
+
+ { "name":"Collapsed Text", "fore":"base01", "back":"base03" },
+
+ { "name":"Line Numbers", "fore":"base00", "back":"base02"},
+
+ { "name":"Punctuation", "fore":"base00" },
+ { "name":"Punctuation(Brackets)", "fore":"base00" },
+
+ { "name":"Comment(Line)", "fore":"base01" },
+ { "name":"Comment(Block)", "fore":"base01" },
+ { "name":"Comment(Doc)", "fore":"base01" },
+ { "name":"Comment(DocTag)", "fore":"base01" },
+ { "name":"Comment Tag", "fore":"base01", "style":"italic" },
+ { "name":"Excluded Code", "fore":"base01" },
+
+ { "name":"String", "fore":"cyan"},
+ { "name":"String(Escape)", "fore":"lightcyan"},
+ { "name":"String(C# @ Verbatim)", "fore":"cyan"},
+
+ { "name":"Number", "fore":"violet"},
+
+ { "name":"Preprocessor", "fore":"orange" },
+ { "name":"Preprocessor(Region Name)", "fore":"orange" },
+
+ { "name":"Xml Text", "fore":"base00" },
+ { "name":"Xml Delimiter", "fore":"base00" },
+ { "name":"Xml Name", "fore":"blue" },
+ { "name":"Xml Attribute", "fore":"base00" },
+ { "name":"Xml Attribute Quotes", "fore":"cyan" },
+ { "name":"Xml Attribute Value", "fore":"cyan" },
+ { "name":"Xml Comment", "fore":"base01" },
+ { "name":"Xml CData Section", "fore":"cyan" },
+
+ { "name":"Html Attribute Name", "fore":"base00" },
+ { "name":"Html Attribute Value", "fore":"cyan" },
+ { "name":"Html Comment", "fore":"base01" },
+ { "name":"Html Element Name", "fore":"blue" },
+ { "name":"Html Entity", "fore":"orange" },
+ { "name":"Html Operator", "fore":"base00" },
+ { "name":"Html Server-Side Script", "fore":"magenta", "back":"base02" },
+ { "name":"Html Tag Delimiter", "fore":"base00" },
+ { "name":"Razor Code", "fore":"black", "back":"base02" },
+
+ { "name":"Tooltip Text", "fore":"black", "back":"#feffe9" },
+ { "name":"Notification Text", "fore":"black", "back":"#feffe9" },
+
+ { "name":"Completion Text", "fore":"#434343", "back":"#F0F6F8" },
+ { "name":"Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
+ { "name":"Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
+
+ { "name":"Keyword(Access)", "fore":"violet" },
+ { "name":"Keyword(Type)", "fore":"green" },
+ { "name":"Keyword(Operator)", "fore":"green" },
+ { "name":"Keyword(Selection)", "fore":"green" },
+ { "name":"Keyword(Iteration)", "fore":"green" },
+ { "name":"Keyword(Jump)", "fore":"green" },
+ { "name":"Keyword(Context)", "fore":"green" },
+ { "name":"Keyword(Exception)", "fore":"green" },
+ { "name":"Keyword(Modifiers)", "fore":"green" },
+ { "name":"Keyword(Constants)", "fore":"green" },
+ { "name":"Keyword(Void)", "fore":"yellow" },
+ { "name":"Keyword(Namespace)", "fore":"green" },
+ { "name":"Keyword(Property)", "fore":"green" },
+ { "name":"Keyword(Declaration)", "fore":"green" },
+ { "name":"Keyword(Parameter)", "fore":"green" },
+ { "name":"Keyword(Operator Declaration)", "fore":"green" },
+ { "name":"Keyword(Other)", "fore":"green" },
+
+ { "name":"User Types", "fore":"yellow" },
+ { "name":"User Types(Enums)", "fore":"yellow" },
+ { "name":"User Types(Interfaces)", "fore":"yellow" },
+ { "name":"User Types(Delegates)", "fore":"yellow" },
+ { "name":"User Types(Value types)", "fore":"yellow" },
+ { "name":"User Types(Type parameters)", "fore":"yellow" },
+
+ { "name":"User Field Usage", "fore":"blue" },
+ { "name":"User Field Declaration", "fore":"blue" },
+
+ { "name":"User Property Usage", "fore":"blue" },
+ { "name":"User Property Declaration", "fore":"blue" },
+
+ { "name":"User Event Usage", "fore":"blue" },
+ { "name":"User Event Declaration", "fore":"blue" },
+
+ { "name":"User Method Usage", "fore":"blue" },
+ { "name":"User Method Declaration", "fore":"blue" },
+
+ { "name":"User Parameter Usage", "fore":"base00" },
+ { "name":"User Parameter Declaration", "fore":"base00" },
+
+ { "name":"User Variable Usage", "fore":"base00" },
+ { "name":"User Variable Declaration", "fore":"base00" },
+
+ { "name":"Syntax Error", "fore":"invalid-red" },
+
+ { "name":"String Format Items", "fore":"base00" },
+
+ { "name":"Breakpoint Text", "fore":"white", "back":"#6f3535" },
+
+ { "name":"Debugger Current Statement", "fore":"white", "back":"#69684c" },
+ { "name":"Debugger Stack Line", "fore":"white", "back":"#5c6b4d" },
+
+ { "name":"Diff Line(Added)", "fore":"Blue" },
+ { "name":"Diff Line(Removed)", "fore":"Red" },
+ { "name":"Diff Line(Changed)", "fore":"Green" },
+ { "name":"Diff Header", "fore":"Magenta" },
+ { "name":"Diff Header(Separator)", "fore":"Magenta", "weight":"bold" },
+ { "name":"Diff Header(Old)", "fore":"Red", "weight":"bold" },
+ { "name":"Diff Header(New)", "fore":"Blue", "weight":"bold" },
+ { "name":"Diff Location", "fore":"Magenta", "weight":"bold" },
+
+ { "name":"Css Comment", "fore":"base01", "weight":"bold" },
+ { "name":"Css Property Name", "fore":"black", "weight":"bold" },
+ { "name":"Css Property Value", "fore":"cyan", "weight":"bold" },
+ { "name":"Css Selector", "fore":"base01", "weight":"bold" },
+ { "name":"Css String Value", "fore":"cyan", "weight":"bold" },
+ { "name":"Css Keyword", "fore":"keyword-teal", "weight":"bold" },
+
+ { "name":"Script Comment", "fore":"base01" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"green" },
+ { "name":"Script Number", "fore":"violet" },
+ { "name":"Script Operator" },
+ { "name":"Script String", "fore":"cyan" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json b/main/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json
index a6a0b17bed..ce4a504362 100644
--- a/main/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/SolarizedLightStyle.json
@@ -1,230 +1,228 @@
{
- "name":"Solarized Light",
- "version":"1.0",
- "description": "An artful, light scheme that's easy on the eyes.",
- "originator": "Xamarin Inc. (http://xamarin.com)",
-
- "palette":[
- { "name":"base03", "value":"#002b36" },
- { "name":"base02", "value":"#073642" },
- { "name":"base01", "value":"#586e75" },
- { "name":"base00", "value":"#657b83" },
- { "name":"base0", "value":"#839496" },
- { "name":"base1", "value":"#93a1a1" },
- { "name":"base2", "value":"#eee8d5" },
- { "name":"base3", "value":"#fdf6e3" },
- { "name":"yellow", "value":"#b58900" },
- { "name":"orange", "value":"#cb4b16" },
- { "name":"red", "value":"#dc322f" },
- { "name":"magenta", "value":"#d33682" },
- { "name":"violet", "value":"#6c71c4" },
- { "name":"blue", "value":"#268bd2" },
- { "name":"cyan", "value":"#2aa198" },
- { "name":"green", "value":"#859900" },
- { "name":"invalid-red", "value":"#ff0000"}
- ],
-
- "colors":[
- { "name": "Background(Read Only)", "color":"base02" },
-
- { "name": "Search result background", "color":"base3" },
- { "name": "Search result background (highlighted)", "color":"base3" },
-
- { "name": "Column Ruler", "color":"base1" },
-
- { "name": "Fold Square", "color":"base01", "secondcolor":"base3" },
- { "name": "Fold Cross", "color":"base01", "secondcolor":"base3" },
-
- { "name": "Indentation Guide", "color":"#354243" },
-
- { "name": "Indicator Margin", "color":"base2" },
- { "name": "Indicator Margin(Separator)", "color":"base3" },
-
- { "name": "Tooltip Border", "color":"base1" },
- { "name": "Tooltip Pager Top", "color":"base2" },
- { "name": "Tooltip Pager Bottom", "color":"base2" },
- { "name": "Tooltip Pager Triangle", "color":"base00" },
- { "name": "Tooltip Pager Text", "color":"base00" },
-
- { "name": "Notification Border", "color":"base1" },
-
- { "name": "Completion Matching Substring", "color":"#BA3373" },
- { "name": "Completion Border", "color":"#C9C9C9" },
- { "name": "Completion Border(Inactive)", "color":"#bebebe" },
-
- { "name": "Bookmarks", "color":"base3", "secondcolor":"blue" },
-
- { "name": "Underline(Error)", "color":"red" },
- { "name": "Underline(Warning)", "color":"orange" },
- { "name": "Underline(Suggestion)", "color":"blue" },
- { "name": "Underline(Hint)", "color":"green" },
-
- { "name": "Quick Diff(Dirty)", "color":"yellow" },
- { "name": "Quick Diff(Changed)", "color":"green" },
-
- { "name": "Brace Matching(Rectangle)", "color":"base1", "secondcolor":"base3" },
- { "name": "Usages(Rectangle)", "color":"base3", "secondcolor":"base3", "bordercolor":"base3" },
- { "name": "Changing usages(Rectangle)", "color":"base3", "secondcolor":"base3", "bordercolor":"base3" },
-
- { "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
-
- { "name": "Current Line Marker", "color":"base3", "secondcolor":"base3"},
- { "name": "Current Line Marker(Inactive)", "color":"base3", "secondcolor":"base3"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
-
- { "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"},
- { "name": "Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
- { "name": "Message Bubble Error Line", "color":"#7b645c"},
- { "name": "Message Bubble Error Tooltip", "color":"#e3a6a1"},
-
- { "name": "Message Bubble Warning Marker", "color":"#b28d37"},
- { "name": "Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
- { "name": "Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
- { "name": "Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
- { "name": "Message Bubble Warning Line", "color":"#807e5c"},
- { "name": "Message Bubble Warning Tooltip", "color":"#efe89d"}
- ],
-
- "text":[
- { "name": "Plain Text", "fore":"base00", "back":"base3" },
- { "name": "Selected Text", "back":"base02" },
- { "name": "Selected Text(Inactive)", "back":"base3" },
-
- { "name": "Collapsed Text", "fore":"base01", "back":"base3" },
-
- { "name": "Line Numbers", "fore":"base00", "back":"base2"},
-
- { "name": "Punctuation", "fore":"base00" },
- { "name": "Punctuation(Brackets)", "fore":"base00" },
-
- { "name": "Comment(Line)", "fore":"base01" },
- { "name": "Comment(Block)", "fore":"base01" },
- { "name": "Comment(Doc)", "fore":"base01" },
- { "name": "Comment(DocTag)", "fore":"base01" },
- { "name": "Comment Tag", "fore":"base01", "style":"italic" },
- { "name": "Excluded Code", "fore":"base01" },
-
- { "name": "String", "fore":"cyan"},
- { "name": "String(Escape)", "fore":"lightcyan"},
- { "name": "String(C# @ Verbatim)", "fore":"cyan"},
-
- { "name": "Number", "fore":"violet"},
-
- { "name": "Preprocessor", "fore":"orange" },
- { "name": "Preprocessor(Region Name)", "fore":"orange" },
-
- { "name": "Xml Text", "fore":"base00" },
- { "name": "Xml Delimiter", "fore":"base00" },
- { "name": "Xml Name", "fore":"blue" },
- { "name": "Xml Attribute", "fore":"base00" },
- { "name": "Xml Attribute Quotes", "fore":"cyan" },
- { "name": "Xml Attribute Value", "fore":"cyan" },
- { "name": "Xml Comment", "fore":"base01" },
- { "name": "Xml CData Section", "fore":"cyan" },
-
- { "name": "Html Attribute Name", "fore":"base00" },
- { "name": "Html Attribute Value", "fore":"cyan" },
- { "name": "Html Comment", "fore":"base01" },
- { "name": "Html Element Name", "fore":"blue" },
- { "name": "Html Entity", "fore":"orange" },
- { "name": "Html Operator", "fore":"base00" },
- { "name": "Html Server-Side Script", "fore":"magenta", "back":"base2" },
- { "name": "Html Tag Delimiter", "fore":"base00" },
- { "name": "Razor Code", "fore":"black", "back":"base2" },
-
- { "name": "Tooltip Text", "fore":"black", "back":"#feffe9" },
- { "name": "Notification Text", "fore":"black", "back":"#feffe9" },
-
- { "name": "Completion Text", "fore":"#434343", "back":"#F0F6F8" },
- { "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
- { "name": "Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
-
- { "name": "Keyword(Access)", "fore":"violet" },
- { "name": "Keyword(Type)", "fore":"green" },
- { "name": "Keyword(Operator)", "fore":"green" },
- { "name": "Keyword(Selection)", "fore":"green" },
- { "name": "Keyword(Iteration)", "fore":"green" },
- { "name": "Keyword(Jump)", "fore":"green" },
- { "name": "Keyword(Context)", "fore":"green" },
- { "name": "Keyword(Exception)", "fore":"green" },
- { "name": "Keyword(Modifiers)", "fore":"green" },
- { "name": "Keyword(Constants)", "fore":"green" },
- { "name": "Keyword(Void)", "fore":"yellow" },
- { "name": "Keyword(Namespace)", "fore":"green" },
- { "name": "Keyword(Property)", "fore":"green" },
- { "name": "Keyword(Declaration)", "fore":"green" },
- { "name": "Keyword(Parameter)", "fore":"green" },
- { "name": "Keyword(Operator Declaration)", "fore":"green" },
- { "name": "Keyword(Other)", "fore":"green" },
-
- { "name": "User Types", "fore":"yellow" },
- { "name": "User Types(Enums)", "fore":"yellow" },
- { "name": "User Types(Interfaces)", "fore":"yellow" },
- { "name": "User Types(Delegates)", "fore":"yellow" },
- { "name": "User Types(Value types)", "fore":"yellow" },
- { "name": "User Types(Type parameters)", "fore":"yellow" },
-
- { "name": "User Field Usage", "fore":"blue" },
- { "name": "User Field Declaration", "fore":"blue" },
-
- { "name": "User Property Usage", "fore":"blue" },
- { "name": "User Property Declaration", "fore":"blue" },
-
- { "name": "User Event Usage", "fore":"blue" },
- { "name": "User Event Declaration", "fore":"blue" },
-
- { "name": "User Method Usage", "fore":"blue" },
- { "name": "User Method Declaration", "fore":"blue" },
-
- { "name": "User Parameter Usage", "fore":"base00" },
- { "name": "User Parameter Declaration", "fore":"base00" },
-
- { "name": "User Variable Usage", "fore":"base00" },
- { "name": "User Variable Declaration", "fore":"base00" },
-
- { "name": "Syntax Error", "fore":"invalid-red" },
-
- { "name": "String Format Items", "fore":"base00" },
-
- { "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
- { "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
-
- { "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
- { "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
- { "name": "Diff Line(Added)", "fore":"Blue" },
- { "name": "Diff Line(Removed)", "fore":"Red" },
- { "name": "Diff Line(Changed)", "fore":"Green" },
- { "name": "Diff Header", "fore":"Magenta" },
- { "name": "Diff Header(Separator)", "fore":"Magenta", "weight":"bold" },
- { "name": "Diff Header(Old)", "fore":"Red", "weight":"bold" },
- { "name": "Diff Header(New)", "fore":"Blue", "weight":"bold" },
- { "name": "Diff Location", "fore":"Magenta", "weight":"bold" },
-
- { "name": "Css Comment", "fore":"base01", "weight":"bold" },
- { "name": "Css Property Name", "fore":"black", "weight":"bold" },
- { "name": "Css Property Value", "fore":"cyan", "weight":"bold" },
- { "name": "Css Selector", "fore":"base01", "weight":"bold" },
- { "name": "Css String Value", "fore":"cyan", "weight":"bold" },
- { "name": "Css Keyword", "fore":"keyword-teal", "weight":"bold" },
-
- { "name": "Script Comment", "fore":"base01" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"green" },
- { "name": "Script Number", "fore":"violet" },
- { "name": "Script Operator" },
- { "name": "Script String", "fore":"cyan" }
- ]
-
+ "name":"Solarized Light",
+ "version":"1.1",
+ "description":"An artful, light scheme that's easy on the eyes.",
+ "originator":"Xamarin Inc. (http://xamarin.com)",
+
+ "palette":[
+ { "name":"base03", "value":"#002b36" },
+ { "name":"base02", "value":"#073642" },
+ { "name":"base01", "value":"#586e75" },
+ { "name":"base00", "value":"#657b83" },
+ { "name":"base0", "value":"#839496" },
+ { "name":"base1", "value":"#93a1a1" },
+ { "name":"base2", "value":"#eee8d5" },
+ { "name":"base3", "value":"#fdf6e3" },
+ { "name":"yellow", "value":"#b58900" },
+ { "name":"orange", "value":"#cb4b16" },
+ { "name":"red", "value":"#dc322f" },
+ { "name":"magenta", "value":"#d33682" },
+ { "name":"violet", "value":"#6c71c4" },
+ { "name":"blue", "value":"#268bd2" },
+ { "name":"cyan", "value":"#2aa198" },
+ { "name":"green", "value":"#859900" },
+ { "name":"invalid-red", "value":"#ff0000"}
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"base02" },
+
+ { "name":"Search result background", "color":"base3" },
+ { "name":"Search result background (highlighted)", "color":"base3" },
+
+ { "name":"Column Ruler", "color":"base1" },
+
+ { "name":"Fold Square", "color":"base01", "secondcolor":"base3" },
+ { "name":"Fold Cross", "color":"base01", "secondcolor":"base3" },
+
+ { "name":"Indentation Guide", "color":"#354243" },
+
+ { "name":"Indicator Margin", "color":"base2" },
+ { "name":"Indicator Margin(Separator)", "color":"base3" },
+
+ { "name":"Tooltip Border", "color":"base1" },
+ { "name":"Tooltip Pager Top", "color":"base2" },
+ { "name":"Tooltip Pager Bottom", "color":"base2" },
+ { "name":"Tooltip Pager Triangle", "color":"base00" },
+ { "name":"Tooltip Pager Text", "color":"base00" },
+
+ { "name":"Notification Border", "color":"base1" },
+
+ { "name":"Completion Matching Substring", "color":"#BA3373" },
+ { "name":"Completion Border", "color":"#C9C9C9" },
+ { "name":"Completion Border(Inactive)", "color":"#bebebe" },
+
+ { "name":"Bookmarks", "color":"base3", "secondcolor":"blue" },
+
+ { "name":"Underline(Error)", "color":"red" },
+ { "name":"Underline(Warning)", "color":"orange" },
+ { "name":"Underline(Suggestion)", "color":"blue" },
+ { "name":"Underline(Hint)", "color":"green" },
+
+ { "name":"Quick Diff(Dirty)", "color":"yellow" },
+ { "name":"Quick Diff(Changed)", "color":"green" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"base1", "secondcolor":"base3" },
+ { "name":"Usages(Rectangle)", "color":"base3", "secondcolor":"base3", "bordercolor":"base3" },
+ { "name":"Changing usages(Rectangle)", "color":"base3", "secondcolor":"base3", "bordercolor":"base3" },
+
+ { "name":"Breakpoint Marker", "color":"#f9dbda", "bordercolor":"#ebcccb" },
+ { "name":"Breakpoint Marker(Disabled)", "color":"#e9e9e9", "bordercolor":"#dbdbdb" },
+ { "name":"Breakpoint Marker(Invalid)", "color":"#f1e3e3", "bordercolor":"#e3d5d5" },
+
+ { "name":"Current Line Marker", "color":"base3"},
+ { "name":"Current Line Marker(Inactive)", "color":"base3"},
+
+ { "name":"Debugger Current Line Marker", "color":"#f8f4a1", "bordercolor":"#ede993" },
+ { "name":"Debugger Stack Line Marker", "color":"#ccfca6", "bordercolor":"#bff197" },
+
+ { "name":"Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
+ { "name":"Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
+ { "name":"Secondary Link", "color":"aluminium2", "secondcolor":"white"},
+ { "name":"Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
+
+ { "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"},
+ { "name":"Message Bubble Error IconMargin", "color":"#735c54", "bordercolor":"#805b4d"},
+ { "name":"Message Bubble Error Line", "color":"#7b645c"},
+ { "name":"Message Bubble Error Tooltip", "color":"#e3a6a1"},
+
+ { "name":"Message Bubble Warning Marker", "color":"#b28d37"},
+ { "name":"Message Bubble Warning Tag", "color":"#efe89d", "secondcolor":"black"},
+ { "name":"Message Bubble Warning Counter", "color":"black", "secondcolor":"#efe89d"},
+ { "name":"Message Bubble Warning IconMargin", "color":"#777553", "bordercolor":"#948e51"},
+ { "name":"Message Bubble Warning Line", "color":"#807e5c"},
+ { "name":"Message Bubble Warning Tooltip", "color":"#efe89d"}
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"base00", "back":"base3" },
+ { "name":"Selected Text", "back":"base02" },
+ { "name":"Selected Text(Inactive)", "back":"base3" },
+
+ { "name":"Collapsed Text", "fore":"base01", "back":"base3" },
+
+ { "name":"Line Numbers", "fore":"base00", "back":"base2"},
+
+ { "name":"Punctuation", "fore":"base00" },
+ { "name":"Punctuation(Brackets)", "fore":"base00" },
+
+ { "name":"Comment(Line)", "fore":"base01" },
+ { "name":"Comment(Block)", "fore":"base01" },
+ { "name":"Comment(Doc)", "fore":"base01" },
+ { "name":"Comment(DocTag)", "fore":"base01" },
+ { "name":"Comment Tag", "fore":"base01", "style":"italic" },
+ { "name":"Excluded Code", "fore":"base01" },
+
+ { "name":"String", "fore":"cyan"},
+ { "name":"String(Escape)", "fore":"lightcyan"},
+ { "name":"String(C# @ Verbatim)", "fore":"cyan"},
+
+ { "name":"Number", "fore":"violet"},
+
+ { "name":"Preprocessor", "fore":"orange" },
+ { "name":"Preprocessor(Region Name)", "fore":"orange" },
+
+ { "name":"Xml Text", "fore":"base00" },
+ { "name":"Xml Delimiter", "fore":"base00" },
+ { "name":"Xml Name", "fore":"blue" },
+ { "name":"Xml Attribute", "fore":"base00" },
+ { "name":"Xml Attribute Quotes", "fore":"cyan" },
+ { "name":"Xml Attribute Value", "fore":"cyan" },
+ { "name":"Xml Comment", "fore":"base01" },
+ { "name":"Xml CData Section", "fore":"cyan" },
+
+ { "name":"Html Attribute Name", "fore":"base00" },
+ { "name":"Html Attribute Value", "fore":"cyan" },
+ { "name":"Html Comment", "fore":"base01" },
+ { "name":"Html Element Name", "fore":"blue" },
+ { "name":"Html Entity", "fore":"orange" },
+ { "name":"Html Operator", "fore":"base00" },
+ { "name":"Html Server-Side Script", "fore":"magenta", "back":"base2" },
+ { "name":"Html Tag Delimiter", "fore":"base00" },
+ { "name":"Razor Code", "fore":"black", "back":"base2" },
+
+ { "name":"Tooltip Text", "fore":"black", "back":"#feffe9" },
+ { "name":"Notification Text", "fore":"black", "back":"#feffe9" },
+
+ { "name":"Completion Text", "fore":"#434343", "back":"#F0F6F8" },
+ { "name":"Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
+ { "name":"Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
+
+ { "name":"Keyword(Access)", "fore":"violet" },
+ { "name":"Keyword(Type)", "fore":"green" },
+ { "name":"Keyword(Operator)", "fore":"green" },
+ { "name":"Keyword(Selection)", "fore":"green" },
+ { "name":"Keyword(Iteration)", "fore":"green" },
+ { "name":"Keyword(Jump)", "fore":"green" },
+ { "name":"Keyword(Context)", "fore":"green" },
+ { "name":"Keyword(Exception)", "fore":"green" },
+ { "name":"Keyword(Modifiers)", "fore":"green" },
+ { "name":"Keyword(Constants)", "fore":"green" },
+ { "name":"Keyword(Void)", "fore":"yellow" },
+ { "name":"Keyword(Namespace)", "fore":"green" },
+ { "name":"Keyword(Property)", "fore":"green" },
+ { "name":"Keyword(Declaration)", "fore":"green" },
+ { "name":"Keyword(Parameter)", "fore":"green" },
+ { "name":"Keyword(Operator Declaration)", "fore":"green" },
+ { "name":"Keyword(Other)", "fore":"green" },
+
+ { "name":"User Types", "fore":"yellow" },
+ { "name":"User Types(Enums)", "fore":"yellow" },
+ { "name":"User Types(Interfaces)", "fore":"yellow" },
+ { "name":"User Types(Delegates)", "fore":"yellow" },
+ { "name":"User Types(Value types)", "fore":"yellow" },
+ { "name":"User Types(Type parameters)", "fore":"yellow" },
+
+ { "name":"User Field Usage", "fore":"blue" },
+ { "name":"User Field Declaration", "fore":"blue" },
+
+ { "name":"User Property Usage", "fore":"blue" },
+ { "name":"User Property Declaration", "fore":"blue" },
+
+ { "name":"User Event Usage", "fore":"blue" },
+ { "name":"User Event Declaration", "fore":"blue" },
+
+ { "name":"User Method Usage", "fore":"blue" },
+ { "name":"User Method Declaration", "fore":"blue" },
+
+ { "name":"User Parameter Usage", "fore":"base00" },
+ { "name":"User Parameter Declaration", "fore":"base00" },
+
+ { "name":"User Variable Usage", "fore":"base00" },
+ { "name":"User Variable Declaration", "fore":"base00" },
+
+ { "name":"Syntax Error", "fore":"invalid-red" },
+
+ { "name":"String Format Items", "fore":"base00" },
+
+ { "name":"Breakpoint Text", "fore":"text-black", "back":"#ffe8e7" },
+
+ { "name":"Debugger Current Statement", "fore":"text-black", "back":"#f8f4a1" },
+ { "name":"Debugger Stack Line", "fore":"text-black", "back":"#ccfca6" },
+
+ { "name":"Diff Line(Added)", "fore":"Blue" },
+ { "name":"Diff Line(Removed)", "fore":"Red" },
+ { "name":"Diff Line(Changed)", "fore":"Green" },
+ { "name":"Diff Header", "fore":"Magenta" },
+ { "name":"Diff Header(Separator)", "fore":"Magenta", "weight":"bold" },
+ { "name":"Diff Header(Old)", "fore":"Red", "weight":"bold" },
+ { "name":"Diff Header(New)", "fore":"Blue", "weight":"bold" },
+ { "name":"Diff Location", "fore":"Magenta", "weight":"bold" },
+
+ { "name":"Css Comment", "fore":"base01", "weight":"bold" },
+ { "name":"Css Property Name", "fore":"black", "weight":"bold" },
+ { "name":"Css Property Value", "fore":"cyan", "weight":"bold" },
+ { "name":"Css Selector", "fore":"base01", "weight":"bold" },
+ { "name":"Css String Value", "fore":"cyan", "weight":"bold" },
+ { "name":"Css Keyword", "fore":"keyword-teal", "weight":"bold" },
+
+ { "name":"Script Comment", "fore":"base01" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"green" },
+ { "name":"Script Number", "fore":"violet" },
+ { "name":"Script Operator" },
+ { "name":"Script String", "fore":"cyan" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/Styles/TangoStyle.json b/main/src/core/Mono.Texteditor/Styles/TangoStyle.json
index 11e06cbc79..af2bcf20b8 100644
--- a/main/src/core/Mono.Texteditor/Styles/TangoStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/TangoStyle.json
@@ -1,226 +1,239 @@
{
- "name":"Tango",
- "version":"1.0",
- "description": "A light scheme using colors from the Tango Project.",
- "originator": "Xamarin Inc. (http://xamarin.com)",
-
- "palette":[
- { "name":"butter1", "value":"#fce94f" },
- { "name":"butter2", "value":"#edd400" },
- { "name":"butter3", "value":"#c4a000" },
- { "name":"orange1", "value":"#fcaf3e" },
- { "name":"orange2", "value":"#f57900" },
- { "name":"orange3", "value":"#ce5c00" },
- { "name":"chocolate1", "value":"#e9b96e" },
- { "name":"chocolate2", "value":"#c17d11" },
- { "name":"chocolate3", "value":"#8f5902" },
- { "name":"chameleon1", "value":"#8ae234" },
- { "name":"chameleon2", "value":"#73d216" },
- { "name":"chameleon3", "value":"#4e9a06" },
- { "name":"skyblue0", "value":"#92BfFf" },
- { "name":"skyblue1", "value":"#729fcf" },
- { "name":"skyblue2", "value":"#3465a4" },
- { "name":"skyblue3", "value":"#204a87" },
- { "name":"plum1", "value":"#ad7fa8" },
- { "name":"plum2", "value":"#75507b" },
- { "name":"plum3", "value":"#5c3566" },
- { "name":"scarletred1", "value":"#ef2929" },
- { "name":"scarletred2", "value":"#cc0000" },
- { "name":"scarletred3", "value":"#a40000" },
- { "name":"aluminium1", "value":"#eeeeec" },
- { "name":"aluminium2", "value":"#d3d7cf" },
- { "name":"aluminium3", "value":"#babdb6" },
- { "name":"aluminium4", "value":"#888a85" },
- { "name":"aluminium5", "value":"#555753" },
- { "name":"aluminium6", "value":"#2e3436" }
- ],
-
- "colors":[
- { "name": "Background(Read Only)", "color":"white" },
-
- { "name": "Search result background", "color":"#F6B94D" },
- { "name": "Search result background (highlighted)", "color":"#E5992F" },
-
- { "name": "Column Ruler", "color":"aluminium3" },
-
- { "name": "Fold Square", "color":"aluminium4", "secondcolor":"white" },
- { "name": "Fold Cross", "color":"aluminium4", "secondcolor":"white" },
-
- { "name": "Indentation Guide", "color":"aluminium2" },
-
- { "name": "Indicator Margin", "color":"aluminium1" },
- { "name": "Indicator Margin(Separator)", "color":"aluminium3" },
-
- { "name": "Tooltip Border", "color":"#b2b2b2" },
- { "name": "Tooltip Pager Top", "color":"#ffffff" },
- { "name": "Tooltip Pager Bottom", "color":"#f5f5f5" },
- { "name": "Tooltip Pager Triangle", "color":"#737373" },
- { "name": "Tooltip Pager Text", "color":"#828282" },
-
- { "name": "Notification Border", "color":"#b2b2b2" },
-
- { "name": "Completion Matching Substring", "color":"#BA3373" },
- { "name": "Completion Border", "color":"#C9C9C9" },
- { "name": "Completion Border(Inactive)", "color":"#666666" },
-
- { "name": "Bookmarks", "color":"white", "secondcolor":"skyblue" },
-
- { "name": "Underline(Error)", "color":"scarletred2" },
- { "name": "Underline(Warning)", "color":"skyblue1" },
- { "name": "Underline(Suggestion)", "color":"chameleon3" },
- { "name": "Underline(Hint)", "color":"chameleon1" },
-
- { "name": "Quick Diff(Dirty)", "color":"butter2" },
- { "name": "Quick Diff(Changed)", "color":"chameleon2" },
-
- { "name": "Brace Matching(Rectangle)", "color":"aluminium1", "secondcolor":"aluminium2" },
- { "name": "Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9", "bordercolor":"#B1DFF9" },
- { "name": "Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD", "bordercolor":"#FFD6DD" },
-
- { "name": "Breakpoint Marker", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Disabled)", "color":"white", "secondcolor":"#AB616B" },
- { "name": "Breakpoint Marker(Invalid)", "color":"#eddcdc", "secondcolor":"#eddcdc" },
-
- { "name": "Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2"},
- { "name": "Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3"},
-
- { "name": "Debugger Current Line Marker", "color":"#ffff00", "secondcolor":"#ffffcc", "bordercolor":"#666600" },
- { "name": "Debugger Stack Line Marker", "color":"#80ff80", "secondcolor":"#ccffcc", "bordercolor":"#336633"},
-
- { "name": "Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
- { "name": "Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
- { "name": "Secondary Link", "color":"aluminium2", "secondcolor":"white"},
- { "name": "Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"}
- ],
-
- "text":[
- { "name": "Plain Text", "fore":"black", "back":"white" },
- { "name": "Selected Text", "back":"skyblue0" },
- { "name": "Selected Text(Inactive)", "back":"aluminium3" },
-
- { "name": "Collapsed Text", "fore":"aluminium4", "back":"white" },
-
- { "name": "Line Numbers", "fore":"aluminium4", "back":"white"},
-
- { "name": "Punctuation", "fore":"black" },
- { "name": "Punctuation(Brackets)", "fore":"black" },
-
- { "name": "Comment(Line)", "fore":"aluminium4" },
- { "name": "Comment(Block)", "fore":"aluminium4" },
- { "name": "Comment(Doc)", "fore":"aluminium4" },
- { "name": "Comment(DocTag)", "fore":"aluminium3" },
- { "name": "Comment Tag", "fore":"aluminium4" },
- { "name": "Excluded Code", "fore":"aluminium4" },
-
- { "name": "String", "fore":"scarletred3"},
- { "name": "String(Escape)", "fore":"scarletred3", "weight":"bold"},
- { "name": "String(C# @ Verbatim)", "fore":"scarletred3"},
-
- { "name": "Number", "fore":"scarletred3"},
-
- { "name": "Preprocessor", "fore":"butter3" },
- { "name": "Preprocessor(Region Name)", "fore":"black" },
-
- { "name": "Xml Text", "fore":"black" },
- { "name": "Xml Delimiter", "fore":"black" },
- { "name": "Xml Name", "fore":"skyblue3" },
- { "name": "Xml Attribute", "fore":"orange2" },
- { "name": "Xml Attribute Quotes", "fore":"scarletred3" },
- { "name": "Xml Attribute Value", "fore":"scarletred3" },
- { "name": "Xml Comment", "fore":"aluminium4" },
- { "name": "Xml CData Section", "fore":"scarletred3" },
-
- { "name": "Html Attribute Name", "fore":"orange2" },
- { "name": "Html Attribute Value", "fore":"scarletred3" },
- { "name": "Html Comment", "fore":"aluminium4" },
- { "name": "Html Element Name", "fore":"skyblue3" },
- { "name": "Html Entity", "fore":"#c12dad" },
- { "name": "Html Operator", "fore":"skyblue3" },
- { "name": "Html Server-Side Script", "fore":"black", "back":"#fdf0bd" },
- { "name": "Html Tag Delimiter", "fore":"skyblue2" },
- { "name": "Razor Code", "fore":"black", "back":"#fdfaed" },
-
- { "name": "Tooltip Text", "fore":"black", "back":"#feffe9" },
- { "name": "Notification Text", "fore":"black", "back":"#feffe9" },
-
- { "name": "Completion Text", "fore":"#434343", "back":"#F0F6F8" },
- { "name": "Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
- { "name": "Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
-
- { "name": "Keyword(Access)", "fore":"skyblue2" },
- { "name": "Keyword(Type)", "fore":"skyblue2" },
- { "name": "Keyword(Operator)", "fore":"skyblue2" },
- { "name": "Keyword(Selection)", "fore":"skyblue2" },
- { "name": "Keyword(Iteration)", "fore":"skyblue2" },
- { "name": "Keyword(Jump)", "fore":"skyblue2" },
- { "name": "Keyword(Context)", "fore":"skyblue2" },
- { "name": "Keyword(Exception)", "fore":"skyblue2" },
- { "name": "Keyword(Modifiers)", "fore":"skyblue2" },
- { "name": "Keyword(Constants)", "fore":"skyblue2" },
- { "name": "Keyword(Void)", "fore":"skyblue2" },
- { "name": "Keyword(Namespace)", "fore":"skyblue2" },
- { "name": "Keyword(Property)", "fore":"skyblue2" },
- { "name": "Keyword(Declaration)", "fore":"skyblue2" },
- { "name": "Keyword(Parameter)", "fore":"skyblue2" },
- { "name": "Keyword(Operator Declaration)", "fore":"skyblue2" },
- { "name": "Keyword(Other)", "fore":"skyblue2" },
-
- { "name": "User Types", "fore":"plum2" },
- { "name": "User Types(Enums)", "fore":"plum2" },
- { "name": "User Types(Interfaces)", "fore":"plum2" },
- { "name": "User Types(Delegates)", "fore":"plum2" },
- { "name": "User Types(Value types)", "fore":"plum2" },
- { "name": "User Types(Type parameters)", "fore":"plum2" },
-
- { "name": "User Field Usage", "fore":"black", "style":"oblique" },
- { "name": "User Field Declaration", "fore":"black", "style":"oblique" },
-
- { "name": "User Property Usage", "fore":"black" },
- { "name": "User Property Declaration", "fore":"black" },
-
- { "name": "User Event Usage", "fore":"orange3", "style":"oblique" },
- { "name": "User Event Declaration", "fore":"orange3", "style":"oblique" },
-
- { "name": "User Method Usage", "fore":"black" },
- { "name": "User Method Declaration", "fore":"black" },
-
- { "name": "User Parameter Usage", "fore":"black" },
- { "name": "User Parameter Declaration", "fore":"black" },
-
- { "name": "User Variable Usage", "fore":"black" },
- { "name": "User Variable Declaration", "fore":"black" },
-
- { "name": "Syntax Error", "fore":"white", "back":"scarletred3" },
-
- { "name": "String Format Items", "fore":"chocolate2" },
-
- { "name": "Breakpoint Text", "fore":"white", "back":"#AB616B" },
- { "name": "Breakpoint Text(Invalid)", "fore":"white", "back":"#eddcdc" },
-
- { "name": "Debugger Current Statement", "fore":"black", "back":"#ffff00" },
- { "name": "Debugger Stack Line", "fore":"black", "back":"#80ff80" },
-
- { "name": "Diff Line(Added)", "fore":"skyblue2" },
- { "name": "Diff Line(Removed)", "fore":"scarletred1" },
- { "name": "Diff Line(Changed)", "fore":"plum2" },
- { "name": "Diff Header", "fore":"chameleon3" },
- { "name": "Diff Header(Separator)", "fore":"chameleon3", "weight":"bold" },
- { "name": "Diff Header(Old)", "fore":"scarletred1", "weight":"bold" },
- { "name": "Diff Header(New)", "fore":"skyblue2", "weight":"bold" },
- { "name": "Diff Location", "fore":"plum2", "weight":"bold" },
-
- { "name": "Css Comment", "fore":"chameleon3", "weight":"bold" },
- { "name": "Css Property Name", "fore":"black", "weight":"bold" },
- { "name": "Css Property Value", "fore":"literal-orange", "weight":"bold" },
- { "name": "Css Selector", "fore":"chameleon3", "weight":"bold" },
- { "name": "Css String Value", "fore":"literal-orange", "weight":"bold" },
- { "name": "Css Keyword", "fore":"keyword-teal", "weight":"bold" },
-
- { "name": "Script Comment", "fore":"chameleon3" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"skyblue2" },
- { "name": "Script Number", "fore":"scarletred3" },
- { "name": "Script Operator" },
- { "name": "Script String", "fore":"scarletred3" }
- ]
+ "name":"Tango",
+ "version":"1.1",
+ "description":"A light scheme using colors from the Tango Project.",
+ "originator":"Xamarin Inc. (http://xamarin.com)",
+
+ "palette":[
+ { "name":"butter1", "value":"#fce94f" },
+ { "name":"butter2", "value":"#edd400" },
+ { "name":"butter3", "value":"#c4a000" },
+ { "name":"orange1", "value":"#fcaf3e" },
+ { "name":"orange2", "value":"#f57900" },
+ { "name":"orange3", "value":"#ce5c00" },
+ { "name":"chocolate1", "value":"#e9b96e" },
+ { "name":"chocolate2", "value":"#c17d11" },
+ { "name":"chocolate3", "value":"#8f5902" },
+ { "name":"chameleon1", "value":"#8ae234" },
+ { "name":"chameleon2", "value":"#73d216" },
+ { "name":"chameleon3", "value":"#4e9a06" },
+ { "name":"skyblue0", "value":"#92BfFf" },
+ { "name":"skyblue1", "value":"#729fcf" },
+ { "name":"skyblue2", "value":"#3465a4" },
+ { "name":"skyblue3", "value":"#204a87" },
+ { "name":"plum1", "value":"#ad7fa8" },
+ { "name":"plum2", "value":"#75507b" },
+ { "name":"plum3", "value":"#5c3566" },
+ { "name":"scarletred1", "value":"#ef2929" },
+ { "name":"scarletred2", "value":"#cc0000" },
+ { "name":"scarletred3", "value":"#a40000" },
+ { "name":"aluminium1", "value":"#eeeeec" },
+ { "name":"aluminium2", "value":"#d3d7cf" },
+ { "name":"aluminium3", "value":"#babdb6" },
+ { "name":"aluminium4", "value":"#888a85" },
+ { "name":"aluminium5", "value":"#555753" },
+ { "name":"aluminium6", "value":"#2e3436" }
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"white" },
+
+ { "name":"Search result background", "color":"#F6B94D" },
+ { "name":"Search result background (highlighted)", "color":"#E5992F" },
+
+ { "name":"Column Ruler", "color":"aluminium3" },
+
+ { "name":"Fold Square", "color":"aluminium4", "secondcolor":"white" },
+ { "name":"Fold Cross", "color":"aluminium4", "secondcolor":"white" },
+
+ { "name":"Indentation Guide", "color":"aluminium2" },
+
+ { "name":"Indicator Margin", "color":"aluminium1" },
+ { "name":"Indicator Margin(Separator)", "color":"aluminium3" },
+
+ { "name":"Tooltip Border", "color":"#b2b2b2" },
+ { "name":"Tooltip Pager Top", "color":"#ffffff" },
+ { "name":"Tooltip Pager Bottom", "color":"#f5f5f5" },
+ { "name":"Tooltip Pager Triangle", "color":"#737373" },
+ { "name":"Tooltip Pager Text", "color":"#828282" },
+
+ { "name":"Notification Border", "color":"#b2b2b2" },
+
+ { "name":"Completion Matching Substring", "color":"#BA3373" },
+ { "name":"Completion Border", "color":"#C9C9C9" },
+ { "name":"Completion Border(Inactive)", "color":"#666666" },
+
+ { "name":"Bookmarks", "color":"white", "secondcolor":"skyblue" },
+
+ { "name":"Underline(Error)", "color":"scarletred2" },
+ { "name":"Underline(Warning)", "color":"skyblue1" },
+ { "name":"Underline(Suggestion)", "color":"chameleon3" },
+ { "name":"Underline(Hint)", "color":"chameleon1" },
+
+ { "name":"Quick Diff(Dirty)", "color":"butter2" },
+ { "name":"Quick Diff(Changed)", "color":"chameleon2" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"aluminium1", "secondcolor":"aluminium2" },
+ { "name":"Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9", "bordercolor":"#B1DFF9" },
+ { "name":"Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD", "bordercolor":"#FFD6DD" },
+
+ { "name":"Breakpoint Marker", "color":"#f9dbda", "bordercolor":"#ebcccb" },
+ { "name":"Breakpoint Marker(Disabled)", "color":"#e9e9e9", "bordercolor":"#dbdbdb" },
+ { "name":"Breakpoint Marker(Invalid)", "color":"#f1e3e3", "bordercolor":"#e3d5d5" },
+
+ { "name":"Current Line Marker", "color":"aluminium1", "secondcolor":"aluminium2" },
+ { "name":"Current Line Marker(Inactive)", "color":"aluminium2", "secondcolor":"aluminium3" },
+
+ { "name":"Debugger Current Line Marker", "color":"#f8f4a1", "bordercolor":"#ede993" },
+ { "name":"Debugger Stack Line Marker", "color":"#ccfca6", "bordercolor":"#bff197" },
+
+ { "name":"Primary Link", "color":"chameleon3", "secondcolor":"chameleon2"},
+ { "name":"Primary Link(Highlighted)", "color":"chameleon3", "secondcolor":"chameleon1"},
+ { "name":"Secondary Link", "color":"aluminium2", "secondcolor":"white"},
+ { "name":"Secondary Link(Highlighted)", "color":"aluminium3", "secondcolor":"aluminium1"},
+
+ { "name":"Message Bubble Error Marker", "color":"#df6962" },
+ { "name":"Message Bubble Error Tag", "color":"#d83f3f", "secondcolor":"white" },
+ { "name":"Message Bubble Error Counter", "color":"white", "secondcolor":"#d83f3f" },
+ { "name":"Message Bubble Error IconMargin", "color":"#d83f3f", "bordercolor":"#b12a2a" },
+ { "name":"Message Bubble Error Line", "color":"#fbe4e6" },
+ { "name":"Message Bubble Error Tooltip", "color":"#D10B0B" },
+
+ { "name":"Message Bubble Warning Marker", "color":"#b28d37" },
+ { "name":"Message Bubble Warning Tag", "color":"#e68100", "secondcolor":"white" },
+ { "name":"Message Bubble Warning Counter", "color":"white", "secondcolor":"#e68100" },
+ { "name":"Message Bubble Warning IconMargin", "color":"#e68100", "bordercolor":"#c76f00" },
+ { "name":"Message Bubble Warning Line", "color":"#fff1da" },
+ { "name":"Message Bubble Warning Tooltip", "color":"#D1590B" }
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"black", "back":"white" },
+ { "name":"Selected Text", "back":"skyblue0" },
+ { "name":"Selected Text(Inactive)", "back":"aluminium3" },
+
+ { "name":"Collapsed Text", "fore":"aluminium4", "back":"white" },
+
+ { "name":"Line Numbers", "fore":"aluminium4", "back":"white"},
+
+ { "name":"Punctuation", "fore":"black" },
+ { "name":"Punctuation(Brackets)", "fore":"black" },
+
+ { "name":"Comment(Line)", "fore":"aluminium4" },
+ { "name":"Comment(Block)", "fore":"aluminium4" },
+ { "name":"Comment(Doc)", "fore":"aluminium4" },
+ { "name":"Comment(DocTag)", "fore":"aluminium3" },
+ { "name":"Comment Tag", "fore":"aluminium4" },
+ { "name":"Excluded Code", "fore":"aluminium4" },
+
+ { "name":"String", "fore":"scarletred3"},
+ { "name":"String(Escape)", "fore":"scarletred3", "weight":"bold"},
+ { "name":"String(C# @ Verbatim)", "fore":"scarletred3"},
+
+ { "name":"Number", "fore":"scarletred3"},
+
+ { "name":"Preprocessor", "fore":"butter3" },
+ { "name":"Preprocessor(Region Name)", "fore":"black" },
+
+ { "name":"Xml Text", "fore":"black" },
+ { "name":"Xml Delimiter", "fore":"black" },
+ { "name":"Xml Name", "fore":"skyblue3" },
+ { "name":"Xml Attribute", "fore":"orange2" },
+ { "name":"Xml Attribute Quotes", "fore":"scarletred3" },
+ { "name":"Xml Attribute Value", "fore":"scarletred3" },
+ { "name":"Xml Comment", "fore":"aluminium4" },
+ { "name":"Xml CData Section", "fore":"scarletred3" },
+
+ { "name":"Html Attribute Name", "fore":"orange2" },
+ { "name":"Html Attribute Value", "fore":"scarletred3" },
+ { "name":"Html Comment", "fore":"aluminium4" },
+ { "name":"Html Element Name", "fore":"skyblue3" },
+ { "name":"Html Entity", "fore":"#c12dad" },
+ { "name":"Html Operator", "fore":"skyblue3" },
+ { "name":"Html Server-Side Script", "fore":"black", "back":"#fdf0bd" },
+ { "name":"Html Tag Delimiter", "fore":"skyblue2" },
+ { "name":"Razor Code", "fore":"black", "back":"#fdfaed" },
+
+ { "name":"Tooltip Text", "fore":"black", "back":"#feffe9" },
+ { "name":"Notification Text", "fore":"black", "back":"#feffe9" },
+
+ { "name":"Completion Text", "fore":"#434343", "back":"#F0F6F8" },
+ { "name":"Completion Selected Text", "fore":"#f8fcfc", "back":"#dff4f0" },
+ { "name":"Completion Selected Text(Inactive)", "fore":"#434343", "back":"white" },
+
+ { "name":"Keyword(Access)", "fore":"skyblue2" },
+ { "name":"Keyword(Type)", "fore":"skyblue2" },
+ { "name":"Keyword(Operator)", "fore":"skyblue2" },
+ { "name":"Keyword(Selection)", "fore":"skyblue2" },
+ { "name":"Keyword(Iteration)", "fore":"skyblue2" },
+ { "name":"Keyword(Jump)", "fore":"skyblue2" },
+ { "name":"Keyword(Context)", "fore":"skyblue2" },
+ { "name":"Keyword(Exception)", "fore":"skyblue2" },
+ { "name":"Keyword(Modifiers)", "fore":"skyblue2" },
+ { "name":"Keyword(Constants)", "fore":"skyblue2" },
+ { "name":"Keyword(Void)", "fore":"skyblue2" },
+ { "name":"Keyword(Namespace)", "fore":"skyblue2" },
+ { "name":"Keyword(Property)", "fore":"skyblue2" },
+ { "name":"Keyword(Declaration)", "fore":"skyblue2" },
+ { "name":"Keyword(Parameter)", "fore":"skyblue2" },
+ { "name":"Keyword(Operator Declaration)", "fore":"skyblue2" },
+ { "name":"Keyword(Other)", "fore":"skyblue2" },
+
+ { "name":"User Types", "fore":"plum2" },
+ { "name":"User Types(Enums)", "fore":"plum2" },
+ { "name":"User Types(Interfaces)", "fore":"plum2" },
+ { "name":"User Types(Delegates)", "fore":"plum2" },
+ { "name":"User Types(Value types)", "fore":"plum2" },
+ { "name":"User Types(Type parameters)", "fore":"plum2" },
+
+ { "name":"User Field Usage", "fore":"black", "style":"oblique" },
+ { "name":"User Field Declaration", "fore":"black", "style":"oblique" },
+
+ { "name":"User Property Usage", "fore":"black" },
+ { "name":"User Property Declaration", "fore":"black" },
+
+ { "name":"User Event Usage", "fore":"orange3", "style":"oblique" },
+ { "name":"User Event Declaration", "fore":"orange3", "style":"oblique" },
+
+ { "name":"User Method Usage", "fore":"black" },
+ { "name":"User Method Declaration", "fore":"black" },
+
+ { "name":"User Parameter Usage", "fore":"black" },
+ { "name":"User Parameter Declaration", "fore":"black" },
+
+ { "name":"User Variable Usage", "fore":"black" },
+ { "name":"User Variable Declaration", "fore":"black" },
+
+ { "name":"Syntax Error", "fore":"white", "back":"scarletred3" },
+
+ { "name":"String Format Items", "fore":"chocolate2" },
+
+ { "name":"Breakpoint Text", "fore":"text-black", "back":"#ffe8e7" },
+
+ { "name":"Debugger Current Statement", "fore":"text-black", "back":"#f8f4a1" },
+ { "name":"Debugger Stack Line", "fore":"text-black", "back":"#ccfca6" },
+
+ { "name":"Diff Line(Added)", "fore":"skyblue2" },
+ { "name":"Diff Line(Removed)", "fore":"scarletred1" },
+ { "name":"Diff Line(Changed)", "fore":"plum2" },
+ { "name":"Diff Header", "fore":"chameleon3" },
+ { "name":"Diff Header(Separator)", "fore":"chameleon3", "weight":"bold" },
+ { "name":"Diff Header(Old)", "fore":"scarletred1", "weight":"bold" },
+ { "name":"Diff Header(New)", "fore":"skyblue2", "weight":"bold" },
+ { "name":"Diff Location", "fore":"plum2", "weight":"bold" },
+
+ { "name":"Css Comment", "fore":"chameleon3", "weight":"bold" },
+ { "name":"Css Property Name", "fore":"black", "weight":"bold" },
+ { "name":"Css Property Value", "fore":"literal-orange", "weight":"bold" },
+ { "name":"Css Selector", "fore":"chameleon3", "weight":"bold" },
+ { "name":"Css String Value", "fore":"literal-orange", "weight":"bold" },
+ { "name":"Css Keyword", "fore":"keyword-teal", "weight":"bold" },
+
+ { "name":"Script Comment", "fore":"chameleon3" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"skyblue2" },
+ { "name":"Script Number", "fore":"scarletred3" },
+ { "name":"Script Operator" },
+ { "name":"Script String", "fore":"scarletred3" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json b/main/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json
index 322baced64..24c60691e3 100644
--- a/main/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json
+++ b/main/src/core/Mono.Texteditor/Styles/VisualStudioStyle.json
@@ -1,123 +1,148 @@
{
- "name":"Visual Studio",
- "version":"1.0",
- "description": "Reminiscent of Microsoft Visual Studio's default colors.",
- "originator": "Jeffrey Stedfast <fejj@novell.com>",
-
- "palette":[
- { "name":"comment-green", "value":"#008000" },
- { "name":"keyword-blue", "value":"#0000ff" },
- { "name":"semantic-type", "value":"#2B90AF" },
- { "name":"aluminium2", "value":"#d3d7cf" }
- ],
-
- "colors":[
- {"name": "Background(Read Only)", "color":"#FFFFFF" },
- {"name": "Fold Square", "color":"#A5A5A5" },
- {"name": "Fold Cross", "color":"#555555", "secondcolor":"#E2E2E2" },
- {"name": "Indentation Guide", "color":"aluminium2" },
-
- { "name": "Quick Diff(Dirty)", "color":"yellow" },
- { "name": "Quick Diff(Changed)", "color":"green" },
-
- { "name": "Current Line Marker", "color":"white", "secondcolor":"gray"},
- { "name": "Current Line Marker(Inactive)", "color":"white", "secondcolor":"gray"},
-
- {"name": "Indicator Margin", "color":"#F0F0F0" },
- {"name": "Indicator Margin(Separator)", "color":"#F0F0F0" },
- {"name": "Underline(Error)", "color":"#FF0000" },
- {"name": "Underline(Warning)", "color":"comment-green" },
- {"name": "Brace Matching(Rectangle)", "color":"#DBE0CC", "secondcolor":"#00000000" },
- { "name": "Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9", "bordercolor":"#B1DFF9" },
- { "name": "Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD", "bordercolor":"#FFD6DD" }
- ],
-
- "text":[
- {"name": "Plain Text", "fore":"#000000", "back":"#FFFFFF" },
- {"name": "Selected Text", "fore":"white", "back":"#3298FF" },
- {"name": "Selected Text(Inactive)", "fore":"white", "back":"#BFCDDB" },
- {"name": "Collapsed Text", "fore":"#808080" },
- {"name": "Line Numbers", "fore":"semantic-type", "back":"#FFFFFF" },
- {"name": "Punctuation" },
- {"name": "Punctuation(Brackets)", "fore":"#000000", "back":"#FFFFFF" },
- {"name": "Comment(Line)", "fore":"comment-green" },
- {"name": "Comment(Block)", "fore":"comment-green" },
- {"name": "Comment(Doc)", "fore":"comment-green" },
- {"name": "Comment(DocTag)", "fore":"#808080" },
- {"name": "Comment Tag", "fore":"comment-green" },
- {"name": "Excluded Code", "fore":"comment-green" },
- {"name": "String", "fore":"#A31515" },
- {"name": "String(Escape)", "fore":"#A31515" },
- {"name": "String(C# @ Verbatim)", "fore":"#A31515" },
- {"name": "Number" },
- {"name": "Preprocessor", "fore":"keyword-blue" },
- {"name": "Preprocessor(Region Name)", "fore":"#000000" },
- {"name": "Xml Text" },
- {"name": "Xml Delimiter", "fore":"keyword-blue" },
- {"name": "Xml Name", "fore":"#A31515" },
- {"name": "Xml Attribute", "fore":"#FF0000" },
- {"name": "Xml Attribute Quotes", "fore":"#000000" },
- {"name": "Xml Attribute Value", "fore":"keyword-blue" },
- {"name": "Xml Comment", "fore":"#006400" },
- {"name": "Xml CData Section", "fore":"#808080" },
- {"name": "Keyword(Access)", "fore":"keyword-blue" },
- {"name": "Keyword(Type)", "fore":"keyword-blue" },
- {"name": "Keyword(Operator)", "fore":"keyword-blue" },
- {"name": "Keyword(Selection)", "fore":"keyword-blue" },
- {"name": "Keyword(Iteration)", "fore":"keyword-blue" },
- {"name": "Keyword(Jump)", "fore":"keyword-blue" },
- {"name": "Keyword(Context)", "fore":"keyword-blue" },
- {"name": "Keyword(Exception)", "fore":"keyword-blue" },
- {"name": "Keyword(Modifiers)", "fore":"keyword-blue" },
- {"name": "Keyword(Constants)", "fore":"keyword-blue" },
- {"name": "Keyword(Void)", "fore":"keyword-blue" },
- {"name": "Keyword(Namespace)", "fore":"keyword-blue" },
- {"name": "Keyword(Property)", "fore":"keyword-blue" },
- {"name": "Keyword(Declaration)", "fore":"keyword-blue" },
- {"name": "Keyword(Parameter)", "fore":"keyword-blue" },
- {"name": "Keyword(Operator Declaration)", "fore":"keyword-blue" },
- {"name": "Keyword(Other)", "fore":"keyword-blue" },
- {"name": "User Types", "fore":"semantic-type" },
- {"name": "User Types(Enums)", "fore":"semantic-type" },
- {"name": "User Types(Interfaces)", "fore":"semantic-type" },
- {"name": "User Types(Delegates)", "fore":"semantic-type" },
- {"name": "User Types(Value types)", "fore":"semantic-type" },
- {"name": "User Field Usage" },
- {"name": "User Field Declaration" },
- {"name": "User Property Usage" },
- {"name": "User Property Declaration" },
- {"name": "User Event Usage" },
- {"name": "User Event Declaration" },
- {"name": "User Method Usage" },
- {"name": "User Method Declaration" },
- {"name": "User Parameter Usage" },
- {"name": "User Parameter Declaration" },
- {"name": "User Variable Usage" },
- {"name": "User Variable Declaration" },
- {"name": "Syntax Error", "fore":"#FF0000" },
- {"name": "Breakpoint Text", "fore":"#FFFFFF", "back":"#963945" },
- {"name": "Debugger Current Statement", "fore":"#000000", "back":"#FFEE61" },
- {"name": "Html Attribute Name", "fore":"#FF0000" },
- {"name": "Html Attribute Value", "fore":"keyword-blue" },
- {"name": "Html Comment", "fore":"#006400" },
- {"name": "Html Element Name", "fore":"#800000" },
- {"name": "Html Entity", "fore":"#FF0000" },
- {"name": "Html Operator", "fore":"keyword-blue" },
- {"name": "Html Server-Side Script", "back":"#FEFF00" },
- {"name": "Html Tag Delimiter", "fore":"keyword-blue" },
- {"name": "Razor Code", "back":"#E7EFF2" },
- {"name": "Css Comment", "fore":"#006400" },
- {"name": "Css Property Name", "fore":"#FF0000" },
- {"name": "Css Property Value", "fore":"keyword-blue" },
- {"name": "Css Selector", "fore":"#800000" },
- {"name": "Css String Value", "fore":"keyword-blue" },
- {"name": "Css Keyword", "fore":"keyword-blue" },
-
- { "name": "Script Comment", "fore":"comment-green" },
- { "name": "Script Identifier" },
- { "name": "Script Keyword", "fore":"keyword-blue" },
- { "name": "Script Number" },
- { "name": "Script Operator" },
- { "name": "Script String" }
- ]
+ "name":"Visual Studio",
+ "version":"1.1",
+ "description":"Reminiscent of Microsoft Visual Studio's default colors.",
+ "originator":"Jeffrey Stedfast <fejj@novell.com>",
+
+ "palette":[
+ { "name":"comment-green", "value":"#008000" },
+ { "name":"keyword-blue", "value":"#0000ff" },
+ { "name":"semantic-type", "value":"#2B90AF" },
+ { "name":"aluminium2", "value":"#d3d7cf" }
+ ],
+
+ "colors":[
+ { "name":"Background(Read Only)", "color":"#FFFFFF" },
+
+ { "name":"Fold Square", "color":"#A5A5A5" },
+ { "name":"Fold Cross", "color":"#555555", "secondcolor":"#E2E2E2" },
+
+ { "name":"Indentation Guide", "color":"aluminium2" },
+
+ { "name":"Underline(Error)", "color":"#FF0000" },
+ { "name":"Underline(Warning)", "color":"comment-green" },
+
+ { "name":"Quick Diff(Dirty)", "color":"yellow" },
+ { "name":"Quick Diff(Changed)", "color":"green" },
+
+ { "name":"Brace Matching(Rectangle)", "color":"#DBE0CC", "secondcolor":"#00000000" },
+ { "name":"Usages(Rectangle)", "color":"#B1DFF9", "secondcolor":"#B1DFF9", "bordercolor":"#B1DFF9" },
+ { "name":"Changing usages(Rectangle)", "color":"#FFD6DD", "secondcolor":"#FFD6DD", "bordercolor":"#FFD6DD" },
+
+ { "name":"Current Line Marker", "color":"white", "secondcolor":"gray"},
+ { "name":"Current Line Marker(Inactive)", "color":"white", "secondcolor":"gray"},
+
+ { "name":"Indicator Margin", "color":"#F0F0F0" },
+ { "name":"Indicator Margin(Separator)", "color":"#F0F0F0" }
+ ],
+
+ "text":[
+ { "name":"Plain Text", "fore":"#000000", "back":"#FFFFFF" },
+ { "name":"Selected Text", "fore":"white", "back":"#3298FF" },
+ { "name":"Selected Text(Inactive)", "fore":"white", "back":"#BFCDDB" },
+
+ { "name":"Collapsed Text", "fore":"#808080" },
+
+ { "name":"Line Numbers", "fore":"semantic-type", "back":"#FFFFFF" },
+
+ { "name":"Punctuation" },
+ { "name":"Punctuation(Brackets)", "fore":"#000000", "back":"#FFFFFF" },
+
+ { "name":"Comment(Line)", "fore":"comment-green" },
+ { "name":"Comment(Block)", "fore":"comment-green" },
+ { "name":"Comment(Doc)", "fore":"comment-green" },
+ { "name":"Comment(DocTag)", "fore":"#808080" },
+ { "name":"Comment Tag", "fore":"comment-green" },
+ { "name":"Excluded Code", "fore":"comment-green" },
+
+ { "name":"String", "fore":"#A31515" },
+ { "name":"String(Escape)", "fore":"#A31515" },
+ { "name":"String(C# @ Verbatim)", "fore":"#A31515" },
+
+ { "name":"Number" },
+
+ { "name":"Preprocessor", "fore":"keyword-blue" },
+ { "name":"Preprocessor(Region Name)", "fore":"#000000" },
+
+ { "name":"Xml Text" },
+ { "name":"Xml Delimiter", "fore":"keyword-blue" },
+ { "name":"Xml Name", "fore":"#A31515" },
+ { "name":"Xml Attribute", "fore":"#FF0000" },
+ { "name":"Xml Attribute Quotes", "fore":"#000000" },
+ { "name":"Xml Attribute Value", "fore":"keyword-blue" },
+ { "name":"Xml Comment", "fore":"#006400" },
+ { "name":"Xml CData Section", "fore":"#808080" },
+
+ { "name":"Html Attribute Name", "fore":"#FF0000" },
+ { "name":"Html Attribute Value", "fore":"keyword-blue" },
+ { "name":"Html Comment", "fore":"#006400" },
+ { "name":"Html Element Name", "fore":"#800000" },
+ { "name":"Html Entity", "fore":"#FF0000" },
+ { "name":"Html Operator", "fore":"keyword-blue" },
+ { "name":"Html Server-Side Script", "back":"#FEFF00" },
+ { "name":"Html Tag Delimiter", "fore":"keyword-blue" },
+ { "name":"Razor Code", "back":"#E7EFF2" },
+
+ { "name":"Keyword(Access)", "fore":"keyword-blue" },
+ { "name":"Keyword(Type)", "fore":"keyword-blue" },
+ { "name":"Keyword(Operator)", "fore":"keyword-blue" },
+ { "name":"Keyword(Selection)", "fore":"keyword-blue" },
+ { "name":"Keyword(Iteration)", "fore":"keyword-blue" },
+ { "name":"Keyword(Jump)", "fore":"keyword-blue" },
+ { "name":"Keyword(Context)", "fore":"keyword-blue" },
+ { "name":"Keyword(Exception)", "fore":"keyword-blue" },
+ { "name":"Keyword(Modifiers)", "fore":"keyword-blue" },
+ { "name":"Keyword(Constants)", "fore":"keyword-blue" },
+ { "name":"Keyword(Void)", "fore":"keyword-blue" },
+ { "name":"Keyword(Namespace)", "fore":"keyword-blue" },
+ { "name":"Keyword(Property)", "fore":"keyword-blue" },
+ { "name":"Keyword(Declaration)", "fore":"keyword-blue" },
+ { "name":"Keyword(Parameter)", "fore":"keyword-blue" },
+ { "name":"Keyword(Operator Declaration)", "fore":"keyword-blue" },
+ { "name":"Keyword(Other)", "fore":"keyword-blue" },
+
+ { "name":"User Types", "fore":"semantic-type" },
+ { "name":"User Types(Enums)", "fore":"semantic-type" },
+ { "name":"User Types(Interfaces)", "fore":"semantic-type" },
+ { "name":"User Types(Delegates)", "fore":"semantic-type" },
+ { "name":"User Types(Value types)", "fore":"semantic-type" },
+
+ { "name":"User Field Usage" },
+ { "name":"User Field Declaration" },
+
+ { "name":"User Property Usage" },
+ { "name":"User Property Declaration" },
+
+ { "name":"User Event Usage" },
+ { "name":"User Event Declaration" },
+
+ { "name":"User Method Usage" },
+ { "name":"User Method Declaration" },
+
+ { "name":"User Parameter Usage" },
+ { "name":"User Parameter Declaration" },
+
+ { "name":"User Variable Usage" },
+ { "name":"User Variable Declaration" },
+
+ { "name":"Syntax Error", "fore":"#FF0000" },
+
+ { "name":"Breakpoint Text", "fore":"#000000", "back":"#963945" },
+
+ { "name":"Debugger Current Statement", "fore":"#000000", "back":"#FFEE61" },
+
+ { "name":"Css Comment", "fore":"#006400" },
+ { "name":"Css Property Name", "fore":"#FF0000" },
+ { "name":"Css Property Value", "fore":"keyword-blue" },
+ { "name":"Css Selector", "fore":"#800000" },
+ { "name":"Css String Value", "fore":"keyword-blue" },
+ { "name":"Css Keyword", "fore":"keyword-blue" },
+
+ { "name":"Script Comment", "fore":"comment-green" },
+ { "name":"Script Identifier" },
+ { "name":"Script Keyword", "fore":"keyword-blue" },
+ { "name":"Script Number" },
+ { "name":"Script Operator" },
+ { "name":"Script String" }
+ ]
} \ No newline at end of file
diff --git a/main/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml b/main/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml
index f032a75348..555391f232 100644
--- a/main/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml
+++ b/main/src/core/Mono.Texteditor/SyntaxModes/FSharpSyntaxMode.xml
@@ -29,6 +29,8 @@
<Property name="BlockCommentEnd">*)</Property>
<Property name="StringQuote">"</Property>
+ <Delimiters>&amp;&lt;&gt;~@%^*()-+=|\#/{}[]:;"' , ?</Delimiters>
+
<EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#if</EolSpan>
<EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#else</EolSpan>
<EolSpan tagColor = "Preprocessor" rule="text.preprocessor">#elif</EolSpan>
@@ -95,6 +97,14 @@
<Match color="Number">CSharpNumber</Match>
+ <Match color="Keyword(Iteration)">let(!)?</Match>
+ <Match color="Keyword(Iteration)">use(!)?</Match>
+ <Match color="Keyword(Iteration)">yield(!)?</Match>
+ <Match color="Keyword(Iteration)">return(!)?</Match>
+ <Match color="Keyword(Iteration)">do(!)?</Match>
+
+ <!-- reserved-ident-keyword F# spec v3.0 section 3.4 -->
+ <Match color="Keyword(Other)">(atomic|break|checked|component|const|constraint|constructor|continue|eager|fixed|fori|functor|include|measure|method|mixin|object|parallel|params|process|protected|pure|recursive|sealed|tailcall|trait|virtual|volatile)[!#]?</Match>
<!-- It is really impossible to do some intelligent grouping here, because
it looks weird no matter what we do... some things are context-sensitive,
@@ -114,17 +124,9 @@
<Word>with</Word>
<Word>val</Word>
- <Word>use</Word>
- <Word>yield</Word>
- <Word>let!</Word>
- <Word>use!</Word>
- <Word>do!</Word>
- <Word>yield!</Word>
- <Word>return!</Word>
<Word>while</Word>
<Word>for</Word>
- <Word>do</Word>
<Word>begin</Word>
<Word>done</Word>
<Word>elif</Word>
@@ -132,7 +134,6 @@
<Word>end</Word>
<Word>if</Word>
<Word>match</Word>
- <Word>return</Word>
<Word>then</Word>
<Word>when</Word>
@@ -157,7 +158,6 @@
<Word>type</Word>
<Word>of</Word>
- <Word>sig</Word>
<Word>class</Word>
<Word>delegate</Word>
<Word>exception</Word>
@@ -176,6 +176,7 @@
<Word>lazy</Word>
<Word>and</Word>
<Word>downcast</Word>
+ <Word>select</Word>
</Keywords>
<Keywords color="Keyword(Constants)">
@@ -214,6 +215,15 @@
</Keywords>
<Keywords color="Keyword(Other)">
+ <!-- reserved OCaml keywords -->
+ <Word>asr</Word>
+ <Word>land</Word>
+ <Word>lor</Word>
+ <Word>lsl</Word>
+ <Word>lsr</Word>
+ <Word>lxor</Word>
+ <Word>mod</Word>
+ <Word>sig</Word>
</Keywords>
<Rule name="text.preprocessor" ignorecase="True">
@@ -293,10 +303,10 @@
<Rule name="XmlDocumentation">
<Delimiters>&lt;&gt;</Delimiters>
- <Span color = "Comment(DocTag)" rule = "XmlDocumentationTag">
+ <Span color = "Comment(DocTag)" rule = "XmlDocumentationTag" stopateol = "true">
<Begin>&lt;</Begin>
<End>&gt;</End>
</Span>
</Rule>
-</SyntaxMode> \ No newline at end of file
+</SyntaxMode>
diff --git a/main/src/core/Mono.Texteditor/SyntaxModes/JavascriptSyntaxMode.xml b/main/src/core/Mono.Texteditor/SyntaxModes/JavascriptSyntaxMode.xml
index 58de0b9172..add1a65161 100644
--- a/main/src/core/Mono.Texteditor/SyntaxModes/JavascriptSyntaxMode.xml
+++ b/main/src/core/Mono.Texteditor/SyntaxModes/JavascriptSyntaxMode.xml
@@ -25,6 +25,8 @@
THE SOFTWARE. -->
<SyntaxMode name = "Javascript" mimeTypes="application/javascript;text/javascript">
+ <Property name="LineComment">//</Property>
+
<EolSpan color = "Script Comment" rule="Comment">//</EolSpan>
<Span color = "Script Comment" rule="Comment">
<Begin>/*</Begin>
diff --git a/main/src/core/Mono.Texteditor/SyntaxModes/TypescriptSyntaxMode.xml b/main/src/core/Mono.Texteditor/SyntaxModes/TypescriptSyntaxMode.xml
index 36d76840d5..a6ccc9c804 100644
--- a/main/src/core/Mono.Texteditor/SyntaxModes/TypescriptSyntaxMode.xml
+++ b/main/src/core/Mono.Texteditor/SyntaxModes/TypescriptSyntaxMode.xml
@@ -27,7 +27,8 @@ THE SOFTWARE.
-->
<SyntaxMode name = "Typescript" mimeTypes="application/typescript;text/typescript">
-
+ <Property name="LineComment">//</Property>
+
<EolSpan color = "Script Comment" rule="Comment">//</EolSpan>
<Span color = "Script Comment" rule="Comment">
diff --git a/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs b/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs
index 4dc0f82825..15f8d980bc 100644
--- a/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs
+++ b/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs
@@ -9,7 +9,13 @@ namespace Application
public static void Main (string[] args)
{
var dir = args [0];
- var lines = File.ReadAllLines (Path.Combine (dir, "..", "..", "..", "..", "version.config"));
+ var pathVersionConfig = Path.Combine (dir, "..", "..", "..", "..", "version.config");
+ if (!File.Exists(pathVersionConfig))
+ {
+ // in a tarball, we have less depth in the directory hierarchy
+ pathVersionConfig = Path.Combine (dir, "..", "..", "..", "version.config");
+ }
+ var lines = File.ReadAllLines (pathVersionConfig);
var txt = File.ReadAllText (Path.Combine (dir, "BuildVariables.cs.in"));
txt = txt.Replace ("@PACKAGE_VERSION@", GetValue (lines, "Version"));
txt = txt.Replace ("@PACKAGE_VERSION_LABEL@", GetValue (lines, "Label"));
diff --git a/main/src/core/MonoDevelop.Core/Makefile.am b/main/src/core/MonoDevelop.Core/Makefile.am
index c9cc87438f..0f98ef2b7e 100644
--- a/main/src/core/MonoDevelop.Core/Makefile.am
+++ b/main/src/core/MonoDevelop.Core/Makefile.am
@@ -1 +1,4 @@
include $(top_srcdir)/xbuild.include
+
+EXTRA_DIST += \
+ BuildVariables.cs.in
diff --git a/main/src/core/MonoDevelop.Core/Mono.Options.cs b/main/src/core/MonoDevelop.Core/Mono.Options.cs
index b22bd87af8..bd3830d661 100644
--- a/main/src/core/MonoDevelop.Core/Mono.Options.cs
+++ b/main/src/core/MonoDevelop.Core/Mono.Options.cs
@@ -529,19 +529,6 @@ namespace Mono.Options
throw new InvalidOperationException ("Option has no names!");
}
- [Obsolete ("Use KeyedCollection.this[string]")]
- protected Option GetOptionForName (string option)
- {
- if (option == null)
- throw new ArgumentNullException ("option");
- try {
- return base [option];
- }
- catch (KeyNotFoundException) {
- return null;
- }
- }
-
protected override void InsertItem (int index, Option item)
{
base.InsertItem (index, item);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs
index f83dea7eda..607e07936e 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs
@@ -35,7 +35,7 @@ namespace MonoDevelop.Core.AddIns
{
string plat = conditionNode.GetAttribute ("value");
bool negate = false;
- if (plat.StartsWith ("!")) {
+ if (plat.StartsWith ("!", StringComparison.Ordinal)) {
plat = plat.Substring (1);
negate = true;
}
@@ -54,6 +54,11 @@ namespace MonoDevelop.Core.AddIns
default:
result = false; break;
}
+
+ Version version;
+ if (Version.TryParse (conditionNode.GetAttribute ("minVersion"), out version))
+ result |= Environment.OSVersion.Version >= version;
+
return negate ? !result : result;
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs
index a4b9ac2100..03c844c227 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/AssemblyContext.cs
@@ -132,9 +132,15 @@ namespace MonoDevelop.Core.Assemblies
{
return packages;
}
-
+
+ [Obsolete ("Cannot de-duplicate framework assemblies")]
public IEnumerable<SystemPackage> GetPackages (TargetFramework fx)
{
+ return GetPackagesInternal (fx);
+ }
+
+ IEnumerable<SystemPackage> GetPackagesInternal (TargetFramework fx)
+ {
foreach (SystemPackage pkg in packages) {
if (pkg.IsFrameworkPackage) {
if (fx.IncludesFramework (pkg.TargetFramework))
@@ -192,31 +198,39 @@ namespace MonoDevelop.Core.Assemblies
foreach (SystemAssembly asm in pkg.Assemblies)
yield return asm;
}
- } else {
- foreach (SystemPackage pkg in GetPackages (fx)) {
- foreach (SystemAssembly asm in pkg.Assemblies)
+ yield break;
+ }
+
+ var fxGroups = new Dictionary<string, List<SystemAssembly>> ();
+
+ foreach (SystemPackage pkg in GetPackagesInternal (fx)) {
+ if (pkg.IsFrameworkPackage) {
+ foreach (var asm in pkg.Assemblies) {
+ List<SystemAssembly> list;
+ if (!fxGroups.TryGetValue (asm.FullName, out list))
+ fxGroups [asm.FullName] = list = new List<SystemAssembly> ();
+ list.Add (asm);
+ }
+ } else {
+ foreach (var asm in pkg.Assemblies)
yield return asm;
}
}
+
+ foreach (var g in fxGroups) {
+ var a = BestFrameworkAssembly (g.Value);
+ if (a != null)
+ yield return a;
+ }
}
public SystemAssembly GetAssemblyFromFullName (string fullname, string package, TargetFramework fx)
{
if (package == null) {
- SystemAssembly found = null;
- SystemAssembly gacFound = null;
- foreach (SystemAssembly asm in GetAssembliesFromFullNameInternal (fullname)) {
- if (asm.Package.IsFrameworkPackage && fx != null) {
- if (fx.IncludesFramework (asm.Package.TargetFramework))
- return asm;
- else
- continue;
- }
- found = asm;
- if (asm.Package.IsGacPackage)
- gacFound = asm;
- }
- return gacFound ?? found;
+ var asms = GetAssembliesFromFullNameInternal (fullname).ToList ();
+ return BestFrameworkAssembly (asms, fx)
+ ?? asms.FirstOrDefault (a => a.Package.IsGacPackage)
+ ?? asms.FirstOrDefault ();
}
foreach (SystemAssembly asm in GetAssembliesFromFullNameInternal (fullname)) {
@@ -270,10 +284,10 @@ namespace MonoDevelop.Core.Assemblies
public static string NormalizeAsmName (string name)
{
- int i = name.ToLower ().IndexOf (", publickeytoken=null");
+ int i = name.ToLower ().IndexOf (", publickeytoken=null", StringComparison.Ordinal);
if (i != -1)
name = name.Substring (0, i).Trim ();
- i = name.ToLower ().IndexOf (", processorarchitecture=");
+ i = name.ToLower ().IndexOf (", processorarchitecture=", StringComparison.Ordinal);
if (i != -1)
name = name.Substring (0, i).Trim ();
return name;
@@ -304,13 +318,18 @@ namespace MonoDevelop.Core.Assemblies
return best;
}
+
+ var asms = FindNewerAssembliesSameName (fullname).ToList ();
+
+ if (fx != null) {
+ var fxAsm = BestFrameworkAssembly (asms, fx);
+ if (fxAsm != null)
+ return fxAsm.FullName;
+ }
+
string bestMatch = null;
- foreach (SystemAssembly asm in FindNewerAssembliesSameName (fullname)) {
- if (asm.Package.IsFrameworkPackage) {
- if (fx.IncludesFramework (asm.Package.TargetFramework))
- if (package == null || asm.Package.Name == package)
- return asm.FullName;
- } else if (fx.CanReferenceAssembliesTargetingFramework (asm.Package.TargetFramework)) {
+ foreach (SystemAssembly asm in asms) {
+ if (fx.CanReferenceAssembliesTargetingFramework (asm.Package.TargetFramework)) {
if (package != null && asm.Package.Name == package)
return asm.FullName;
bestMatch = asm.FullName;
@@ -318,6 +337,36 @@ namespace MonoDevelop.Core.Assemblies
}
return bestMatch;
}
+
+ static SystemAssembly BestFrameworkAssembly (IEnumerable<SystemAssembly> assemblies, TargetFramework fx)
+ {
+ if (fx == null)
+ return null;
+ return BestFrameworkAssembly (
+ assemblies
+ .Where (a => a.Package != null && a.Package.IsFrameworkPackage && fx.IncludesFramework (a.Package.TargetFramework))
+ .ToList ()
+ );
+ }
+
+ static SystemAssembly BestFrameworkAssembly (List<SystemAssembly> list)
+ {
+ if (list.Count == 0)
+ return null;
+
+ if (list.Count == 1)
+ return list [0];
+
+ SystemAssembly best = list [0];
+
+ for (int i = 1; i < list.Count; i++) {
+ var a = list[i];
+ var f = Runtime.SystemAssemblyService.GetTargetFramework (a.Package.TargetFramework);
+ if (f.IncludesFramework (best.Package.TargetFramework))
+ best = a;
+ }
+ return best;
+ }
IEnumerable<SystemAssembly> FindNewerAssembliesSameName (string fullname)
{
@@ -419,7 +468,7 @@ namespace MonoDevelop.Core.Assemblies
if (asm == null)
return null;
- var fxAsms = asm.AllSameName ().Where (a => a.Package.IsFrameworkPackage);
+ var fxAsms = asm.AllSameName ().Where (a => a.Package.IsFrameworkPackage).ToList ();
//if the asm is not a framework asm, we don't upgrade it automatically
if (!fxAsms.Any ()) {
@@ -430,22 +479,19 @@ namespace MonoDevelop.Core.Assemblies
return null;
}
- foreach (var fxAsm in fxAsms) {
- if (fx.IncludesFramework (fxAsm.Package.TargetFramework))
- return fxAsm;
- }
+ var bestFx = BestFrameworkAssembly (fxAsms, fx);
+ if (bestFx != null)
+ return bestFx;
// We have to find the assembly with the same name in the target fx
- string fname = Path.GetFileName ((string) fxAsms.First ().Location);
-
- foreach (var pair in assemblyFullNameToAsm) {
- foreach (var fxAsm in pair.Value.AllSameName ()) {
- var rpack = fxAsm.Package;
- if (rpack.IsFrameworkPackage && fx.IncludesFramework (rpack.TargetFramework) && Path.GetFileName (fxAsm.Location) == fname)
- return fxAsm;
- }
- }
- return null;
+ string fname = Path.GetFileName (fxAsms.First ().Location);
+
+ var possible = packages.Where (p => p.IsFrameworkPackage && fx.IncludesFramework (p.TargetFramework))
+ .SelectMany (p => p.Assemblies)
+ .Where (a => Path.GetFileName (a.Location) == fname)
+ .ToList ();
+
+ return BestFrameworkAssembly (possible);
}
public string GetAssemblyFullName (string assemblyName, TargetFramework fx)
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/IAssemblyContext.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/IAssemblyContext.cs
index 179c999622..dc0a28c829 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/IAssemblyContext.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/IAssemblyContext.cs
@@ -31,8 +31,12 @@ namespace MonoDevelop.Core.Assemblies
{
public interface IAssemblyContext
{
+ [Obsolete ("Avoid use of SystemPackage")]
IEnumerable<SystemPackage> GetPackages ();
+
+ [Obsolete ("Avoid use of SystemPackage")]
IEnumerable<SystemPackage> GetPackages (TargetFramework fx);
+
SystemPackage GetPackage (string name);
SystemPackage GetPackage (string name, string version);
SystemPackage GetPackageFromPath (string path);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoFrameworkBackend.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoFrameworkBackend.cs
index df631da7dd..5194d0c421 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoFrameworkBackend.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoFrameworkBackend.cs
@@ -164,7 +164,8 @@ namespace MonoDevelop.Core.Assemblies
SystemPackageInfo info = base.GetFrameworkPackageInfo (packageName);
if (framework.Id.Version == "3.0" && packageName == "olive") {
info.IsCorePackage = false;
- } else {
+ }
+ if (String.IsNullOrEmpty (info.Name)) {
info.Name = "mono";
}
return info;
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs
index 22144cf1b2..164ed5c2e3 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/MonoRuntimeInfo.cs
@@ -120,14 +120,14 @@ namespace MonoDevelop.Core.Assemblies
SetupPkgconfigPaths (null, null);
string ver = output.ToString ();
- int i = ver.IndexOf ("version");
+ int i = ver.IndexOf ("version", StringComparison.Ordinal);
if (i == -1)
return false;
i += 8;
int j = ver.IndexOf (' ', i);
if (j == -1)
return false;
-
+
monoVersion = ver.Substring (i, j - i);
i = ver.IndexOf ('(');
@@ -138,6 +138,9 @@ namespace MonoDevelop.Core.Assemblies
j = ver.IndexOf (')', i);
if (j != -1) {
var rev = ver.Substring (i, j - i);
+ i = rev.IndexOf ('/');
+ if (i != -1 && i + 1 < rev.Length)
+ rev = rev.Substring (i + 1);
if (rev != "tarball")
monoVersion += " (" + rev + ")";
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs
index 4549c2be51..d3be657e8e 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs
@@ -164,12 +164,6 @@ namespace MonoDevelop.Core.Assemblies
return profile == pattern;
}
- [Obsolete ("Use CanReferenceAssembliesTargetingFramework() instead")]
- public bool IsCompatibleWithFramework (TargetFrameworkMoniker fxId)
- {
- return CanReferenceAssembliesTargetingFramework (fxId);
- }
-
public bool CanReferenceAssembliesTargetingFramework (TargetFrameworkMoniker fxId)
{
var fx = Runtime.SystemAssemblyService.GetTargetFramework (fxId);
@@ -269,11 +263,6 @@ namespace MonoDevelop.Core.Assemblies
set;
}
- internal AssemblyInfo[] AssembliesExpanded {
- get;
- set;
- }
-
public override string ToString ()
{
return string.Format ("[TargetFramework: Hidden={0}, Name={1}, Id={2}, ClrVersion={3}]",
@@ -341,9 +330,8 @@ namespace MonoDevelop.Core.Assemblies
if (reader.MoveToAttribute ("IncludeFramework") && reader.ReadAttributeValue ()) {
string include = reader.ReadContentAsString ();
- if (!string.IsNullOrEmpty (include)) {
- fx.IncludedFrameworks.Add (new TargetFrameworkMoniker (fx.Id.Identifier, include));
- }
+ if (!string.IsNullOrEmpty (include))
+ fx.includesFramework = include;
}
//this is a Mono-specific extension
@@ -380,7 +368,7 @@ namespace MonoDevelop.Core.Assemblies
// HACK: we were using EnumerateFiles but it's broken in some Mono releases
// https://bugzilla.xamarin.com/show_bug.cgi?id=2975
- var files = System.IO.Directory.GetFiles (dir, "*.dll");
+ var files = Directory.GetFiles (dir, "*.dll");
foreach (var f in files) {
try {
var an = SystemAssemblyService.GetAssemblyNameObj (dir.Combine (f));
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionTarget.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionTarget.cs
index acb5bc5cb2..fbadafd7a3 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionTarget.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/ExecutionTarget.cs
@@ -35,6 +35,11 @@ namespace MonoDevelop.Core.Execution
/// </summary>
public abstract class ExecutionTarget
{
+ protected ExecutionTarget ()
+ {
+ this.Enabled = true;
+ }
+
/// <summary>
/// Display name of the device
/// </summary>
@@ -50,6 +55,11 @@ namespace MonoDevelop.Core.Execution
/// </summary>
public abstract string Id { get; }
+ /// <summary>
+ /// Gets or sets a value indicating whether this <see cref="MonoDevelop.Core.Execution.ExecutionTarget"/> is enabled.
+ /// </summary>
+ public bool Enabled { get; set; }
+
public override bool Equals (object obj)
{
var t = obj as ExecutionTarget;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/TextWeight.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/IDebugConsole.cs
index 1e566f790c..feded135b7 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Highlighting/TextWeight.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Execution/IDebugConsole.cs
@@ -1,10 +1,10 @@
-//
-// TextWeight.cs
+//
+// IDebugConsole.cs
//
// Author:
-// Mike Krüger <mkrueger@xamarin.com>
+// David Karlaš <david.karlas@xamarin.com>
//
-// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+// Copyright (c) 2014 Xamarin, Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -23,24 +23,13 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-
using System;
using System.IO;
-using System.Collections.Generic;
-using System.Linq;
-using System.Xml.Linq;
-using System.Xml.XPath;
-using System.Reflection;
-namespace Mono.TextEditor.Highlighting
+namespace MonoDevelop.Core.Execution
{
- [Obsolete("Will be removed - use FontWeight")]
- [Flags]
- public enum TextWeight {
- None,
- Bold,
- Italic,
- Underline
+ public interface IDebugConsole: IConsole
+ {
+ void Debug (int level, string category, string message);
}
-
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs
index 6ff3108947..240cb8913c 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/FileSystemExtension.cs
@@ -129,22 +129,9 @@ namespace MonoDevelop.Core.FileSystem
public virtual void RequestFileEdit (IEnumerable<FilePath> files)
{
-#pragma warning disable 618
- foreach (var f in files) {
- if (!RequestFileEdit (f))
- throw new UserException (GettextCatalog.GetString ("File '{0}' can't be modified", f.FileName));
- }
-#pragma warning restore 618
-
foreach (var fg in files.GroupBy (f => GetNextForPath (f, false)))
fg.Key.RequestFileEdit (fg);
}
-
- [Obsolete ("This will be removed. Override RequestFileEdit (IEnumerable<FilePath>) instead")]
- public virtual bool RequestFileEdit (FilePath file)
- {
- return true;
- }
public virtual void NotifyFilesChanged (IEnumerable<FilePath> files)
{
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ConsoleProgressMonitor.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ConsoleProgressMonitor.cs
index b502d99669..82410eae20 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ConsoleProgressMonitor.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.ProgressMonitoring/ConsoleProgressMonitor.cs
@@ -34,6 +34,7 @@ namespace MonoDevelop.Core.ProgressMonitoring
public class ConsoleProgressMonitor: NullProgressMonitor
{
int columns = 0;
+ bool leaveOpen;
bool indent = true;
bool wrap = false;
int ilevel = 0;
@@ -47,7 +48,7 @@ namespace MonoDevelop.Core.ProgressMonitoring
get { return EnableTimeStamp ? string.Format ("[{0}] ", DateTime.Now.ToString ("yyyy-MM-dd HH:mm:ss.f")) : string.Empty; }
}
- public ConsoleProgressMonitor () : this (Console.Out)
+ public ConsoleProgressMonitor () : this (Console.Out, true)
{
//TODO: can we efficiently update Console.WindowWidth when it changes?
// TODO: Use Console.IsOutputRedirected in .NET 4.5.
@@ -61,12 +62,28 @@ namespace MonoDevelop.Core.ProgressMonitoring
wrap = columns > 0;
}
-
- public ConsoleProgressMonitor (TextWriter writer)
+
+ public ConsoleProgressMonitor (TextWriter writer, bool leaveOpen)
{
this.writer = writer;
+ this.leaveOpen = leaveOpen;
logger = new LogTextWriter ();
- logger.TextWritten += new LogTextEventHandler (WriteLog);
+ logger.TextWritten += WriteLog;
+ }
+
+ public ConsoleProgressMonitor (TextWriter writer) : this (writer, false)
+ {
+ }
+
+ public override void Dispose ()
+ {
+ logger.TextWritten -= WriteLog;
+ logger.Dispose ();
+
+ if (!leaveOpen)
+ writer.Dispose ();
+
+ base.Dispose ();
}
public bool EnableTimeStamp {
@@ -151,27 +168,27 @@ namespace MonoDevelop.Core.ProgressMonitoring
else
WriteText (text, 0);
}
-
- void WriteText (string text, int leftMargin)
- {
+
+ void WriteText (string text, int leftMargin)
+ {
if (text == null)
return;
- string timestamp = TimeStamp;
+ string timestamp = TimeStamp;
int maxCols = wrap ? columns - timestamp.Length : int.MaxValue;
- int n = 0;
+ int n = 0;
- while (n < text.Length)
- {
+ while (n < text.Length)
+ {
if (col == -1) {
writer.Write (timestamp + new string (' ', leftMargin));
col = leftMargin;
}
- int lastWhite = -1;
+ int lastWhite = -1;
int sn = n;
bool eol = false;
-
+
while (col < maxCols && n < text.Length) {
char c = text [n];
if (c == '\r') {
@@ -181,26 +198,26 @@ namespace MonoDevelop.Core.ProgressMonitoring
if (c == '\n') {
eol = true;
break;
- }
- if (char.IsWhiteSpace (c))
- lastWhite = n;
- col++;
- n++;
- }
-
- if (lastWhite == -1 || col < maxCols)
- lastWhite = n;
- else if (col >= maxCols)
- n = lastWhite + 1;
-
+ }
+ if (char.IsWhiteSpace (c))
+ lastWhite = n;
+ col++;
+ n++;
+ }
+
+ if (lastWhite == -1 || col < maxCols)
+ lastWhite = n;
+ else if (col >= maxCols)
+ n = lastWhite + 1;
+
writer.Write (text.Substring (sn, lastWhite - sn));
if (eol || col >= maxCols) {
col = -1;
writer.WriteLine ();
if (eol) n++;
- }
- }
+ }
+ }
}
void Indent ()
@@ -222,4 +239,4 @@ namespace MonoDevelop.Core.ProgressMonitoring
}
}
}
-} \ No newline at end of file
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialProviderExtensions.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialProviderExtensions.cs
index 374f3a8cd4..e9f3ad148b 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialProviderExtensions.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialProviderExtensions.cs
@@ -1,38 +1,64 @@
-using System;
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
using System.Net;
namespace MonoDevelop.Core.Web
{
- static class CredentialProviderExtensions
+ internal static class CredentialProviderExtensions
{
- static readonly string[] AuthenticationSchemes = { "Basic", "NTLM", "Negotiate" };
+ private static readonly string[] _authenticationSchemes = new[] { "Basic", "NTLM", "Negotiate" };
- internal static ICredentials GetCredentials (this ICredentialProvider provider, WebRequest request, ICredentials currentCredentials, CredentialType credentialType, bool retrying = false)
+ internal static ICredentials GetCredentials(this ICredentialProvider provider, WebRequest request, CredentialType credentialType, bool retrying = false)
{
- return provider.GetCredentials (request.RequestUri, request.Proxy, credentialType, currentCredentials, retrying);
+ return provider.GetCredentials(request.RequestUri, request.Proxy, credentialType, retrying);
}
- internal static ICredentials AsCredentialCache (this ICredentials credentials, Uri uri)
+ internal static ICredentials AsCredentialCache(this ICredentials credentials, Uri uri)
{
// No credentials then bail
if (credentials == null)
+ {
return null;
+ }
// Do nothing with default credentials
- if (credentials == CredentialCache.DefaultCredentials || credentials == CredentialCache.DefaultNetworkCredentials)
+ if (credentials == CredentialCache.DefaultCredentials ||
+ credentials == CredentialCache.DefaultNetworkCredentials)
+ {
return credentials;
+ }
// If this isn't a NetworkCredential then leave it alone
var networkCredentials = credentials as NetworkCredential;
if (networkCredentials == null)
+ {
return credentials;
+ }
// Set this up for each authentication scheme we support
// The reason we're using a credential cache is so that the HttpWebRequest will forward our
// credentials if there happened to be any redirects in the chain of requests.
- var cache = new CredentialCache ();
- foreach (var scheme in AuthenticationSchemes)
- cache.Add (uri, scheme, networkCredentials);
+ var cache = new CredentialCache();
+ foreach (var scheme in _authenticationSchemes)
+ {
+ cache.Add(uri, scheme, networkCredentials);
+ }
return cache;
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialStore.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialStore.cs
index 56d3109496..d22f2f27af 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialStore.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialStore.cs
@@ -1,45 +1,65 @@
-using System;
-using System.Collections.Concurrent;
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
using System.Net;
+using System.Collections.Concurrent;
namespace MonoDevelop.Core.Web
{
class CredentialStore : ICredentialCache
{
- readonly ConcurrentDictionary<Uri, ICredentials> credentialCache = new ConcurrentDictionary<Uri, ICredentials> ();
-
- public ICredentials GetCredentials (Uri uri, CredentialType credentialType)
- {
- ICredentials credentials;
- if (!credentialCache.TryGetValue (uri, out credentials)) {
- if (credentialType == CredentialType.RequestCredentials &&
- credentialCache.TryGetValue (GetRootUri (uri), out credentials))
- return credentials;
- } else {
- return credentials;
+ private readonly ConcurrentDictionary<Uri, ICredentials> _credentialCache = new ConcurrentDictionary<Uri, ICredentials>();
+
+ private static readonly CredentialStore _instance = new CredentialStore();
+
+ public static CredentialStore Instance
+ {
+ get
+ {
+ return _instance;
+ }
+ }
+
+ public ICredentials GetCredentials(Uri uri)
+ {
+ Uri rootUri = GetRootUri(uri);
+
+ ICredentials credentials;
+ if (_credentialCache.TryGetValue(uri, out credentials) ||
+ _credentialCache.TryGetValue(rootUri, out credentials))
+ {
+ return credentials;
}
-
- // Then go to the keychain
- var creds = PasswordService.GetWebUserNameAndPassword (uri);
- return creds != null ? new NetworkCredential (creds.Item1, creds.Item2).AsCredentialCache (uri) : null;
- }
-
- public void Add (Uri requestUri, ICredentials credentials, CredentialType credentialType)
- {
- credentialCache.TryAdd (requestUri, credentials);
- if (credentialType == CredentialType.RequestCredentials) {
- var rootUri = GetRootUri (requestUri);
- credentialCache.AddOrUpdate (rootUri, credentials, (u, c) => credentials);
- }
-
- var cred = Utility.GetCredentialsForUriFromICredentials (requestUri, credentials);
- if (cred != null && !string.IsNullOrWhiteSpace (cred.UserName) && !string.IsNullOrWhiteSpace (cred.Password))
- PasswordService.AddWebUserNameAndPassword (requestUri, cred.UserName, cred.Password);
- }
-
- static Uri GetRootUri (Uri uri)
+
+ return null;
+ }
+
+ public void Add(Uri uri, ICredentials credentials)
{
- return new Uri (uri.GetComponents (UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
+ Uri rootUri = GetRootUri(uri);
+ _credentialCache.TryAdd(uri, credentials);
+ _credentialCache.AddOrUpdate(rootUri, credentials, (u, c) => credentials);
+ }
+
+ internal static Uri GetRootUri(Uri uri)
+ {
+ return new Uri(uri.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
}
}
+
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialType.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialType.cs
index 37ea1b68db..c65b61086c 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialType.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/CredentialType.cs
@@ -1,4 +1,21 @@
-namespace MonoDevelop.Core.Web
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+namespace MonoDevelop.Core.Web
{
public enum CredentialType
{
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialCache.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialCache.cs
index b45aefed53..10c47194d8 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialCache.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialCache.cs
@@ -1,12 +1,28 @@
-using System;
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
using System.Net;
namespace MonoDevelop.Core.Web
{
- public interface ICredentialCache
+ interface ICredentialCache
{
- void Add (Uri uri, ICredentials credentials, CredentialType credentialType);
-
- ICredentials GetCredentials (Uri uri, CredentialType credentialType);
+ void Add(Uri uri, ICredentials credentials);
+ ICredentials GetCredentials(Uri uri);
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialProvider.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialProvider.cs
index 889a405d04..4646e7cf4c 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialProvider.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ICredentialProvider.cs
@@ -1,4 +1,21 @@
-using System;
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
using System.Net;
namespace MonoDevelop.Core.Web
@@ -10,12 +27,12 @@ namespace MonoDevelop.Core.Web
public interface ICredentialProvider
{
/// <summary>
- /// Returns CredentialState state that lets the consumer know if ICredentials
+ /// Returns CredentialState state that let's the consumer know if ICredentials
/// were discovered by the ICredentialProvider. The credentials argument is then
/// populated with the discovered valid credentials that can be used for the given Uri.
/// The proxy instance if passed will be used to ensure that the request goes through the proxy
/// to ensure successful connection to the destination Uri.
/// </summary>
- ICredentials GetCredentials (Uri uri, IWebProxy proxy, CredentialType credentialType, ICredentials existingCredentials, bool retrying);
+ ICredentials GetCredentials(Uri uri, IWebProxy proxy, CredentialType credentialType, bool retrying);
}
-} \ No newline at end of file
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IHttpWebResponse.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IHttpWebResponse.cs
index aed89d4864..65959bab1e 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IHttpWebResponse.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IHttpWebResponse.cs
@@ -1,18 +1,32 @@
-using System;
-using System.Collections.Specialized;
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
using System.Net;
+using System.Collections.Specialized;
namespace MonoDevelop.Core.Web
{
// For unit testing
- public interface IHttpWebResponse : IDisposable
+ interface IHttpWebResponse : IDisposable
{
HttpStatusCode StatusCode { get; }
-
Uri ResponseUri { get; }
-
string AuthType { get; }
-
NameValueCollection Headers { get; }
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyAuthenticationHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyAuthenticationHandler.cs
new file mode 100644
index 0000000000..5a9f422d13
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyAuthenticationHandler.cs
@@ -0,0 +1,63 @@
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+using System.Net;
+
+namespace MonoDevelop.Core.Web
+{
+ ///<summary>Proxy authentication handler.</summary>
+ [Obsolete]
+ public interface IProxyAuthenticationHandler
+ {
+ /// <summary>
+ /// Adds a proxy to the cache.
+ /// </summary>
+ /// <param name="proxy">Proxy.</param>
+ void AddProxyToCache (IWebProxy proxy);
+
+ /// <summary>
+ /// Gets a cached proxy for the Url, if available.
+ /// </summary>
+ /// <returns>The cached proxy.</returns>
+ /// <param name="uri">URI for which the proxy will be used.</param>
+ IWebProxy GetCachedProxy (Uri uri);
+
+ /// <summary>
+ /// Adds credentials to the cache.
+ /// </summary>
+ /// <param name="uri">URI for which the credentials are valid.</param>
+ /// <param name="credentials">Credentials.</param>
+ void AddCredentialsToCache (Uri uri, ICredentials credentials);
+
+ /// <summary>
+ /// Gets cached credentials, if available.
+ /// </summary>
+ /// <returns>The cached credentials.</returns>
+ /// <param name="uri">URI for which the credentials will be used.</param>
+ ICredentials GetCachedCredentials (Uri uri);
+
+ /// <summary>
+ /// Gets credentials from user.
+ /// </summary>
+ /// <returns>The credentials from user.</returns>
+ /// <param name="request">Request for which the credentials will be used.</param>
+ /// <param name="credentialType">Type of the credentials.</param>
+ /// <param name="retrying">Whether retrying.</param>
+ ICredentials GetCredentialsFromUser (HttpWebRequest request, CredentialType credentialType, bool retrying);
+ }
+} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyCache.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyCache.cs
index 7d2bd56ad0..488dfcf142 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyCache.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/IProxyCache.cs
@@ -1,9 +1,26 @@
-using System;
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
using System.Net;
namespace MonoDevelop.Core.Web
{
- public interface IProxyCache
+ interface IProxyCache
{
void Add (IWebProxy proxy);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/MemoryCache.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/MemoryCache.cs
new file mode 100644
index 0000000000..6f06838350
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/MemoryCache.cs
@@ -0,0 +1,150 @@
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+using System.Collections.Concurrent;
+using System.Threading;
+
+namespace MonoDevelop.Core.Web
+{
+ sealed class MemoryCache : IDisposable
+ {
+ private static readonly Lazy<MemoryCache> _instance = new Lazy<MemoryCache>(() => new MemoryCache());
+ // Interval to wait before cleaning up expired items
+ private static readonly TimeSpan _cleanupInterval = TimeSpan.FromSeconds(10);
+
+ // Cache keys are case-sensitive
+ private readonly ConcurrentDictionary<object, CacheItem> _cache = new ConcurrentDictionary<object, CacheItem>();
+ private readonly Timer _timer;
+
+ internal MemoryCache()
+ {
+ _timer = new Timer(RemoveExpiredEntries, null, _cleanupInterval, _cleanupInterval);
+ }
+
+ internal static MemoryCache Instance
+ {
+ get
+ {
+ return _instance.Value;
+ }
+ }
+
+ internal T GetOrAdd<T>(object cacheKey, Func<T> factory, TimeSpan expiration, bool absoluteExpiration = false) where T : class
+ {
+ // Although this method would return values that have expired while also elavating them to unexpired entries,
+ // none of the data that we cache is time sensitive. At worst, an item will be cached for an extra _cleanupInterval duration.
+
+ CacheItem cacheFactory = new CacheItem(factory, expiration, absoluteExpiration);
+
+ var cachedItem = _cache.GetOrAdd(cacheKey, cacheFactory);
+
+ // Increase the expiration time
+ cachedItem.UpdateUsage(expiration);
+
+ return (T)cachedItem.Value;
+ }
+
+ internal bool TryGetValue<T>(object cacheKey, out T value) where T : class
+ {
+ CacheItem cacheItem;
+ if (_cache.TryGetValue(cacheKey, out cacheItem))
+ {
+ value = (T)cacheItem.Value;
+ return true;
+ }
+ else
+ {
+ value = null;
+ return false;
+ }
+ }
+
+ internal void Remove(object cacheKey)
+ {
+ CacheItem item;
+ _cache.TryRemove(cacheKey, out item);
+ }
+
+ private void RemoveExpiredEntries(object state)
+ {
+ // Remove all the expired ones
+ var keys = _cache.Keys;
+ foreach (var key in keys)
+ {
+ CacheItem cacheItem;
+ if (_cache.TryGetValue(key, out cacheItem) && cacheItem.Expired)
+ {
+ // Note: It is entirely possible that someone reads the value between the time we read Expired on the CacheItem
+ // and we call TryRemove. However we are fine with cache misses at these boundary values. If in the future the nature
+ // of this cache changes, use the method prescribed at http://blogs.msdn.com/b/pfxteam/archive/2011/04/02/10149222.aspx
+ _cache.TryRemove(key, out cacheItem);
+ }
+ }
+ }
+
+ public void Dispose()
+ {
+ if (_timer != null)
+ {
+ _timer.Dispose();
+ }
+ }
+
+ private sealed class CacheItem
+ {
+ private readonly Lazy<object> _valueFactory;
+ private readonly bool _absoluteExpiration;
+ private long _expires;
+
+ public CacheItem(Func<object> valueFactory, TimeSpan expires, bool absoluteExpiration)
+ {
+ _valueFactory = new Lazy<object>(valueFactory);
+ _absoluteExpiration = absoluteExpiration;
+ _expires = DateTime.UtcNow.Ticks + expires.Ticks;
+ }
+
+ public object Value
+ {
+ get
+ {
+ return _valueFactory.Value;
+ }
+ }
+
+ public void UpdateUsage(TimeSpan slidingExpiration)
+ {
+ if (!_absoluteExpiration)
+ {
+ _expires = DateTime.UtcNow.Ticks + slidingExpiration.Ticks;
+ }
+ }
+
+ public bool Expired
+ {
+ get
+ {
+ long ticks = DateTime.UtcNow.Ticks;
+ long expires = Interlocked.Read(ref _expires);
+ // > is atomic on primitive types
+ return ticks > expires;
+ }
+ }
+ }
+ }
+
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/NullCredentialProvider.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/NullCredentialProvider.cs
new file mode 100644
index 0000000000..40e96ff66c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/NullCredentialProvider.cs
@@ -0,0 +1,30 @@
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+using System.Net;
+
+namespace MonoDevelop.Core.Web
+{
+ class NullCredentialProvider : ICredentialProvider
+ {
+ public ICredentials GetCredentials(Uri uri, IWebProxy proxy, CredentialType credentialType, bool retrying)
+ {
+ return null;
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ProxyCache.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ProxyCache.cs
index bdd149d460..ddba33042a 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ProxyCache.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/ProxyCache.cs
@@ -1,4 +1,21 @@
-using System;
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
using System.Collections.Concurrent;
using System.Net;
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs
index d709827899..863a60beff 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/RequestHelper.cs
@@ -1,224 +1,358 @@
-using System;
-using System.Collections.Specialized;
-using System.Net;
-using MonoDevelop.Core.Web;
-
-namespace Xamarin.Components.Ide.Web
-{
- public static class RequestHelper
- {
- /// <summary>
- /// Keeps sending requests until a response code that doesn't require authentication happens or if
- /// the request requires authentication and the user has stopped trying to enter them (i.e. they hit cancel when they are prompted).
- /// </summary>
- internal static WebResponse GetResponse (Func<WebRequest> createRequest, Action<WebRequest> prepareRequest)
- {
- var proxyCache = WebService.ProxyCache;
- var credentialCache = WebService.CredentialCache;
- var credentialProvider = WebService.CredentialProvider;
-
- HttpWebRequest previousRequest = null;
- IHttpWebResponse previousResponse = null;
- HttpStatusCode? previousStatusCode = null;
- var continueIfFailed = true;
- int proxyCredentialsRetryCount = 0, credentialsRetryCount = 0;
-
- while (true) {
- // Create the request
- var request = (HttpWebRequest)createRequest ();
- request.Proxy = proxyCache.GetProxy (request.RequestUri);
-
- if (request.Proxy != null && request.Proxy.Credentials == null) {
- var proxyAddress = ((WebProxy)request.Proxy).Address;
- request.Proxy.Credentials = credentialCache.GetCredentials (proxyAddress, CredentialType.ProxyCredentials) ??
- CredentialCache.DefaultCredentials;
- }
-
- var retrying = proxyCredentialsRetryCount > 0;
- ICredentials oldCredentials;
- if (!previousStatusCode.HasValue && (previousResponse == null || ShouldKeepAliveBeUsedInRequest (previousRequest, previousResponse))) {
- // Try to use the cached credentials (if any, for the first request)
- request.Credentials = credentialCache.GetCredentials (request.RequestUri, CredentialType.RequestCredentials);
-
- // If there are no cached credentials, use the default ones
- if (request.Credentials == null)
- request.UseDefaultCredentials = true;
- } else if (previousStatusCode == HttpStatusCode.ProxyAuthenticationRequired) {
- oldCredentials = previousRequest != null && previousRequest.Proxy != null ? previousRequest.Proxy.Credentials : null;
- request.Proxy.Credentials = credentialProvider.GetCredentials (request, oldCredentials, CredentialType.ProxyCredentials, retrying: retrying);
- continueIfFailed = request.Proxy.Credentials != null;
- proxyCredentialsRetryCount++;
- } else if (previousStatusCode == HttpStatusCode.Unauthorized) {
- oldCredentials = previousRequest != null ? previousRequest.Credentials : null;
- request.Credentials = credentialProvider.GetCredentials (request, oldCredentials, CredentialType.RequestCredentials, retrying: retrying);
- continueIfFailed = request.Credentials != null;
- credentialsRetryCount++;
- }
-
- try {
- ICredentials credentials = request.Credentials;
-
- SetKeepAliveHeaders (request, previousResponse);
-
- // Prepare the request, we do something like write to the request stream
- // which needs to happen last before the request goes out
- prepareRequest (request);
-
- // Wrap the credentials in a CredentialCache in case there is a redirect
- // and credentials need to be kept around.
- request.Credentials = request.Credentials.AsCredentialCache (request.RequestUri);
-
- var response = request.GetResponse ();
-
- // Cache the proxy and credentials
- if (request.Proxy != null) {
- proxyCache.Add (request.Proxy);
- credentialCache.Add (((WebProxy)request.Proxy).Address, request.Proxy.Credentials, CredentialType.ProxyCredentials);
- }
-
- credentialCache.Add (request.RequestUri, credentials, CredentialType.RequestCredentials);
- credentialCache.Add (response.ResponseUri, credentials, CredentialType.RequestCredentials);
-
- return response;
- } catch (WebException ex) {
- using (var response = GetResponse (ex.Response)) {
- if (response == null && ex.Status != WebExceptionStatus.SecureChannelFailure) {
- // No response, something went wrong so just rethrow
- throw;
- }
-
- // Special case https connections that might require authentication
- if (ex.Status == WebExceptionStatus.SecureChannelFailure) {
- if (continueIfFailed) {
- if (ex.Message.Contains ("407"))
- previousStatusCode = HttpStatusCode.ProxyAuthenticationRequired;
- else if (ex.Message.Contains ("401"))
- previousStatusCode = HttpStatusCode.Unauthorized;
- else
- previousStatusCode = null;
- continue;
- }
-
- throw;
- }
-
- // If we were trying to authenticate the proxy or the request and succeeded, cache the result.
- if (previousStatusCode == HttpStatusCode.ProxyAuthenticationRequired && response.StatusCode != HttpStatusCode.ProxyAuthenticationRequired) {
- proxyCache.Add (request.Proxy);
- credentialCache.Add (((WebProxy)request.Proxy).Address, request.Proxy.Credentials, CredentialType.ProxyCredentials);
- } else if (previousStatusCode == HttpStatusCode.Unauthorized && response.StatusCode != HttpStatusCode.Unauthorized) {
- credentialCache.Add (request.RequestUri, request.Credentials, CredentialType.RequestCredentials);
- credentialCache.Add (response.ResponseUri, request.Credentials, CredentialType.RequestCredentials);
- }
-
- if (!IsAuthenticationResponse (response) || !continueIfFailed)
- throw;
-
- previousRequest = request;
- previousResponse = response;
- previousStatusCode = previousResponse.StatusCode;
- }
- }
- }
- }
-
- static IHttpWebResponse GetResponse (WebResponse response)
- {
- var httpWebResponse = response as IHttpWebResponse;
- if (httpWebResponse != null)
- return httpWebResponse;
-
- var webResponse = response as HttpWebResponse;
- return webResponse == null ? null : new HttpWebResponseWrapper (webResponse);
- }
-
- static bool IsAuthenticationResponse (IHttpWebResponse response)
- {
- return response.StatusCode == HttpStatusCode.Unauthorized ||
- response.StatusCode == HttpStatusCode.ProxyAuthenticationRequired;
- }
-
- static void SetKeepAliveHeaders (HttpWebRequest request, IHttpWebResponse previousResponse)
- {
- // KeepAlive is required for NTLM and Kerberos authentication. If we've never been authenticated or are
- // using a different auth, we should not require KeepAlive.
- // REVIEW: The WWW-Authenticate header is tricky to parse so a Equals might not be correct.
- if (previousResponse != null && IsNtlmOrKerberos (previousResponse.AuthType))
- return;
-
- // This is to work around the "The underlying connection was closed: An unexpected error occurred on a receive." exception.
- request.KeepAlive = false;
- request.ProtocolVersion = HttpVersion.Version10;
- }
-
- static bool ShouldKeepAliveBeUsedInRequest (HttpWebRequest request, IHttpWebResponse response)
- {
- if (request == null)
- throw new ArgumentNullException ("request");
-
- if (response == null)
- throw new ArgumentNullException ("response");
-
- return !request.KeepAlive && IsNtlmOrKerberos (response.AuthType);
- }
-
- static bool IsNtlmOrKerberos (string authType)
- {
- if (String.IsNullOrEmpty (authType)) {
- return false;
- }
-
- return authType.IndexOf ("NTLM", StringComparison.OrdinalIgnoreCase) != -1
- || authType.IndexOf ("Kerberos", StringComparison.OrdinalIgnoreCase) != -1;
- }
-
- private class HttpWebResponseWrapper : IHttpWebResponse
- {
- readonly HttpWebResponse response;
-
- public HttpWebResponseWrapper (HttpWebResponse response)
- {
- this.response = response;
- }
-
- public string AuthType
- {
- get
- {
- return response.Headers[HttpResponseHeader.WwwAuthenticate];
- }
- }
-
- public HttpStatusCode StatusCode
- {
- get
- {
- return response.StatusCode;
- }
- }
-
- public Uri ResponseUri
- {
- get
- {
- return response.ResponseUri;
- }
- }
-
- public NameValueCollection Headers
- {
- get
- {
- return response.Headers;
- }
- }
-
- public void Dispose ()
- {
- if (response != null) {
- response.Close ();
- }
- }
- }
- }
-}
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+using System.Net;
+using System.Collections.Specialized;
+using System.Threading;
+
+namespace MonoDevelop.Core.Web
+{
+ /// <summary>
+ /// This class is used to keep sending requests until a response code that doesn't require
+ /// authentication happens or if the request requires authentication and
+ /// the user has stopped trying to enter them (i.e. they hit cancel when they are prompted).
+ /// </summary>
+ class RequestHelper
+ {
+ private Func<HttpWebRequest> _createRequest;
+ private Action<HttpWebRequest> _prepareRequest;
+ private IProxyCache _proxyCache;
+ private ICredentialCache _credentialCache;
+ private ICredentialProvider _credentialProvider;
+
+ HttpWebRequest _previousRequest;
+ IHttpWebResponse _previousResponse;
+ HttpStatusCode? _previousStatusCode;
+ int _credentialsRetryCount;
+ bool _usingSTSAuth;
+ bool _continueIfFailed;
+ int _proxyCredentialsRetryCount;
+ bool _basicAuthIsUsedInPreviousRequest;
+
+ public RequestHelper(Func<HttpWebRequest> createRequest,
+ Action<HttpWebRequest> prepareRequest,
+ IProxyCache proxyCache,
+ ICredentialCache credentialCache,
+ ICredentialProvider credentialProvider)
+ {
+ _createRequest = createRequest;
+ _prepareRequest = prepareRequest;
+ _proxyCache = proxyCache;
+ _credentialCache = credentialCache;
+ _credentialProvider = credentialProvider;
+ }
+
+ static void MakeCancelable (HttpWebRequest request, CancellationToken token)
+ {
+ if (token.CanBeCanceled)
+ token.Register (request.Abort);
+ }
+
+ public HttpWebResponse GetResponse(CancellationToken token)
+ {
+ _previousRequest = null;
+ _previousResponse = null;
+ _previousStatusCode = null;
+ _usingSTSAuth = false;
+ _continueIfFailed = true;
+ _proxyCredentialsRetryCount = 0;
+ _credentialsRetryCount = 0;
+ int failureCount = 0;
+ const int MaxFailureCount = 10;
+
+ while (true)
+ {
+ // Create the request
+ var request = (HttpWebRequest)_createRequest();
+ MakeCancelable (request, token);
+ ConfigureRequest(request);
+
+ try
+ {
+ var auth = request.Headers["Authorization"];
+ _basicAuthIsUsedInPreviousRequest = (auth != null)
+ && auth.StartsWith("Basic ", StringComparison.Ordinal);
+
+ // Prepare the request, we do something like write to the request stream
+ // which needs to happen last before the request goes out
+ _prepareRequest(request);
+
+ HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+
+ // Cache the proxy and credentials
+ _proxyCache.Add(request.Proxy);
+
+ ICredentials credentials = request.Credentials;
+ _credentialCache.Add(request.RequestUri, credentials);
+ _credentialCache.Add(response.ResponseUri, credentials);
+
+ return response;
+ }
+ catch (WebException ex)
+ {
+ ++failureCount;
+ if (failureCount >= MaxFailureCount)
+ {
+ throw;
+ }
+
+ using (IHttpWebResponse response = GetResponse(ex.Response))
+ {
+ if (response == null &&
+ ex.Status != WebExceptionStatus.SecureChannelFailure)
+ {
+ // No response, something went wrong so just rethrow
+ throw;
+ }
+
+ // Special case https connections that might require authentication
+ if (ex.Status == WebExceptionStatus.SecureChannelFailure)
+ {
+ if (_continueIfFailed)
+ {
+ // Act like we got a 401 so that we prompt for credentials on the next request
+ _previousStatusCode = HttpStatusCode.Unauthorized;
+ continue;
+ }
+ throw;
+ }
+
+ // If we were trying to authenticate the proxy or the request and succeeded, cache the result.
+ if (_previousStatusCode == HttpStatusCode.ProxyAuthenticationRequired &&
+ response.StatusCode != HttpStatusCode.ProxyAuthenticationRequired)
+ {
+ _proxyCache.Add(request.Proxy);
+ }
+ else if (_previousStatusCode == HttpStatusCode.Unauthorized &&
+ response.StatusCode != HttpStatusCode.Unauthorized)
+ {
+ _credentialCache.Add(request.RequestUri, request.Credentials);
+ _credentialCache.Add(response.ResponseUri, request.Credentials);
+ }
+
+ _usingSTSAuth = STSAuthHelper.TryRetrieveSTSToken(request.RequestUri, response);
+
+ if (!IsAuthenticationResponse(response) || !_continueIfFailed)
+ {
+ throw;
+ }
+
+ _previousRequest = request;
+ _previousResponse = response;
+ _previousStatusCode = _previousResponse.StatusCode;
+ }
+ }
+ }
+ }
+
+ private void ConfigureRequest(HttpWebRequest request)
+ {
+ request.Proxy = _proxyCache.GetProxy(request.RequestUri);
+ if (request.Proxy != null && request.Proxy.Credentials == null)
+ {
+ request.Proxy.Credentials = CredentialCache.DefaultCredentials;
+ }
+
+ if (_previousResponse == null || ShouldKeepAliveBeUsedInRequest(_previousRequest, _previousResponse))
+ {
+ // Try to use the cached credentials (if any, for the first request)
+ request.Credentials = _credentialCache.GetCredentials(request.RequestUri);
+
+ // If there are no cached credentials, use the default ones
+ if (request.Credentials == null)
+ {
+ request.UseDefaultCredentials = true;
+ }
+ }
+ else if (_previousStatusCode == HttpStatusCode.ProxyAuthenticationRequired)
+ {
+ request.Proxy.Credentials = _credentialProvider.GetCredentials(
+ request, CredentialType.ProxyCredentials, retrying: _proxyCredentialsRetryCount > 0);
+ _continueIfFailed = request.Proxy.Credentials != null;
+ _proxyCredentialsRetryCount++;
+ }
+ else if (_previousStatusCode == HttpStatusCode.Unauthorized)
+ {
+ SetCredentialsOnAuthorizationError(request);
+ }
+
+ SetKeepAliveHeaders(request, _previousResponse);
+ if (_usingSTSAuth)
+ {
+ // Add request headers if the server requires STS based auth.
+ STSAuthHelper.PrepareSTSRequest(request);
+ }
+
+ // Wrap the credentials in a CredentialCache in case there is a redirect
+ // and credentials need to be kept around.
+ request.Credentials = request.Credentials.AsCredentialCache(request.RequestUri);
+ }
+
+ private void SetCredentialsOnAuthorizationError(HttpWebRequest request)
+ {
+ if (_usingSTSAuth)
+ {
+ // If we are using STS, the auth's being performed by a request header.
+ // We do not need to ask the user for credentials at this point.
+ return;
+ }
+
+ bool basicAuth = _previousResponse.AuthType != null &&
+ _previousResponse.AuthType.IndexOf("Basic", StringComparison.OrdinalIgnoreCase) != -1;
+ if (basicAuth && !_basicAuthIsUsedInPreviousRequest)
+ {
+ // The basic auth credentials were not sent in the last request.
+ // We need to try with cached credentials in this request.
+ request.Credentials = _credentialCache.GetCredentials(request.RequestUri);
+ }
+
+ if (request.Credentials == null)
+ {
+ request.Credentials = _credentialProvider.GetCredentials(
+ request, CredentialType.RequestCredentials, retrying: _credentialsRetryCount > 0);
+ }
+
+ if (basicAuth)
+ {
+ // Add the Authorization header for basic authentication.
+ var networkCredentials = request.Credentials.GetCredential(request.RequestUri, "Basic");
+ if (networkCredentials != null)
+ {
+ string authInfo = networkCredentials.UserName + ":" + networkCredentials.Password;
+ authInfo = Convert.ToBase64String(System.Text.Encoding.Default.GetBytes(authInfo));
+ request.Headers["Authorization"] = "Basic " + authInfo;
+ }
+ }
+
+ _continueIfFailed = request.Credentials != null;
+ _credentialsRetryCount++;
+ }
+
+ private static IHttpWebResponse GetResponse(WebResponse response)
+ {
+ var httpWebResponse = response as IHttpWebResponse;
+ if (httpWebResponse == null)
+ {
+ var webResponse = response as HttpWebResponse;
+ if (webResponse == null)
+ {
+ return null;
+ }
+ return new HttpWebResponseWrapper(webResponse);
+ }
+
+ return httpWebResponse;
+ }
+
+ private static bool IsAuthenticationResponse(IHttpWebResponse response)
+ {
+ return response.StatusCode == HttpStatusCode.Unauthorized ||
+ response.StatusCode == HttpStatusCode.ProxyAuthenticationRequired;
+ }
+
+ private static void SetKeepAliveHeaders(HttpWebRequest request, IHttpWebResponse previousResponse)
+ {
+ // KeepAlive is required for NTLM and Kerberos authentication. If we've never been authenticated or are using a different auth, we
+ // should not require KeepAlive.
+ // REVIEW: The WWW-Authenticate header is tricky to parse so a Equals might not be correct.
+ if (previousResponse == null ||
+ !IsNtlmOrKerberos(previousResponse.AuthType))
+ {
+ // This is to work around the "The underlying connection was closed: An unexpected error occurred on a receive."
+ // exception.
+ request.KeepAlive = false;
+ request.ProtocolVersion = HttpVersion.Version10;
+ }
+ }
+
+ private static bool ShouldKeepAliveBeUsedInRequest(HttpWebRequest request, IHttpWebResponse response)
+ {
+ if (request == null)
+ {
+ throw new ArgumentNullException("request");
+ }
+
+ if (response == null)
+ {
+ throw new ArgumentNullException("response");
+ }
+
+ return !request.KeepAlive && IsNtlmOrKerberos(response.AuthType);
+ }
+
+ private static bool IsNtlmOrKerberos(string authType)
+ {
+ if (String.IsNullOrEmpty(authType))
+ {
+ return false;
+ }
+
+ return authType.IndexOf("NTLM", StringComparison.OrdinalIgnoreCase) != -1
+ || authType.IndexOf("Kerberos", StringComparison.OrdinalIgnoreCase) != -1;
+ }
+
+ private class HttpWebResponseWrapper : IHttpWebResponse
+ {
+ private readonly HttpWebResponse _response;
+ public HttpWebResponseWrapper(HttpWebResponse response)
+ {
+ _response = response;
+ }
+
+ public string AuthType
+ {
+ get
+ {
+ return _response.Headers[HttpResponseHeader.WwwAuthenticate];
+ }
+ }
+
+ public HttpStatusCode StatusCode
+ {
+ get
+ {
+ return _response.StatusCode;
+ }
+ }
+
+ public Uri ResponseUri
+ {
+ get
+ {
+ return _response.ResponseUri;
+ }
+ }
+
+ public NameValueCollection Headers
+ {
+ get
+ {
+ return _response.Headers;
+ }
+ }
+
+ public void Dispose()
+ {
+ if (_response != null)
+ {
+ _response.Close();
+ }
+ }
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/STSAuthHelper.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/STSAuthHelper.cs
new file mode 100644
index 0000000000..83dc43d972
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/STSAuthHelper.cs
@@ -0,0 +1,153 @@
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+using System.Net;
+using System.Globalization;
+using System.ServiceModel;
+using System.ServiceModel.Security;
+using System.Text;
+
+namespace MonoDevelop.Core.Web
+{
+ static class STSAuthHelper
+ {
+ /// <summary>
+ /// Response header that specifies the WSTrust13 Windows Transport endpoint.
+ /// </summary>
+ /// <remarks>
+ /// TODO: Is there a way to discover this \ negotiate this endpoint?
+ /// </remarks>
+ private const string STSEndPointHeader = "X-MonoDevelop-STS-EndPoint";
+
+ /// <summary>
+ /// Response header that specifies the realm to authenticate for. In most cases this would be the gallery we are going up against.
+ /// </summary>
+ private const string STSRealmHeader = "X-MonoDevelop-STS-Realm";
+
+ /// <summary>
+ /// Request header that contains the SAML token.
+ /// </summary>
+ private const string STSTokenHeader = "X-MonoDevelop-STS-Token";
+
+ /// <summary>
+ /// Adds the SAML token as a header to the request if it is already cached for this host.
+ /// </summary>
+ public static void PrepareSTSRequest(WebRequest request)
+ {
+ string cacheKey = GetCacheKey(request.RequestUri);
+ string token;
+ if (MemoryCache.Instance.TryGetValue(cacheKey, out token))
+ {
+ request.Headers[STSTokenHeader] = EncodeHeader(token);
+ }
+ }
+
+ /// <summary>
+ /// Attempts to retrieve a SAML token if the response indicates that server requires STS-based auth.
+ /// </summary>
+ /// <param name="requestUri">The feed URI we were connecting to.</param>
+ /// <param name="response">The 401 response we receieved from the server.</param>
+ /// <returns>True if we were able to successfully retrieve a SAML token from the STS specified in the response headers.</returns>
+ public static bool TryRetrieveSTSToken(Uri requestUri, IHttpWebResponse response)
+ {
+ if (response.StatusCode != HttpStatusCode.Unauthorized)
+ {
+ // We only care to do STS auth if the server returned a 401
+ return false;
+ }
+
+ string endPoint = GetSTSEndPoint(response);
+ string realm = response.Headers[STSRealmHeader];
+ if (String.IsNullOrEmpty(endPoint) || String.IsNullOrEmpty(realm))
+ {
+ // The server does not conform to our STS-auth requirements.
+ return false;
+ }
+
+ string cacheKey = GetCacheKey(requestUri);
+
+ // TODO: We need to figure out a way to cache the token for the duration of the token's validity (which is available as part of it's result).
+ MemoryCache.Instance.GetOrAdd(cacheKey,
+ () => GetSTSToken(requestUri, endPoint, realm),
+ TimeSpan.FromMinutes(30),
+ absoluteExpiration: true);
+ return true;
+ }
+
+ private static string GetSTSToken(Uri requestUri, string endPoint, string appliesTo)
+ {
+ var typeProvider = WIFTypeProvider.GetWIFTypes();
+ if (typeProvider == null)
+ {
+ throw new InvalidOperationException (
+ String.Format (
+ CultureInfo.CurrentCulture,
+ "Connection to feed '{0}' requires the Windows Identity Foundation runtime to be installed.",
+ requestUri
+ )
+ );
+ }
+
+ var binding = new WS2007HttpBinding(SecurityMode.Transport);
+ dynamic factory = Activator.CreateInstance(typeProvider.ChannelFactory, binding, endPoint);
+ factory.TrustVersion = TrustVersion.WSTrust13;
+
+ // Check if we can create 4.5 types.
+ dynamic rst = Activator.CreateInstance(typeProvider.RequestSecurityToken);
+ rst.RequestType = GetFieldValue<string>(typeProvider.RequestTypes, "Issue");
+ rst.KeyType = GetFieldValue<string>(typeProvider.KeyTypes, "Bearer");
+
+ // Dynamic verifies the type of the instance so we cannot use it to assign a value for this property.
+ var endPointAddress = Activator.CreateInstance(typeProvider.EndPoint, appliesTo);
+ SetProperty(rst, "AppliesTo", endPointAddress);
+
+ dynamic channel = factory.CreateChannel();
+ dynamic securityToken = channel.Issue(rst);
+ return securityToken.TokenXml.OuterXml;
+ }
+
+ private static void SetProperty(object instance, string propertyName, object value)
+ {
+ var type = instance.GetType();
+ var property = type.GetProperty(propertyName);
+
+ var propertySetter = property.GetSetMethod();
+ propertySetter.Invoke(instance, new[] { value });
+ }
+
+ private static TVal GetFieldValue<TVal>(Type type, string fieldName)
+ {
+ return (TVal)type.GetField(fieldName).GetValue(obj: null);
+ }
+
+ private static string GetSTSEndPoint(IHttpWebResponse response)
+ {
+ return response.Headers[STSEndPointHeader].SafeTrim();
+ }
+
+ private static string GetCacheKey(Uri requestUri)
+ {
+ return STSTokenHeader + "|" + requestUri.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped);
+ }
+
+ private static string EncodeHeader(string token)
+ {
+ return Convert.ToBase64String(Encoding.UTF8.GetBytes(token));
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/StringExtensions.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/StringExtensions.cs
new file mode 100644
index 0000000000..e7f892380d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/StringExtensions.cs
@@ -0,0 +1,29 @@
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+
+namespace MonoDevelop.Core.Web
+{
+ static class StringExtensions
+ {
+ public static string SafeTrim(this string value)
+ {
+ return value == null ? null : value.Trim();
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/Utility.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/Utility.cs
deleted file mode 100644
index 5c2aeb392a..0000000000
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/Utility.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-using System.Net;
-
-namespace MonoDevelop.Core.Web
-{
- public static class Utility
- {
- static readonly string[] AuthenticationSchemes = { "Basic", "NTLM", "Negotiate" };
-
- public static NetworkCredential GetCredentialsForUriFromICredentials (Uri uri, ICredentials credentials)
- {
- if (credentials == null)
- return null;
-
- NetworkCredential cred = null;
- foreach (var scheme in AuthenticationSchemes) {
- cred = credentials.GetCredential (uri, scheme);
- if (cred != null)
- break;
- }
-
- return cred;
- }
- }
-} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WIFTypeProvider.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WIFTypeProvider.cs
new file mode 100644
index 0000000000..e3417894ac
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WIFTypeProvider.cs
@@ -0,0 +1,163 @@
+//
+// From NuGet src/Core
+//
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+
+namespace MonoDevelop.Core.Web
+{
+ abstract class WIFTypeProvider
+ {
+ public abstract Type ChannelFactory { get; }
+
+ public abstract Type RequestSecurityToken { get; }
+
+ public abstract Type EndPoint { get; }
+
+ public abstract Type RequestTypes { get; }
+
+ public abstract Type KeyTypes { get; }
+
+ protected abstract string AssemblyName { get; }
+
+ public static WIFTypeProvider GetWIFTypes()
+ {
+ // First attempt to look up the 4.5 types
+ WIFTypeProvider wifProvider = new WIFTypes45();
+ if (wifProvider.ChannelFactory != null)
+ {
+ return wifProvider;
+ }
+
+ // We could be on 4.0 with the SDK \ WIF Runtime installed.
+ wifProvider = new WIFTypes40();
+ if (wifProvider.ChannelFactory != null)
+ {
+ return wifProvider;
+ }
+ return null;
+ }
+
+ protected string QualifyTypeName(string typeName)
+ {
+ return typeName + ',' + AssemblyName;
+ }
+
+ private sealed class WIFTypes40 : WIFTypeProvider
+ {
+ public override Type ChannelFactory
+ {
+ get
+ {
+ string typeName = QualifyTypeName("Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannelFactory");
+ return Type.GetType(typeName);
+ }
+ }
+
+ public override Type RequestSecurityToken
+ {
+ get
+ {
+ string typeName = QualifyTypeName("Microsoft.IdentityModel.Protocols.WSTrust.RequestSecurityToken");
+ return Type.GetType(typeName);
+ }
+ }
+
+ public override Type EndPoint
+ {
+ get
+ {
+ return typeof(System.ServiceModel.EndpointAddress);
+ }
+ }
+
+ public override Type RequestTypes
+ {
+ get
+ {
+ string typeName = QualifyTypeName("Microsoft.IdentityModel.SecurityTokenService.RequestTypes");
+ return Type.GetType(typeName);
+ }
+ }
+
+ public override Type KeyTypes
+ {
+ get
+ {
+ string typeName = QualifyTypeName("Microsoft.IdentityModel.SecurityTokenService.KeyTypes");
+ return Type.GetType(typeName);
+ }
+ }
+
+ protected override string AssemblyName
+ {
+ get { return "Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; }
+ }
+ }
+
+ private sealed class WIFTypes45 : WIFTypeProvider
+ {
+ public override Type ChannelFactory
+ {
+ get
+ {
+ return Type.GetType("System.ServiceModel.Security.WSTrustChannelFactory, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
+ }
+ }
+
+ public override Type RequestSecurityToken
+ {
+ get
+ {
+ string typeName = QualifyTypeName("System.IdentityModel.Protocols.WSTrust.RequestSecurityToken");
+ return Type.GetType(typeName);
+ }
+ }
+
+ public override Type EndPoint
+ {
+ get
+ {
+ string typeName = QualifyTypeName("System.IdentityModel.Protocols.WSTrust.EndpointReference");
+ return Type.GetType(typeName);
+ }
+ }
+
+ public override Type RequestTypes
+ {
+ get
+ {
+ string typeName = QualifyTypeName("System.IdentityModel.Protocols.WSTrust.RequestTypes");
+ return Type.GetType(typeName);
+ }
+ }
+
+ public override Type KeyTypes
+ {
+ get
+ {
+ string typeName = QualifyTypeName("System.IdentityModel.Protocols.WSTrust.KeyTypes");
+ return Type.GetType(typeName);
+ }
+ }
+
+ protected override string AssemblyName
+ {
+ get { return "System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"; }
+ }
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WebService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WebService.cs
deleted file mode 100644
index 377e6c80a2..0000000000
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Web/WebService.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// WebService.cs
-//
-// Author:
-// Bojan Rajkovic <bojan.rajkovic@xamarin.com>
-//
-// Copyright (c) 2013 Xamarin Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Linq;
-
-using Mono.Addins;
-using System.Net;
-
-namespace MonoDevelop.Core.Web
-{
- public static class WebService
- {
- const string WebCredentialProvidersPath = "/MonoDevelop/Core/WebCredentialProviders";
-
- public static IProxyCache ProxyCache { get; private set; }
- public static ICredentialCache CredentialCache { get; private set; }
- public static ICredentialProvider CredentialProvider { get; private set; }
-
- internal static void Initialize ()
- {
- CredentialCache = new CredentialStore ();
- ProxyCache = new ProxyCache ();
- CredentialProvider = AddinManager.GetExtensionObjects<ICredentialProvider> (WebCredentialProvidersPath).FirstOrDefault ();
-
- if (CredentialProvider == null) {
- LoggingService.LogWarning ("No proxy credential provider was found");
-
- }
- }
-
- class NullCredentialsProvider : ICredentialProvider
- {
- public ICredentials GetCredentials (
- Uri uri, IWebProxy proxy, CredentialType credentialType, ICredentials existingCredentials, bool retrying)
- {
- return null;
- }
- }
- }
-}
-
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml
index 8a3dc695be..f91a6b60eb 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.addin.xml
@@ -144,6 +144,14 @@
<ExtensionPoint path = "/MonoDevelop/ProjectModel/MSBuildImportProviders" name = "MSBuild Import Providers">
<ExtensionNode objectType="MonoDevelop.Projects.Formats.MSBuild.IMSBuildImportProvider"/>
</ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/MSBuildGlobalPropertyProviders" name = "MSBuild Global Property Providers">
+ <ExtensionNode objectType="MonoDevelop.Projects.Formats.MSBuild.IMSBuildGlobalPropertyProvider"/>
+ </ExtensionPoint>
+
+ <ExtensionPoint path = "/MonoDevelop/ProjectModel/MSBuildExtensions" name = "MSBuild Extensions">
+ <ExtensionNode name="Class" objectType="MonoDevelop.Projects.Formats.MSBuild.MSBuildExtension"/>
+ </ExtensionPoint>
<ExtensionPoint path = "/MonoDevelop/ProjectModel/MonoDocSources" name = "MonoDoc Sources">
<ExtensionNode name="Source" type="MonoDevelop.Projects.Extensions.MonoDocSourceNode" />
@@ -215,6 +223,7 @@
<ProjectBinding id = "DotNet" class = "MonoDevelop.Projects.DotNetProjectBinding" />
<ProjectBinding id = "GenericProject" class = "MonoDevelop.Projects.GenericProjectBinding" />
<ProjectBinding id = "PortableDotNet" class = "MonoDevelop.Projects.PortableDotNetProjectBinding" />
+ <ProjectBinding id = "SharedAssetsProject" class = "MonoDevelop.Projects.SharedAssetsProjects.SharedAssetsProjectBinding" />
</Extension>
<Extension path = "/MonoDevelop/ProjectModel/FileFormats">
@@ -269,8 +278,17 @@
<SolutionItem guid = "{8BC9CEB9-8B4A-11D0-8D11-00A0C91BC942}"
type = "MonoDevelop.Projects.CompiledAssemblyProject"
handlerType = "MonoDevelop.Projects.Formats.MSBuild.CompiledAssemblyProjectMSBuildHandler" />
+ <SolutionItem guid = "{D954291E-2A0B-460D-934E-DC6B0785DB48}"
+ type = "MonoDevelop.Projects.SharedAssetsProjects.SharedAssetsProject"
+ extension = "shproj"
+ handlerType = "MonoDevelop.Projects.SharedAssetsProjects.SharedAssetsProjectMSBuildHandler" />
</Extension>
-
+
+ <Extension path = "/MonoDevelop/ProjectModel/MSBuildExtensions">
+ <Class class="MonoDevelop.Projects.SharedAssetsProjects.SharedAssetsProjectMSBuildExtension"/>
+ </Extension>
+
+
<!--
Some info from:
http://www.mztools.com/articles/2008/mz2008017.aspx
@@ -302,6 +320,7 @@
<ProjectType guid = "{4925A630-B079-445d-BCD4-3A9C94FE9307}" name = "F#" extension="fsproj" addin = "F#" />
<ProjectType guid = "{F2A71F9B-5D33-465A-A702-920D77279786}" name = "F#" extension="fsproj" addin = "F#" />
<ProjectType guid = "{C089C8C0-30E0-4E22-80C0-CE093F111A43}" name = "Windows Phone" />
+ <ProjectType guid = "{76F1466A-8B6D-4E39-A767-685A06062A39}" name = "Windows Phone" />
<ProjectType guid = "{E24C65DC-7377-472B-9ABA-BC803B73C61A}" name = "ASP.NET Web Site" />
<ProjectType guid = "{F135691A-BF7E-435D-8960-F99683D2D49C}" name = "MS Distributed System" loadFiles="False" />
<ProjectType guid = "{3D9AD99F-2412-4246-B90B-4EAA41C64699}" name = "Windows Communication Foundation (WCF)" />
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
index 3ff9a31329..a088fd94b8 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.csproj
@@ -85,9 +85,10 @@
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
+ <Reference Include="System.ServiceModel" />
+ <Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
- <Compile Include="MonoDevelop.Core.Web\Utility.cs" />
<Compile Include="MonoDevelop.Core\StringParserService.cs" />
<Compile Include="MonoDevelop.Core\UserException.cs" />
<Compile Include="MonoDevelop.Core\Runtime.cs" />
@@ -443,26 +444,41 @@
<Compile Include="MonoDevelop.Core.Execution\DotNetCommandFactory.cs" />
<Compile Include="BuildVariables.cs" />
<Compile Include="AddinInfo.cs" />
+ <Compile Include="MonoDevelop.Core.Logging\AssertLoggingTraceListener.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MD1\MD1ProjectService.cs" />
+ <Compile Include="MonoDevelop.Projects\UnknownProject.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildExtension.cs" />
+ <Compile Include="MonoDevelop.Projects.SharedAssetsProjects\SharedAssetsProject.cs" />
+ <Compile Include="MonoDevelop.Projects.SharedAssetsProjects\SharedAssetsProjectMSBuildExtension.cs" />
+ <Compile Include="MonoDevelop.Projects.SharedAssetsProjects\SharedAssetsProjectMSBuildHandler.cs" />
+ <Compile Include="MonoDevelop.Projects.SharedAssetsProjects\SharedAssetsProjectBinding.cs" />
+ <Compile Include="MonoDevelop.Core\WebRequestHelper.cs" />
+ <Compile Include="MonoDevelop.Core.Web\IProxyAuthenticationHandler.cs" />
<Compile Include="MonoDevelop.Core.Web\CredentialStore.cs" />
<Compile Include="MonoDevelop.Core.Web\CredentialType.cs" />
<Compile Include="MonoDevelop.Core.Web\ICredentialCache.cs" />
<Compile Include="MonoDevelop.Core.Web\ICredentialProvider.cs" />
+ <Compile Include="MonoDevelop.Core.Web\IHttpWebResponse.cs" />
<Compile Include="MonoDevelop.Core.Web\IProxyCache.cs" />
+ <Compile Include="MonoDevelop.Core.Web\MemoryCache.cs" />
+ <Compile Include="MonoDevelop.Core.Web\NullCredentialProvider.cs" />
<Compile Include="MonoDevelop.Core.Web\ProxyCache.cs" />
<Compile Include="MonoDevelop.Core.Web\RequestHelper.cs" />
- <Compile Include="MonoDevelop.Core.Web\IHttpWebResponse.cs" />
+ <Compile Include="MonoDevelop.Core.Web\StringExtensions.cs" />
+ <Compile Include="MonoDevelop.Core.Web\STSAuthHelper.cs" />
+ <Compile Include="MonoDevelop.Core.Web\WIFTypeProvider.cs" />
<Compile Include="MonoDevelop.Core.Web\CredentialProviderExtensions.cs" />
- <Compile Include="MonoDevelop.Core.Web\WebService.cs" />
- <Compile Include="MonoDevelop.Core.Logging\AssertLoggingTraceListener.cs" />
- <Compile Include="MonoDevelop.Projects.Formats.MD1\MD1ProjectService.cs" />
- <Compile Include="MonoDevelop.Projects\UnknownProject.cs" />
<Compile Include="MonoDevelop.Core.Text\ISegment.cs" />
<Compile Include="MonoDevelop.Core.Text\UnicodeNewLine.cs" />
<Compile Include="MonoDevelop.Core.Text\ITextSource.cs" />
<Compile Include="MonoDevelop.Core.Text\TextChangeEventArgs.cs" />
<Compile Include="MonoDevelop.Core.Text\StringTextSource.cs" />
<Compile Include="MonoDevelop.Core.Text\TextFileUtility.cs" />
- <Compile Include="MonoDevelop.Core.Text\ITextSourceVersion.cs" />
+ <Compile Include="MonoDevelop.Core.Text\ITextSourceVersion.cs" />
+ <Compile Include="MonoDevelop.Core.Execution\IDebugConsole.cs" />
+ <Compile Include="MonoDevelop.Projects\IDotNetFileContainer.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\IMSBuildGlobalPropertyProvider.cs" />
+ <Compile Include="MonoDevelop.Projects\DotNetProjectImport.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
@@ -500,11 +516,6 @@
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild">
- <MakeDir Directories="$(OutputPath)" />
- <Exec Command="&quot;$(Git)&quot; rev-parse HEAD &gt; $(BuildInfo)" WorkingDirectory="$(MSBuildProjectDirectory)" IgnoreExitCode="True" />
- <Exec Command="&quot;$(Git)&quot; rev-parse HEAD &gt; $(VcRevision)" WorkingDirectory="$(MSBuildProjectDirectory)" IgnoreExitCode="True" />
- </Target>
<ItemGroup>
<ProjectReference Include="..\MonoDevelop.Projects.Formats.MSBuild\MonoDevelop.Projects.Formats.MSBuild.csproj">
<Project>{A437F1A3-78DF-4F00-8053-D32A8B1EB679}</Project>
@@ -566,11 +577,14 @@
</Content>
</ItemGroup>
<ItemGroup>
- <Folder Include="MonoDevelop.Core.Web\" />
+ <Folder Include="MonoDevelop.Projects.SharedAssetsProjects\" />
</ItemGroup>
- <Target Name="BeforeBuild" Inputs="BuildVariables.cs.in; ..\..\..\..\version.config" Outputs="BuildVariables.cs">
+ <Target Name="BeforeBuild" Inputs="BuildVariables.cs.in; $(MSBuildProjectDirectory)\..\..\..\..\version.config" Outputs="BuildVariables.cs">
<Csc Sources="BuildVariables.gen.cs" OutputAssembly="BuildVariables.gen.exe" />
<Exec Command="$(MonoLauncher)$(MSBuildProjectDirectory)\BuildVariables.gen.exe ." WorkingDirectory="$(MSBuildProjectDirectory)" />
<Delete Files="BuildVariables.gen.exe" />
+ <MakeDir Directories="$(OutputPath)" />
+ <Exec Command="&quot;$(Git)&quot; rev-parse HEAD &gt; $(BuildInfo)" WorkingDirectory="$(MSBuildProjectDirectory)" IgnoreExitCode="True" />
+ <Exec Command="&quot;$(Git)&quot; rev-parse HEAD &gt; $(VcRevision)" WorkingDirectory="$(MSBuildProjectDirectory)" IgnoreExitCode="True" />
</Target>
</Project>
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs
index 47cf5433f1..b15350f37b 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FilePath.cs
@@ -70,7 +70,7 @@ namespace MonoDevelop.Core
public bool IsDirectory {
get {
- return File.GetAttributes (FullPath).HasFlag(FileAttributes.Directory);
+ return Directory.Exists (FullPath);
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
index f71406d752..044704ec37 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
@@ -240,16 +240,11 @@ namespace MonoDevelop.Core
}
}
- [Obsolete ("Replaced by RequestFileEdit(fileName,throwIfFails)")]
- public static bool RequestFileEdit (string fileName)
- {
- return RequestFileEdit (fileName, false);
- }
-
/// <summary>
/// Requests permission for modifying a file
/// </summary>
/// <param name="fileName">The file to be modified</param>
+ /// <param name="throwIfFails">If set to false, it will catch the exception that would've been thrown.</param>
/// <remarks>This method must be called before trying to write any file. It throws an exception if permission is not granted.</remarks>
public static bool RequestFileEdit (FilePath fileName, bool throwIfFails = true)
{
@@ -468,7 +463,7 @@ namespace MonoDevelop.Core
public static bool IsDirectory (string filename)
{
- return Directory.Exists (filename) && (File.GetAttributes (filename) & FileAttributes.Directory) != 0;
+ return Directory.Exists (filename);
}
public static string GetFullPath (string path)
@@ -584,16 +579,6 @@ namespace MonoDevelop.Core
}
/// <summary>
- /// Creates a directory if it does not already exist.
- /// </summary>
- [Obsolete("Use Directory.CreateDirectory")]
- public static void EnsureDirectoryExists (string directory)
- {
- if (!Directory.Exists (directory))
- Directory.CreateDirectory (directory);
- }
-
- /// <summary>
/// Makes the path separators native.
/// </summary>
public static string MakePathSeparatorsNative (string path)
@@ -671,111 +656,72 @@ namespace MonoDevelop.Core
}
public static Task<bool> UpdateDownloadedCacheFile (string url, string cacheFile,
- Func<Stream,bool> validateDownload = null, CancellationToken ct = new CancellationToken ())
+ Func<Stream,bool> validateDownload = null, CancellationToken ct = default (CancellationToken))
{
- var tcs = new TaskCompletionSource<bool> ();
-
- //HACK: .NET blocks on DNS in BeginGetResponse, so use a threadpool thread
- // see http://stackoverflow.com/questions/1232139#1232930
- System.Threading.ThreadPool.QueueUserWorkItem ((state) => {
- var request = (HttpWebRequest)WebRequest.Create (url);
-
- try {
+ return WebRequestHelper.GetResponseAsync (
+ () => (HttpWebRequest)WebRequest.Create (url),
+ r => {
//check to see if the online file has been modified since it was last downloaded
var localNewsXml = new FileInfo (cacheFile);
if (localNewsXml.Exists)
- request.IfModifiedSince = localNewsXml.LastWriteTime;
-
- request.BeginGetResponse (HandleResponse, new CacheFileDownload {
- Request = request,
- Url = url,
- CacheFile = cacheFile,
- ValidateDownload = validateDownload,
- CancellationToken = ct,
- Tcs = tcs,
- });
- } catch (Exception ex) {
- tcs.SetException (ex);
- }
- });
-
- return tcs.Task;
- }
-
- class CacheFileDownload
- {
- public HttpWebRequest Request;
- public string CacheFile, Url;
- public Func<Stream,bool> ValidateDownload;
- public CancellationToken CancellationToken;
- public TaskCompletionSource<bool> Tcs;
- }
-
- static void HandleResponse (IAsyncResult ar)
- {
- var c = (CacheFileDownload) ar.AsyncState;
- bool deleteTempFile = true;
- var tempFile = c.CacheFile + ".temp";
-
- try {
- if (c.CancellationToken.IsCancellationRequested)
- c.Tcs.TrySetCanceled ();
+ r.IfModifiedSince = localNewsXml.LastWriteTime;
+ },
+ ct
+ ).ContinueWith (t => {
+ bool deleteTempFile = true;
+ var tempFile = cacheFile + ".temp";
try {
- //TODO: limit this size in case open wifi hotspots provide bad data
- var response = (HttpWebResponse) c.Request.EndGetResponse (ar);
+ ct.ThrowIfCancellationRequested ();
+
+ if (t.IsFaulted) {
+ var wex = t.Exception.Flatten ().InnerException as WebException;
+ if (wex != null) {
+ var resp = wex.Response as HttpWebResponse;
+ if (resp != null && resp.StatusCode == HttpStatusCode.NotModified)
+ return false;
+ }
+ }
+
+ //TODO: limit this size in case open wifi hotspots provide junk data
+ var response = t.Result;
if (response.StatusCode == HttpStatusCode.OK) {
using (var fs = File.Create (tempFile))
- response.GetResponseStream ().CopyTo (fs, 2048);
+ response.GetResponseStream ().CopyTo (fs, 2048);
}
- } catch (WebException wex) {
- var httpResp = wex.Response as HttpWebResponse;
- if (httpResp != null) {
- if (httpResp.StatusCode == HttpStatusCode.NotModified) {
- c.Tcs.TrySetResult (false);
- return;
- }
- //is this valid? should we just return the WebException directly?
- else if (httpResp.StatusCode == HttpStatusCode.NotFound) {
- c.Tcs.TrySetException (new FileNotFoundException ("File not found on server", c.Url, wex));
- return;
+
+ //check the document is valid, might get bad ones from wifi hotspots etc
+ if (validateDownload != null) {
+ ct.ThrowIfCancellationRequested ();
+
+ using (var f = File.OpenRead (tempFile)) {
+ bool validated;
+ try {
+ validated = validateDownload (f);
+ } catch (Exception ex) {
+ throw new Exception ("Failed to validate downloaded file", ex);
+ }
+ if (!validated) {
+ throw new Exception ("Failed to validate downloaded file");
+ }
}
}
- throw;
- }
- //check the document is valid, might get bad ones from wifi hotspots etc
- if (c.ValidateDownload != null) {
- if (c.CancellationToken.IsCancellationRequested)
- c.Tcs.TrySetCanceled ();
+ ct.ThrowIfCancellationRequested ();
- using (var f = File.OpenRead (tempFile)) {
+ SystemRename (tempFile, cacheFile);
+ deleteTempFile = false;
+ return true;
+ } finally {
+ if (deleteTempFile) {
try {
- if (!c.ValidateDownload (f)) {
- c.Tcs.TrySetException (new Exception ("Failed to validate downloaded file"));
- return;
- }
+ File.Delete (tempFile);
} catch (Exception ex) {
- c.Tcs.TrySetException (new Exception ("Failed to validate downloaded file", ex));
+ LoggingService.LogError ("Failed to delete temp download file", ex);
}
}
}
-
- if (c.CancellationToken.IsCancellationRequested)
- c.Tcs.TrySetCanceled ();
-
- SystemRename (tempFile, c.CacheFile);
- deleteTempFile = false;
- c.Tcs.TrySetResult (true);
- } catch (Exception ex) {
- c.Tcs.TrySetException (ex);
- } finally {
- if (deleteTempFile) {
- try {
- File.Delete (tempFile);
- } catch {}
- }
- }
+ }, ct);
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
index 1a1fe87cf2..1bcbd46c3e 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/LoggingService.cs
@@ -126,11 +126,6 @@ namespace MonoDevelop.Core
set { PropertyService.Set (ReportUsageKey, value); }
}
- [Obsolete ("Use CreateLogFile")]
- public static DateTime LogTimestamp {
- get { return timestamp; }
- }
-
/// <summary>
/// Creates a session log file with the given identifier.
/// </summary>
@@ -203,13 +198,14 @@ namespace MonoDevelop.Core
internal static void ReportUnhandledException (Exception ex, bool willShutDown, bool silently, string tag)
{
- var tags = new List<string> { tag };
+ try {
+ var tags = new List<string> { tag };
- if (reporting)
- return;
+ if (reporting)
+ return;
+
+ reporting = true;
- reporting = true;
- try {
var oldReportCrashes = ReportCrashes;
if (UnhandledErrorOccured != null && !silently)
@@ -226,7 +222,12 @@ namespace MonoDevelop.Core
#if ENABLE_RAYGUN
if (raygunClient != null) {
ThreadPool.QueueUserWorkItem (delegate {
- raygunClient.Send (ex, tags, customData, Runtime.Version.ToString ());
+ try {
+ raygunClient.Send (ex, tags, customData, Runtime.Version.ToString ());
+ } catch {
+ // If we get here then things have gone really wrong - we can't log anything or
+ // attempt to report anything. Drop any exception that ends up here.
+ }
});
}
#endif
@@ -236,6 +237,10 @@ namespace MonoDevelop.Core
PropertyService.SaveProperties ();
}
+ } catch {
+ // I don't know if we can/should try to log this. I'm going to guess that we don't want to
+ // and can't safely call any LoggingService.Log methods anyway in case we'd recurse, though
+ // the 'reporting' boolean should take care of that.
} finally {
reporting = false;
}
@@ -276,19 +281,22 @@ namespace MonoDevelop.Core
}
}
+ static MonoDevelop.Core.ProgressMonitoring.LogTextWriter stderr;
+ static MonoDevelop.Core.ProgressMonitoring.LogTextWriter stdout;
+ static TextWriter writer;
static void RedirectOutputToFileWindows ()
{
- var writer = CreateLogFile ("Ide");
+ writer = CreateLogFile ("Ide");
if (writer == Console.Out)
return;
- var stderr = new MonoDevelop.Core.ProgressMonitoring.LogTextWriter ();
+ stderr = new MonoDevelop.Core.ProgressMonitoring.LogTextWriter ();
stderr.ChainWriter (Console.Error);
stderr.ChainWriter (writer);
defaultError = Console.Error;
Console.SetError (stderr);
- var stdout = new MonoDevelop.Core.ProgressMonitoring.LogTextWriter ();
+ stdout = new MonoDevelop.Core.ProgressMonitoring.LogTextWriter ();
stdout.ChainWriter (Console.Out);
stdout.ChainWriter (writer);
defaultOut = Console.Out;
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/MacSystemInformation.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/MacSystemInformation.cs
index 3ef2206863..1579d1ccb8 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/MacSystemInformation.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/MacSystemInformation.cs
@@ -30,6 +30,8 @@ namespace MonoDevelop.Core
{
public class MacSystemInformation : UnixSystemInformation
{
+ public static readonly Version Yosemite = new Version (10, 10);
+ public static readonly Version Mavericks = new Version (10, 9);
public static readonly Version MountainLion = new Version (10, 8);
public static readonly Version Lion = new Version (10, 7);
public static readonly Version SnowLeopard = new Version (10, 6);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs
index cbbe9ac21a..282b03f585 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/PropertyService.cs
@@ -233,7 +233,7 @@ namespace MonoDevelop.Core
{
Debug.Assert (properties != null);
var prefsPath = UserProfile.Current.ConfigDir.Combine (FileName);
- FileService.EnsureDirectoryExists (prefsPath.ParentDirectory);
+ Directory.CreateDirectory (prefsPath.ParentDirectory);
properties.Save (prefsPath);
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs
index e4d383b564..653f215e61 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs
@@ -113,7 +113,9 @@ namespace MonoDevelop.Core
Counters.RuntimeInitialization.Trace ("Initialized Addin Manager");
PropertyService.Initialize ();
- WebService.Initialize ();
+
+ WebRequestHelper.Initialize ();
+ Mono.Addins.Setup.WebRequestHelper.SetRequestHandler (WebRequestHelper.GetResponse);
//have to do this after the addin service and property service have initialized
if (UserDataMigrationService.HasSource) {
@@ -266,9 +268,7 @@ namespace MonoDevelop.Core
get {
if (version == null) {
version = new Version (BuildInfo.Version);
- #pragma warning disable 618
var relId = SystemInformation.GetReleaseId ();
- #pragma warning restore 618
if (relId != null && relId.Length >= 9) {
int rev;
int.TryParse (relId.Substring (relId.Length - 4), out rev);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs
index 0ab0f046f7..4f24adf7b1 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/SystemInformation.cs
@@ -119,10 +119,8 @@ namespace MonoDevelop.Core
};
}
- [Obsolete ("Use Runtime.Version")]
- public static string GetReleaseId ()
+ internal static string GetReleaseId ()
{
- // Change to internal
var biFile = ((FilePath)Assembly.GetEntryAssembly ().Location).ParentDirectory.Combine ("buildinfo");
if (File.Exists (biFile)) {
var line = File.ReadAllLines (biFile).Select (l => l.Split (':')).FirstOrDefault (a => a.Length > 1 && a [0].Trim () == "Release ID");
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs
index aaaedf3a03..89acf31bd7 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserDataMigrationService.cs
@@ -146,7 +146,7 @@ namespace MonoDevelop.Core
LoggingService.LogInfo ("Migrating '{0}' to '{1}'", source, target);
if (!sourceIsDirectory)
- FileService.EnsureDirectoryExists (target.ParentDirectory);
+ Directory.CreateDirectory (target.ParentDirectory);
var handler = node.GetHandler ();
if (handler != null) {
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserProfile.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserProfile.cs
index 35c1e8e113..84f6e61dea 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserProfile.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/UserProfile.cs
@@ -41,7 +41,8 @@ namespace MonoDevelop.Core
"2.7",
"2.8",
"3.0",
- "4.0"
+ "4.0",
+ "5.0"
};
static UserProfile ()
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/WebRequestHelper.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/WebRequestHelper.cs
new file mode 100644
index 0000000000..0fa710e677
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/WebRequestHelper.cs
@@ -0,0 +1,196 @@
+//
+// WebRequestHelper.cs
+//
+// Author:
+// Bojan Rajkovic <bojan.rajkovic@xamarin.com>
+// Michael Hutchinson <mhutch@xamarin.com>
+//
+// based on NuGet src/Core/Http/RequestHelper.cs
+//
+// Copyright (c) 2013-2014 Xamarin Inc.
+// Copyright (c) 2010-2014 Outercurve Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+using System;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+using MonoDevelop.Core.Web;
+using Mono.Addins;
+using System.Linq;
+
+namespace MonoDevelop.Core
+{
+ /// <summary>
+ /// Helper for making web requests with support for authenticated proxies.
+ /// </summary>
+ public static class WebRequestHelper
+ {
+ const string WebCredentialProvidersPath = "/MonoDevelop/Core/WebCredentialProviders";
+
+ static ProxyCache proxyCache;
+ static ICredentialProvider credentialProvider;
+
+ internal static void Initialize ()
+ {
+ proxyCache = new ProxyCache ();
+ credentialProvider = AddinManager.GetExtensionObjects<ICredentialProvider> (WebCredentialProvidersPath).FirstOrDefault ();
+
+ if (credentialProvider != null) {
+ credentialProvider = new CachingCredentialProvider (credentialProvider);
+ } else {
+ LoggingService.LogWarning ("No proxy credential provider was found");
+ credentialProvider = new NullCredentialProvider ();
+ }
+ }
+
+ public static ICredentialProvider CredentialProvider { get { return credentialProvider; } }
+
+ [Obsolete]
+ public static IProxyAuthenticationHandler ProxyAuthenticationHandler { get; internal set; }
+
+ /// <summary>
+ /// Gets the web response, using the <see cref="ProxyAuthenticationHandler"/> to handle proxy authentication
+ /// if necessary.
+ /// </summary>
+ /// <returns>The response.</returns>
+ /// <param name="createRequest">Callback for creating the request.</param>
+ /// <param name="prepareRequest">Callback for preparing the request, e.g. writing the request stream.</param>
+ /// <param name="token">Cancellation token.</param>
+ /// <remarks>
+ /// Keeps sending requests until a response code that doesn't require authentication happens or if the request
+ /// requires authentication and the user has stopped trying to enter them (i.e. they hit cancel when they are prompted).
+ /// </remarks>
+ public static Task<HttpWebResponse> GetResponseAsync (
+ Func<HttpWebRequest> createRequest,
+ Action<HttpWebRequest> prepareRequest = null,
+ CancellationToken token = default(CancellationToken))
+ {
+ //TODO: make this really async under the covers
+ return Task.Factory.StartNew (() => GetResponse (createRequest, prepareRequest, token), token);
+ }
+
+ /// <summary>
+ /// Gets the web response, using the <see cref="ProxyAuthenticationHandler"/> to handle proxy authentication
+ /// if necessary.
+ /// </summary>
+ /// <returns>The response.</returns>
+ /// <param name="createRequest">Callback for creating the request.</param>
+ /// <param name="prepareRequest">Callback for preparing the request, e.g. writing the request stream.</param>
+ /// <param name="token">Cancellation token.</param>
+ /// <remarks>
+ /// Keeps sending requests until a response code that doesn't require authentication happens or if the request
+ /// requires authentication and the user has stopped trying to enter them (i.e. they hit cancel when they are prompted).
+ /// </remarks>
+ public static HttpWebResponse GetResponse (
+ Func<HttpWebRequest> createRequest,
+ Action<HttpWebRequest> prepareRequest = null,
+ CancellationToken token = default(CancellationToken))
+ {
+ if (prepareRequest == null) {
+ prepareRequest = r => {};
+ }
+
+ if (credentialProvider == null) {
+ var req = createRequest ();
+ req.MakeCancelable (token);
+ prepareRequest (req);
+ return (HttpWebResponse) req.GetResponse ();
+ }
+
+ var handler = new RequestHelper (
+ createRequest, prepareRequest, proxyCache, CredentialStore.Instance, credentialProvider
+ );
+
+ return handler.GetResponse (token);
+ }
+
+ /// <summary>
+ /// Determines whether an error code is likely to have been caused by internet reachability problems.
+ /// </summary>
+ public static bool IsCannotReachInternetError (this WebExceptionStatus status)
+ {
+ switch (status) {
+ case WebExceptionStatus.NameResolutionFailure:
+ case WebExceptionStatus.ConnectFailure:
+ case WebExceptionStatus.ConnectionClosed:
+ case WebExceptionStatus.ProxyNameResolutionFailure:
+ case WebExceptionStatus.SendFailure:
+ case WebExceptionStatus.Timeout:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ static void MakeCancelable (this HttpWebRequest request, CancellationToken token)
+ {
+ if (!token.CanBeCanceled)
+ return;
+ token.Register (() => {
+ var r = request;
+ if (r != null)
+ r.Abort ();
+ });
+ }
+
+ // RequestHelper doesn't cache proxy credentials, only request credentials. We'll cache proxy credentials
+ // to avoid propting auth for the system store multiple times.
+ //
+ // We implement caching here so we can use the same store without making it public
+ // and so that the providers don't have to implement caching too.
+ class CachingCredentialProvider : ICredentialProvider
+ {
+ readonly ICredentialProvider wrapped;
+ readonly object locker = new object ();
+
+ public CachingCredentialProvider (ICredentialProvider wrapped)
+ {
+ this.wrapped = wrapped;
+ }
+
+ public ICredentials GetCredentials (Uri uri, IWebProxy proxy, CredentialType credentialType, bool retrying)
+ {
+ if (credentialType != CredentialType.ProxyCredentials)
+ return wrapped.GetCredentials (uri, proxy, credentialType, retrying);
+
+ var proxyUri = proxy.GetProxy (uri);
+ if (proxyUri == null)
+ return null;
+
+ if (!retrying) {
+ var cached = CredentialStore.Instance.GetCredentials (proxyUri);
+ if (cached != null)
+ return cached;
+ }
+
+ lock (locker) {
+ if (!retrying) {
+ var cached = CredentialStore.Instance.GetCredentials (proxyUri);
+ if (cached != null)
+ return cached;
+ }
+
+ var creds = wrapped.GetCredentials (uri, proxy, credentialType, retrying);
+
+ if (creds != null)
+ CredentialStore.Instance.Add (proxyUri, creds);
+
+ return creds;
+ }
+ }
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/ISolutionItemHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/ISolutionItemHandler.cs
index adef0bf5d4..83b0603b79 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/ISolutionItemHandler.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/ISolutionItemHandler.cs
@@ -80,5 +80,19 @@ namespace MonoDevelop.Projects.Extensions
/// Hint about which part of the solution item has been modified. This will typically be the property name.
/// </param>
void OnModified (string hint);
+
+ /// <summary>
+ /// Gets a service instance of a given type
+ /// </summary>
+ /// <returns>
+ /// The service.
+ /// </returns>
+ /// <param name='t'>
+ /// Type of the service
+ /// </param>
+ /// <remarks>
+ /// This method looks for an imlpementation of a service of the given type.
+ /// </remarks>
+ object GetService (Type t);
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs
index 56391bd52f..835a0c2d92 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Extensions/SolutionItemHandler.cs
@@ -82,5 +82,10 @@ namespace MonoDevelop.Projects.Extensions
public virtual void OnModified (string hint)
{
}
+
+ public virtual object GetService (Type t)
+ {
+ return null;
+ }
}
}
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Annotatable.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/IMSBuildGlobalPropertyProvider.cs
index 134f8d76dd..df7c76e443 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Annotatable.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/IMSBuildGlobalPropertyProvider.cs
@@ -1,21 +1,21 @@
-//
-// Annotatable.cs
-//
+//
+// IMSBuildGlobalPropertyProvider.cs
+//
// Author:
-// Mike Krüger <mkrueger@xamarin.com>
-//
-// Copyright (c) 2011 Xamarin Inc. (http://xamarin.com)
-//
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (c) 2014 Xamarin Inc.
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,14 +25,12 @@
// THE SOFTWARE.
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-namespace Mono.TextEditor
+namespace MonoDevelop.Projects.Formats.MSBuild
{
- [Obsolete("Use ICSharpCode.NRefactory.AbstractAnnotatable")]
- public abstract class AbstractAnnotatable : ICSharpCode.NRefactory.AbstractAnnotatable
+ public interface IMSBuildGlobalPropertyProvider
{
+ event EventHandler GlobalPropertiesChanged;
+ IDictionary<string,string> GetGlobalProperties ();
}
}
-
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildExtension.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildExtension.cs
new file mode 100644
index 0000000000..adb9f0a0c4
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildExtension.cs
@@ -0,0 +1,49 @@
+//
+// MSBuildExtension.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using MonoDevelop.Core;
+
+namespace MonoDevelop.Projects.Formats.MSBuild
+{
+ public class MSBuildExtension
+ {
+ public MSBuildProjectHandler Handler { get; set; }
+
+ public virtual void LoadProject (IProgressMonitor monitor, SolutionEntityItem item, MSBuildProject project)
+ {
+ }
+
+ public virtual void SaveProject (IProgressMonitor monitor, SolutionEntityItem item, MSBuildProject project)
+ {
+ }
+
+ public virtual object GetService (Type t)
+ {
+ return null;
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildFileFormat.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildFileFormat.cs
index 272b7101a9..05314dfdb7 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildFileFormat.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildFileFormat.cs
@@ -162,10 +162,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return new List<FilePath> ();
}
- public void InitializeSolutionItem (SolutionItem item)
- {
- }
-
public void ConvertToFormat (object obj)
{
if (obj == null)
@@ -351,7 +347,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
protected override bool SupportsToolsVersion (string version)
{
- return version == "4.0" || version == DefaultToolsVersion;
+ return version == "4.0" || version == "12.0";
}
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildHandler.cs
index ac0a6f3467..29e862cb26 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildHandler.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildHandler.cs
@@ -151,5 +151,22 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
customSlnData = item;
}
+
+ /// <summary>
+ /// Gets a service instance of a given type
+ /// </summary>
+ /// <returns>
+ /// The service.
+ /// </returns>
+ /// <param name='t'>
+ /// Type of the service
+ /// </param>
+ /// <remarks>
+ /// This method looks for an imlpementation of a service of the given type.
+ /// </remarks>
+ public virtual object GetService (Type t)
+ {
+ return null;
+ }
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
index b5cb33b05b..2976287a16 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProject.cs
@@ -40,7 +40,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
public class MSBuildProject
{
- public XmlDocument doc;
+ XmlDocument doc;
string file;
Dictionary<XmlElement,MSBuildObject> elemCache = new Dictionary<XmlElement,MSBuildObject> ();
Dictionary<string, MSBuildItemGroup> bestGroups;
@@ -66,6 +66,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild
get { return file; }
}
+ public XmlDocument Document {
+ get { return doc; }
+ }
+
public MSBuildProject ()
{
doc = new XmlDocument ();
@@ -170,7 +174,12 @@ namespace MonoDevelop.Projects.Formats.MSBuild
public void Evaluate ()
{
- MSBuildEvaluationContext context = new MSBuildEvaluationContext (this);
+ Evaluate (new MSBuildEvaluationContext ());
+ }
+
+ public void Evaluate (MSBuildEvaluationContext context)
+ {
+ context.InitEvaluation (this);
foreach (var pg in PropertyGroups)
pg.Evaluate (context);
foreach (var pg in ItemGroups)
@@ -192,16 +201,21 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- public void AddNewImport (string name, string condition)
+ public MSBuildImport AddNewImport (string name, MSBuildImport beforeImport = null)
{
XmlElement elem = doc.CreateElement (null, "Import", MSBuildProject.Schema);
elem.SetAttribute ("Project", name);
-
- XmlElement last = doc.DocumentElement.SelectSingleNode ("tns:Import[last()]", XmlNamespaceManager) as XmlElement;
- if (last != null)
- doc.DocumentElement.InsertAfter (elem, last);
- else
- doc.DocumentElement.AppendChild (elem);
+
+ if (beforeImport != null) {
+ doc.DocumentElement.InsertBefore (elem, beforeImport.Element);
+ } else {
+ XmlElement last = doc.DocumentElement.SelectSingleNode ("tns:Import[last()]", XmlNamespaceManager) as XmlElement;
+ if (last != null)
+ doc.DocumentElement.InsertAfter (elem, last);
+ else
+ doc.DocumentElement.AppendChild (elem);
+ }
+ return new MSBuildImport (elem);
}
public void RemoveImport (string name)
@@ -214,13 +228,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild
Console.WriteLine ("ppnf:");
}
- public List<string> Imports {
+ public IEnumerable<MSBuildImport> Imports {
get {
- List<string> ims = new List<string> ();
- foreach (XmlElement elem in doc.DocumentElement.SelectNodes ("tns:Import", XmlNamespaceManager)) {
- ims.Add (elem.GetAttribute ("Project"));
- }
- return ims;
+ foreach (XmlElement elem in doc.DocumentElement.SelectNodes ("tns:Import", XmlNamespaceManager))
+ yield return new MSBuildImport (elem);
}
}
@@ -438,7 +449,12 @@ namespace MonoDevelop.Projects.Formats.MSBuild
elem.AppendChild (e);
return e;
}
-
+
+ public string Label {
+ get { return EvaluatedElement.GetAttribute ("Label"); }
+ set { Element.SetAttribute ("Label", value); }
+ }
+
public string Condition {
get {
return Element.GetAttribute ("Condition");
@@ -455,6 +471,23 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
}
}
+
+ public class MSBuildImport: MSBuildObject
+ {
+ public MSBuildImport (XmlElement elem): base (elem)
+ {
+ }
+
+ public string Project {
+ get { return EvaluatedElement.GetAttribute ("Project"); }
+ set { Element.SetAttribute ("Project", value); }
+ }
+
+ public string Condition {
+ get { return EvaluatedElement.GetAttribute ("Condition"); }
+ set { Element.SetAttribute ("Condition", value); }
+ }
+ }
public class MSBuildProperty: MSBuildObject
{
@@ -468,16 +501,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
internal bool Overwritten { get; set; }
- [Obsolete]
- public string Value {
- get {
- return EvaluatedElement.InnerText;
- }
- set {
- Element.InnerText = value;
- }
- }
-
public string GetValue (bool isXml = false)
{
if (isXml)
@@ -760,6 +783,11 @@ namespace MonoDevelop.Projects.Formats.MSBuild
set { Element.SetAttribute ("Include", value); }
}
+ public string UnevaluatedInclude {
+ get { return Element.GetAttribute ("Include"); }
+ set { Element.SetAttribute ("Include", value); }
+ }
+
public string Name {
get { return Element.Name; }
}
@@ -878,15 +906,25 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- internal class MSBuildEvaluationContext: IExpressionContext
+ public class MSBuildEvaluationContext: IExpressionContext
{
Dictionary<string,string> properties = new Dictionary<string, string> ();
bool allResolved;
MSBuildProject project;
- public MSBuildEvaluationContext (MSBuildProject project)
+ public MSBuildEvaluationContext ()
+ {
+ }
+
+ internal void InitEvaluation (MSBuildProject project)
{
this.project = project;
+ SetPropertyValue ("MSBuildThisFile", Path.GetFileName (project.FileName));
+ SetPropertyValue ("MSBuildThisFileName", Path.GetFileNameWithoutExtension (project.FileName));
+ SetPropertyValue ("MSBuildThisFileDirectory", Path.GetDirectoryName (project.FileName) + Path.DirectorySeparatorChar);
+ SetPropertyValue ("MSBuildThisFileExtension", Path.GetExtension (project.FileName));
+ SetPropertyValue ("MSBuildThisFileFullPath", Path.GetFullPath (project.FileName));
+ SetPropertyValue ("VisualStudioReferenceAssemblyVersion", project.ToolsVersion + ".0.0");
}
public string GetPropertyValue (string name)
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
index 987b26fdec..96e68d4cef 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectHandler.cs
@@ -152,6 +152,16 @@ namespace MonoDevelop.Projects.Formats.MSBuild
Runtime.SystemAssemblyService.DefaultRuntimeChanged += OnDefaultRuntimeChanged;
}
+
+ public override object GetService (Type t)
+ {
+ foreach (var ex in GetMSBuildExtensions ()) {
+ var s = ex.GetService (t);
+ if (s != null)
+ return s;
+ }
+ return null;
+ }
void OnDefaultRuntimeChanged (object o, EventArgs args)
{
@@ -231,11 +241,13 @@ namespace MonoDevelop.Projects.Formats.MSBuild
});
foreach (var refProject in item.GetReferencedItems (configuration).OfType<Project> ()) {
var refConfig = refProject.GetConfiguration (configuration);
- configs.Add (new ProjectConfigurationInfo () {
- ProjectFile = refProject.FileName,
- Configuration = refConfig.Name,
- Platform = GetExplicitPlatform (refConfig)
- });
+ if (refConfig != null) {
+ configs.Add (new ProjectConfigurationInfo () {
+ ProjectFile = refProject.FileName,
+ Configuration = refConfig.Name,
+ Platform = GetExplicitPlatform (refConfig)
+ });
+ }
}
return configs.ToArray ();
}
@@ -247,8 +259,17 @@ namespace MonoDevelop.Projects.Formats.MSBuild
SolutionEntityItem item = (SolutionEntityItem) Item;
RemoteProjectBuilder builder = GetProjectBuilder ();
var configs = GetConfigurations (item, configuration);
- foreach (string s in builder.GetAssemblyReferences (configs))
- yield return s;
+
+ var result = builder.Run (
+ configs, null, MSBuildVerbosity.Normal,
+ new[] { "ResolveAssemblyReferences" }, new [] { "ReferencePath" }, null
+ );
+
+ List<MSBuildEvaluatedItem> items;
+ if (result.Items.TryGetValue ("ReferencePath", out items) && items != null) {
+ foreach (var i in items)
+ yield return i.ItemSpec;
+ }
}
else {
CleanupProjectBuilder ();
@@ -270,17 +291,19 @@ namespace MonoDevelop.Projects.Formats.MSBuild
LogWriter logWriter = new LogWriter (monitor.Log);
RemoteProjectBuilder builder = GetProjectBuilder ();
var configs = GetConfigurations (item, configuration);
- MSBuildResult[] results = builder.RunTarget (target, configs, logWriter, MSBuildProjectService.DefaultMSBuildVerbosity);
+ var result = builder.Run (configs, logWriter, MSBuildProjectService.DefaultMSBuildVerbosity, new[] { target }, null, null);
System.Runtime.Remoting.RemotingServices.Disconnect (logWriter);
var br = new BuildResult ();
- foreach (MSBuildResult res in results) {
- FilePath file = Path.Combine (Path.GetDirectoryName (res.ProjectFile), res.File);
+ foreach (var err in result.Errors) {
+ FilePath file = null;
+ if (err.File != null)
+ file = Path.Combine (Path.GetDirectoryName (err.ProjectFile), err.File);
- if (res.IsWarning)
- br.AddWarning (file, res.LineNumber, res.ColumnNumber, res.Code, res.Message);
+ if (err.IsWarning)
+ br.AddWarning (file, err.LineNumber, err.ColumnNumber, err.Code, err.Message);
else
- br.AddError (file, res.LineNumber, res.ColumnNumber, res.Code, res.Message);
+ br.AddError (file, err.LineNumber, err.ColumnNumber, err.Code, err.Message);
}
return br;
}
@@ -344,6 +367,11 @@ namespace MonoDevelop.Projects.Formats.MSBuild
if (itemGuid == null)
throw new UserException ("Project file doesn't have a valid ProjectGuid");
+ // Workaround for a VS issue. VS doesn't include the curly braces in the ProjectGuid
+ // of shared projects.
+ if (!itemGuid.StartsWith ("{"))
+ itemGuid = "{" + itemGuid + "}";
+
itemGuid = itemGuid.ToUpper ();
string projectTypeGuids = globalGroup.GetPropertyValue ("ProjectTypeGuids");
string itemType = globalGroup.GetPropertyValue ("ItemType");
@@ -362,6 +390,11 @@ namespace MonoDevelop.Projects.Formats.MSBuild
ProjectExtensionUtil.BeginLoadOperation ();
Item = CreateSolutionItem (monitor, p, fileName, language, itemType, itemClass);
+ if (subtypeGuids.Any ()) {
+ string gg = string.Join (";", subtypeGuids) + ";" + TypeGuid;
+ Item.ExtendedProperties ["ProjectTypeGuids"] = gg.ToUpper ();
+ }
+
Item.SetItemHandler (this);
MSBuildProjectService.SetId (Item, itemGuid);
@@ -372,7 +405,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
RemoveDuplicateItems (p, fileName);
- Load (monitor, p);
+ LoadProject (monitor, p);
return it;
} finally {
@@ -597,7 +630,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- void Load (IProgressMonitor monitor, MSBuildProject msproject)
+ protected virtual void LoadProject (IProgressMonitor monitor, MSBuildProject msproject)
{
timer.Trace ("Initialize serialization");
@@ -615,31 +648,8 @@ namespace MonoDevelop.Projects.Formats.MSBuild
timer.Trace ("Read project items");
- foreach (MSBuildItem buildItem in msproject.GetAllItems ()) {
- ProjectItem it = ReadItem (ser, buildItem);
-
- if (it == null) continue;
-
- if (it is ProjectFile) {
- var file = (ProjectFile)it;
-
- if (file.Name.IndexOf ('*') > -1) {
- // Thanks to IsOriginatedFromWildcard, these expanded items will not be saved back to disk.
- foreach (var expandedItem in ResolveWildcardItems (file))
- EntityItem.Items.Add (expandedItem);
-
- // Add to wildcard items (so it can be re-saved) instead of Items (where tools will
- // try to compile and display these nonstandard items
- EntityItem.WildcardItems.Add (it);
- continue;
- }
- if (ProjectTypeIsUnsupported && !File.Exists (file.FilePath))
- continue;
- }
+ LoadProjectItems (msproject, ser, ProjectItemFlags.None);
- EntityItem.Items.Add (it);
- }
-
timer.Trace ("Read configurations");
TargetFrameworkMoniker targetFx = null;
@@ -765,10 +775,44 @@ namespace MonoDevelop.Projects.Formats.MSBuild
dotNetProject.TargetFramework = Runtime.SystemAssemblyService.GetTargetFramework (targetFx);
}
-
+
+ LoadFromMSBuildProject (monitor, msproject);
+
Item.NeedsReload = false;
}
+ internal void LoadProjectItems (MSBuildProject msproject, MSBuildSerializer ser, ProjectItemFlags flags)
+ {
+ foreach (MSBuildItem buildItem in msproject.GetAllItems ()) {
+ ProjectItem it = ReadItem (ser, buildItem);
+ if (it == null)
+ continue;
+ it.Flags = flags;
+ if (it is ProjectFile) {
+ var file = (ProjectFile)it;
+ if (file.Name.IndexOf ('*') > -1) {
+ // Thanks to IsOriginatedFromWildcard, these expanded items will not be saved back to disk.
+ foreach (var expandedItem in ResolveWildcardItems (file))
+ EntityItem.Items.Add (expandedItem);
+ // Add to wildcard items (so it can be re-saved) instead of Items (where tools will
+ // try to compile and display these nonstandard items
+ EntityItem.WildcardItems.Add (it);
+ continue;
+ }
+ if (ProjectTypeIsUnsupported && !File.Exists (file.FilePath))
+ continue;
+ }
+ EntityItem.Items.Add (it);
+ it.ExtendedProperties ["MSBuild.SourceProject"] = msproject.FileName;
+ }
+ }
+
+ protected virtual void LoadFromMSBuildProject (IProgressMonitor monitor, MSBuildProject msproject)
+ {
+ foreach (var ext in GetMSBuildExtensions ())
+ ext.LoadProject (monitor, EntityItem, msproject);
+ }
+
const string RecursiveDirectoryWildcard = "**";
static readonly char[] directorySeparators = new [] {
Path.DirectorySeparatorChar,
@@ -881,7 +925,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- ProjectItem ReadItem (MSBuildSerializer ser, MSBuildItem buildItem)
+ internal ProjectItem ReadItem (MSBuildSerializer ser, MSBuildItem buildItem)
{
Project project = Item as Project;
DotNetProject dotNetProject = Item as DotNetProject;
@@ -957,6 +1001,11 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return ReadProjectFile (ser, project, buildItem, typeof(ProjectFile));
}
}
+
+ // ProjectReference objects only make sense on a DotNetProject, so don't load them
+ // if that's not the type of the project.
+ if (dt != null && dt.ValueType == typeof(ProjectReference) && dotNetProject == null)
+ dt = null;
if (dt != null && typeof(ProjectItem).IsAssignableFrom (dt.ValueType)) {
ProjectItem obj = (ProjectItem) Activator.CreateInstance (dt.ValueType);
@@ -980,12 +1029,15 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
// If it is an absolute uri, it's not a valid file
try {
- return !Uri.IsWellFormedUriString (path, UriKind.Absolute);
+ if (Uri.IsWellFormedUriString (path, UriKind.Absolute)) {
+ var f = new Uri (path);
+ return f.Scheme == "file";
+ }
} catch {
// Old mono versions may crash in IsWellFormedUriString if the path
// is not an uri.
- return true;
}
+ return true;
}
class ConfigData
@@ -1061,7 +1113,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
projectBuilder.Refresh ();
}
- MSBuildProject SaveProject (IProgressMonitor monitor)
+ protected virtual MSBuildProject SaveProject (IProgressMonitor monitor)
{
if (Item is UnknownSolutionItem)
return null;
@@ -1118,9 +1170,11 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
gg += ";" + TypeGuid;
Item.ExtendedProperties ["ProjectTypeGuids"] = gg.ToUpper ();
- }
- else
+ globalGroup.SetPropertyValue ("ProjectTypeGuids", gg.ToUpper (), true);
+ } else {
Item.ExtendedProperties.Remove ("ProjectTypeGuids");
+ globalGroup.RemoveProperty ("ProjectTypeGuids");
+ }
Item.ExtendedProperties ["ProductVersion"] = productVersion;
Item.ExtendedProperties ["SchemaVersion"] = schemaVersion;
@@ -1247,19 +1301,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- // Remove old items
- Dictionary<string,ItemInfo> oldItems = new Dictionary<string, ItemInfo> ();
- foreach (MSBuildItem item in msproject.GetAllItems ())
- oldItems [item.Name + "<" + item.Include + "<" + item.Condition] = new ItemInfo () { Item=item };
-
- // Add the new items
- foreach (object ob in ((SolutionEntityItem)Item).Items.Concat (((SolutionEntityItem)Item).WildcardItems))
- SaveItem (monitor, toolsFormat, ser, msproject, ob, oldItems);
-
- foreach (ItemInfo itemInfo in oldItems.Values) {
- if (!itemInfo.Added)
- msproject.RemoveItem (itemInfo.Item);
- }
+ SaveProjectItems (monitor, toolsFormat, ser, msproject);
if (dotNetProject != null) {
var moniker = dotNetProject.TargetFramework.Id;
@@ -1280,21 +1322,23 @@ namespace MonoDevelop.Projects.Formats.MSBuild
// Impdate the imports section
- List<string> currentImports = msproject.Imports;
- List<string> imports = new List<string> (currentImports);
+ List<DotNetProjectImport> currentImports = msproject.Imports.Select (i => new DotNetProjectImport (i.Project)).ToList ();
+ List<DotNetProjectImport> imports = new List<DotNetProjectImport> (currentImports);
// If the project is not new, don't add the default project imports,
// just assume that the current imports are correct
UpdateImports (imports, dotNetProject, newProject);
- foreach (string imp in imports) {
+ foreach (DotNetProjectImport imp in imports) {
if (!currentImports.Contains (imp)) {
- msproject.AddNewImport (imp, null);
+ MSBuildImport import = msproject.AddNewImport (imp.Name);
+ if (imp.HasCondition ())
+ import.Condition = imp.Condition;
currentImports.Add (imp);
}
}
- foreach (string imp in currentImports) {
+ foreach (DotNetProjectImport imp in currentImports) {
if (!imports.Contains (imp))
- msproject.RemoveImport (imp);
+ msproject.RemoveImport (imp.Name);
}
DataItem extendedData = ser.ExternalItemProperties;
@@ -1306,9 +1350,34 @@ namespace MonoDevelop.Projects.Formats.MSBuild
} else
msproject.RemoveProjectExtensions ("MonoDevelop");
+ SaveToMSBuildProject (monitor, msproject);
+
return msproject;
}
+ internal void SaveProjectItems (IProgressMonitor monitor, MSBuildFileFormat toolsFormat, MSBuildSerializer ser, MSBuildProject msproject, string pathPrefix = null)
+ {
+ // Remove old items
+ Dictionary<string, ItemInfo> oldItems = new Dictionary<string, ItemInfo> ();
+ foreach (MSBuildItem item in msproject.GetAllItems ())
+ oldItems [item.Name + "<" + item.UnevaluatedInclude + "<" + item.Condition] = new ItemInfo () {
+ Item = item
+ };
+ // Add the new items
+ foreach (object ob in ((SolutionEntityItem)Item).Items.Concat (((SolutionEntityItem)Item).WildcardItems).Where (it => !it.Flags.HasFlag (ProjectItemFlags.DontPersist)))
+ SaveItem (monitor, toolsFormat, ser, msproject, ob, oldItems, pathPrefix);
+ foreach (ItemInfo itemInfo in oldItems.Values) {
+ if (!itemInfo.Added)
+ msproject.RemoveItem (itemInfo.Item);
+ }
+ }
+
+ protected void SaveToMSBuildProject (IProgressMonitor monitor, MSBuildProject msproject)
+ {
+ foreach (var ext in GetMSBuildExtensions ())
+ ext.SaveProject (monitor, EntityItem, msproject);
+ }
+
void SetIfPresentOrNotDefaultValue (MSBuildPropertySet propGroup, string name, string value, string defaultValue, bool isXml = false)
{
bool hasDefaultValue = string.IsNullOrEmpty (value) || value == defaultValue;
@@ -1379,34 +1448,37 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- void SaveItem (IProgressMonitor monitor, MSBuildFileFormat fmt, MSBuildSerializer ser, MSBuildProject msproject, object ob, Dictionary<string,ItemInfo> oldItems)
+ void SaveItem (IProgressMonitor monitor, MSBuildFileFormat fmt, MSBuildSerializer ser, MSBuildProject msproject, object ob, Dictionary<string,ItemInfo> oldItems, string pathPrefix = null)
{
if (ob is ProjectReference) {
SaveReference (monitor, fmt, ser, msproject, (ProjectReference) ob, oldItems);
}
else if (ob is ProjectFile) {
- SaveProjectFile (ser, msproject, (ProjectFile) ob, oldItems);
+ SaveProjectFile (ser, msproject, (ProjectFile) ob, oldItems, pathPrefix);
}
else {
string itemName;
- if (ob is UnknownProjectItem)
- itemName = ((UnknownProjectItem)ob).ItemName;
+ if (ob is UnknownProjectItem) {
+ var ui = (UnknownProjectItem)ob;
+ itemName = ui.ItemName;
+ var buildItem = AddOrGetBuildItem (msproject, oldItems, itemName, ui.Include, ui.Condition);
+ WriteBuildItemMetadata (ser, buildItem, ob, oldItems);
+ }
else {
DataType dt = ser.DataContext.GetConfigurationDataType (ob.GetType ());
- itemName = dt.Name;
+ var buildItem = msproject.AddNewItem (dt.Name, "");
+ WriteBuildItemMetadata (ser, buildItem, ob, oldItems);
}
- MSBuildItem buildItem = msproject.AddNewItem (itemName, "");
- WriteBuildItemMetadata (ser, buildItem, ob, oldItems);
}
}
- void SaveProjectFile (MSBuildSerializer ser, MSBuildProject msproject, ProjectFile file, Dictionary<string,ItemInfo> oldItems)
+ void SaveProjectFile (MSBuildSerializer ser, MSBuildProject msproject, ProjectFile file, Dictionary<string,ItemInfo> oldItems, string pathPrefix = null)
{
if (file.IsOriginatedFromWildcard) return;
string itemName = (file.Subtype == Subtype.Directory)? "Folder" : file.BuildAction;
- string path = MSBuildProjectService.ToMSBuildPath (Item.ItemDirectory, file.FilePath);
+ string path = pathPrefix + MSBuildProjectService.ToMSBuildPath (Item.ItemDirectory, file.FilePath);
if (path.Length == 0)
return;
@@ -1458,11 +1530,17 @@ namespace MonoDevelop.Projects.Formats.MSBuild
} else {
buildItem.UnsetMetadata ("Visible");
}
-
- if (file.BuildAction == BuildAction.EmbeddedResource) {
- //Emit LogicalName only when it does not match the default Id
- if (GetDefaultResourceId (file) != file.ResourceId)
- buildItem.SetMetadata ("LogicalName", file.ResourceId);
+
+ var resId = file.ResourceId;
+
+ //For EmbeddedResource, emit LogicalName only when it does not match the default Id
+ if (file.BuildAction == BuildAction.EmbeddedResource && GetDefaultResourceId (file) == resId)
+ resId = null;
+
+ if (!string.IsNullOrEmpty (resId)) {
+ buildItem.SetMetadata ("LogicalName", resId);
+ } else {
+ buildItem.UnsetMetadata ("LogicalName");
}
}
@@ -1573,15 +1651,19 @@ namespace MonoDevelop.Projects.Formats.MSBuild
buildItem.Condition = pref.Condition;
}
- void UpdateImports (List<string> imports, DotNetProject project, bool addItemTypeImports)
+ void UpdateImports (List<DotNetProjectImport> imports, DotNetProject project, bool addItemTypeImports)
{
if (targetImports != null && addItemTypeImports) {
AddMissingImports (imports, targetImports);
}
+
+ List <string> updatedImports = imports.Select (import => import.Name).ToList ();
foreach (IMSBuildImportProvider ip in AddinManager.GetExtensionObjects ("/MonoDevelop/ProjectModel/MSBuildImportProviders")) {
- ip.UpdateImports (EntityItem, imports);
+ ip.UpdateImports (EntityItem, updatedImports);
}
+ UpdateImports (imports, updatedImports);
+
if (project != null) {
AddMissingImports (imports, project.ImportsAdded);
RemoveImports (imports, project.ImportsRemoved);
@@ -1589,19 +1671,44 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
}
- void AddMissingImports (List<string> existingImports, IEnumerable<string> newImports)
+ void AddMissingImports (List<DotNetProjectImport> existingImports, IEnumerable<string> newImports)
+ {
+ AddMissingImports (existingImports, newImports.Select (import => new DotNetProjectImport (import)));
+ }
+
+ void AddMissingImports (List<DotNetProjectImport> existingImports, IEnumerable<DotNetProjectImport> newImports)
{
- foreach (string imp in newImports)
+ foreach (DotNetProjectImport imp in newImports)
if (!existingImports.Contains (imp))
existingImports.Add (imp);
}
- void RemoveImports (List<string> existingImports, IEnumerable<string> importsToRemove)
+ void UpdateImports (List<DotNetProjectImport> existingImports, List<string> updatedImports)
+ {
+ RemoveMissingImports (existingImports, updatedImports);
+ AddMissingImports (existingImports, updatedImports);
+ }
+
+ void RemoveMissingImports (List<DotNetProjectImport> existingImports, List<string> updatedImports)
{
- foreach (string imp in importsToRemove)
+ List <DotNetProjectImport> importsToRemove = existingImports.Where (import => !updatedImports.Contains (import.Name)).ToList ();
+ RemoveImports (existingImports, importsToRemove);
+ }
+
+ void RemoveImports (List<DotNetProjectImport> existingImports, IEnumerable<DotNetProjectImport> importsToRemove)
+ {
+ foreach (DotNetProjectImport imp in importsToRemove)
existingImports.Remove (imp);
}
+ IEnumerable<MSBuildExtension> GetMSBuildExtensions ()
+ {
+ foreach (var e in AddinManager.GetExtensionObjects<MSBuildExtension> ("/MonoDevelop/ProjectModel/MSBuildExtensions")) {
+ e.Handler = this;
+ yield return e;
+ }
+ }
+
void ReadBuildItemMetadata (DataSerializer ser, MSBuildItem buildItem, object dataItem, Type extendedType)
{
DataItem ditem = new DataItem ();
@@ -1902,7 +2009,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
static readonly MSBuildElementOrder globalConfigOrder = new MSBuildElementOrder (
- "Configuration","Platform","ProductVersion","SchemaVersion","ProjectGuid","ProjectTypeGuids", "OutputType",
+ "Configuration","Platform","ProductVersion","SchemaVersion","ProjectGuid", "OutputType",
"AppDesignerFolder","RootNamespace","AssemblyName","StartupObject"
);
static readonly MSBuildElementOrder configOrder = new MSBuildElementOrder (
@@ -1916,7 +2023,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
new ItemMember (typeof(SolutionEntityItem), "ProductVersion"),
new ItemMember (typeof(SolutionEntityItem), "SchemaVersion"),
new ItemMember (typeof(SolutionEntityItem), "ProjectGuid"),
- new ItemMember (typeof(SolutionEntityItem), "ProjectTypeGuids"),
new ItemMember (typeof(DotNetProjectConfiguration), "ErrorReport"),
new ItemMember (typeof(DotNetProjectConfiguration), "TargetFrameworkVersion", new object[] { new MergeToProjectAttribute () }),
new ItemMember (typeof(ProjectReference), "RequiredTargetFramework"),
@@ -1926,8 +2032,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild
// Items generated by VS but which MD is not using and should be ignored
internal static readonly IList<string> UnsupportedItems = new string[] {
- "BootstrapperFile", "AppDesigner", "WebReferences", "WebReferenceUrl", "Service",
- "ProjectReference", "Reference" // Reference elements are included here because they are special-cased for DotNetProject, and they are unsupported in other types of projects
+ "BootstrapperFile", "AppDesigner", "WebReferences", "WebReferenceUrl", "Service",
+ "ProjectReference", "Reference", // Reference elements are included here because they are special-cased for DotNetProject, and they are unsupported in other types of projects
+ "InternalsVisibleTo",
+ "InternalsVisibleToTest"
};
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs
index df6d026199..ac766786b6 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/MSBuildProjectService.cs
@@ -56,6 +56,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
static DataContext dataContext;
+ static IMSBuildGlobalPropertyProvider[] globalPropertyProviders;
static Dictionary<string,RemoteBuildEngine> builders = new Dictionary<string, RemoteBuildEngine> ();
static GenericItemTypeNode genericItemTypeNode = new GenericItemTypeNode ();
@@ -91,6 +92,21 @@ namespace MonoDevelop.Projects.Formats.MSBuild
ShutDown = true;
CleanProjectBuilders ();
};
+
+ const string gppPath = "/MonoDevelop/ProjectModel/MSBuildGlobalPropertyProviders";
+ globalPropertyProviders = AddinManager.GetExtensionObjects<IMSBuildGlobalPropertyProvider> (gppPath);
+ foreach (var gpp in globalPropertyProviders) {
+ gpp.GlobalPropertiesChanged += HandleGlobalPropertyProviderChanged;
+ }
+ }
+
+ static void HandleGlobalPropertyProviderChanged (object sender, EventArgs e)
+ {
+ lock (builders) {
+ var gpp = (IMSBuildGlobalPropertyProvider) sender;
+ foreach (var builder in builders.Values)
+ builder.SetGlobalProperties (gpp.GetGlobalProperties ());
+ }
}
static void HandlePropertyChanged (object sender, PropertyChangedEventArgs e)
@@ -486,7 +502,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return true;
}
- public static RemoteProjectBuilder GetProjectBuilder (TargetRuntime runtime, string minToolsVersion, string file, string solutionFile)
+ internal static RemoteProjectBuilder GetProjectBuilder (TargetRuntime runtime, string minToolsVersion, string file, string solutionFile)
{
lock (builders) {
//attempt to use 12.0 builder first if available
@@ -534,12 +550,23 @@ namespace MonoDevelop.Projects.Formats.MSBuild
try {
p = runtime.ExecuteAssembly (pinfo);
p.StandardInput.WriteLine (Process.GetCurrentProcess ().Id.ToString ());
- string sref = p.StandardError.ReadLine ();
+ string responseKey = "[MonoDevelop]";
+ string sref;
+ while (true) {
+ sref = p.StandardError.ReadLine ();
+ if (sref.StartsWith (responseKey, StringComparison.Ordinal)) {
+ sref = sref.Substring (responseKey.Length);
+ break;
+ }
+ }
byte[] data = Convert.FromBase64String (sref);
MemoryStream ms = new MemoryStream (data);
BinaryFormatter bf = new BinaryFormatter ();
var engine = (IBuildEngine)bf.Deserialize (ms);
- engine.Initialize (solutionFile, GettextCatalog.UICulture);
+ engine.SetCulture (GettextCatalog.UICulture);
+ engine.SetGlobalProperties (GetCoreGlobalProperties (solutionFile));
+ foreach (var gpp in globalPropertyProviders)
+ builder.SetGlobalProperties (gpp.GetGlobalProperties ());
builder = new RemoteBuildEngine (p, engine);
} catch {
if (p != null) {
@@ -555,6 +582,29 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return new RemoteProjectBuilder (file, builder);
}
}
+
+ static IDictionary<string,string> GetCoreGlobalProperties (string slnFile)
+ {
+ var dictionary = new Dictionary<string,string> ();
+
+ //this causes build targets to behave how they should inside an IDE, instead of in a command-line process
+ dictionary.Add ("BuildingInsideVisualStudio", "true");
+
+ //we don't have host compilers in MD, and this is set to true by some of the MS targets
+ //which causes it to always run the CoreCompile task if BuildingInsideVisualStudio is also
+ //true, because the VS in-process compiler would take care of the deps tracking
+ dictionary.Add ("UseHostCompilerIfAvailable", "false" );
+
+ if (string.IsNullOrEmpty (slnFile))
+ return dictionary;
+
+ dictionary.Add ("SolutionPath", Path.GetFullPath (slnFile));
+ dictionary.Add ("SolutionName", Path.GetFileNameWithoutExtension (slnFile));
+ dictionary.Add ("SolutionFilename", Path.GetFileName (slnFile));
+ dictionary.Add ("SolutionDir", Path.GetDirectoryName (slnFile) + Path.DirectorySeparatorChar);
+
+ return dictionary;;
+ }
static string GetExeLocation (TargetRuntime runtime, string toolsVersion)
{
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs
index a033d83d0c..e5d99fb724 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/RemoteProjectBuilder.cs
@@ -27,6 +27,9 @@
using System;
using System.Diagnostics;
using System.Globalization;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
namespace MonoDevelop.Projects.Formats.MSBuild
{
@@ -54,9 +57,14 @@ namespace MonoDevelop.Projects.Formats.MSBuild
engine.UnloadProject (pb);
}
- public void Initialize (string slnFile, CultureInfo uiCulture)
+ public void SetCulture (CultureInfo uiCulture)
{
- engine.Initialize (slnFile, uiCulture);
+ engine.SetCulture (uiCulture);
+ }
+
+ public void SetGlobalProperties (IDictionary<string, string> properties)
+ {
+ engine.SetGlobalProperties (properties);
}
public void Dispose ()
@@ -82,19 +90,16 @@ namespace MonoDevelop.Projects.Formats.MSBuild
this.engine = engine;
builder = engine.LoadProject (file);
}
-
- public MSBuildResult[] RunTarget (string target, ProjectConfigurationInfo[] configurations, ILogWriter logWriter,
- MSBuildVerbosity verbosity)
- {
- if (target == null)
- throw new ArgumentNullException ("target");
- return builder.RunTarget (target, configurations, logWriter, verbosity);
- }
-
- public string[] GetAssemblyReferences (ProjectConfigurationInfo[] configurations)
+ public MSBuildResult Run (
+ ProjectConfigurationInfo[] configurations,
+ ILogWriter logWriter,
+ MSBuildVerbosity verbosity,
+ string[] runTargets,
+ string[] evaluateItems,
+ string[] evaluateProperties)
{
- return builder.GetAssemblyReferences (configurations);
+ return builder.Run (configurations, logWriter, verbosity, runTargets, evaluateItems, evaluateProperties);
}
public void Refresh ()
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/SlnFileFormat.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/SlnFileFormat.cs
index 7940eddda2..0f3e4cfc31 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/SlnFileFormat.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Formats.MSBuild/SlnFileFormat.cs
@@ -317,6 +317,10 @@ namespace MonoDevelop.Projects.Formats.MSBuild
foreach (SolutionConfigurationEntry cce in cc.Configurations) {
SolutionEntityItem p = cce.Item;
+
+ // Don't save configurations for shared projects
+ if (!p.SupportsBuild ())
+ continue;
// <ProjectGuid>...</ProjectGuid> in some Visual Studio generated F# project files
// are missing "{"..."}" in their guid. This is not generally a problem since it
@@ -540,7 +544,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
int lineNum = start + 1;
int lastLine = start + count - 2;
while (lineNum <= lastLine) {
- if (!ReadDataNode (it, lines, lastLine, "", ref lineNum))
+ if (!ReadDataNode (it, lines, lastLine, "", ref lineNum))
lineNum++;
}
return it;
@@ -1069,7 +1073,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
}
SolutionEntityItem item;
- if (slnData.ItemsByGuid.TryGetValue (projGuid, out item)) {
+ if (slnData.ItemsByGuid.TryGetValue (projGuid, out item) && item.SupportsBuild ()) {
string key = projGuid + "." + slnConfig;
SolutionConfigurationEntry combineConfigEntry = null;
if (cache.ContainsKey (key)) {
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyService.cs
index 7b4925d6de..0e7b6e5b61 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyService.cs
@@ -41,8 +41,6 @@ using System.Globalization;
namespace MonoDevelop.Projects.Policies
{
-
-
public static class PolicyService
{
const string TYPE_EXT_POINT = "/MonoDevelop/ProjectModel/PolicyTypes";
@@ -1122,6 +1120,13 @@ namespace MonoDevelop.Projects.Policies
/// </param>
public static void AddUserPolicySet (PolicySet pset)
{
+ if (pset.Id != null)
+ throw new ArgumentException ("User policy cannot have ID");
+ if (string.IsNullOrEmpty (pset.Name))
+ throw new ArgumentException ("User policy cannot have null or empty name");
+ if (sets.Any (ps => ps.Name == pset.Name))
+ throw new ArgumentException ("There is already a policy with the name ' " + pset.Name + "'");
+
userSets.Add (pset);
sets.Add (pset);
}
@@ -1200,7 +1205,14 @@ namespace MonoDevelop.Projects.Policies
if (Directory.Exists (PoliciesFolder)) {
foreach (var file in Directory.GetFiles (PoliciesFolder, "*.mdpolicy.xml")) {
- LoadPolicy (file);
+ try {
+ LoadPolicy (file);
+ } catch (Exception ex) {
+ LoggingService.LogError (
+ string.Format ("Failed to load policy file '{0}'", Path.GetFileName (file)),
+ ex
+ );
+ }
}
}
@@ -1225,11 +1237,10 @@ namespace MonoDevelop.Projects.Policies
while (xr.NodeType != XmlNodeType.EndElement) {
PolicySet pset = new PolicySet ();
pset.LoadFromXml (xr);
- if (pset.Id == "Default")
+ if (pset.Id == "Default") {
defaultPolicies = pset;
- else {
- userSets.Add (pset);
- sets.Add (pset);
+ } else {
+ AddUserPolicySet (pset);
}
xr.MoveToContent ();
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs
index abcead1ca2..d8b62e1387 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicySet.cs
@@ -156,7 +156,7 @@ namespace MonoDevelop.Projects.Policies
internal void LoadFromFile (StreamReader reader)
{
- var xr = System.Xml.XmlReader.Create (reader);
+ var xr = XmlReader.Create (reader);
LoadFromXml (xr);
}
@@ -180,8 +180,9 @@ namespace MonoDevelop.Projects.Policies
foreach (ScopedPolicy policyPair in PolicyService.DiffDeserializeXml (reader)) {
PolicyKey key = new PolicyKey (policyPair.PolicyType, policyPair.Scope);
if (policies.ContainsKey (key))
- throw new InvalidOperationException ("Cannot add second policy of type '" +
- key.ToString () + "' to policy set '" + Id + "'");
+ throw new InvalidOperationException (
+ "Cannot add second policy of type '" + key + "' to policy set '" + Id + "'"
+ );
policies[key] = policyPair.Policy;
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyTypeAttribute.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyTypeAttribute.cs
index edfd34d3a3..71a7ea4302 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyTypeAttribute.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Policies/PolicyTypeAttribute.cs
@@ -36,6 +36,7 @@ namespace MonoDevelop.Projects.Policies
public PolicyTypeAttribute ([NodeAttribute ("description")] string description)
{
+ Description = description;
}
[NodeAttribute ("description")]
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs
new file mode 100644
index 0000000000..2a98dae3cb
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProject.cs
@@ -0,0 +1,288 @@
+//
+// SharedProject.cs
+//
+// Author:
+// Lluis Sanchez <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using MonoDevelop.Core;
+using System.IO;
+using System.Xml;
+using MonoDevelop.Projects.Policies;
+
+namespace MonoDevelop.Projects.SharedAssetsProjects
+{
+ public class SharedAssetsProject: Project, IDotNetFileContainer
+ {
+ Solution currentSolution;
+ IDotNetLanguageBinding languageBinding;
+ string languageName;
+
+ public SharedAssetsProject ()
+ {
+ }
+
+ public SharedAssetsProject (string language)
+ {
+ languageName = language;
+ }
+
+ public SharedAssetsProject (ProjectCreateInformation projectCreateInfo, XmlElement projectOptions)
+ {
+ languageName = projectOptions.GetAttribute ("language");
+ DefaultNamespace = projectCreateInfo.ProjectName;
+ }
+
+ internal protected override List<FilePath> OnGetItemFiles (bool includeReferencedFiles)
+ {
+ var list = base.OnGetItemFiles (includeReferencedFiles);
+ if (!string.IsNullOrEmpty (FileName))
+ list.Add (FileName.ChangeExtension (".projitems"));
+ return list;
+ }
+
+ public string LanguageName {
+ get { return languageName; }
+ set { languageName = value; }
+ }
+
+ public string DefaultNamespace { get; set; }
+
+ public override IEnumerable<string> GetProjectTypes ()
+ {
+ yield return "SharedAssets";
+ yield return "DotNet";
+ }
+
+ public override string[] SupportedLanguages {
+ get {
+ return new [] {languageName};
+ }
+ }
+
+ public IDotNetLanguageBinding LanguageBinding {
+ get {
+ if (languageBinding == null)
+ languageBinding = LanguageBindingService.GetBindingPerLanguageName (languageName) as IDotNetLanguageBinding;
+ return languageBinding;
+ }
+ }
+
+ public override bool IsCompileable (string fileName)
+ {
+ return LanguageBinding.IsSourceCodeFile (fileName);
+ }
+
+ protected override BuildResult OnBuild (MonoDevelop.Core.IProgressMonitor monitor, ConfigurationSelector configuration)
+ {
+ return new BuildResult ();
+ }
+
+ internal protected override bool OnGetSupportsTarget (string target)
+ {
+ return false;
+ }
+
+ internal protected override bool OnGetSupportsExecute ()
+ {
+ return false;
+ }
+
+ protected override IEnumerable<string> GetStandardBuildActions ()
+ {
+ return BuildAction.DotNetActions;
+ }
+
+ protected override IList<string> GetCommonBuildActions ()
+ {
+ return BuildAction.DotNetCommonActions;
+ }
+
+ /// <summary>
+ /// Gets the default namespace for the file, according to the naming policy.
+ /// </summary>
+ /// <remarks>Always returns a valid namespace, even if the fileName is null.</remarks>
+ public string GetDefaultNamespace (string fileName)
+ {
+ return DotNetProject.GetDefaultNamespace (this, DefaultNamespace, fileName);
+ }
+
+ protected override void OnBoundToSolution ()
+ {
+ if (currentSolution != null)
+ DisconnectFromSolution ();
+
+ base.OnBoundToSolution ();
+
+ ParentSolution.ReferenceAddedToProject += HandleReferenceAddedToProject;
+ ParentSolution.ReferenceRemovedFromProject += HandleReferenceRemovedFromProject;
+ ParentSolution.SolutionItemAdded += HandleSolutionItemAdded;
+ currentSolution = ParentSolution;
+
+ // Maybe there is a project that is already referencing this one. It may happen when creating a solution
+ // from a template
+ foreach (var p in ParentSolution.GetAllSolutionItems<DotNetProject> ())
+ ProcessProject (p);
+ }
+
+ void HandleSolutionItemAdded (object sender, SolutionItemChangeEventArgs e)
+ {
+ var p = e.SolutionItem as DotNetProject;
+ if (p != null)
+ // Maybe the new project already contains a reference to this shared project
+ ProcessProject (p);
+ }
+
+ public override void Dispose ()
+ {
+ base.Dispose ();
+ DisconnectFromSolution ();
+ }
+
+ void DisconnectFromSolution ()
+ {
+ if (currentSolution != null) {
+ currentSolution.ReferenceAddedToProject -= HandleReferenceAddedToProject;
+ currentSolution.ReferenceRemovedFromProject -= HandleReferenceRemovedFromProject;
+ currentSolution.SolutionItemAdded -= HandleSolutionItemAdded;
+ currentSolution = null;
+ }
+ }
+
+ void HandleReferenceRemovedFromProject (object sender, ProjectReferenceEventArgs e)
+ {
+ if (e.ProjectReference.ReferenceType == ReferenceType.Project && e.ProjectReference.Reference == Name) {
+ foreach (var f in Files) {
+ var pf = e.Project.GetProjectFile (f.FilePath);
+ if ((pf.Flags & ProjectItemFlags.DontPersist) != 0)
+ e.Project.Files.Remove (pf.FilePath);
+ }
+ }
+ }
+
+ void HandleReferenceAddedToProject (object sender, ProjectReferenceEventArgs e)
+ {
+ if (e.ProjectReference.ReferenceType == ReferenceType.Project && e.ProjectReference.Reference == Name) {
+ ProcessNewReference (e.ProjectReference);
+ }
+ }
+
+ void ProcessProject (DotNetProject p)
+ {
+ foreach (var pref in p.References.Where (r => r.ReferenceType == ReferenceType.Project && r.Reference == Name))
+ ProcessNewReference (pref);
+ }
+
+ void ProcessNewReference (ProjectReference pref)
+ {
+ pref.Flags = ProjectItemFlags.DontPersist;
+ pref.SetItemsProjectPath (Path.ChangeExtension (FileName, ".projitems"));
+ foreach (var f in Files) {
+ if (pref.OwnerProject.Files.GetFile (f.FilePath) == null) {
+ var cf = (ProjectFile)f.Clone ();
+ cf.Flags |= ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden;
+ pref.OwnerProject.Files.Add (cf);
+ }
+ }
+ }
+
+ protected override void OnFilePropertyChangedInProject (ProjectFileEventArgs e)
+ {
+ base.OnFilePropertyChangedInProject (e);
+ foreach (var p in GetReferencingProjects ()) {
+ foreach (var f in e) {
+ if (f.ProjectFile.Subtype == Subtype.Directory)
+ continue;
+ var pf = (ProjectFile) f.ProjectFile.Clone ();
+ pf.Flags |= ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden;
+ p.Files.Remove (pf.FilePath);
+ p.Files.Add (pf);
+ }
+ }
+ }
+
+ protected override void OnFileAddedToProject (ProjectFileEventArgs e)
+ {
+ base.OnFileAddedToProject (e);
+ foreach (var p in GetReferencingProjects ()) {
+ foreach (var f in e) {
+ if (f.ProjectFile.Subtype != Subtype.Directory && p.Files.GetFile (f.ProjectFile.FilePath) == null) {
+ var pf = (ProjectFile)f.ProjectFile.Clone ();
+ pf.Flags |= ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden;
+ p.Files.Add (pf);
+ }
+ }
+ }
+ }
+
+ protected override void OnFileRemovedFromProject (ProjectFileEventArgs e)
+ {
+ base.OnFileRemovedFromProject (e);
+ foreach (var p in GetReferencingProjects ()) {
+ foreach (var f in e) {
+ if (f.ProjectFile.Subtype != Subtype.Directory)
+ p.Files.Remove (f.ProjectFile.FilePath);
+ }
+ }
+ }
+
+ protected override void OnFileRenamedInProject (ProjectFileRenamedEventArgs e)
+ {
+ base.OnFileRenamedInProject (e);
+ foreach (var p in GetReferencingProjects ()) {
+ foreach (var f in e) {
+ if (f.ProjectFile.Subtype == Subtype.Directory)
+ continue;
+ var pf = (ProjectFile) f.ProjectFile.Clone ();
+ p.Files.Remove (f.OldName);
+ pf.Flags |= ProjectItemFlags.DontPersist | ProjectItemFlags.Hidden;
+ p.Files.Add (pf);
+ }
+ }
+ }
+
+ IEnumerable<DotNetProject> GetReferencingProjects ()
+ {
+ if (ParentSolution == null)
+ return new DotNetProject[0];
+
+ return ParentSolution.GetAllSolutionItems<DotNetProject> ().Where (p => p.References.Any (r => r.GetItemsProjectPath () != null));
+ }
+ }
+
+ internal static class SharedAssetsProjectExtensions
+ {
+ public static string GetItemsProjectPath (this ProjectReference r)
+ {
+ return (string) r.ExtendedProperties ["MSBuild.SharedAssetsProject"];
+ }
+
+ public static void SetItemsProjectPath (this ProjectReference r, string path)
+ {
+ r.ExtendedProperties ["MSBuild.SharedAssetsProject"] = path;
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectBinding.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectBinding.cs
new file mode 100644
index 0000000000..ca7f7527a1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectBinding.cs
@@ -0,0 +1,58 @@
+//
+// SharedAssetsProjectBinding.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+
+namespace MonoDevelop.Projects.SharedAssetsProjects
+{
+ public class SharedAssetsProjectBinding: IProjectBinding
+ {
+ #region IProjectBinding implementation
+
+ public Project CreateProject (ProjectCreateInformation info, System.Xml.XmlElement projectOptions)
+ {
+ return new SharedAssetsProject (info, projectOptions);
+ }
+
+ public Project CreateSingleFileProject (string sourceFile)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public bool CanCreateSingleFileProject (string sourceFile)
+ {
+ return false;
+ }
+
+ public string Name {
+ get {
+ return "SharedAssetsProject";
+ }
+ }
+
+ #endregion
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildExtension.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildExtension.cs
new file mode 100644
index 0000000000..1da660c7a1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildExtension.cs
@@ -0,0 +1,94 @@
+//
+// SharedAssetsProjectMSBuildExtension.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Linq;
+using System.IO;
+using MonoDevelop.Core;
+using System.Collections.Generic;
+using MonoDevelop.Projects.Formats.MSBuild;
+
+namespace MonoDevelop.Projects.SharedAssetsProjects
+{
+ class SharedAssetsProjectMSBuildExtension: MSBuildExtension
+ {
+ public override void LoadProject (IProgressMonitor monitor, SolutionEntityItem item, MSBuildProject msproject)
+ {
+ base.LoadProject (monitor, item, msproject);
+
+ var dnp = item as DotNetProject;
+ if (dnp == null)
+ return;
+
+ // Convert .projitems imports into project references
+
+ foreach (var sp in msproject.Imports.Where (im => im.Label == "Shared" && im.Project.EndsWith (".projitems"))) {
+ var projitemsFile = sp.Project;
+ if (!string.IsNullOrEmpty (projitemsFile)) {
+ projitemsFile = MSBuildProjectService.FromMSBuildPath (item.ItemDirectory, projitemsFile);
+ projitemsFile = Path.Combine (Path.GetDirectoryName (msproject.FileName), projitemsFile);
+ if (File.Exists (projitemsFile)) {
+ MSBuildSerializer iser = Handler.CreateSerializer ();
+ iser.SerializationContext.BaseFile = projitemsFile;
+ iser.SerializationContext.ProgressMonitor = monitor;
+ MSBuildProject p = new MSBuildProject ();
+ p.Load (projitemsFile);
+ Handler.LoadProjectItems (p, iser, ProjectItemFlags.Hidden | ProjectItemFlags.DontPersist);
+ var r = new ProjectReference (ReferenceType.Project, Path.GetFileNameWithoutExtension (projitemsFile));
+ r.Flags = ProjectItemFlags.DontPersist;
+ r.SetItemsProjectPath (projitemsFile);
+ dnp.References.Add (r);
+ }
+ }
+ }
+ }
+
+ public override void SaveProject (IProgressMonitor monitor, SolutionEntityItem item, MSBuildProject project)
+ {
+ base.SaveProject (monitor, item, project);
+ var dnp = item as DotNetProject;
+ if (dnp == null)
+ return;
+ HashSet<string> validProjitems = new HashSet<string> ();
+ foreach (var r in dnp.References.Where (rp => rp.ReferenceType == ReferenceType.Project)) {
+ var ip = r.GetItemsProjectPath ();
+ if (!string.IsNullOrEmpty (ip)) {
+ ip = MSBuildProjectService.ToMSBuildPath (item.ItemDirectory, ip);
+ validProjitems.Add (ip);
+ if (!project.Imports.Any (im => im.Project == ip)) {
+ var im = project.AddNewImport (ip, project.Imports.FirstOrDefault (i => i.Label != "Shared"));
+ im.Label = "Shared";
+ im.Condition = "Exists('" + ip + "')";
+ }
+ }
+ }
+ foreach (var im in project.Imports) {
+ if (im.Label == "Shared" && im.Project.EndsWith (".projitems") && !(validProjitems.Contains (im.Project)))
+ project.RemoveImport (im.Project);
+ }
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildHandler.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildHandler.cs
new file mode 100644
index 0000000000..d64df4f8e0
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.SharedAssetsProjects/SharedAssetsProjectMSBuildHandler.cs
@@ -0,0 +1,139 @@
+//
+// SharedProjectMSBuildHandler.cs
+//
+// Author:
+// Lluis Sanchez <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.Linq;
+using System.Xml;
+using System.IO;
+using MonoDevelop.Core;
+using System.Collections.Generic;
+using MonoDevelop.Projects.Formats.MSBuild;
+
+namespace MonoDevelop.Projects.SharedAssetsProjects
+{
+ class SharedAssetsProjectMSBuildHandler: MSBuildProjectHandler
+ {
+ string projitemsFile;
+
+ public SharedAssetsProjectMSBuildHandler ()
+ {
+ }
+
+ protected override void LoadProject (IProgressMonitor monitor, MSBuildProject msproject)
+ {
+ var doc = msproject.Document;
+ projitemsFile = null;
+ foreach (var no in doc.DocumentElement.ChildNodes) {
+ var im = no as XmlElement;
+ if (im != null && im.LocalName == "Import" && im.GetAttribute ("Label") == "Shared") {
+ projitemsFile = im.GetAttribute ("Project");
+ break;
+ }
+ }
+ if (projitemsFile == null)
+ return;
+
+ // TODO: load the type from msbuild
+ ((SharedAssetsProject)EntityItem).LanguageName = "C#";
+
+ projitemsFile = Path.Combine (Path.GetDirectoryName (msproject.FileName), projitemsFile);
+
+ MSBuildProject p = new MSBuildProject ();
+ p.Load (projitemsFile);
+
+ MSBuildSerializer ser = CreateSerializer ();
+ ser.SerializationContext.BaseFile = EntityItem.FileName;
+ ser.SerializationContext.ProgressMonitor = monitor;
+
+ Item.SetItemHandler (this);
+
+ var cp = p.PropertyGroups.FirstOrDefault (g => g.Label == "Configuration");
+ if (cp != null)
+ ((SharedAssetsProject)EntityItem).DefaultNamespace = cp.GetPropertyValue ("Import_RootNamespace");
+
+ LoadProjectItems (p, ser, ProjectItemFlags.None);
+ }
+
+ protected override MSBuildProject SaveProject (IProgressMonitor monitor)
+ {
+ MSBuildSerializer ser = CreateSerializer ();
+ ser.SerializationContext.BaseFile = EntityItem.FileName;
+ ser.SerializationContext.ProgressMonitor = monitor;
+
+ MSBuildProject projitemsProject = new MSBuildProject ();
+ MSBuildProject msproject = new MSBuildProject ();
+
+ var newProject = EntityItem.FileName == null || !File.Exists (EntityItem.FileName);
+ if (newProject) {
+ var grp = msproject.GetGlobalPropertyGroup ();
+ if (grp == null)
+ grp = msproject.AddNewPropertyGroup (false);
+ grp.SetPropertyValue ("ProjectGuid", EntityItem.ItemId, false);
+ var import = msproject.AddNewImport (@"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props");
+ import.Condition = @"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')";
+ msproject.AddNewImport (@"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props");
+ msproject.AddNewImport (@"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props");
+ import = msproject.AddNewImport (Path.ChangeExtension (EntityItem.FileName.FileName, ".projitems"));
+ import.Label = "Shared";
+ msproject.AddNewImport (@"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets");
+ } else {
+ msproject.Load (EntityItem.FileName);
+ }
+
+ // having no ToolsVersion is equivalent to 2.0, roundtrip that correctly
+ if (ToolsVersion != "2.0")
+ msproject.ToolsVersion = ToolsVersion;
+ else if (string.IsNullOrEmpty (msproject.ToolsVersion))
+ msproject.ToolsVersion = null;
+ else
+ msproject.ToolsVersion = "2.0";
+
+ if (projitemsFile == null)
+ projitemsFile = Path.ChangeExtension (EntityItem.FileName, ".projitems");
+ if (File.Exists (projitemsFile)) {
+ projitemsProject.Load (projitemsFile);
+ } else {
+ var grp = projitemsProject.AddNewPropertyGroup (true);
+ grp.SetPropertyValue ("MSBuildAllProjects", "$(MSBuildAllProjects);$(MSBuildThisFileFullPath)", false);
+ grp.SetPropertyValue ("HasSharedItems", "true", false);
+ grp.SetPropertyValue ("SharedGUID", EntityItem.ItemId, false);
+ }
+
+ var configGrp = projitemsProject.PropertyGroups.FirstOrDefault (g => g.Label == "Configuration");
+ if (configGrp == null) {
+ configGrp = projitemsProject.AddNewPropertyGroup (true);
+ configGrp.Label = "Configuration";
+ }
+ configGrp.SetPropertyValue ("Import_RootNamespace", ((SharedAssetsProject)EntityItem).DefaultNamespace, false);
+
+ SaveProjectItems (monitor, new MSBuildFileFormatVS12 (), ser, projitemsProject, "$(MSBuildThisFileDirectory)");
+
+ projitemsProject.Save (projitemsFile);
+
+ return msproject;
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs
index a97fd46e02..85f4dd8b26 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects.Text/TextFile.cs
@@ -438,6 +438,7 @@ namespace MonoDevelop.Projects.Text
fs.Close ();
FileService.SystemRename (tempName, fileName);
+ FileService.NotifyFileChanged (fileName);
}
public static void WriteFile (FilePath fileName, string content, string encoding, ByteOrderMark bom, bool onlyIfChanged)
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CompiledAssemblyProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CompiledAssemblyProject.cs
index 70f4e811ef..481bcd9ecf 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CompiledAssemblyProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CompiledAssemblyProject.cs
@@ -45,11 +45,10 @@ namespace MonoDevelop.Projects
{
AddNewConfiguration ("Default");
}
-
- public override string ProjectType {
- get {
- return "CompiledAssembly";
- }
+
+ public override IEnumerable<string> GetProjectTypes ()
+ {
+ yield return "CompiledAssembly";
}
public override IconId StockIcon {
@@ -58,7 +57,6 @@ namespace MonoDevelop.Projects
}
}
-
public override SolutionItemConfiguration CreateConfiguration (string name)
{
return new ProjectConfiguration (name);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CustomCommandExtension.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CustomCommandExtension.cs
index f3c891fc88..fc0a9bf77b 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CustomCommandExtension.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/CustomCommandExtension.cs
@@ -79,7 +79,7 @@ namespace MonoDevelop.Projects
{
SolutionItemConfiguration conf = entry.GetConfiguration (configuration) as SolutionItemConfiguration;
if (conf != null) {
- ExecutionContext localContext = new ExecutionContext (Runtime.ProcessService.DefaultExecutionHandler, context.ConsoleFactory);
+ ExecutionContext localContext = new ExecutionContext (Runtime.ProcessService.DefaultExecutionHandler, context.ConsoleFactory, context.ExecutionTarget);
if (conf.CustomCommands.CanExecute (entry, CustomCommandType.BeforeExecute, localContext, configuration))
conf.CustomCommands.ExecuteCommand (monitor, entry, CustomCommandType.BeforeExecute, localContext, configuration);
@@ -91,7 +91,7 @@ namespace MonoDevelop.Projects
base.Execute (monitor, entry, context, configuration);
if (conf != null && !monitor.IsCancelRequested) {
- ExecutionContext localContext = new ExecutionContext (Runtime.ProcessService.DefaultExecutionHandler, context.ConsoleFactory);
+ ExecutionContext localContext = new ExecutionContext (Runtime.ProcessService.DefaultExecutionHandler, context.ConsoleFactory, context.ExecutionTarget);
if (conf.CustomCommands.CanExecute (entry, CustomCommandType.AfterExecute, localContext, configuration))
conf.CustomCommands.ExecuteCommand (monitor, entry, CustomCommandType.AfterExecute, localContext, configuration);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs
index 9589f0251f..cba01e80c1 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetAssemblyProject.cs
@@ -46,6 +46,13 @@ namespace MonoDevelop.Projects
base (languageName, projectCreateInfo, projectOptions)
{
}
+
+ public override System.Collections.Generic.IEnumerable<string> GetProjectTypes ()
+ {
+ yield return "DotNetAssembly";
+ foreach (var pt in base.GetProjectTypes ())
+ yield return pt;
+ }
public override bool SupportsFramework (TargetFramework framework)
{
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
index 951695501b..d6a7a8c7f0 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs
@@ -49,7 +49,7 @@ namespace MonoDevelop.Projects
{
[DataInclude(typeof(DotNetProjectConfiguration))]
[ProjectModelDataItem ("AbstractDotNetProject")]
- public abstract class DotNetProject : Project, IAssemblyProject
+ public abstract class DotNetProject : Project, IAssemblyProject, IDotNetFileContainer
{
bool usePartialTypes = true;
ProjectParameters languageParameters;
@@ -184,8 +184,9 @@ namespace MonoDevelop.Projects
return Runtime.SystemAssemblyService.GetTargetFramework (moniker);
}
- public override string ProjectType {
- get { return "DotNet"; }
+ public override IEnumerable<string> GetProjectTypes ()
+ {
+ yield return "DotNet";
}
private string languageName;
@@ -593,10 +594,12 @@ namespace MonoDevelop.Projects
else if (projectReference.ReferenceType == ReferenceType.Assembly) {
// VS COMPAT: Copy the assembly, but also all other assemblies referenced by it
// that are located in the same folder
- foreach (string file in GetAssemblyRefsRec (projectReference.Reference, new HashSet<string> ())) {
+ var visitedAssemblies = new HashSet<string> ();
+ var referencedFiles = projectReference.GetReferencedFileNames (configuration);
+ foreach (string file in referencedFiles.SelectMany (ar => GetAssemblyRefsRec (ar, visitedAssemblies))) {
// Indirectly referenced assemblies are only copied if a newer copy doesn't exist. This avoids overwritting directly referenced assemblies
// by indirectly referenced stale copies of the same assembly. See bug #655566.
- bool copyIfNewer = file != projectReference.Reference;
+ bool copyIfNewer = !referencedFiles.Contains (file);
list.Add (file, copyIfNewer);
if (File.Exists (file + ".config"))
list.Add (file + ".config", copyIfNewer);
@@ -740,7 +743,7 @@ namespace MonoDevelop.Projects
/// When set to true, it will include assemblies generated by referenced project. When set to false,
/// it will only include package and direct assembly references.
/// </param>
- public virtual IEnumerable<string> GetReferencedAssemblies (ConfigurationSelector configuration, bool includeProjectReferences)
+ public IEnumerable<string> GetReferencedAssemblies (ConfigurationSelector configuration, bool includeProjectReferences)
{
return Services.ProjectService.GetExtensionChain (this).GetReferencedAssemblies (this, configuration, includeProjectReferences);
}
@@ -953,20 +956,29 @@ namespace MonoDevelop.Projects
return false;
return LanguageBinding.IsSourceCodeFile (fileName);
}
-
+
/// <summary>
/// Gets the default namespace for the file, according to the naming policy.
/// </summary>
/// <remarks>Always returns a valid namespace, even if the fileName is null.</remarks>
public virtual string GetDefaultNamespace (string fileName)
{
- DotNetNamingPolicy pol = Policies.Get<DotNetNamingPolicy> ();
+ return GetDefaultNamespace (this, DefaultNamespace, fileName);
+ }
+
+ /// <summary>
+ /// Gets the default namespace for the file, according to the naming policy.
+ /// </summary>
+ /// <remarks>Always returns a valid namespace, even if the fileName is null.</remarks>
+ internal static string GetDefaultNamespace (Project project, string defaultNamespace, string fileName)
+ {
+ DotNetNamingPolicy pol = project.Policies.Get<DotNetNamingPolicy> ();
string root = null;
string dirNamespc = null;
- string defaultNmspc = !string.IsNullOrEmpty (DefaultNamespace)
- ? DefaultNamespace
- : SanitisePotentialNamespace (Name) ?? "Application";
+ string defaultNmspc = !string.IsNullOrEmpty (defaultNamespace)
+ ? defaultNamespace
+ : SanitisePotentialNamespace (project.Name) ?? "Application";
if (string.IsNullOrEmpty (fileName)) {
return defaultNmspc;
@@ -975,7 +987,7 @@ namespace MonoDevelop.Projects
string dirname = Path.GetDirectoryName (fileName);
string relativeDirname = null;
if (!String.IsNullOrEmpty (dirname)) {
- relativeDirname = GetRelativeChildPath (dirname);
+ relativeDirname = project.GetRelativeChildPath (dirname);
if (string.IsNullOrEmpty (relativeDirname) || relativeDirname.StartsWith (".."))
relativeDirname = null;
}
@@ -1011,7 +1023,7 @@ namespace MonoDevelop.Projects
return defaultNmspc;
}
- string GetHierarchicalNamespace (string relativePath)
+ static string GetHierarchicalNamespace (string relativePath)
{
StringBuilder sb = new StringBuilder (relativePath);
for (int i = 0; i < sb.Length; i++) {
@@ -1021,7 +1033,7 @@ namespace MonoDevelop.Projects
return sb.ToString ();
}
- string SanitisePotentialNamespace (string potential)
+ static string SanitisePotentialNamespace (string potential)
{
StringBuilder sb = new StringBuilder ();
foreach (char c in potential) {
@@ -1049,12 +1061,17 @@ namespace MonoDevelop.Projects
{
foreach (ProjectReference pref in References) {
if (pref.ReferenceType == ReferenceType.Package) {
- string newRef = AssemblyContext.GetAssemblyNameForVersion (pref.Reference, pref.Package != null ? pref.Package.Name : null, this.TargetFramework);
- if (newRef == null) {
+ // package name is only relevant if it's not a framework package
+ var pkg = pref.Package;
+ string packageName = pkg != null && !pkg.IsFrameworkPackage? pkg.Name : null;
+ // find the version of the assembly that's valid for the new framework
+ var newAsm = AssemblyContext.GetAssemblyForVersion (pref.Reference, packageName, TargetFramework);
+ // if it changed, clear assembly resolution caches and update reference
+ if (newAsm == null) {
pref.ResetReference ();
- } else if (newRef != pref.Reference) {
- pref.Reference = newRef;
- } else if (!pref.IsValid) {
+ } else if (newAsm.FullName != pref.Reference) {
+ pref.Reference = newAsm.FullName;
+ } else if (!pref.IsValid || newAsm.Package != pref.Package) {
pref.ResetReference ();
}
}
@@ -1227,23 +1244,23 @@ namespace MonoDevelop.Projects
public void AddImportIfMissing (string name, string condition)
{
- importsAdded.Add (name);
+ importsAdded.Add (new DotNetProjectImport (name, condition));
}
public void RemoveImport (string name)
{
- importsRemoved.Add (name);
+ importsRemoved.Add (new DotNetProjectImport (name));
}
- List <string> importsAdded = new List<string> ();
+ List <DotNetProjectImport> importsAdded = new List<DotNetProjectImport> ();
- internal IList<string> ImportsAdded {
+ internal IList<DotNetProjectImport> ImportsAdded {
get { return importsAdded; }
}
- List <string> importsRemoved = new List<string> ();
+ List <DotNetProjectImport> importsRemoved = new List<DotNetProjectImport> ();
- internal IList<string> ImportsRemoved {
+ internal IList<DotNetProjectImport> ImportsRemoved {
get { return importsRemoved; }
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectImport.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectImport.cs
new file mode 100644
index 0000000000..71e438e05b
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProjectImport.cs
@@ -0,0 +1,62 @@
+//
+// DotNetProjectImport.cs
+//
+// Author:
+// Matt Ward <matt.ward@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin Inc. (http://xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+
+namespace MonoDevelop.Projects
+{
+ internal class DotNetProjectImport
+ {
+ internal DotNetProjectImport (string name, string condition = null)
+ {
+ Name = name;
+ Condition = condition;
+ }
+
+ public string Name { get; set; }
+ public string Condition { get; set; }
+
+ public bool HasCondition ()
+ {
+ return !String.IsNullOrEmpty (Condition);
+ }
+
+ public override bool Equals (object obj)
+ {
+ var other = obj as DotNetProjectImport;
+ if (other == null)
+ return false;
+
+ return other.Name == Name;
+ }
+
+ public override int GetHashCode ()
+ {
+ return Name.GetHashCode ();
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ExecutionContext.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ExecutionContext.cs
index 110c88431c..3c9207fe3e 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ExecutionContext.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ExecutionContext.cs
@@ -38,14 +38,14 @@ namespace MonoDevelop.Projects
IConsoleFactory consoleFactory;
ExecutionTarget executionTarget;
- public ExecutionContext (IExecutionMode executionMode, IConsoleFactory consoleFactory, ExecutionTarget target = null)
+ public ExecutionContext (IExecutionMode executionMode, IConsoleFactory consoleFactory, ExecutionTarget target)
{
this.executionHandler = executionMode.ExecutionHandler;
this.consoleFactory = consoleFactory;
this.executionTarget = target;
}
- public ExecutionContext (IExecutionHandler executionHandler, IConsoleFactory consoleFactory, ExecutionTarget target = null)
+ public ExecutionContext (IExecutionHandler executionHandler, IConsoleFactory consoleFactory, ExecutionTarget target)
{
this.executionHandler = executionHandler;
this.consoleFactory = consoleFactory;
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/GenericProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/GenericProject.cs
index d2e05b22de..9e14d17bb6 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/GenericProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/GenericProject.cs
@@ -26,8 +26,8 @@
//
-using System;
using System.Xml;
+using System.Collections.Generic;
namespace MonoDevelop.Projects
{
@@ -48,9 +48,10 @@ namespace MonoDevelop.Projects
GenericProjectConfiguration conf = new GenericProjectConfiguration (name);
return conf;
}
-
- public override string ProjectType {
- get { return "GenericProject"; }
+
+ public override IEnumerable<string> GetProjectTypes ()
+ {
+ yield return "GenericProject";
}
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs
index 3a3a3c0304..46f53edd81 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IBuildTarget.cs
@@ -35,6 +35,7 @@ namespace MonoDevelop.Projects
public interface IBuildTarget: IWorkspaceObject
{
BuildResult RunTarget (IProgressMonitor monitor, string target, ConfigurationSelector configuration);
+ bool SupportsTarget (string target);
void Execute (IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration);
bool CanExecute (ExecutionContext context, ConfigurationSelector configuration);
bool NeedsBuilding (ConfigurationSelector configuration);
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IDotNetFileContainer.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IDotNetFileContainer.cs
new file mode 100644
index 0000000000..321e8cac14
--- /dev/null
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/IDotNetFileContainer.cs
@@ -0,0 +1,36 @@
+//
+// IDotNetFileContainer.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using MonoDevelop.Core;
+
+namespace MonoDevelop.Projects
+{
+ public interface IDotNetFileContainer
+ {
+ string GetDefaultNamespace (string fileName);
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs
index 93257eed0e..7903a6152a 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/PortableDotNetProject.cs
@@ -46,9 +46,12 @@ namespace MonoDevelop.Projects
: base (languageName, projectCreateInfo, projectOptions)
{
}
-
- public override string ProjectType {
- get { return "PortableDotNet"; }
+
+ public override IEnumerable<string> GetProjectTypes ()
+ {
+ yield return "PortableDotNet";
+ foreach (var t in base.GetProjectTypes ())
+ yield return t;
}
public override bool SupportsFormat (FileFormat format)
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
index 4e808dd9ed..b3bf2233e3 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs
@@ -121,11 +121,17 @@ namespace MonoDevelop.Projects
/// <value>
/// The type of the project.
/// </value>
- public abstract string ProjectType {
- get;
+ [Obsolete ("Use GetProjectTypes")]
+ public virtual string ProjectType {
+ get { return GetProjectTypes ().First (); }
}
/// <summary>
+ /// Gets the project type and its base types.
+ /// </summary>
+ public abstract IEnumerable<string> GetProjectTypes ();
+
+ /// <summary>
/// Gets or sets the icon of the project.
/// </summary>
/// <value>
@@ -626,7 +632,7 @@ namespace MonoDevelop.Projects
{
ProjectConfiguration config = GetConfiguration (configuration) as ProjectConfiguration;
if (config == null) {
- monitor.ReportError (GettextCatalog.GetString ("Configuration '{0}' not found in project '{1}'", config.Id, Name), null);
+ monitor.ReportError (GettextCatalog.GetString ("Configuration '{0}' not found in project '{1}'", configuration, Name), null);
return;
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
index e92872ec27..77d9f63534 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectFile.cs
@@ -464,12 +464,6 @@ namespace MonoDevelop.Projects
if (project != null)
project.NotifyFilePropertyChangedInProject (this, property);
}
-
- [Obsolete ("Use OnChanged(string property) instead.")]
- protected virtual void OnChanged ()
- {
- OnChanged (null);
- }
}
internal class ProjectFileVirtualPathChangedEventArgs : EventArgs
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs
index 1aeec8dd03..8c5a7303fa 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs
@@ -43,6 +43,8 @@ namespace MonoDevelop.Projects
}
internal string Condition { get; set; }
+
+ public ProjectItemFlags Flags { get; set; }
}
public class UnknownProjectItem: ProjectItem
@@ -58,4 +60,20 @@ namespace MonoDevelop.Projects
this.Include = include;
}
}
+
+ [Flags]
+ public enum ProjectItemFlags
+ {
+ None = 0,
+
+ /// <summary>
+ /// The item is for internal use and will not be shown to the user
+ /// </summary>
+ Hidden = 1,
+
+ /// <summary>
+ /// The item will not be saved to the project file
+ /// </summary>
+ DontPersist = 2
+ }
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectModelDataItemAttribute.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectModelDataItemAttribute.cs
index 61daac50ce..69048f5182 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectModelDataItemAttribute.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectModelDataItemAttribute.cs
@@ -38,6 +38,7 @@ namespace MonoDevelop.Projects
public ProjectModelDataItemAttribute ([NodeAttribute ("name")] string name)
{
+ Name = name;
}
[NodeAttribute ("name")]
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
index eee99971c8..74e56794d8 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectReference.cs
@@ -45,8 +45,8 @@ namespace MonoDevelop.Projects
Project,
Package,
Custom,
- [Obsolete]
- Gac
+ [Obsolete ("Use Package")]
+ Gac = Package
}
/// <summary>
@@ -107,15 +107,17 @@ namespace MonoDevelop.Projects
public ProjectReference (ReferenceType referenceType, string reference, string hintPath)
{
- if (referenceType == ReferenceType.Assembly)
+ if (referenceType == ReferenceType.Assembly) {
specificVersion = false;
-#pragma warning disable 612
- if (referenceType == ReferenceType.Gac)
- referenceType = ReferenceType.Package;
-#pragma warning restore 612
+ if (hintPath == null) {
+ hintPath = reference;
+ reference = Path.GetFileNameWithoutExtension (reference);
+ }
+ }
+
this.referenceType = referenceType;
- this.reference = reference;
- this.hintPath = hintPath ?? (referenceType == ReferenceType.Assembly ? reference : null);
+ this.reference = reference;
+ this.hintPath = hintPath;
UpdatePackageReference ();
}
@@ -157,9 +159,7 @@ namespace MonoDevelop.Projects
// This property is used by the serializer. It ensures that the obsolete Gac value is not serialized
internal ReferenceType internalReferenceType {
get { return referenceType; }
- #pragma warning disable 612
- set { referenceType = value == ReferenceType.Gac ? ReferenceType.Package : value; }
- #pragma warning restore 612
+ set { referenceType = value; }
}
public ReferenceType ReferenceType {
@@ -466,20 +466,8 @@ namespace MonoDevelop.Projects
// No package is specified, get any of the registered assemblies, giving priority to gaced assemblies
// (because non-gac assemblies should have a package name set)
- SystemAssembly best = null;
- foreach (SystemAssembly asm in AssemblyContext.GetAssembliesFromFullName (reference)) {
- //highest priority to framework packages
- if (ownerProject != null && asm.Package.IsFrameworkPackage) {
- var targetFx = ownerProject.TargetFramework;
- var packageFxId = asm.Package.TargetFramework;
- if (targetFx.IncludesFramework (packageFxId))
- return cachedPackage = asm.Package;
- }
- if (asm.Package.IsGacPackage)
- best = asm;
- else if (best == null)
- best = asm;
- }
+ TargetFramework fx = ownerProject == null? null : ownerProject.TargetFramework;
+ var best = AssemblyContext.GetAssemblyFromFullName (reference, null, fx);
if (best != null)
return cachedPackage = best.Package;
}
@@ -536,6 +524,22 @@ namespace MonoDevelop.Projects
if (StatusChanged != null)
StatusChanged (this, EventArgs.Empty);
}
+
+ /// <summary>
+ /// Resolves a project for a ReferenceType.Project reference type in a given solution.
+ /// </summary>
+ /// <returns>The project, or <c>null</c> if it couldn't be resolved.</returns>
+ /// <param name="inSolution">The solution the project is in.</param>
+ /// <exception cref="T:System.ArgumentNullException">Thrown if inSolution == null</exception>
+ /// <exception cref="T:System.InvalidOperationException">Thrown if ReferenceType != ReferenceType.Project</exception>
+ public Project ResolveProject (Solution inSolution)
+ {
+ if (inSolution == null)
+ throw new ArgumentNullException ("inSolution");
+ if (ReferenceType != ReferenceType.Project)
+ throw new InvalidOperationException ("ResolveProject is only definied for Project reference type.");
+ return inSolution.FindProjectByName (Reference);
+ }
}
public class UnknownProjectReference: ProjectReference
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs
index a5aa5415c6..64d8bc6e76 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectService.cs
@@ -75,8 +75,6 @@ namespace MonoDevelop.Projects
internal event EventHandler DataContextChanged;
- LocalDataStoreSlot extensionChainSlot;
-
class ExtensionChainInfo
{
public ExtensionContext ExtensionContext;
@@ -86,7 +84,6 @@ namespace MonoDevelop.Projects
internal ProjectService ()
{
- extensionChainSlot = Thread.AllocateDataSlot ();
AddinManager.AddExtensionNodeHandler (FileFormatsExtensionPath, OnFormatExtensionChanged);
AddinManager.AddExtensionNodeHandler (SerializableClassesExtensionPath, OnSerializableExtensionChanged);
AddinManager.AddExtensionNodeHandler (ExtendedPropertiesExtensionPath, OnPropertiesExtensionChanged);
@@ -104,29 +101,31 @@ namespace MonoDevelop.Projects
get { return formatManager; }
}
- public ProjectServiceExtension GetExtensionChain (IBuildTarget target)
+ internal ProjectServiceExtension GetExtensionChain (IBuildTarget target)
{
ProjectServiceExtension chain;
if (target != null) {
- ExtensionChainInfo einfo = (ExtensionChainInfo) Thread.GetData (extensionChainSlot);
- if (einfo == null) {
- einfo = new ExtensionChainInfo ();
- ExtensionContext ctx = AddinManager.CreateExtensionContext ();
- einfo.ExtensionContext = ctx;
- einfo.ItemTypeCondition = new ItemTypeCondition (target.GetType ());
- einfo.ProjectLanguageCondition = new ProjectLanguageCondition (target);
- ctx.RegisterCondition ("ItemType", einfo.ItemTypeCondition);
- ctx.RegisterCondition ("ProjectLanguage", einfo.ProjectLanguageCondition);
- Thread.SetData (extensionChainSlot, einfo);
- } else {
- einfo.ItemTypeCondition.ObjType = target.GetType ();
- einfo.ProjectLanguageCondition.TargetProject = target;
+ lock (target) {
+ ExtensionChainInfo einfo = (ExtensionChainInfo)target.ExtendedProperties [typeof(ExtensionChainInfo)];
+ if (einfo == null) {
+ einfo = new ExtensionChainInfo ();
+ ExtensionContext ctx = AddinManager.CreateExtensionContext ();
+ einfo.ExtensionContext = ctx;
+ einfo.ItemTypeCondition = new ItemTypeCondition (target.GetType ());
+ einfo.ProjectLanguageCondition = new ProjectLanguageCondition (target);
+ ctx.RegisterCondition ("ItemType", einfo.ItemTypeCondition);
+ ctx.RegisterCondition ("ProjectLanguage", einfo.ProjectLanguageCondition);
+ target.ExtendedProperties [typeof(ExtensionChainInfo)] = einfo;
+ } else {
+ einfo.ItemTypeCondition.ObjType = target.GetType ();
+ einfo.ProjectLanguageCondition.TargetProject = target;
+ }
+ ProjectServiceExtension[] extensions = einfo.ExtensionContext.GetExtensionObjects ("/MonoDevelop/ProjectModel/ProjectServiceExtensions", typeof(ProjectServiceExtension)).Cast<ProjectServiceExtension> ().ToArray ();
+ chain = CreateExtensionChain (extensions);
+
+ // After creating the chain there is no need to keep the reference to the target
+ einfo.ProjectLanguageCondition.TargetProject = null;
}
- ProjectServiceExtension[] extensions = einfo.ExtensionContext.GetExtensionObjects ("/MonoDevelop/ProjectModel/ProjectServiceExtensions", typeof(ProjectServiceExtension)).Cast<ProjectServiceExtension> ().ToArray ();
- chain = CreateExtensionChain (extensions);
-
- // After creating the chain there is no need to keep the reference to the target
- einfo.ProjectLanguageCondition.TargetProject = null;
}
else {
if (defaultExtensionChain == null) {
@@ -178,12 +177,6 @@ namespace MonoDevelop.Projects
}
}
- [Obsolete ("Use DefaultFileFormat.Id")]
- public string DefaultFileFormatId {
- get { return defaultFormat.Id; }
- set { /* nop */ }
- }
-
public FileFormat DefaultFileFormat {
get { return defaultFormat; }
}
@@ -643,11 +636,16 @@ namespace MonoDevelop.Projects
{
Dictionary <SolutionItem,bool> needsBuildingCache;
- public override object GetService (IBuildTarget item, Type type)
+ public override object GetService (SolutionItem item, Type type)
{
- return null;
+ return item.OnGetService (type);
}
+ public override object GetService (WorkspaceItem item, Type type)
+ {
+ return item.OnGetService (type);
+ }
+
public override void Save (IProgressMonitor monitor, SolutionEntityItem entry)
{
FileService.RequestFileEdit (entry.GetItemFiles (false));
@@ -700,6 +698,26 @@ namespace MonoDevelop.Projects
return res;
}
+ public override bool SupportsTarget (IBuildTarget item, string target)
+ {
+ if (item is WorkspaceItem)
+ return ((WorkspaceItem)item).OnGetSupportsTarget (target);
+ else if (item is SolutionItem)
+ return ((SolutionItem)item).OnGetSupportsTarget (target);
+ else
+ throw new InvalidOperationException ("Unknown item type: " + item);
+ }
+
+ public override bool SupportsExecute (IBuildTarget item)
+ {
+ if (item is WorkspaceItem)
+ return ((WorkspaceItem)item).OnGetSupportsExecute ();
+ else if (item is SolutionItem)
+ return ((SolutionItem)item).OnGetSupportsExecute ();
+ else
+ throw new InvalidOperationException ("Unknown item type: " + item);
+ }
+
public override void Execute (IProgressMonitor monitor, IBuildTarget item, ExecutionContext context, ConfigurationSelector configuration)
{
if (item is SolutionEntityItem) {
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs
index bfa738ae61..476081baf6 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectServiceExtension.cs
@@ -54,7 +54,15 @@ namespace MonoDevelop.Projects
return true;
}
- public virtual object GetService (IBuildTarget item, Type type)
+ public virtual object GetService (SolutionItem item, Type type)
+ {
+ if (type.IsInstanceOfType (this))
+ return this;
+ else
+ return GetNext (item).GetService (item, type);
+ }
+
+ public virtual object GetService (WorkspaceItem item, Type type)
{
if (type.IsInstanceOfType (this))
return this;
@@ -120,6 +128,62 @@ namespace MonoDevelop.Projects
return GetNext (item).RunTarget (monitor, item, target, configuration);
}
+ public virtual bool SupportsTarget (IBuildTarget item, string target)
+ {
+ if (item is SolutionEntityItem)
+ return SupportsTarget ((SolutionEntityItem)item, target);
+ else if (item is WorkspaceItem)
+ return SupportsTarget ((WorkspaceItem) item, target);
+ else
+ return GetNext (item).SupportsTarget (item, target);
+ }
+
+ protected virtual bool SupportsTarget (SolutionEntityItem item, string target)
+ {
+ return GetNext (item).SupportsTarget ((IBuildTarget) item, target);
+ }
+
+ protected virtual bool SupportsTarget (Solution solution, string target)
+ {
+ return GetNext (solution).SupportsTarget ((IBuildTarget) solution, target);
+ }
+
+ protected virtual bool SupportsTarget (WorkspaceItem item, string target)
+ {
+ if (item is Solution)
+ return SupportsTarget ((Solution) item, target);
+ else
+ return GetNext (item).SupportsTarget ((IBuildTarget) item, target);
+ }
+
+ public virtual bool SupportsExecute (IBuildTarget item)
+ {
+ if (item is SolutionEntityItem)
+ return SupportsExecute ((SolutionEntityItem)item);
+ else if (item is WorkspaceItem)
+ return SupportsExecute ((WorkspaceItem) item);
+ else
+ return GetNext (item).SupportsExecute (item);
+ }
+
+ protected virtual bool SupportsExecute (SolutionEntityItem item)
+ {
+ return GetNext (item).SupportsExecute ((IBuildTarget) item);
+ }
+
+ protected virtual bool SupportsExecute (Solution solution)
+ {
+ return GetNext (solution).SupportsExecute ((IBuildTarget) solution);
+ }
+
+ protected virtual bool SupportsExecute (WorkspaceItem item)
+ {
+ if (item is Solution)
+ return SupportsExecute ((Solution) item);
+ else
+ return GetNext (item).SupportsExecute ((IBuildTarget) item);
+ }
+
protected virtual void Clean (IProgressMonitor monitor, IBuildTarget item, ConfigurationSelector configuration)
{
if (item is SolutionEntityItem)
@@ -173,7 +237,7 @@ namespace MonoDevelop.Projects
{
return GetNext (solution).RunTarget (monitor, solution, ProjectService.BuildTarget, configuration);
}
-
+
public virtual void Execute (IProgressMonitor monitor, IBuildTarget item, ExecutionContext context, ConfigurationSelector configuration)
{
if (item is SolutionEntityItem)
@@ -360,6 +424,11 @@ namespace MonoDevelop.Projects
return false;
}
+ public bool SupportsTarget (string target)
+ {
+ return false;
+ }
+
public bool NeedsBuilding (ConfigurationSelector configuration)
{
return false;
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs
index b92abc3651..3a147f5e08 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Solution.cs
@@ -124,7 +124,7 @@ namespace MonoDevelop.Projects
if (startupItem == null && singleStartup) {
ReadOnlyCollection<SolutionEntityItem> its = GetAllSolutionItems<SolutionEntityItem> ();
if (its.Count > 0)
- startupItem = its [0];
+ startupItem = its.FirstOrDefault (it => it.SupportsExecute ());
}
return startupItem;
}
@@ -288,7 +288,7 @@ namespace MonoDevelop.Projects
public void CreateDefaultConfigurations ()
{
- foreach (SolutionEntityItem item in Items) {
+ foreach (SolutionEntityItem item in Items.Where (it => it.SupportsBuild ())) {
foreach (ItemConfiguration conf in item.Configurations) {
SolutionConfiguration sc = Configurations [conf.Id];
if (sc == null) {
@@ -308,7 +308,7 @@ namespace MonoDevelop.Projects
public SolutionConfiguration AddConfiguration (string name, bool createConfigForItems)
{
SolutionConfiguration conf = new SolutionConfiguration (name);
- foreach (SolutionEntityItem item in Items) {
+ foreach (SolutionEntityItem item in Items.Where (it => it.SupportsBuild())) {
if (createConfigForItems && item.GetConfiguration (new ItemConfigurationSelector (name)) == null) {
SolutionItemConfiguration newc = item.CreateConfiguration (name);
if (item.DefaultConfiguration != null)
@@ -366,11 +366,17 @@ namespace MonoDevelop.Projects
{
return RootFolder.GetAllProjectsWithTopologicalSort (configuration);
}
-
+
+ [Obsolete("Use GetProjectsContainingFile() (plural) instead")]
public override Project GetProjectContainingFile (FilePath fileName)
{
return RootFolder.GetProjectContainingFile (fileName);
}
+
+ public override IEnumerable<Project> GetProjectsContainingFile (FilePath fileName)
+ {
+ return RootFolder.GetProjectsContainingFile (fileName);
+ }
public override bool ContainsItem (IWorkspaceObject obj)
{
@@ -661,20 +667,25 @@ namespace MonoDevelop.Projects
SolutionEntityItem eitem = item as SolutionEntityItem;
if (eitem != null) {
eitem.NeedsReload = false;
- if (replacedItem == null) {
- // Register the new entry in every solution configuration
- foreach (SolutionConfiguration conf in Configurations)
- conf.AddItem (eitem);
- } else {
- // Reuse the configuration information of the replaced item
- foreach (SolutionConfiguration conf in Configurations)
- conf.ReplaceItem ((SolutionEntityItem)replacedItem, eitem);
- if (StartupItem == replacedItem)
- StartupItem = eitem;
- else {
- int i = MultiStartupItems.IndexOf ((SolutionEntityItem)replacedItem);
- if (i != -1)
- MultiStartupItems [i] = eitem;
+ if (eitem.SupportsBuild ()) {
+ if (replacedItem == null) {
+ // Register the new entry in every solution configuration
+ foreach (SolutionConfiguration conf in Configurations)
+ conf.AddItem (eitem);
+ // If there is no startup project or it is an invalid one, use the new project as startup if possible
+ if ((StartupItem == null || !StartupItem.SupportsExecute ()) && eitem.SupportsExecute ())
+ StartupItem = eitem;
+ } else {
+ // Reuse the configuration information of the replaced item
+ foreach (SolutionConfiguration conf in Configurations)
+ conf.ReplaceItem ((SolutionEntityItem)replacedItem, eitem);
+ if (StartupItem == replacedItem)
+ StartupItem = eitem;
+ else {
+ int i = MultiStartupItems.IndexOf ((SolutionEntityItem)replacedItem);
+ if (i != -1)
+ MultiStartupItems [i] = eitem;
+ }
}
}
}
@@ -715,8 +726,8 @@ namespace MonoDevelop.Projects
if (!reloading) {
foreach (SolutionConfiguration conf in Configurations)
conf.RemoveItem (item);
- if (item is DotNetProject)
- RemoveReferencesToProject ((DotNetProject)item);
+ if (item is Project)
+ RemoveReferencesToProject ((Project)item);
if (StartupItem == item)
StartupItem = null;
@@ -728,7 +739,7 @@ namespace MonoDevelop.Projects
item.FileName = item.FileName;
}
- void RemoveReferencesToProject (DotNetProject projectToRemove)
+ void RemoveReferencesToProject (Project projectToRemove)
{
if (projectToRemove == null)
return;
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs
index cd98fda4ae..258a23c7af 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolder.cs
@@ -243,7 +243,16 @@ namespace MonoDevelop.Projects
e.FileName = item.FileName;
newItem = e;
}
-
+
+ if (!Items.Contains (item)) {
+ // The old item is gone, which probably means it has already been reloaded (BXC20615), or maybe removed.
+ // In this case, there isn't anything else we can do
+ newItem.Dispose ();
+
+ // Find the replacement if it exists
+ return Items.OfType<SolutionEntityItem> ().FirstOrDefault (it => it.FileName == item.FileName);
+ }
+
// Replace in the file list
Items.Replace (item, newItem);
@@ -331,7 +340,7 @@ namespace MonoDevelop.Projects
Items.Add (item);
SolutionEntityItem eitem = item as SolutionEntityItem;
- if (eitem != null && createSolutionConfigurations) {
+ if (eitem != null && createSolutionConfigurations && eitem.SupportsBuild ()) {
// Create new solution configurations for item configurations
foreach (ItemConfiguration iconf in eitem.Configurations) {
bool found = false;
@@ -477,7 +486,7 @@ namespace MonoDevelop.Projects
foreach (SolutionItem item in Items) {
if (item is SolutionFolder)
((SolutionFolder)item).GetAllBuildableEntries (list, configuration, includeExternalReferences);
- else if ((item is SolutionEntityItem) && conf.BuildEnabledForItem ((SolutionEntityItem) item))
+ else if ((item is SolutionEntityItem) && conf.BuildEnabledForItem ((SolutionEntityItem) item) && item.SupportsBuild ())
GetAllBuildableReferences (list, item, configuration, includeExternalReferences);
}
}
@@ -492,7 +501,8 @@ namespace MonoDevelop.Projects
GetAllBuildableReferences (list, it, configuration, includeExternalReferences);
}
}
-
+
+ [Obsolete("Use GetProjectsContainingFile() (plural) instead")]
public Project GetProjectContainingFile (string fileName)
{
ReadOnlyCollection<Project> projects = GetAllProjects ();
@@ -503,6 +513,31 @@ namespace MonoDevelop.Projects
}
return null;
}
+
+ public IEnumerable<Project> GetProjectsContainingFile (string fileName)
+ {
+ ReadOnlyCollection<Project> projects = GetAllProjects ();
+
+ Project mainProject = null;
+ var projectsWithLinks = new List<Project>();
+ foreach (Project projectEntry in projects) {
+ if (projectEntry.FileName == fileName || projectEntry.IsFileInProject(fileName)) {
+ var projectPath = Path.GetDirectoryName (projectEntry.FileName);
+ if (fileName.StartsWith (projectPath)) {
+ mainProject = projectEntry;
+ } else {
+ projectsWithLinks.Add (projectEntry);
+ }
+ }
+ }
+
+ if (mainProject != null) {
+ yield return mainProject;
+ }
+ foreach (var project in projectsWithLinks) {
+ yield return project;
+ }
+ }
public SolutionEntityItem FindSolutionItem (string fileName)
{
@@ -1007,6 +1042,11 @@ namespace MonoDevelop.Projects
public void Dispose ()
{
}
+
+ public object GetService (Type t)
+ {
+ return null;
+ }
}
public class SolutionFolderFileCollection: System.Collections.ObjectModel.Collection<FilePath>
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs
index 488dd2d19d..3dd753efab 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionItem.cs
@@ -160,14 +160,9 @@ namespace MonoDevelop.Projects
/// </param>
/// <remarks>
/// This method looks for an imlpementation of a service of the given type.
- /// The default implementation this instance if the type is an interface
- /// implemented by this instance. Otherwise, it looks for a service in
- /// the project extension chain.
/// </remarks>
public virtual object GetService (Type t)
{
- if (t.IsInstanceOfType (this))
- return this;
return Services.ProjectService.GetExtensionChain (this).GetService (this, t);
}
@@ -478,6 +473,21 @@ namespace MonoDevelop.Projects
return Services.ProjectService.GetExtensionChain (this).RunTarget (monitor, this, target, configuration);
}
+ public bool SupportsTarget (string target)
+ {
+ return Services.ProjectService.GetExtensionChain (this).SupportsTarget (this, target);
+ }
+
+ public bool SupportsBuild ()
+ {
+ return SupportsTarget (ProjectService.BuildTarget);
+ }
+
+ public bool SupportsExecute ()
+ {
+ return Services.ProjectService.GetExtensionChain (this).SupportsExecute (this);
+ }
+
/// <summary>
/// Cleans the files produced by this solution item
/// </summary>
@@ -602,7 +612,7 @@ namespace MonoDevelop.Projects
return true;
return false;
}
-
+
/// <summary>
/// Gets the time of the last build
/// </summary>
@@ -659,6 +669,8 @@ namespace MonoDevelop.Projects
/// </param>
public bool CanExecute (ExecutionContext context, ConfigurationSelector configuration)
{
+ if (!SupportsExecute ())
+ return false;
return Services.ProjectService.GetExtensionChain (this).CanExecute (this, context, configuration);
}
@@ -1050,6 +1062,16 @@ namespace MonoDevelop.Projects
return DateTime.MinValue;
}
+ internal protected virtual bool OnGetSupportsTarget (string target)
+ {
+ return true;
+ }
+
+ internal protected virtual bool OnGetSupportsExecute ()
+ {
+ return true;
+ }
+
/// <summary>
/// Determines whether this solution item can be executed using the specified context and configuration.
/// </summary>
@@ -1075,7 +1097,12 @@ namespace MonoDevelop.Projects
protected virtual void OnBoundToSolution ()
{
}
-
+
+ internal protected virtual object OnGetService (Type t)
+ {
+ return ItemHandler.GetService (t);
+ }
+
/// <summary>
/// Occurs when the name of the item changes
/// </summary>
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownProject.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownProject.cs
index 30414eb23d..581d8a1b6a 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownProject.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownProject.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
using MonoDevelop.Core;
+using System.Collections.Generic;
namespace MonoDevelop.Projects
{
@@ -49,8 +50,9 @@ namespace MonoDevelop.Projects
this.loadError = loadError;
}
- public override string ProjectType {
- get { return ""; }
+ public override IEnumerable<string> GetProjectTypes ()
+ {
+ yield return "";
}
public override FilePath FileName {
@@ -86,6 +88,12 @@ namespace MonoDevelop.Projects
set { }
}
+ internal protected override bool OnGetSupportsTarget (string target)
+ {
+ // We can't do anything with unsupported projects, other than display them in the solution pad
+ return false;
+ }
+
protected override void OnClean (IProgressMonitor monitor, ConfigurationSelector configuration)
{
}
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownSolutionItem.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownSolutionItem.cs
index 0c39360adb..4c384540f4 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownSolutionItem.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/UnknownSolutionItem.cs
@@ -80,6 +80,11 @@ namespace MonoDevelop.Projects
}
set { }
}
+
+ internal protected override bool OnGetSupportsTarget (string target)
+ {
+ return false;
+ }
protected override void OnClean (IProgressMonitor monitor, ConfigurationSelector configuration)
{
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs
index 02b51a6646..a59cdab116 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Workspace.cs
@@ -95,8 +95,8 @@ namespace MonoDevelop.Projects
}
return null;
}
-
-
+
+ [Obsolete("Use GetProjectsContainingFile() (plural) instead")]
public override Project GetProjectContainingFile (FilePath fileName)
{
foreach (WorkspaceItem it in Items) {
@@ -107,6 +107,15 @@ namespace MonoDevelop.Projects
return null;
}
+ public override IEnumerable<Project> GetProjectsContainingFile (FilePath fileName)
+ {
+ foreach (WorkspaceItem it in Items) {
+ foreach (Project p in it.GetProjectsContainingFile (fileName)) {
+ yield return p;
+ }
+ }
+ }
+
public override bool ContainsItem (IWorkspaceObject obj)
{
if (base.ContainsItem (obj))
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs
index df27e2c77a..8455a52481 100644
--- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs
+++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/WorkspaceItem.cs
@@ -163,8 +163,6 @@ namespace MonoDevelop.Projects
public virtual object GetService (Type t)
{
- if (t.IsInstanceOfType (this))
- return this;
return Services.ProjectService.GetExtensionChain (this).GetService (this, t);
}
@@ -218,11 +216,17 @@ namespace MonoDevelop.Projects
list.Add ((T)this);
return list.AsReadOnly ();
}
-
+
+ [Obsolete("Use GetProjectsContainingFile() (plural) instead")]
public virtual Project GetProjectContainingFile (FilePath fileName)
{
return null;
}
+
+ public virtual IEnumerable<Project> GetProjectsContainingFile (FilePath fileName)
+ {
+ yield break;
+ }
public virtual ReadOnlyCollection<string> GetConfigurations ()
{
@@ -249,6 +253,11 @@ namespace MonoDevelop.Projects
return Services.ProjectService.GetExtensionChain (this).RunTarget (monitor, this, target, configuration);
}
+ public bool SupportsBuild ()
+ {
+ return SupportsTarget (ProjectService.BuildTarget);
+ }
+
public void Clean (IProgressMonitor monitor, string configuration)
{
Clean (monitor, (SolutionConfigurationSelector) configuration);
@@ -259,6 +268,16 @@ namespace MonoDevelop.Projects
Services.ProjectService.GetExtensionChain (this).RunTarget (monitor, this, ProjectService.CleanTarget, configuration);
}
+ public bool SupportsTarget (string target)
+ {
+ return Services.ProjectService.GetExtensionChain (this).SupportsTarget (this, target);
+ }
+
+ public bool SupportsExecute ()
+ {
+ return Services.ProjectService.GetExtensionChain (this).SupportsExecute (this);
+ }
+
public BuildResult Build (IProgressMonitor monitor, string configuration)
{
return InternalBuild (monitor, (SolutionConfigurationSelector) configuration);
@@ -408,6 +427,16 @@ namespace MonoDevelop.Projects
return null;
}
+ internal protected virtual bool OnGetSupportsTarget (string target)
+ {
+ return true;
+ }
+
+ internal protected virtual bool OnGetSupportsExecute ()
+ {
+ return true;
+ }
+
protected virtual void OnClean (IProgressMonitor monitor, ConfigurationSelector configuration)
{
}
@@ -562,7 +591,12 @@ namespace MonoDevelop.Projects
if (NameChanged != null)
NameChanged (this, e);
}
-
+
+ internal protected virtual object OnGetService (Type t)
+ {
+ return null;
+ }
+
protected void NotifyModified ()
{
OnModified (new WorkspaceItemEventArgs (this));
diff --git a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_2_0.xml b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_2_0.xml
index 8cc32a0d8f..a22df8a5f0 100644
--- a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_2_0.xml
+++ b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_2_0.xml
@@ -74,5 +74,6 @@
<Assembly name="Mono.Tasklets" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
<Assembly name="Mono.Web" version="2.0.0.0" publicKeyToken="0738eb9f132ed756" />
<Assembly name="RabbitMQ.Client" version="2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="FSharp.Core" />
</Assemblies>
</TargetFramework> \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_3_5_client.xml b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_3_5_client.xml
index 8527b2575c..f4bce761d7 100644
--- a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_3_5_client.xml
+++ b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_3_5_client.xml
@@ -54,5 +54,6 @@
<Assembly name="System.ServiceModel.Web" version="3.5.0.0" publicKeyToken="31bf3856ad364e35" />
<Assembly name="System.Windows.Presentation" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
<Assembly name="System.Xml.Linq" version="3.5.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="FSharp.Core" />
</Assemblies>
</TargetFramework> \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0.xml b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0.xml
index 9ab95c26e5..e6bf0f3da4 100644
--- a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0.xml
+++ b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0.xml
@@ -142,6 +142,7 @@
<Assembly name="Mono.Tasklets" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
<Assembly name="Mono.Web" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
<Assembly name="RabbitMQ.Client" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="FSharp.Core" />
<!-- the following assemblies were added by Mono, but don't seem to exist any more -->
<Assembly name="Mono.WebServer" />
diff --git a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml
index 32e286e8f8..5362de837a 100644
--- a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml
+++ b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_0_client.xml
@@ -80,5 +80,6 @@
<Assembly name="System.Device" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
<Assembly name="System.Speech" version="4.0.0.0" publicKeyToken="31bf3856ad364e35" />
<Assembly name="System.Windows.Input.Manipulations" version="4.0.0.0" publicKeyToken="b77a5c561934e089" />
+ <Assembly name="FSharp.Core" />
</Assemblies>
</TargetFramework>
diff --git a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_5.xml b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_5.xml
index 6d059ba518..46e275dad5 100644
--- a/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_5.xml
+++ b/main/src/core/MonoDevelop.Core/frameworks/framework_NET_4_5.xml
@@ -158,6 +158,7 @@
<Assembly name="Mono.Tasklets" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
<Assembly name="Mono.Web" version="4.0.0.0" publicKeyToken="0738eb9f132ed756" />
<Assembly name="RabbitMQ.Client" version="4.0.0.0" publicKeyToken="b03f5f7f11d50a3a" />
+ <Assembly name="FSharp.Core" />
<!-- the following assemblies were added by Mono, but don't seem to exist any more -->
<Assembly name="Mono.WebServer" />
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
index 262056a0ff..a633e6d460 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/Commands.addin.xml
@@ -380,7 +380,7 @@
_label = "_Save" />
<Command id = "MonoDevelop.Ide.Commands.FileCommands.SaveAll"
defaultHandler = "MonoDevelop.Ide.Commands.SaveAllHandler"
- icon = "md-save-all-icon"
+ icon = "md-save-all"
shortcut = "Control|Shift|S"
macShortcut = "Meta|Shift|S"
_description = "Save all open files"
@@ -495,7 +495,7 @@
_label = "Require Specific Version" />
<Command id = "MonoDevelop.Ide.Commands.FileTabCommands.CloseAllButThis"
defaultHandler = "MonoDevelop.Ide.Commands.CloseAllButThisHandler"
- _label = "C_lose all but this"
+ _label = "C_lose Others"
_description = "Closes all opened files except for the active file"/>
<Command id = "MonoDevelop.Ide.Commands.FileTabCommands.CopyPathName"
defaultHandler = "MonoDevelop.Ide.Commands.CopyPathNameHandler"
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/DefaultPolicyPanels.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/DefaultPolicyPanels.addin.xml
index 5609d08bd5..87421f4d48 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/DefaultPolicyPanels.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/DefaultPolicyPanels.addin.xml
@@ -9,16 +9,16 @@
<Extension path = "/MonoDevelop/ProjectModel/Gui/DefaultPolicyPanels">
<Section id="Common" _label="General">
</Section>
- <Section id="Build" _label="Build">
+ <Section id="Build" _label="Build" icon="md-prefs-build">
</Section>
- <Section id="Run" _label="Run">
+ <Section id="Run" _label="Run" icon="md-prefs-play">
</Section>
<Section id="SourceCode" _label="Source Code">
- <Section id="DefaultDotNetNamingPolicies" _label=".NET Naming Policies">
+ <Section id="DefaultDotNetNamingPolicies" _label=".NET Naming Policies" icon="md-prefs-dotnet-naming-policies" >
<Panel id = "NamespaceSynchronisationPanel" class = "MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanel" />
</Section>
- <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
- <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" fill="true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" icon="md-prefs-code-formatting" />
+ <Section id="DefaultStandardHeader" _label="Standard Header" fill="true" class="MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" icon="md-prefs-standard-header" />
</Section>
<Section id="VersionControl" _label="Version Control" />
</Extension>
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/GlobalOptionsDialog.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/GlobalOptionsDialog.addin.xml
index 101ee91f08..19b8e2e82f 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/GlobalOptionsDialog.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/GlobalOptionsDialog.addin.xml
@@ -7,38 +7,38 @@
<Extension path = "/MonoDevelop/Ide/GlobalOptionsDialog">
<Section id = "Preferences" _label = "Environment">
- <Section id = "GeneralAuthorInfo" _label = "Author Information" icon="md-monkey" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.GlobalAuthorInformationPanel" />
- <Section id = "Language" _label = "Language" icon="md-locale" class = "MonoDevelop.Ide.Gui.OptionPanels.IDEStyleOptionsPanel">
-<!-- <Panel _label = "Welcome Page" class = "MonoDevelop.Ide.WelcomePage.WelcomePageOptionPanel" />-->
+ <Section id = "GeneralAuthorInfo" _label = "Author Information" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.GlobalAuthorInformationPanel" icon="md-prefs-author-information" />
+ <Section id = "Language" _label = "Language" class = "MonoDevelop.Ide.Gui.OptionPanels.IDEStyleOptionsPanel" icon="md-prefs-language">
+ <!-- <Panel _label = "Welcome Page" class = "MonoDevelop.Ide.WelcomePage.WelcomePageOptionPanel" />-->
</Section>
- <Section id = "KeyBindings" _label = "Key Bindings" fill="true" icon="md-keyboard-shortcuts" class = "MonoDevelop.Ide.Gui.OptionPanels.KeyBindingsPanel" />
- <Section id = "Fonts" _label = "Fonts" fill="true" icon = "md-letters" class = "MonoDevelop.Ide.Fonts.FontChooserPanel"/>
- <Section id = "Updates" _label = "Updates" icon="md-updates" class = "MonoDevelop.Ide.Gui.OptionPanels.AddInsOptionsPanel" />
- <Section id = "TaskList" _label = "Tasks" icon="md-task-list-icon" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.TasksOptionsPanel" />
- <Section id = "ExternalTools" _label = "External Tools" icon="md-external-tools" fill="true" class = "MonoDevelop.Ide.ExternalTools.ExternalToolPane" />
+ <Section id = "KeyBindings" _label = "Key Bindings" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.KeyBindingsPanel" icon="md-prefs-key-bindings" />
+ <Section id = "Fonts" _label = "Fonts" fill="true" class = "MonoDevelop.Ide.Fonts.FontChooserPanel" icon = "md-prefs-fonts" />
+ <Section id = "Updates" _label = "Updates" class = "MonoDevelop.Ide.Gui.OptionPanels.AddInsOptionsPanel" icon="md-prefs-updates" />
+ <Section id = "TaskList" _label = "Tasks" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.TasksOptionsPanel" icon="md-prefs-task-list" />
+ <Section id = "ExternalTools" _label = "External Tools" fill="true" class = "MonoDevelop.Ide.ExternalTools.ExternalToolPane" icon="md-prefs-external-tools" />
</Section>
<Section id = "Projects" _label = "Projects">
- <Section id = "LoadSave" _label = "Load/Save" icon="md-drive" class = "MonoDevelop.Ide.Gui.OptionPanels.LoadSavePanel" />
- <Section id = "Build" _label = "Build" icon="md-hammer" class = "MonoDevelop.Ide.Gui.OptionPanels.BuildPanel">
+ <Section id = "LoadSave" _label = "Load/Save" class = "MonoDevelop.Ide.Gui.OptionPanels.LoadSavePanel" icon="md-prefs-load-save" />
+ <Section id = "Build" _label = "Build" class = "MonoDevelop.Ide.Gui.OptionPanels.BuildPanel" icon="md-prefs-build">
<Panel id = "BuildMessages" _label = "Errors and Warnings" class = "MonoDevelop.Ide.Gui.OptionPanels.BuildMessagePanel" />
<Panel id = "Directories" _label = "Assembly Folders" class = "MonoDevelop.Ide.Gui.OptionPanels.AssemblyFoldersPanel" />
</Section>
<Section id = "MonoRuntime" _label = ".NET Runtimes" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.MonoRuntimePanel" />
- <Section id = "SdkLocations" _label = "SDK Locations" icon = "sdk-locations" />
+ <Section id = "SdkLocations" _label = "SDK Locations" icon = "md-prefs-sdk-locations" />
</Section>
<Section id = "TextEditor" _label = "Text Editor">
- <Section id = "Formatting" icon="md-formatting" _label = "Formatting" />
- <Section id = "CodeTemplates" icon="md-template" _label = "Code Templates" fill="true" class = "MonoDevelop.Ide.CodeTemplates.CodeTemplatePane"/>
+ <Section id = "Formatting" _label = "Formatting" icon="md-prefs-code-formatting" />
+ <Section id = "CodeTemplates" _label = "Code Templates" fill="true" class = "MonoDevelop.Ide.CodeTemplates.CodeTemplatePane" icon="md-prefs-code-templates" />
</Section>
<Section id="SourceCode" _label="Source Code">
- <Section id="DefaultDotNetNamingPolicies" _label=".NET Naming Policies">
+ <Section id="DefaultDotNetNamingPolicies" _label=".NET Naming Policies" icon="md-prefs-dotnet-naming-policies">
<Panel id = "NamespaceSynchronisationPanel" class = "MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanel" />
</Section>
- <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
- <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" fill="true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" icon="md-prefs-code-formatting" />
+ <Section id="DefaultStandardHeader" _label="Standard Header" fill="true" class="MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" icon="md-prefs-standard-header" />
</Section>
<Section id = "VersionControl" _label = "Version Control" />
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml
index 680d22099a..2a9bfa6b3a 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/ItemOptionPanels.addin.xml
@@ -30,11 +30,11 @@
</Condition>
</Section>
<Condition id="ItemType" value="Solution">
- <Section id = "AuthorInfo" _label = "Author Information" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.AuthorInformationPanel" />
+ <Section id = "AuthorInfo" _label = "Author Information" fill="true" class = "MonoDevelop.Ide.Gui.OptionPanels.AuthorInformationPanel" icon="md-prefs-author-information" />
</Condition>
</Section>
<Section id="Build" _label="Build">
- <Section id="General" _label="General" icon="md-build-combine">
+ <Section id="General" _label="General" icon="md-prefs-build">
<Condition id="ItemType" value="DotNetAssemblyProject">
<Panel id = "RuntimeOptionsPanel" _label = "Runtime Options" class = "MonoDevelop.Ide.Projects.OptionPanels.RuntimeOptionsPanel"/>
</Condition>
@@ -49,11 +49,11 @@
</Condition>
</Section>
<Condition id="ItemType" value="SolutionEntityItem">
- <Section id = "CustomCommands" _label = "Custom Commands" icon="md-custom-commands" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.BuildCustomCommandPanel"/>
+ <Section id = "CustomCommands" _label = "Custom Commands" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.BuildCustomCommandPanel" icon = "md-prefs-generic" />
</Condition>
<Condition id="ItemType" value="Project">
<Section id = "ProjectConfigurations" _label = "Configurations" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.SolutionItemConfigurationsPanel"/>
- <Section id = "Compiler" _label="Compiler" icon="md-compiler-options" />
+ <Section id = "Compiler" _label="Compiler" />
<Section id = "SigningPreferences" _label = "Assembly Signing" class = "MonoDevelop.Ide.Projects.OptionPanels.CommonAssemblySigningPreferencesPanel"/>
<Section id = "OutputOptionsPanel" _label = "Output" class = "MonoDevelop.Ide.Projects.OptionPanels.OutputOptionsPanel"/>
</Condition>
@@ -65,7 +65,7 @@
</Condition>
</Section>
<Section id="Run" _label="Run">
- <Section id="General" _label="General" icon="gtk-execute">
+ <Section id="General" _label="General" icon="md-prefs-play">
<Condition id="ItemType" value="Project">
<Panel id = "RunOptionsPanel" _label = "Run" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.RunOptionsPanel"/>
</Condition>
@@ -74,11 +74,11 @@
<Section id = "StartupOptionsPanel" _label = "Startup Project" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.StartupOptionsPanel"/>
</Condition>
<Condition id="ItemType" value="SolutionEntityItem">
- <Section id = "CustomCommands" _label = "Custom Commands" icon="md-custom-commands" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.ExecutionCustomCommandPanel"/>
+ <Section id = "CustomCommands" _label = "Custom Commands" fill = "true" class = "MonoDevelop.Ide.Projects.OptionPanels.ExecutionCustomCommandPanel" />
</Condition>
</Section>
<Section id="SourceCode" _label="Source Code">
- <Section id="DotNetNamingPolicies" _label=".NET Naming Policies">
+ <Section id="DotNetNamingPolicies" _label=".NET Naming Policies" icon="md-prefs-dotnet-naming-policies">
<Condition id="ItemType" value="Solution">
<Panel id = "NamespaceSynchronisationPanel" class = "MonoDevelop.Ide.Projects.OptionPanels.NamespaceSynchronisationPanel" />
</Condition>
@@ -87,12 +87,12 @@
</Condition>
</Section>
<Condition id="ItemType" value="Solution">
- <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
- <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" fill="true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" icon="md-prefs-code-formatting" />
+ <Section id="DefaultStandardHeader" _label="Standard Header" fill="true" class= "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" icon="md-prefs-standard-header" />
</Condition>
<Condition id="ItemType" value="SolutionItem">
- <Section id="CodeFormattingPolicies" _label="Code Formatting" icon="md-formatting" fill = "true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" />
- <Section id="DefaultStandardHeader" _label = "Standard Header" fill="true" class = "MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" />
+ <Section id="CodeFormattingPolicies" _label="Code Formatting" fill="true" class="MonoDevelop.Ide.Projects.OptionPanels.CodeFormattingPanel" icon="md-prefs-code-formatting" />
+ <Section id="DefaultStandardHeader" _label="Standard Header" fill="true" class="MonoDevelop.Ide.StandardHeader.StandardHeaderPolicyPanel" icon="md-prefs-standard-header" />
</Condition>
</Section>
</Extension>
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
index 36e512a3b2..6f7952db39 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/MainMenu.addin.xml
@@ -10,6 +10,11 @@
<ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
</ExtensionPoint>
+<ExtensionPoint path = "/MonoDevelop/Ide/TargetSelectorCommands" name = "Target selector commands">
+ <Description>Commands to be shown in the target selector in the main toolbar</Description>
+ <ExtensionNodeSet id="MonoDevelop.Components.Commands.ItemSet"/>
+</ExtensionPoint>
+
<Extension path = "/MonoDevelop/Ide/MainMenu">
<ItemSet id = "File" _label = "_File">
<ItemSet id = "New" _label = "_New">
@@ -194,7 +199,7 @@
<ItemSet id = "Run" _label = "_Run">
<CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.Run" />
- <ItemSet id = "RunWith" _label = "Run With">
+ <ItemSet id = "RunWith" _label = "Run With" autohide = "true">
<CommandItem id = "MonoDevelop.Ide.Commands.ProjectCommands.RunWithList" />
</ItemSet>
<SeparatorItem id = "StopSection" />
@@ -270,4 +275,7 @@
</Condition>
</Extension>
+<Extension path="/MonoDevelop/Ide/TargetSelectorCommands">
+</Extension>
+
</ExtensionModel>
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/MimeTypes.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/MimeTypes.addin.xml
index 804f136647..54d687c19f 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/MimeTypes.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/MimeTypes.addin.xml
@@ -73,9 +73,10 @@
<MimeType id="application/x-sh" _description="Shell script" isText="true">
<File pattern="*.sh" />
</MimeType>
- <MimeType id="text/x-fsharp" _description="f# files" isText="true">
+ <MimeType id="text/x-fsharp" _description="f# files" isText="true" icon="md-file-source">
<File pattern="*.fs" />
<File pattern="*.fsx" />
+ <File pattern="*.fsi" />
</MimeType>
<MimeType id="application/x-msbuild" _description="MSBuild targets file" baseType="application/xml">
<File pattern="*.targets" />
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
index 95c9c2ab3d..2bfa4d3823 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
@@ -282,11 +282,12 @@
<Customizer id="MonoDevelop.Ide.Execution.MonoExecutionCustomizer" _name="Mono Options" />
</Extension>
- <Extension path = "/MonoDevelop/Ide/Fonts">
- <Font name ="Editor" _displayName="Text Editor" default ="_DEFAULT_MONOSPACE"/>
- <Font name ="Editor(Gutter)" _displayName="Text Editor Line Numbers" default =""/>
- <Font name ="Pad" _displayName="Pads" default ="_DEFAULT_SANS"/>
- <Font name ="OutputPad" _displayName="Output Pads" default ="_DEFAULT_MONOSPACE"/>
+ <Extension path="/MonoDevelop/Ide/Fonts">
+ <Font name="Editor" _displayName="Text Editor" default="_DEFAULT_MONOSPACE" defaultMac="Menlo 12" /><!-- TODO: VV: "_DEFAULT_MONOSPACE" => "Consolas 10" -->
+ <Font name="Editor(TooltipSource)" _displayName="Text Editor Tooltip Source" default="_DEFAULT_MONOSPACE" defaultMac="Menlo 13" /><!-- TODO: VV: "_DEFAULT_MONOSPACE" => "Consolas 10" -->
+ <Font name="Editor(Gutter)" _displayName="Text Editor Line Numbers" default="_DEFAULT_MONOSPACE" defaultMac="Menlo 11" /><!-- TODO: VV: "_DEFAULT_MONOSPACE" => "Consolas 10" -->
+ <Font name="Pad" _displayName="Pads" default="_DEFAULT_SANS" defaultMac="Lucida Grande 11" /><!-- TODO: VV: "_DEFAULT_SANS" => "Segoe UI 9" -->
+ <Font name="OutputPad" _displayName="Output Pads" default="_DEFAULT_MONOSPACE" defaultMac="Menlo 11" /><!-- TODO: VV: "_DEFAULT_MONOSPACE" => "Consolas 9" -->
</Extension>
<Extension path = "/MonoDevelop/Core/UserDataMigration">
@@ -315,6 +316,7 @@
<Extension path = "/MonoDevelop/Ide/CustomTools">
<Tool name="ResXFileCodeGenerator" type="MonoDevelop.Ide.CustomTools.ResXFileCodeGenerator" />
+ <Tool name="PublicResXFileCodeGenerator" type="MonoDevelop.Ide.CustomTools.PublicResXFileCodeGenerator" />
</Extension>
<Extension path = "/MonoDevelop/Core/FileSystemExtensions">
@@ -324,4 +326,4 @@
<Extension path = "/MonoDevelop/Ide/CompletionCharacters">
<Complete id="Other" language="Other" commitOnSpace="True" commitChars="{}[]().,:;+-*/%&amp;|^!~=&lt;&gt;?@#'&quot;\"/>
</Extension>
-</ExtensionModel> \ No newline at end of file
+</ExtensionModel>
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/Pads.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/Pads.addin.xml
index 1fb1bfb88c..c3094cc430 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/Pads.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/Pads.addin.xml
@@ -31,7 +31,7 @@
<Pad id = "MonoDevelop.Ide.Gui.Pads.TaskListPad"
_label = "Tasks"
- icon="md-task-list-icon"
+ icon="md-task-list"
class = "MonoDevelop.Ide.Gui.Pads.TaskListPad"
defaultPlacement = "Bottom"
defaultStatus="AutoHide"
@@ -61,6 +61,7 @@
<NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.SolutionFolderFileNodeBuilder"/>
<NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.PortableFrameworkSubsetNodeBuilder"/>
<NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.ImplicitFrameworkAssemblyReferenceNodeBuilder"/>
+ <NodeBuilder class = "MonoDevelop.Ide.Gui.Pads.ProjectPad.SapNodeBuilder"/>
</SolutionPad>
<SolutionPad id = "ClassPad" _label = "Classes" icon = "md-class" class = "MonoDevelop.Ide.Gui.Pads.ClassBrowser.ClassBrowserPad" defaultPlacement = "Left" defaultStatus="AutoHide">
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml
index 6dcf556461..626b7db3b9 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/StockIcons.addin.xml
@@ -1,300 +1,378 @@
<ExtensionModel>
-<ExtensionPoint path = "/MonoDevelop/Core/StockIcons" name = "Stock icons">
+<ExtensionPoint path="/MonoDevelop/Core/StockIcons" name="Stock icons">
<Description>Available from MonoDevelop.Ide.ImageService</Description>
<ExtensionNode name="StockIcon" type="MonoDevelop.Ide.Extensions.StockIconCodon" />
</ExtensionPoint>
-<Extension path = "/MonoDevelop/Core/StockIcons">
+<Extension path="/MonoDevelop/Core/StockIcons">
<Condition id="Platform" value="!windows">
- <StockIcon stockid = "md-closed-folder" resource = "generic-folder-osx-light-16.png" size="Menu" />
- <StockIcon stockid = "md-closed-reference-folder" resource = "special-folder-osx-light-16.png" size="Menu" />
- <StockIcon stockid = "md-closed-resource-folder" resource = "special-folder-osx-light-16.png" size="Menu" />
- <StockIcon stockid = "md-solution-folder-closed" resource = "special-folder-osx-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-component-folder-closed" resource = "special-folder-osx-light-16.png" size="Menu"/>
+ <StockIcon stockid="md-closed-folder" resource="generic-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-closed-reference-folder" resource="special-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-closed-resource-folder" resource="special-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-solution-folder-closed" resource="special-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-component-folder-closed" resource="special-folder-osx-light-16.png" size="Menu" />
- <StockIcon stockid = "md-open-folder" resource = "generic-folder-osx-light-16.png" size="Menu" />
- <StockIcon stockid = "md-open-reference-folder" resource = "special-folder-osx-light-16.png" size="Menu" />
- <StockIcon stockid = "md-open-resource-folder" resource = "special-folder-osx-light-16.png" size="Menu" />
- <StockIcon stockid = "md-solution-folder-open" resource = "special-folder-osx-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-component-folder-open" resource = "special-folder-osx-light-16.png" size="Menu"/>
+ <StockIcon stockid="md-open-folder" resource="generic-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-open-reference-folder" resource="special-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-open-resource-folder" resource="special-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-solution-folder-open" resource="special-folder-osx-light-16.png" size="Menu" />
+ <StockIcon stockid="md-component-folder-open" resource="special-folder-osx-light-16.png" size="Menu" />
</Condition>
+
<Condition id="Platform" value="windows">
- <StockIcon stockid = "md-closed-folder" resource = "generic-folder-win-light-16.png" size="Menu" />
- <StockIcon stockid = "md-closed-reference-folder" resource = "special-folder-win-light-16.png" size="Menu" />
- <StockIcon stockid = "md-closed-resource-folder" resource = "special-folder-win-light-16.png" size="Menu" />
- <StockIcon stockid = "md-solution-folder-closed" resource = "special-folder-win-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-component-folder-closed" resource = "special-folder-win-light-16.png" size="Menu"/>
+ <StockIcon stockid="md-closed-folder" resource="generic-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-closed-reference-folder" resource="special-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-closed-resource-folder" resource="special-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-solution-folder-closed" resource="special-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-component-folder-closed" resource="special-folder-win-light-16.png" size="Menu" />
- <StockIcon stockid = "md-open-folder" resource = "generic-folder-win-light-16.png" size="Menu" />
- <StockIcon stockid = "md-open-reference-folder" resource = "special-folder-win-light-16.png" size="Menu" />
- <StockIcon stockid = "md-open-resource-folder" resource = "special-folder-win-light-16.png" size="Menu" />
- <StockIcon stockid = "md-solution-folder-open" resource = "special-folder-win-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-component-folder-open" resource = "special-folder-win-light-16.png" size="Menu"/>
+ <StockIcon stockid="md-open-folder" resource="generic-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-open-reference-folder" resource="special-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-open-resource-folder" resource="special-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-solution-folder-open" resource="special-folder-win-light-16.png" size="Menu" />
+ <StockIcon stockid="md-component-folder-open" resource="special-folder-win-light-16.png" size="Menu" />
</Condition>
- <StockIcon stockid = "md-folder-overlay" resource = "assembly-reference-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-warning-overlay" resource = "invalid-reference-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-reference-warning" icon = "md-reference|res:invalid-reference-overlay-light-16.png" size = "Menu"/>
- <StockIcon stockid = "md-project-overlay" resource = "project-reference-overlay-light-16.png" size="Menu" />
+ <!-- GTK icons redefined -->
+ <StockIcon stockid="gtk-add" resource="add-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-apply" resource="done-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-cancel" resource="remove-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-clear" resource="clear-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-close" resource="remove-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-copy" resource="copy-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-delete" resource="remove-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-edit" resource="edit-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-find" resource="find-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-find-and-replace" resource="find-and-replace-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-go-back" resource="go-back-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-go-down" resource="go-down-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-go-forward" resource="go-forward-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-go-up" resource="go-up-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-home" resource="home-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-jump-to" resource="jump-to-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-media-play" resource="media-play-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-missing-image" resource="missing-image-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-new" resource="add-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-ok" resource="done-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-open" resource="open-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-properties" resource="properties-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-refresh" resource="refresh-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-remove" resource="remove-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-save" resource="save-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-stop" resource="stop-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-undo" resource="undo-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-zoom-in" resource="zoom-in-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-zoom-out" resource="zoom-out-light-16.png" size="Menu" />
+
+ <!-- MD icons -->
+ <StockIcon stockid="md-add" resource="add-light-16.png" size="Menu" />
+ <StockIcon stockid="md-assembly-project" resource="assembly-project-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breadcrumb-next" resource="breadcrumb-next-normal-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breadcrumb-prev" resource="breadcrumb-previous-normal-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breakpoint" resource="breakpoint-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breakpoint-disable-all" resource="breakpoint-disable-all-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breakpoint-disabled" resource="breakpoint-disabled-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breakpoint-invalid" resource="breakpoint-invalid-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breakpoint-new" resource="breakpoint-new-light-16.png" size="Menu" />
+ <StockIcon stockid="md-breakpoint-on-off" resource="breakpoint-on-off-light-16.png" size="Menu" />
+ <StockIcon stockid="md-class" resource="element-class-light-16.png" size="Menu" />
+ <StockIcon stockid="md-class-file" resource="file-class-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-clear" resource="clear-light-16.png" size="Menu" />
+ <StockIcon stockid="md-command" resource="command-light-16.png" size="Menu" />
+ <StockIcon stockid="md-comment" resource="comment-light-16.png" size="Menu" />
+ <StockIcon stockid="md-console" resource="pad-application-output-light-16.png" size="Menu" />
+ <StockIcon stockid="md-delegate" resource="element-delegate-light-16.png" size="Menu" />
+ <StockIcon stockid="md-delete" resource="remove-light-16.png" size="Menu" />
+ <StockIcon stockid="md-disclose-arrow-down" resource="disclose-arrow-down-light-16.png" size="Menu" />
+ <StockIcon stockid="md-disclose-arrow-up" resource="disclose-arrow-up-light-16.png" size="Menu" />
+ <StockIcon stockid="md-done" resource="done-light-16.png" size="Menu" />
+ <StockIcon stockid="md-empty-file-icon" resource="file-generic-light-16.png" size="Menu" />
+ <StockIcon stockid="md-enum" resource="element-enumeration-light-16.png" size="Menu" />
+ <StockIcon stockid="md-enum-file" resource="file-enumeration-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-errors-list" resource="pad-error-list-light-16.png" size="Menu" />
+ <StockIcon stockid="md-errors-list-has-errors" resource="pad-error-list-errors-light-16.png" size="Menu" />
+ <StockIcon stockid="md-errors-list-has-warnings" resource="pad-error-list-warnings-light-16.png" size="Menu" />
+ <StockIcon stockid="md-event" resource="element-event-light-16.png" size="Menu" />
+ <StockIcon stockid="md-exception" resource="element-exception-light-16.png" size="Menu" />
+ <StockIcon stockid="md-extensionmethod" resource="element-extensionmethod-light-16.png" size="Menu" />
+ <StockIcon stockid="md-feedback" resource="feedback-light-16.png" size="Menu" />
+ <StockIcon stockid="md-field" resource="element-field-light-16.png" size="Menu" />
+ <StockIcon stockid="md-file-header" resource="file-header-light-16.png" size="Menu" />
+ <StockIcon stockid="md-file-header" resource="file-header-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-file-source" resource="file-source-light-16.png" size="Menu" />
+ <StockIcon stockid="md-file-source" resource="file-source-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-file-unit-test" resource="file-unit-test-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-folder-overlay" resource="assembly-reference-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-fs-field" resource="element-fs-field-light-16.png" size="Menu" />
+ <StockIcon stockid="md-generic-pad" resource="pad-generic-pad-light-16.png" size="Menu" />
+ <StockIcon stockid="md-group-by-category" resource="group-by-category-light-16.png" size="Menu" />
+ <StockIcon stockid="md-gui-file" resource="file-gtk-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-help" resource="pad-help-light-16.png" size="Menu" />
+ <StockIcon stockid="md-html-file-icon" resource="file-web-light-16.png" size="Menu" />
+ <StockIcon stockid="md-html-file-icon" resource="file-web-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-interface" resource="element-interface-light-16.png" size="Menu" />
+ <StockIcon stockid="md-interface-file" resource="file-interface-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-keyword" resource="element-keyword-light-16.png" size="Menu" />
+ <StockIcon stockid="md-library-overlay" resource="project-library-overlay-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-link-overlay" resource="link-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-literal" resource="element-constant-light-16.png" size="Menu" />
+ <StockIcon stockid="md-magnify" resource="pad-search-results-light-16.png" size="Menu" />
+ <StockIcon stockid="md-message-log" resource="pad-application-output-light-16.png" size="Menu" />
+ <StockIcon stockid="md-method" resource="element-method-light-16.png" size="Menu" />
+ <StockIcon stockid="md-misc-files" resource="file-generic-light-16.png" size="Menu" />
+ <StockIcon stockid="md-module" resource="element-module-light-16.png" size="Menu" />
+ <StockIcon stockid="md-name-space" resource="element-namespace-light-16.png" size="Menu" />
+ <StockIcon stockid="md-newmethod" resource="element-method-new-light-16.png" size="Menu" />
+ <StockIcon stockid="md-other-declaration" resource="element-other-declaration-light-16.png" size="Menu" />
+ <StockIcon stockid="md-output-icon" resource="pad-application-output-light-16.png" size="Menu" />
+ <StockIcon stockid="md-package-source" resource="package-source-light-16.png" size="Menu" />
+ <StockIcon stockid="md-parser" resource="parser-light-16.png" size="Menu" />
+ <StockIcon stockid="md-pin-down" resource="pin-down-light-16.png" size="Menu" />
+ <StockIcon stockid="md-pin-up" resource="pin-up-light-16.png" size="Menu" />
+ <StockIcon stockid="md-popup-close" resource="popup-close-light-16.png" size="Menu" />
+ <StockIcon stockid="md-popup-close-hover" resource="popup-close-hover-light-16.png" size="Menu" />
+ <StockIcon stockid="md-preferences" resource="preferences-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-author-information" resource="prefs-author-information-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-build" resource="prefs-build-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-code-formatting" resource="prefs-code-formatting-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-code-templates" resource="prefs-code-templates-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-csharp" resource="prefs-csharp-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-dotnet-naming-policies" resource="prefs-dotnet-naming-policies-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-external-tools" resource="prefs-external-tools-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-fonts" resource="prefs-fonts-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-generic" resource="prefs-generic-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-key-bindings" resource="prefs-key-bindings-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-language" resource="prefs-language-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-load-save" resource="prefs-load-save-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-name-conventions" resource="prefs-name-conventions-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-play" resource="prefs-play-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-sdk-locations" resource="prefs-sdk-locations-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-standard-header" resource="prefs-standard-header-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-task-list" resource="prefs-task-list-light-16.png" size="Menu" />
+ <StockIcon stockid="md-prefs-updates" resource="prefs-updates-light-16.png" size="Menu" />
+ <StockIcon stockid="md-project" resource="project-light-16.png" size="Menu" />
+ <StockIcon stockid="md-project" resource="project-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-project-overlay" resource="project-reference-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-properties" resource="properties-light-16.png" size="Menu" />
+ <StockIcon stockid="md-property" resource="element-property-light-16.png" size="Menu" />
+ <StockIcon stockid="md-reference" resource="reference-light-16.png" size="Menu" />
+ <StockIcon stockid="md-regular-file" resource="file-generic-light-16.png" size="Menu" />
+ <StockIcon stockid="md-resource-file-icon" resource="file-resource-light-16.png" size="Menu" />
+ <StockIcon stockid="md-resource-file-icon" resource="file-resource-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-save-all" resource="save-all-light-16.png" size="Menu" />
+ <StockIcon stockid="md-script-file-icon" resource="file-script-light-16.png" size="Menu" />
+ <StockIcon stockid="md-script-file-icon" resource="file-script-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-searchbox-clear" resource="searchbox-clear-light-16.png" size="Menu" />
+ <StockIcon stockid="md-searchbox-search" resource="searchbox-search-light-16.png" size="Menu" />
+ <StockIcon stockid="md-solution" resource="solution-light-16.png" size="Menu" />
+ <StockIcon stockid="md-solution" resource="solution-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-sort-alphabetically" resource="sort-alphabetically-light-16.png" size="Menu" />
+ <StockIcon stockid="md-stop" resource="stop-light-16.png" size="Menu" />
+ <StockIcon stockid="md-struct" resource="element-structure-light-16.png" size="Menu" />
+ <StockIcon stockid="md-struct-file" resource="file-struct-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-task-list" resource="pad-task-list-light-16.png" size="Menu" />
+ <StockIcon stockid="md-template" resource="element-template-light-16.png" size="Menu" />
+ <StockIcon stockid="md-template-surroundwith" resource="element-template-surroundwith-light-16.png" size="Menu" />
+ <StockIcon stockid="md-text-file-icon" resource="file-text-light-16.png" size="Menu" />
+ <StockIcon stockid="md-text-file-icon" resource="file-text-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-type" resource="element-type-light-16.png" size="Menu" />
+ <StockIcon stockid="md-updates" resource="updates-light-16.png" size="Menu" />
+ <StockIcon stockid="md-variable" resource="element-variable-light-16.png" size="Menu" />
+ <StockIcon stockid="md-warning-overlay" resource="invalid-reference-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-web-overlay" resource="project-web-overlay-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-workspace" resource="workspace-light-16.png" size="Menu" />
+ <StockIcon stockid="md-workspace" resource="workspace-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-xml-file-icon" resource="file-xml-light-16.png" size="Menu" />
+ <StockIcon stockid="md-xml-file-icon" resource="file-xml-light-32.png" size="Dnd" />
+
+ <!-- All sizes icons -->
+ <StockIcon stockid="gtk-dialog-error" resource="error-light-16.png" />
+ <StockIcon stockid="gtk-dialog-error" resource="error-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-dialog-error" resource="error-light-24.png" size="Button" />
+ <StockIcon stockid="gtk-dialog-error" resource="error-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="gtk-dialog-error" resource="error-light-32.png" size="Dnd" />
+ <StockIcon stockid="gtk-dialog-error" resource="error-light-48.png" size="Dialog" />
+
+ <StockIcon stockid="gtk-dialog-warning" resource="warning-light-16.png" />
+ <StockIcon stockid="gtk-dialog-warning" resource="warning-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-dialog-warning" resource="warning-light-24.png" size="Button" />
+ <StockIcon stockid="gtk-dialog-warning" resource="warning-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="gtk-dialog-warning" resource="warning-light-32.png" size="Dnd" />
+ <StockIcon stockid="gtk-dialog-warning" resource="warning-light-48.png" size="Dialog" />
+
+ <StockIcon stockid="gtk-dialog-info" resource="information-light-16.png" />
+ <StockIcon stockid="gtk-dialog-info" resource="information-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-dialog-info" resource="information-light-24.png" size="Button" />
+ <StockIcon stockid="gtk-dialog-info" resource="information-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="gtk-dialog-info" resource="information-light-32.png" size="Dnd" />
+ <StockIcon stockid="gtk-dialog-info" resource="information-light-48.png" size="Dialog" />
+
+ <StockIcon stockid="gtk-dialog-question" resource="question-light-16.png" />
+ <StockIcon stockid="gtk-dialog-question" resource="question-light-16.png" size="Menu" />
+ <StockIcon stockid="gtk-dialog-question" resource="question-light-24.png" size="Button" />
+ <StockIcon stockid="gtk-dialog-question" resource="question-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="gtk-dialog-question" resource="question-light-32.png" size="Dnd" />
+ <StockIcon stockid="gtk-dialog-question" resource="question-light-48.png" size="Dialog" />
+
+ <StockIcon stockid="md-error" resource="error-light-16.png" />
+ <StockIcon stockid="md-error" resource="error-light-16.png" size="Menu" />
+ <StockIcon stockid="md-error" resource="error-light-24.png" size="Button" />
+ <StockIcon stockid="md-error" resource="error-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="md-error" resource="error-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-error" resource="error-light-48.png" size="Dialog" />
+
+ <StockIcon stockid="md-information" resource="information-light-16.png" />
+ <StockIcon stockid="md-information" resource="information-light-16.png" size="Menu" />
+ <StockIcon stockid="md-information" resource="information-light-24.png" size="Button" />
+ <StockIcon stockid="md-information" resource="information-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="md-information" resource="information-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-information" resource="information-light-48.png" size="Dialog" />
+
+ <StockIcon stockid="md-package" resource="package-light-16.png" />
+ <StockIcon stockid="md-package" resource="package-light-16.png" size="Menu" />
+ <StockIcon stockid="md-package" resource="package-light-24.png" size="Button" />
+ <StockIcon stockid="md-package" resource="package-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="md-package" resource="package-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-package" resource="package-light-48.png" size="Dialog" />
+
+ <StockIcon stockid="md-warning" resource="warning-light-16.png" />
+ <StockIcon stockid="md-warning" resource="warning-light-16.png" size="Menu" />
+ <StockIcon stockid="md-warning" resource="warning-light-24.png" size="Button" />
+ <StockIcon stockid="md-warning" resource="warning-light-24.png" size="LargeToolbar" />
+ <StockIcon stockid="md-warning" resource="warning-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-warning" resource="warning-light-48.png" size="Dialog" />
+
+ <!-- Unprocessed icons -->
+ <StockIcon stockid="md-add-namespace" resource="add-namespace-16.png" />
+ <StockIcon stockid="md-build-combine" resource="build-solution-16.png" size="Menu" />
+ <StockIcon stockid="md-build-current-selected-project" resource="build-project-16.png" size="Menu" />
+ <StockIcon stockid="md-clear-all-bookmarks" resource="clear-all-bookmarks-16.png" size="Menu" />
+ <StockIcon stockid="md-close-all-documents" resource="close-all-documents-16.png" size="Menu" />
+ <StockIcon stockid="md-close-combine-icon" resource="close-solution-16.png" size="Menu" />
+ <StockIcon stockid="md-empty" resource="empty-16.png" size="Menu" />
+ <StockIcon stockid="md-find-in-files" resource="find-in-files-16.png" size="Menu" />
+ <StockIcon stockid="md-find-next-icon" resource="edit-find-next-16.png" size="Menu" />
+ <StockIcon stockid="md-goto-nextbookmark" resource="goto-next-bookmark-16.png" size="Menu" />
+ <StockIcon stockid="md-goto-prevbookmark" resource="goto-prev-bookmark-16.png" size="Menu" />
+ <StockIcon stockid="md-monodevelop" resource="monodevelop-16.png" size="Menu" />
+ <StockIcon stockid="md-monodevelop" resource="monodevelop-22.png" />
+ <StockIcon stockid="md-monodevelop" resource="monodevelop-22.png" size="Button" />
+ <StockIcon stockid="md-monodevelop" resource="monodevelop-32.png" size="Dnd" />
+ <StockIcon stockid="md-monodevelop" resource="monodevelop-48.png" size="Dialog" />
+ <StockIcon stockid="md-navigate-back" resource="navigate-previous-16.png" size="Menu" />
+ <StockIcon stockid="md-navigate-forward" resource="navigate-next-16.png" size="Menu" />
+ <StockIcon stockid="md-new-folder-icon" resource="folder-new-16.png" size="Menu" />
+ <StockIcon stockid="md-new-project" resource="project-new-16.png" size="Menu" />
+ <StockIcon stockid="md-new-solution" resource="solution-new-16.png" size="Menu" />
+ <StockIcon stockid="md-new-solution-folder" resource="solution-folder-new-16.png" size="Menu" />
+ <StockIcon stockid="md-replace-in-files" resource="replace-in-files-16.png" size="Menu" />
+ <StockIcon stockid="md-select-all" resource="edit-select-all-16.png" size="Menu" />
+ <StockIcon stockid="md-toggle-bookmark" resource="toggle-bookmark-16.png" size="Menu" />
+ <StockIcon stockid="md-web-search-icon" resource="web-search-16.png" size="Menu" />
+
+ <!-- Status icons -->
+ <StockIcon stockid="md-status-build" animation="res:status-building-1-light-14.png;res:status-building-2-light-14.png;res:status-building-3-light-14.png;res:status-building-4-light-14.png;res:status-building-5-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-download" animation="res:status-pulling-1-light-14.png;res:status-pulling-2-light-14.png;res:status-pulling-3-light-14.png;res:status-pulling-4-light-14.png;res:status-pulling-5-light-14.png;res:status-pulling-6-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-upload" animation="res:status-pushing-1-light-14.png;res:status-pushing-2-light-14.png;res:status-pushing-3-light-14.png;res:status-pushing-4-light-14.png;res:status-pushing-5-light-14.png;res:status-pushing-6-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-open" animation="res:status-opening-1-light-14.png;res:status-opening-2-light-14.png;res:status-opening-3-light-14.png;res:status-opening-4-light-14.png;res:status-opening-5-light-14.png;res:status-opening-6-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-search" animation="res:status-searching-1-light-14.png;res:status-searching-2-light-14.png;res:status-searching-3-light-14.png;res:status-searching-4-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-connecting" animation="res:status-connecting-1-light-14.png;res:status-connecting-2-light-14.png;res:status-connecting-3-light-14.png;res:status-connecting-4-light-14.png;res:status-connecting-5-light-14.png;res:status-connecting-6-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-waiting" animation="res:status-waiting-1-light-14.png;res:status-waiting-2-light-14.png;res:status-waiting-3-light-14.png;res:status-waiting-4-light-14.png;res:status-waiting-5-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-steady" icon="res:status-ready-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-success" icon="res:status-success-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-warning" icon="res:status-warning-light-14.png" size="Menu" />
+ <StockIcon stockid="md-status-error" icon="res:status-failure-light-14.png" size="Menu" />
- <StockIcon stockid = "md-add-namespace" resource = "add-namespace-16.png"/>
- <StockIcon stockid = "md-breakpoint" resource = "breakpoint-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-breakpoint-new" resource = "breakpoint-new-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-breakpoint-disabled" resource = "breakpoint-disabled-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-breakpoint-invalid" resource = "breakpoint-invalid-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-breakpoint-on-off" resource = "breakpoint-on-off-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-breakpoint-disable-all" resource = "breakpoint-disable-all-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-build-combine" resource = "build-solution-16.png" size="Menu"/>
- <StockIcon stockid = "md-build-current-selected-project" resource = "build-project-16.png" size="Menu"/>
- <StockIcon stockid = "md-class" resource = "element-class-light-16.png" size="Menu" />
- <StockIcon stockid = "md-clear-all-bookmarks" resource = "clear-all-bookmarks-16.png" size="Menu"/>
- <StockIcon stockid = "md-close-all-documents" resource = "close-all-documents-16.png" size="Menu" />
- <StockIcon stockid = "md-close-combine-icon" resource = "close-solution-16.png" size="Menu" />
- <StockIcon stockid = "md-solution" resource = "solution-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-solution" resource = "solution-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-delegate" resource = "element-delegate-light-16.png" size="Menu" />
- <StockIcon stockid = "md-empty" resource = "empty-16.png" size="Menu" />
- <StockIcon stockid = "md-magnify" resource = "pad-search-results-light-16.png" size="Menu" />
- <StockIcon stockid = "md-empty-file-icon" resource = "file-generic-light-16.png" size="Menu" />
- <StockIcon stockid = "md-enum" resource = "element-enumeration-light-16.png" size="Menu" />
- <StockIcon stockid = "md-event" resource = "element-event-light-16.png" size="Menu" />
- <StockIcon stockid = "md-static-event" icon = "res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-extensionmethod" resource = "element-extensionmethod-light-16.png" size="Menu" />
- <StockIcon stockid = "md-field" resource = "element-field-light-16.png" size="Menu" />
- <StockIcon stockid = "md-static-field" icon = "res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-find-in-files" resource = "find-in-files-16.png" size="Menu" />
- <StockIcon stockid = "md-find-next-icon" resource = "edit-find-next-16.png" size="Menu"/>
- <StockIcon stockid = "md-fullscreen" resource = "view-fullscreen.png" size = "Menu" />
- <StockIcon stockid = "md-fullscreen" resource = "view-fullscreen_22.png" />
- <StockIcon stockid = "md-goto-nextbookmark" resource = "goto-next-bookmark-16.png" size="Menu"/>
- <StockIcon stockid = "md-goto-prevbookmark" resource = "goto-prev-bookmark-16.png" size="Menu"/>
- <StockIcon stockid = "md-interface" resource = "element-interface-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-class" icon = "res:element-class-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-internal-delegate" icon = "res:element-delegate-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-enum" icon = "res:element-enumeration-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-event" icon = "res:element-event-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-static-event" icon = "res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-extensionmethod" icon = "res:element-extensionmethod-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-field" icon = "res:element-field-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-static-field" icon = "res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-interface" icon = "res:element-interface-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-method" icon = "res:element-method-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-static-method" icon = "res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-property" icon = "res:element-property-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-static-property" icon = "res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-internal-struct" icon = "res:element-structure-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-class" icon = "res:element-class-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-InternalAndProtected-delegate" icon = "res:element-delegate-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-enum" icon = "res:element-enumeration-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-event" icon = "res:element-event-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-static-event" icon = "res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-extensionmethod" icon = "res:element-extensionmethod-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-field" icon = "res:element-field-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-static-field" icon = "res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-interface" icon = "res:element-interface-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-method" icon = "res:element-method-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-static-method" icon = "res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-property" icon = "res:element-property-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-static-property" icon = "res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-InternalAndProtected-struct" icon = "res:element-structure-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-variable" resource = "element-variable-light-16.png" size="Menu" />
- <StockIcon stockid = "md-literal" resource = "element-constant-light-16.png" size="Menu" />
- <StockIcon stockid = "md-method" resource = "element-method-light-16.png" size="Menu" />
- <StockIcon stockid = "md-static-method" icon = "res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-newmethod" resource = "element-method-new-16.png" size="Menu" />
- <StockIcon stockid = "md-misc-files" resource = "file-generic-light-16.png" size="Menu" />
- <StockIcon stockid = "md-name-space" resource = "element-namespace-light-16.png" size="Menu" />
- <StockIcon stockid = "md-new-folder-icon" resource = "folder-new-16.png" size="Menu" />
- <StockIcon stockid = "md-new-project" resource = "project-new-16.png" size="Menu" />
- <StockIcon stockid = "md-new-solution" resource = "solution-new-16.png" size="Menu" />
- <StockIcon stockid = "md-output-icon" resource = "pad-application-output-light-16.png" size="Menu" />
- <StockIcon stockid = "md-generic-pad" resource = "pad-generic-pad-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-class" icon = "res:element-class-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-delegate" icon = "res:element-delegate-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-enum" icon = "res:element-enumeration-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-event" icon = "res:element-event-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-static-event" icon = "res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-extensionmethod" icon = "res:element-extensionmethod-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-field" icon = "res:element-field-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-static-field" icon = "res:element-field-light-16.png|res:element-visibility-private-overlay-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-interface" icon = "res:element-interface-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-method" icon = "res:element-method-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-static-method" icon = "res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-property" icon = "res:element-property-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-static-property" icon = "res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-private-struct" icon = "res:element-structure-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-property" resource = "element-property-light-16.png" size="Menu" />
- <StockIcon stockid = "md-static-property" icon = "res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-class" icon = "res:element-class-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-delegate" icon = "res:element-delegate-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-enum" icon = "res:element-enumeration-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-event" icon = "res:element-event-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-static-event" icon = "res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-extensionmethod" icon = "res:element-extensionmethod-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-field" icon = "res:element-field-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-static-field" icon = "res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-interface" icon = "res:element-interface-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-method" icon = "res:element-method-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-static-method" icon = "res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-property" icon = "res:element-property-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-static-property" icon = "res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-protected-struct" icon = "res:element-structure-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-class" icon = "res:element-class-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-delegate" icon = "res:element-delegate-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-enum" icon = "res:element-enumeration-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-event" icon = "res:element-event-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-static-event" icon = "res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-extensionmethod" icon = "res:element-extensionmethod-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-field" icon = "res:element-field-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-static-field" icon = "res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-interface" icon = "res:element-interface-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-method" icon = "res:element-method-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-static-method" icon = "res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-property" icon = "res:element-property-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-static-property" icon = "res:element-property-light-16.png|res:element-visibility-static-overlay-light-16element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-ProtectedOrInternal-struct" icon = "res:element-structure-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-reference" resource = "reference-light-16.png" size="Menu" />
- <StockIcon stockid = "md-reference-package" icon = "md-reference" size="Menu" />
- <StockIcon stockid = "md-reference-folder" icon = "md-reference|md-folder-overlay" size="Menu" />
- <StockIcon stockid = "md-reference-project" icon = "md-reference|md-project-overlay" size="Menu" />
- <StockIcon stockid = "md-replace-in-files" resource = "replace-in-files-16.png" size="Menu" />
- <StockIcon stockid = "md-resource-file-icon" resource = "file-resource-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-resource-file-icon" resource = "file-resource-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-save-all-icon" resource = "save-all-16.png" size = "Menu"/>
- <StockIcon stockid = "md-searchbox-clear" resource = "searchbox-clear-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-searchbox-search" resource = "searchbox-search-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-monodevelop" resource = "monodevelop-16.png" size="Menu"/>
- <StockIcon stockid = "md-monodevelop" resource = "monodevelop-22.png" />
- <StockIcon stockid = "md-monodevelop" resource = "monodevelop-32.png" size="Dnd"/>
- <StockIcon stockid = "md-monodevelop" resource = "monodevelop-22.png" size="Button"/>
- <StockIcon stockid = "md-monodevelop" resource = "monodevelop-48.png" size="Dialog"/>
- <StockIcon stockid = "md-project" resource = "project-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-project" resource = "project-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-project-gui" icon = "md-project|res:project-gui-overlay-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-project-console" icon = "md-project|res:project-console-overlay-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-library-overlay" resource = "project-library-overlay-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-web-overlay" resource = "project-web-overlay-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-project-library" icon = "md-project|md-library-overlay" size="Dnd" />
- <StockIcon stockid = "md-project-web" icon = "md-project|md-web-overlay" size="Dnd" />
- <StockIcon stockid = "md-struct" resource = "element-structure-light-16.png" size="Menu" />
- <StockIcon stockid = "md-task-list-icon" resource = "pad-task-list-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-text-file-icon" resource = "file-text-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-text-file-icon" resource = "file-text-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-html-file-icon" resource = "file-web-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-html-file-icon" resource = "file-web-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-class-file" resource = "file-class-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-interface-file" resource = "file-interface-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-enum-file" resource = "file-enumeration-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-struct-file" resource = "file-struct-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-gui-file" resource = "file-gtk-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-toggle-bookmark" resource = "toggle-bookmark-16.png" size="Menu"/>
- <StockIcon stockid = "md-web-search-icon" resource = "web-search-16.png" size="Menu" />
- <StockIcon stockid = "md-xml-file-icon" resource = "file-xml-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-xml-file-icon" resource = "file-xml-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-package" resource = "package-light-22.png" />
- <StockIcon stockid = "md-package" resource = "package-light-32.png" size = "Dnd" />
- <StockIcon stockid = "md-package" resource = "package-light-48.png" size = "Dialog" />
- <StockIcon stockid = "md-select-all" resource = "edit-select-all-16.png" size = "Menu" />
- <StockIcon stockid = "md-comment" resource = "comment-light-16.png" size="Menu" />
- <StockIcon stockid = "md-workspace" resource = "workspace-light-16.png" size="Menu"/>
- <StockIcon stockid = "md-workspace" resource = "workspace-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-new-solution-folder" resource = "solution-folder-new-16.png" size="Menu"/>
- <StockIcon stockid = "md-regular-file" resource = "file-generic-light-16.png" size="Menu" />
- <StockIcon stockid = "md-empty-category" resource = "command-light-16.png" size = "Menu"/>
- <StockIcon stockid = "md-keyword" resource = "element-keyword-16.png" size = "Menu"/>
- <StockIcon stockid = "md-template" resource = "element-template-16.png" size = "Menu"/>
- <StockIcon stockid = "md-template-surroundwith" resource = "element-template-surroundwith-16.png" size = "Menu"/>
- <StockIcon stockid = "md-compiler-options" resource = "compiler-options-16.png" size = "Menu"/>
- <StockIcon stockid = "md-custom-commands" resource = "custom-commands-16.png" size = "Menu"/>
- <StockIcon stockid = "md-formatting" resource = "formatting-16.png" size = "Menu"/>
- <StockIcon stockid = "md-markers-rulers" resource = "markers-rulers-16.png" size = "Menu"/>
- <StockIcon stockid = "md-syntax-highlighting" resource = "syntax-highlighting-16.png" size = "Menu"/>
- <StockIcon stockid = "md-text-editor-behavior" resource = "text-editor-behavior-16.png" size = "Menu"/>
- <StockIcon stockid = "md-text-quickfix" resource = "text-quickfix-16.png" size = "Menu"/>
- <StockIcon stockid = "md-message-log" resource = "pad-application-output-light-16.png" size = "Menu"/>
- <StockIcon stockid = "md-assembly-project" resource = "assembly-project-16.png" size="Menu" />
- <StockIcon stockid = "md-parser" resource = "parser-16.png" size="Menu" />
- <!-- for some reason both pairs next/previous and forward/back are in use -->
- <StockIcon stockid = "md-navigate-forward" resource = "navigate-next-16.png" size="Menu" />
- <StockIcon stockid = "md-navigate-back" resource = "navigate-previous-16.png" size="Menu" />
- <StockIcon stockid = "md-pin-up" resource = "pin-up-light-16.png" size="Menu" />
- <StockIcon stockid = "md-pin-down" resource = "pin-down-light-16.png" size="Menu" />
- <StockIcon stockid = "sdk-locations" resource = "sdk-locations-16.png" size="Menu" />
- <StockIcon stockid = "md-keyboard-shortcuts" resource = "keyboard-shortcuts-16.png" size="Menu"/>
- <StockIcon stockid = "md-text-editor" resource = "text-editor-16.png" size="Menu"/>
- <StockIcon stockid = "md-external-tools" resource = "tools-external-tools-16.png" size="Menu" />
- <StockIcon stockid = "md-feedback" resource = "feedback-light-16.png" size = "Menu" />
- <StockIcon stockid = "md-updates" resource = "updates-light-16.png" size="Menu" />
- <StockIcon stockid = "md-disclose-arrow-up" resource = "disclose-arrow-up-light-16.png" size="Menu" />
- <StockIcon stockid = "md-disclose-arrow-down" resource = "disclose-arrow-down-light-16.png" size="Menu" />
- <StockIcon stockid = "md-link-overlay" resource = "link-overlay-light-16.png" size="Menu" />
- <StockIcon stockid = "md-breadcrumb-next" resource = "breadcrumb-next-normal-light-16.png" size="Menu" />
- <StockIcon stockid = "md-breadcrumb-prev" resource = "breadcrumb-previous-normal-light-16.png" size="Menu" />
- <StockIcon stockid = "md-status-build" animation = "res:status-building-1-light-14.png;res:status-building-2-light-14.png;res:status-building-3-light-14.png;res:status-building-4-light-14.png;res:status-building-5-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-download" animation = "res:status-pulling-1-light-14.png;res:status-pulling-2-light-14.png;res:status-pulling-3-light-14.png;res:status-pulling-4-light-14.png;res:status-pulling-5-light-14.png;res:status-pulling-6-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-upload" animation = "res:status-pushing-1-light-14.png;res:status-pushing-2-light-14.png;res:status-pushing-3-light-14.png;res:status-pushing-4-light-14.png;res:status-pushing-5-light-14.png;res:status-pushing-6-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-open" animation = "res:status-opening-1-light-14.png;res:status-opening-2-light-14.png;res:status-opening-3-light-14.png;res:status-opening-4-light-14.png;res:status-opening-5-light-14.png;res:status-opening-6-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-search" animation = "res:status-searching-1-light-14.png;res:status-searching-2-light-14.png;res:status-searching-3-light-14.png;res:status-searching-4-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-connecting" animation = "res:status-connecting-1-light-14.png;res:status-connecting-2-light-14.png;res:status-connecting-3-light-14.png;res:status-connecting-4-light-14.png;res:status-connecting-5-light-14.png;res:status-connecting-6-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-waiting" animation = "res:status-waiting-1-light-14.png;res:status-waiting-2-light-14.png;res:status-waiting-3-light-14.png;res:status-waiting-4-light-14.png;res:status-waiting-5-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-steady" icon = "res:status-ready-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-success" icon = "res:status-success-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-warning" icon = "res:status-warning-light-14.png" size="Menu" />
- <StockIcon stockid = "md-status-error" icon = "res:status-failure-light-14.png" size="Menu" />
- <StockIcon stockid = "md-information" resource = "information-light-16.png" size="Menu" />
- <StockIcon stockid = "md-command" resource = "command-light-16.png" size="Menu" />
- <StockIcon stockid = "md-clear" resource = "clear-light-16.png" size="Menu" />
- <StockIcon stockid = "md-stop" resource = "stop-light-16.png" size="Menu" />
- <StockIcon stockid = "md-console" resource = "pad-application-output-light-16.png" size="Menu" />
- <StockIcon stockid = "md-drive" resource = "drive-16.png" size="Menu" />
- <StockIcon stockid = "md-letters" resource = "letters-16.png" size="Menu" />
- <StockIcon stockid = "md-hammer" resource = "hammer-16.png" size="Menu" />
- <StockIcon stockid = "md-monkey" resource = "monkey-16.png" size="Menu" />
- <StockIcon stockid = "md-locale" resource = "locale-16.png" size="Menu" />
- <StockIcon stockid = "md-errors-list" resource = "pad-error-list-light-16.png" size="Menu" />
- <StockIcon stockid = "md-errors-list-has-errors" resource = "pad-error-list-errors-light-16.png" size="Menu" />
- <StockIcon stockid = "md-errors-list-has-warnings" resource = "pad-error-list-warnings-light-16.png" size="Menu" />
- <StockIcon stockid = "md-bubble-error" resource = "bubble-error-light-16.png" size="Menu" />
- <StockIcon stockid = "md-bubble-warning" resource = "bubble-warning-light-16.png" size="Menu" />
- <StockIcon stockid = "md-file-source" resource = "file-source-light-16.png" size="Menu" />
- <StockIcon stockid = "md-file-source" resource = "file-source-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-file-header" resource = "file-header-light-16.png" size="Menu" />
- <StockIcon stockid = "md-file-header" resource = "file-header-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-file-unit-test" resource = "file-unit-test-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-preferences" resource = "preferences-light-16.png" size="Menu" />
- <StockIcon stockid = "md-help" resource = "pad-help-light-16.png" size="Menu" />
- <StockIcon stockid = "md-sort-alphabetically" resource = "sort-alphabetically-light-16.png" size="Menu" />
- <StockIcon stockid = "md-group-by-category" resource = "group-by-category-light-16.png" size="Menu" />
- <StockIcon stockid = "md-add" resource = "add-light-16.png" size="Menu" />
- <StockIcon stockid = "md-warning" resource = "warning-light-16.png" size="Menu" />
- <StockIcon stockid = "md-warning" resource = "warning-light-24.png" size="LargeToolbar" />
- <StockIcon stockid = "md-warning" resource = "warning-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-warning" resource = "warning-light-48.png" size="Dialog" />
- <StockIcon stockid = "md-error" resource = "error-light-16.png" size="Menu" />
- <StockIcon stockid = "md-error" resource = "error-light-24.png" size="LargeToolbar" />
- <StockIcon stockid = "md-error" resource = "error-light-32.png" size="Dnd" />
- <StockIcon stockid = "md-error" resource = "error-light-48.png" size="Dialog" />
- <StockIcon stockid = "md-done" resource = "done-light-16.png" size="Menu" />
- <StockIcon stockid = "md-delete" resource = "remove-light-16.png" size="Menu" />
- <StockIcon stockid = "md-properties" resource = "properties-light-16.png" size="Menu" />
- <StockIcon stockid = "md-popup-close" resource = "popup-close-light-16.png" size="Menu" />
- <StockIcon stockid = "md-popup-close-hover" resource = "popup-close-hover-light-16.png" size="Menu" />
+ <!-- Spinners -->
+ <StockIcon stockid="md-spinner-14" animation="res:spinner-light-14-1.png;res:spinner-light-14-2.png;res:spinner-light-14-3.png;res:spinner-light-14-4.png;res:spinner-light-14-5.png" size="Menu" />
+ <StockIcon stockid="md-spinner-18" animation="res:spinner-light-18-1.png;res:spinner-light-18-2.png;res:spinner-light-18-3.png;res:spinner-light-18-4.png;res:spinner-light-18-5.png" size="Button" />
- <StockIcon stockid = "gtk-dialog-error" resource = "error-light-16.png" size="Menu" />
- <StockIcon stockid = "gtk-dialog-error" resource = "error-light-24.png" size="Button" />
- <StockIcon stockid = "gtk-dialog-error" resource = "error-light-24.png" size="LargeToolbar" />
- <StockIcon stockid = "gtk-dialog-error" resource = "error-light-32.png" size="Dnd" />
- <StockIcon stockid = "gtk-dialog-error" resource = "error-light-48.png" size="Dialog" />
- <StockIcon stockid = "gtk-dialog-warning" resource = "warning-light-16.png" />
- <StockIcon stockid = "gtk-dialog-warning" resource = "warning-light-16.png" size="Menu" />
- <StockIcon stockid = "gtk-dialog-warning" resource = "warning-light-24.png" size="LargeToolbar" />
- <StockIcon stockid = "gtk-dialog-warning" resource = "warning-light-24.png" size="Button" />
- <StockIcon stockid = "gtk-dialog-warning" resource = "warning-light-32.png" size="Dnd" />
- <StockIcon stockid = "gtk-dialog-warning" resource = "warning-light-48.png" size="Dialog" />
- <StockIcon stockid = "gtk-delete" resource = "remove-light-16.png" size="Menu" />
- <StockIcon stockid = "gtk-properties" resource = "properties-light-16.png" size="Menu" />
- <StockIcon stockid = "gtk-clear" resource = "clear-light-16.png" size="Menu" />
+ <!-- Overlays -->
+ <StockIcon stockid="md-internal-class" icon="res:element-class-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-delegate" icon="res:element-delegate-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-enum" icon="res:element-enumeration-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-event" icon="res:element-event-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-extensionmethod" icon="res:element-extensionmethod-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-field" icon="res:element-field-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-interface" icon="res:element-interface-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-method" icon="res:element-method-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-property" icon="res:element-property-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-static-event" icon="res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-static-field" icon="res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-static-method" icon="res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-static-property" icon="res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-internal-struct" icon="res:element-structure-light-16.png|res:element-visibility-internal-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-class" icon="res:element-class-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-delegate" icon="res:element-delegate-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-enum" icon="res:element-enumeration-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-event" icon="res:element-event-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-extensionmethod" icon="res:element-extensionmethod-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-field" icon="res:element-field-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-interface" icon="res:element-interface-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-method" icon="res:element-method-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-property" icon="res:element-property-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-static-event" icon="res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-static-field" icon="res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-static-method" icon="res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-static-property" icon="res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-InternalAndProtected-struct" icon="res:element-structure-light-16.png|res:element-visibility-internal-an-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-class" icon="res:element-class-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-delegate" icon="res:element-delegate-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-enum" icon="res:element-enumeration-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-event" icon="res:element-event-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-extensionmethod" icon="res:element-extensionmethod-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-field" icon="res:element-field-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-interface" icon="res:element-interface-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-method" icon="res:element-method-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-property" icon="res:element-property-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-static-event" icon="res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-static-field" icon="res:element-field-light-16.png|res:element-visibility-private-overlay-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-static-method" icon="res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-static-property" icon="res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-private-struct" icon="res:element-structure-light-16.png|res:element-visibility-private-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-project-console" icon="md-project|res:project-console-overlay-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-project-gui" icon="md-project|res:project-gui-overlay-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-project-library" icon="md-project|md-library-overlay" size="Dnd" />
+ <StockIcon stockid="md-project-package" icon="md-project|res:project-package-overlay-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-project-shared-assets" icon="md-project|res:project-shared-assets-overlay-light-32.png" size="Dnd" />
+ <StockIcon stockid="md-project-web" icon="md-project|md-web-overlay" size="Dnd" />
+ <StockIcon stockid="md-protected-class" icon="res:element-class-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-delegate" icon="res:element-delegate-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-enum" icon="res:element-enumeration-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-event" icon="res:element-event-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-extensionmethod" icon="res:element-extensionmethod-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-field" icon="res:element-field-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-interface" icon="res:element-interface-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-method" icon="res:element-method-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-property" icon="res:element-property-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-static-event" icon="res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-static-field" icon="res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-static-method" icon="res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-static-property" icon="res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-protected-struct" icon="res:element-structure-light-16.png|res:element-visibility-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-class" icon="res:element-class-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-delegate" icon="res:element-delegate-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-enum" icon="res:element-enumeration-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-event" icon="res:element-event-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-extensionmethod" icon="res:element-extensionmethod-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-field" icon="res:element-field-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-interface" icon="res:element-interface-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-method" icon="res:element-method-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-property" icon="res:element-property-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-static-event" icon="res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-static-field" icon="res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-static-method" icon="res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-static-property" icon="res:element-property-light-16.png|res:element-visibility-static-overlay-light-16element-visibility-static-overlay-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-ProtectedOrInternal-struct" icon="res:element-structure-light-16.png|res:element-visibility-internal-or-protected-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-reference-folder" icon="md-reference|md-folder-overlay" size="Menu" />
+ <StockIcon stockid="md-reference-package" icon="md-reference" size="Menu" />
+ <StockIcon stockid="md-reference-project" icon="md-reference|md-project-overlay" size="Menu" />
+ <StockIcon stockid="md-reference-warning" icon="md-reference|res:invalid-reference-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-static-event" icon="res:element-event-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-static-field" icon="res:element-field-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-static-method" icon="res:element-method-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
+ <StockIcon stockid="md-static-property" icon="res:element-property-light-16.png|res:element-visibility-static-overlay-light-16.png" size="Menu" />
</Extension>
</ExtensionModel>
diff --git a/main/src/core/MonoDevelop.Ide/Makefile.am b/main/src/core/MonoDevelop.Ide/Makefile.am
index deb0ebdaf3..1056586d0a 100644
--- a/main/src/core/MonoDevelop.Ide/Makefile.am
+++ b/main/src/core/MonoDevelop.Ide/Makefile.am
@@ -1 +1,7 @@
-include $(top_srcdir)/xbuild.include \ No newline at end of file
+include $(top_srcdir)/xbuild.include
+
+EXTRA_DIST += \
+ gtkrc \
+ gtkrc.mac \
+ gtkrc.win32 \
+ gtkrc.win32-vista
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs
index a0fde12cf1..47e5a7aa42 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandCheckMenuItem.cs
@@ -180,6 +180,7 @@ namespace MonoDevelop.Components.Commands
base.OnDestroyed ();
initialTarget = null;
arrayDataItem = null;
+ lastCmdInfo = null;
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
index 6f3632ea99..ac062aa5ce 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
@@ -35,6 +35,7 @@ using System.Collections.Generic;
using MonoDevelop.Components.Commands.ExtensionNodes;
using Mono.Addins;
using MonoDevelop.Core;
+using MonoDevelop.Ide;
namespace MonoDevelop.Components.Commands
{
@@ -203,18 +204,6 @@ namespace MonoDevelop.Components.Commands
ShowContextMenu (parent, evt, CreateCommandEntrySet (ctx, addinPath));
}
- [Obsolete("Use ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, ...)")]
- public void ShowContextMenu (string addinPath)
- {
- ShowContextMenu (CreateCommandEntrySet (addinPath));
- }
-
- [Obsolete("Use ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, ...)")]
- public void ShowContextMenu (ExtensionContext ctx, string addinPath)
- {
- ShowContextMenu (CreateCommandEntrySet (ctx, addinPath));
- }
-
/// <summary>
/// Creates a command entry set.
/// </summary>
@@ -699,25 +688,6 @@ namespace MonoDevelop.Components.Commands
return menu;
}
- [Obsolete("Unused. To be removed")]
- public void InsertOptions (Gtk.Menu menu, CommandEntrySet entrySet, int index)
- {
- CommandTargetRoute route = new CommandTargetRoute ();
- foreach (CommandEntry entry in entrySet) {
- Gtk.MenuItem item = entry.CreateMenuItem (this);
- CustomItem ci = item.Child as CustomItem;
- if (ci != null)
- ci.SetMenuStyle (menu);
- int n = menu.Children.Length;
- menu.Insert (item, index);
- if (item is ICommandUserItem)
- ((ICommandUserItem)item).Update (route);
- else
- item.Show ();
- index += menu.Children.Length - n;
- }
- }
-
/// <summary>
/// Shows a context menu.
/// </summary>
@@ -733,12 +703,26 @@ namespace MonoDevelop.Components.Commands
/// <param name='initialCommandTarget'>
/// Initial command route target. The command handler will start looking for command handlers in this object.
/// </param>
- public void ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, CommandEntrySet entrySet,
+ public bool ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, CommandEntrySet entrySet,
object initialCommandTarget = null)
{
- var menu = CreateMenu (entrySet);
- if (menu != null)
- ShowContextMenu (parent, evt, menu, initialCommandTarget);
+ if (Platform.IsMac) {
+ parent.GrabFocus ();
+ int x, y;
+ if (evt != null) {
+ x = (int)evt.X;
+ y = (int)evt.Y;
+ } else {
+ Gdk.Display.Default.GetPointer (out x, out y);
+ }
+ return DesktopService.ShowContextMenu (this, parent, x, y, entrySet, initialCommandTarget);
+ } else {
+ var menu = CreateMenu (entrySet);
+ if (menu != null)
+ ShowContextMenu (parent, evt, menu, initialCommandTarget);
+
+ return true;
+ }
}
/// <summary>
@@ -766,39 +750,6 @@ namespace MonoDevelop.Components.Commands
GtkWorkarounds.ShowContextMenu (menu, parent, evt);
}
- [Obsolete ("Use ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, ...)")]
- public void ShowContextMenu (Gtk.Menu menu, object initialCommandTarget, Gdk.EventButton evt)
- {
- if (menu is CommandMenu) {
- ((CommandMenu)menu).InitialCommandTarget = initialCommandTarget;
- }
- ShowContextMenu (null, evt, menu, initialCommandTarget);
- }
-
- [Obsolete ("Use ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, ...)")]
- public void ShowContextMenu (CommandEntrySet entrySet)
- {
- ShowContextMenu (entrySet, null);
- }
-
- [Obsolete ("Use ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, ...)")]
- public void ShowContextMenu (CommandEntrySet entrySet, object initialTarget)
- {
- ShowContextMenu (CreateMenu (entrySet, initialTarget));
- }
-
- [Obsolete ("Use ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, ...)")]
- public void ShowContextMenu (Gtk.Menu menu)
- {
- ShowContextMenu (menu, null, (Gdk.EventButton) null);
- }
-
- [Obsolete ("Use ShowContextMenu (Gtk.Widget parent, Gdk.EventButton evt, ...)")]
- public void ShowContextMenu (Gtk.Menu menu, object initialCommandTarget)
- {
- ShowContextMenu (menu, initialCommandTarget, null);
- }
-
/// <summary>
/// Creates a toolbar.
/// </summary>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs
index 2fd04db58e..df4cdae1de 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandMenuItem.cs
@@ -258,6 +258,7 @@ namespace MonoDevelop.Components.Commands
itemArray = null;
initialTarget = null;
arrayDataItem = null;
+ lastCmdInfo = null;
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs
index 43d8006ca1..cafb1b93ff 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockItemTitleTab.cs
@@ -59,6 +59,8 @@ namespace MonoDevelop.Components.Docking
static Xwt.Drawing.Image pixAutoHide;
static Xwt.Drawing.Image pixDock;
+ static double PixelScale = GtkWorkarounds.GetPixelScale ();
+
const int TopPadding = 5;
const int BottomPadding = 7;
const int TopPaddingActive = 5;
@@ -125,7 +127,7 @@ namespace MonoDevelop.Components.Docking
WidthRequest = r;
if (visualStyle != null)
- HeightRequest = visualStyle.PadTitleHeight != null ? visualStyle.PadTitleHeight.Value : -1;
+ HeightRequest = visualStyle.PadTitleHeight != null ? (int)(visualStyle.PadTitleHeight.Value * PixelScale) : -1;
}
public void SetLabel (Gtk.Widget page, Xwt.Drawing.Image icon, string label)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ConfigurationMerger.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ConfigurationMerger.cs
index d32eb80443..965ed07fe2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ConfigurationMerger.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/ConfigurationMerger.cs
@@ -126,6 +126,7 @@ namespace MonoDevelop.Components.MainToolbar
// There is no startup project, just use all solution configurations in this case
var p = new TargetPartition ();
p.SolutionConfigurations.AddRange (sol.GetConfigurations ());
+ partitions.Add (p);
}
// There can be several configurations with the same prefix and different platform but which build the same projects.
@@ -185,7 +186,8 @@ namespace MonoDevelop.Components.MainToolbar
if (first != null)
return first;
} else if (!(target is DummyExecutionTarget)) {
- return target;
+ if (target.Enabled)
+ return target;
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
index b39a4f1d31..4debf80be2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/MainToolbar.cs
@@ -38,15 +38,22 @@ using Mono.Addins;
using MonoDevelop.Components.Commands.ExtensionNodes;
using MonoDevelop.Ide.Gui;
using MonoDevelop.Core.Execution;
+using MonoDevelop.Ide.TypeSystem;
+using System.Threading;
+using ICSharpCode.NRefactory.TypeSystem;
using MonoDevelop.Ide.Editor;
+using System.Text;
namespace MonoDevelop.Components.MainToolbar
{
class MainToolbar: Gtk.EventBox, ICommandBar
{
const string ToolbarExtensionPath = "/MonoDevelop/Ide/CommandBar";
+ const string TargetsMenuPath = "/MonoDevelop/Ide/TargetSelectorCommands";
+
const int RuntimeExecutionTarget = 0;
const int RuntimeIsIndented = 1;
+ const int RuntimeCommand = 2;
EventHandler executionTargetsChanged;
@@ -58,12 +65,12 @@ namespace MonoDevelop.Components.MainToolbar
TreeStore configurationStore = new TreeStore (typeof(string), typeof(string));
ComboBox runtimeCombo;
- TreeStore runtimeStore = new TreeStore (typeof (ExecutionTarget), typeof (bool));
+ TreeStore runtimeStore = new TreeStore (typeof (ExecutionTarget), typeof (bool), typeof(ActionCommand));
StatusArea statusArea;
SearchEntry matchEntry;
- static object lastCommandTarget;
+ static WeakReference lastCommandTarget;
ButtonBar buttonBar = new ButtonBar ();
RoundButton button = new RoundButton ();
@@ -107,7 +114,7 @@ namespace MonoDevelop.Components.MainToolbar
}
internal static object LastCommandTarget {
- get { return lastCommandTarget; }
+ get { return lastCommandTarget != null ? lastCommandTarget.Target : null; }
}
void SetSearchCategory (string category)
@@ -120,19 +127,26 @@ namespace MonoDevelop.Components.MainToolbar
static bool RuntimeIsSeparator (TreeModel model, TreeIter iter)
{
- var target = (ExecutionTarget) model.GetValue (iter, RuntimeExecutionTarget);
-
- return target == null;
+ return model.GetValue (iter, RuntimeExecutionTarget) == null && model.GetValue (iter, RuntimeCommand) == null;
}
void RuntimeRenderCell (CellLayout layout, CellRenderer cell, TreeModel model, TreeIter iter)
{
var target = (ExecutionTarget) model.GetValue (iter, RuntimeExecutionTarget);
var indent = (bool) model.GetValue (iter, RuntimeIsIndented);
+ var cmd = (ActionCommand) model.GetValue (iter, RuntimeCommand);
var renderer = (CellRendererText) cell;
TreeIter parent;
- renderer.Sensitive = !(target is ExecutionTargetGroup);
+ if (cmd != null) {
+ var ci = IdeApp.CommandService.GetCommandInfo (cmd.Id, new CommandTargetRoute (LastCommandTarget));
+ renderer.Text = RemoveUnderline (ci.Text);
+ renderer.Visible = ci.Visible;
+ renderer.Sensitive = ci.Enabled;
+ renderer.Xpad = 3;
+ return;
+ }
+ renderer.Sensitive = !(target is ExecutionTargetGroup) && (target != null && target.Enabled);
if (target == null) {
renderer.Xpad = (uint) 0;
@@ -150,6 +164,26 @@ namespace MonoDevelop.Components.MainToolbar
else
renderer.Text = target.Name;
}
+
+ if (Platform.IsMac)
+ renderer.WidthChars = renderer.Text != null ? (indent ? renderer.Text.Length + 6 : 0) : 0;
+ }
+
+ string RemoveUnderline (string s)
+ {
+ int i = s.IndexOf ('_');
+ if (i == -1)
+ return s;
+ var sb = new StringBuilder (s.Substring (0, i));
+ for (; i < s.Length; i++) {
+ if (s [i] == '_') {
+ i++;
+ if (i >= s.Length)
+ break;
+ }
+ sb.Append (s [i]);
+ }
+ return sb.ToString ();
}
public MainToolbar ()
@@ -184,6 +218,8 @@ namespace MonoDevelop.Components.MainToolbar
runtimeCombo = new Gtk.ComboBox ();
runtimeCombo.Model = runtimeStore;
ctx = new Gtk.CellRendererText ();
+ if (Platform.IsWindows)
+ ctx.Ellipsize = Pango.EllipsizeMode.Middle;
runtimeCombo.PackStart (ctx, true);
runtimeCombo.SetCellDataFunc (ctx, RuntimeRenderCell);
runtimeCombo.RowSeparatorFunc = RuntimeIsSeparator;
@@ -213,10 +249,12 @@ namespace MonoDevelop.Components.MainToolbar
if (toplevel == null)
return;
+ var pixel_scale = GtkWorkarounds.GetPixelScale ();
+
int windowWidth = toplevel.Allocation.Width;
int center = windowWidth / 2;
- int left = Math.Max (center - 300, args.Allocation.Left);
- int right = Math.Min (left + 600, args.Allocation.Right);
+ int left = Math.Max (center - (int)(300 * pixel_scale), args.Allocation.Left);
+ int right = Math.Min (left + (int)(600 * pixel_scale), args.Allocation.Right);
uint left_padding = (uint) (left - args.Allocation.Left);
uint right_padding = (uint) (args.Allocation.Right - right);
@@ -255,7 +293,7 @@ namespace MonoDevelop.Components.MainToolbar
matchEntry.Entry.ModifyBase (StateType.Normal, Style.White);
matchEntry.WidthRequest = 240;
if (!Platform.IsMac && !Platform.IsWindows)
- matchEntry.Entry.ModifyFont (Pango.FontDescription.FromString ("Sans 9"));
+ matchEntry.Entry.ModifyFont (Pango.FontDescription.FromString ("Sans 9")); // TODO: VV: "Segoe UI 9"
matchEntry.RoundedShape = true;
matchEntry.Entry.Changed += HandleSearchEntryChanged;
matchEntry.Activated += (sender, e) => {
@@ -322,7 +360,7 @@ namespace MonoDevelop.Components.MainToolbar
IdeApp.CommandService.RegisterCommandBar (this);
IdeApp.CommandService.ActiveWidgetChanged += (sender, e) => {
- lastCommandTarget = e.OldActiveWidget;
+ lastCommandTarget = new WeakReference (e.OldActiveWidget);
};
this.ShowAll ();
@@ -337,9 +375,12 @@ namespace MonoDevelop.Components.MainToolbar
protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
{
- if (evnt.Button == 1 && evnt.Window == this.GdkWindow) {
- (Toplevel as Gtk.Window).BeginMoveDrag (1, (int)evnt.XRoot, (int)evnt.YRoot, evnt.Time);
- return true;
+ if (evnt.Button == 1 && evnt.Window == GdkWindow) {
+ var window = (Window)Toplevel;
+ if (!DesktopService.GetIsFullscreen (window)) {
+ window.BeginMoveDrag (1, (int)evnt.XRoot, (int)evnt.YRoot, evnt.Time);
+ return true;
+ }
}
return base.OnButtonPressEvent (evnt);
}
@@ -351,7 +392,7 @@ namespace MonoDevelop.Components.MainToolbar
currentSolution.Saved -= HandleSolutionSaved;
}
- currentSolution = IdeApp.ProjectOperations.CurrentSelectedSolution;
+ currentSolution = e.Solution;
if (currentSolution != null) {
currentSolution.StartupItemChanged += HandleStartupItemChanged;
@@ -529,10 +570,23 @@ namespace MonoDevelop.Components.MainToolbar
return (ExecutionTarget) runtimeStore.GetValue (iter, RuntimeExecutionTarget);
}
+ Gtk.TreeIter lastRuntimeSelection = Gtk.TreeIter.Zero;
+
void HandleRuntimeChanged (object sender, EventArgs e)
{
- if (ignoreRuntimeChangedCount == 0)
+ if (ignoreRuntimeChangedCount == 0) {
+ Gtk.TreeIter it;
+ if (runtimeCombo.GetActiveIter (out it)) {
+ var cm = (ActionCommand) runtimeStore.GetValue (it, RuntimeCommand);
+ if (cm != null) {
+ runtimeCombo.SetActiveIter (lastRuntimeSelection);
+ IdeApp.CommandService.DispatchCommand (cm.Id, CommandSource.ContextMenu);
+ return;
+ }
+ lastRuntimeSelection = it;
+ }
NotifyConfigurationChange ();
+ }
}
void HandleConfigurationChanged (object sender, EventArgs e)
@@ -612,7 +666,7 @@ namespace MonoDevelop.Components.MainToolbar
do {
var target = (ExecutionTarget) runtimeStore.GetValue (iter, RuntimeExecutionTarget);
- if (target == null)
+ if (target == null || !target.Enabled)
continue;
if (target is ExecutionTargetGroup) {
@@ -758,6 +812,29 @@ namespace MonoDevelop.Components.MainToolbar
previous = target;
}
+ var cmds = IdeApp.CommandService.CreateCommandEntrySet (TargetsMenuPath);
+ if (cmds.Count > 0) {
+ bool needsSeparator = runtimes > 0;
+ foreach (CommandEntry ce in cmds) {
+ if (ce.CommandId == Command.Separator) {
+ needsSeparator = true;
+ continue;
+ }
+ var cmd = ce.GetCommand (IdeApp.CommandService) as ActionCommand;
+ if (cmd != null) {
+ var ci = IdeApp.CommandService.GetCommandInfo (cmd.Id, new CommandTargetRoute (LastCommandTarget));
+ if (ci.Visible) {
+ if (needsSeparator) {
+ runtimeStore.AppendValues (null, false);
+ needsSeparator = false;
+ }
+ runtimeStore.AppendValues (null, false, cmd);
+ runtimes++;
+ }
+ }
+ }
+ }
+
runtimeCombo.Sensitive = runtimes > 1;
} finally {
ignoreRuntimeChangedCount--;
@@ -905,6 +982,9 @@ namespace MonoDevelop.Components.MainToolbar
base.OnDestroyed ();
AddinManager.ExtensionChanged -= OnExtensionChanged;
+ if (button != null)
+ button.Clicked -= HandleStartButtonClicked;
+
if (Background != null) {
((IDisposable)Background).Dispose ();
Background = null;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupSearchPattern.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupSearchPattern.cs
index d22b909c13..1d77e7ec8b 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupSearchPattern.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupSearchPattern.cs
@@ -43,6 +43,7 @@ namespace MonoDevelop.Components.MainToolbar
public readonly string Pattern;
public readonly int LineNumber;
public readonly int Column;
+ public readonly string UnparsedPattern;
public bool HasLineNumber {
get {
@@ -55,12 +56,13 @@ namespace MonoDevelop.Components.MainToolbar
}
}
- public SearchPopupSearchPattern (string tag, string pattern, int lineNumber = -1, int column = -1)
+ public SearchPopupSearchPattern (string tag, string pattern, int lineNumber = -1, int column = -1, string unparsedPattern = "")
{
Tag = tag;
Pattern = pattern;
LineNumber = lineNumber;
Column = column;
+ UnparsedPattern = unparsedPattern;
}
public static SearchPopupSearchPattern ParsePattern (string searchPattern)
@@ -122,7 +124,7 @@ namespace MonoDevelop.Components.MainToolbar
lineNumber = 0;
break;
}
- return new SearchPopupSearchPattern (tag, pattern, lineNumber, column);
+ return new SearchPopupSearchPattern (tag, pattern, lineNumber, column, searchPattern);
}
static bool TryParseLineColumn (string str, ref int lineNumber, ref int columnNumber)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs
index 6084ca3ecc..4f7b2f21ae 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/SearchPopupWindow.cs
@@ -201,7 +201,7 @@ namespace MonoDevelop.Components.MainToolbar
// in case of 'string:' it's not clear if the user ment 'tag:pattern' or 'pattern:line' therefore guess
// 'tag:', if no valid tag is found guess 'pattern:'
if (!string.IsNullOrEmpty (pattern.Tag) && string.IsNullOrEmpty (pattern.Pattern) && !categories.Any (c => c.IsValidTag (pattern.Tag))) {
- pattern = new SearchPopupSearchPattern (null, pattern.Tag, pattern.LineNumber, pattern.Column);
+ pattern = new SearchPopupSearchPattern (null, pattern.Tag, pattern.LineNumber, pattern.Column, pattern.UnparsedPattern);
}
this.pattern = pattern;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs
index f44a8b910f..68bb07919b 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusArea.cs
@@ -37,6 +37,7 @@ using MonoDevelop.Core;
using MonoDevelop.Ide.Gui.Components;
using StockIcons = MonoDevelop.Ide.Gui.Stock;
using Xwt.Motion;
+using MonoDevelop.Ide.Fonts;
namespace MonoDevelop.Components.MainToolbar
{
@@ -113,6 +114,26 @@ namespace MonoDevelop.Components.MainToolbar
public int MaxWidth { get; set; }
+ void messageBoxToolTip (object o, QueryTooltipArgs e)
+ {
+ if (theme.IsEllipsized && (e.X < messageBox.Allocation.Width)) {
+ var label = new Label ();
+ if (renderArg.CurrentTextIsMarkup) {
+ label.Markup = renderArg.CurrentText;
+ } else {
+ label.Text = renderArg.CurrentText;
+ }
+
+ label.Wrap = true;
+ label.WidthRequest = messageBox.Allocation.Width;
+
+ e.Tooltip.Custom = label;
+ e.RetVal = true;
+ } else {
+ e.RetVal = false;
+ }
+ }
+
public StatusArea ()
{
theme = new StatusAreaTheme ();
@@ -161,6 +182,9 @@ namespace MonoDevelop.Components.MainToolbar
contentBox.PackEnd (statusIconSeparator = new StatusAreaSeparator (), false, false, 0);
contentBox.PackEnd (buildResultWidget = CreateBuildResultsWidget (Orientation.Horizontal), false, false, 0);
+ HasTooltip = true;
+ QueryTooltip += messageBoxToolTip;
+
mainAlign = new Alignment (0, 0.5f, 1, 0);
mainAlign.LeftPadding = 12;
mainAlign.RightPadding = 8;
@@ -294,20 +318,29 @@ namespace MonoDevelop.Components.MainToolbar
TaskEventHandler updateHandler = delegate {
int ec=0, wc=0;
+
foreach (Task t in TaskService.Errors) {
if (t.Severity == TaskSeverity.Error)
ec++;
else if (t.Severity == TaskSeverity.Warning)
wc++;
}
- errors.Visible = ec > 0;
- errors.Text = ec.ToString ();
- errorImage.Visible = ec > 0;
- warnings.Visible = wc > 0;
- warnings.Text = wc.ToString ();
- warningImage.Visible = wc > 0;
+
+ using (var font = FontService.SansFont.CopyModified (0.8d)) {
+ errors.Visible = ec > 0;
+ errors.ModifyFont (font);
+ errors.Text = ec.ToString ();
+ errorImage.Visible = ec > 0;
+
+ warnings.Visible = wc > 0;
+ warnings.ModifyFont (font);
+ warnings.Text = wc.ToString ();
+ warningImage.Visible = wc > 0;
+ }
+
ebox.Visible = ec > 0 || wc > 0;
+
UpdateSeparators ();
};
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs
index 3a59635fc5..2434d1b7df 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/StatusAreaTheme.cs
@@ -42,6 +42,11 @@ namespace MonoDevelop.Components.MainToolbar
{
internal class StatusAreaTheme : IDisposable
{
+ public bool IsEllipsized {
+ get;
+ private set;
+ }
+
SurfaceWrapper backgroundSurface, errorSurface;
public void Dispose ()
@@ -294,10 +299,10 @@ namespace MonoDevelop.Components.MainToolbar
void DrawProgressBar (Cairo.Context context, double progress, Gdk.Rectangle bounding, StatusArea.RenderArg arg)
{
- LayoutRoundedRectangle (context, new Gdk.Rectangle (bounding.X, bounding.Y, (int) (bounding.Width * progress), bounding.Height));
+ LayoutRoundedRectangle (context, new Gdk.Rectangle (bounding.X, bounding.Y, (int) (bounding.Width * progress), bounding.Height), 0, 0, 1);
context.Clip ();
- LayoutRoundedRectangle (context, bounding);
+ LayoutRoundedRectangle (context, bounding, 0, 0, 1);
context.SetSourceColor (Styles.WithAlpha (Styles.StatusBarProgressBackgroundColor, Styles.StatusBarProgressBackgroundColor.A * arg.ProgressBarAlpha));
context.FillPreserve ();
@@ -345,6 +350,9 @@ namespace MonoDevelop.Components.MainToolbar
context.SetSourceColor (Styles.WithAlpha (FontColor (), opacity));
Pango.CairoHelper.ShowLayout (context, pl);
+
+ IsEllipsized = pl.IsEllipsized;
+
pl.Dispose ();
context.Restore ();
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs
index 23f7a8bd23..53c3d04c87 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.PropertyGrid/PropertyGridTable.cs
@@ -398,7 +398,7 @@ namespace MonoDevelop.Components.PropertyGrid
Pango.CairoHelper.ShowLayout (ctx, layout);
var img = r.Expanded ? discloseUp : discloseDown;
- ctx.DrawImage (this, img, Allocation.Width - img.Width - CategoryTopBottomPadding, y + (rh - img.Height) / 2);
+ ctx.DrawImage (this, img, Allocation.Width - img.Width - CategoryTopBottomPadding, y + Math.Round ((rh - img.Height) / 2));
y += rh;
lastCategory = r;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CellRendererImage.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CellRendererImage.cs
index abd965c401..3cd15e12d5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CellRendererImage.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/CellRendererImage.cs
@@ -26,6 +26,7 @@
using System;
using Xwt.Drawing;
using MonoDevelop.Core;
+using MonoDevelop.Ide;
namespace MonoDevelop.Components
{
@@ -37,6 +38,12 @@ namespace MonoDevelop.Components
IconId icon;
Gtk.IconSize stockSize = Gtk.IconSize.Menu;
+ /// <summary>
+ /// Image to be used to represent "no image". This is necessary since GLib.Value can't hold
+ /// null values for object that are not of subclasses of GLib.Object
+ /// </summary>
+ public static readonly Xwt.Drawing.Image NullImage = ImageService.GetIcon ("md-empty");
+
public CellRendererImage ()
{
}
@@ -122,42 +129,52 @@ namespace MonoDevelop.Components
protected override void Render (Gdk.Drawable window, Gtk.Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, Gtk.CellRendererState flags)
{
- var img = GetImate ();
+ var img = GetImage ();
if (img == null)
return;
using (var ctx = Gdk.CairoHelper.Create (window)) {
- var x = Xpad + cell_area.X + cell_area.Width / 2 - (int)(img.Width / 2);
- var y = Ypad + cell_area.Y + cell_area.Height / 2 - (int)(img.Height / 2);
+ var x = cell_area.X + cell_area.Width / 2 - (int)(img.Width / 2);
+ var y = cell_area.Y + cell_area.Height / 2 - (int)(img.Height / 2);
ctx.DrawImage (widget, img, x, y);
}
}
protected void GetImageInfo (Gdk.Rectangle cell_area, out Image img, out int x, out int y)
{
- img = GetImate ();
- x = (int)(Xpad + cell_area.X + cell_area.Width / 2 - (int)(img.Width / 2));
- y = (int)(Ypad + cell_area.Y + cell_area.Height / 2 - (int)(img.Height / 2));
+ img = GetImage ();
+ if (img == null) {
+ x = (int)(cell_area.X + cell_area.Width / 2);
+ y = (int)(cell_area.Y + cell_area.Height / 2);
+ } else {
+ x = (int)(cell_area.X + cell_area.Width / 2 - (int)(img.Width / 2));
+ y = (int)(cell_area.Y + cell_area.Height / 2 - (int)(img.Height / 2));
+ }
}
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
- var img = GetImate ();
+ var img = GetImage ();
if (img != null) {
width = (int)img.Width;
height = (int)img.Height;
} else
width = height = 0;
+ width += (int)Xpad * 2;
+ height += (int)Ypad * 2;
x_offset = y_offset = 0;
}
- Xwt.Drawing.Image GetImate ()
+ Image GetImage ()
{
+ Image img;
if (icon.IsNull)
- return IsExpanded ? (imageOpen ?? image) : (imageClosed ?? image);
+ img = IsExpanded ? (imageOpen ?? image) : (imageClosed ?? image);
else
- return Ide.ImageService.GetIcon (icon, stockSize);
+ img = ImageService.GetIcon (icon, stockSize);
+
+ return img != NullImage ? img : null;
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs
index 2507d111d4..c6ea099579 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuTreeView.cs
@@ -32,24 +32,54 @@ namespace MonoDevelop.Components
/// </summary>
public class ContextMenuTreeView : Gtk.TreeView
{
- const Gdk.ModifierType selectionModifiers = Gdk.ModifierType.ShiftMask | Gdk.ModifierType.ControlMask;
-
public ContextMenuTreeView ()
{
}
-
+
public ContextMenuTreeView (Gtk.TreeModel model) : base (model)
{
}
-
+
public Action<Gdk.EventButton> DoPopupMenu { get; set; }
-
+
+ Gtk.TreePath buttonPressPath;
+ bool selectOnRelease;
+
+ protected override void OnDragBegin (Gdk.DragContext context)
+ {
+ //If user starts dragging don't do any selection
+ //useful in case user press Esc to abort dragging and
+ //didn't release mouse button yet
+ selectOnRelease = false;
+ base.OnDragBegin (context);
+ }
+
protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
{
+ selectOnRelease = false;
if (!evnt.TriggersContextMenu ()) {
+ //Because we are blocking selection changes with SelectFunction base.OnButtonPressEvent
+ //can be called so expanders work. Another good effect is when expander is clicked
+ //SelectFunction is not called so selectOnRelease remains false.
+ //Which means no selection operation is performed in OnButtonReleaseEvent.
+ //When Shift is pressed we don't do our magic becasue:
+ //a) it works as expected((item is still selected when dragging starts
+ //(it's by nature of Shift selecting))
+ //b) we would have to simulate Shift selecting in OnButtonReleaseEvent
+ //which would mean we have to implement all selecting logic...
+ //Also notice that our magic is requiered only when item is selected.
+ if (GetPathAtPos ((int)evnt.X, (int)evnt.Y, out buttonPressPath) &&
+ ((evnt.State & Gdk.ModifierType.ShiftMask) == 0) &&
+ Selection.PathIsSelected (buttonPressPath)) {
+ this.Selection.SelectFunction = (s, m, p, b) => {
+ selectOnRelease = true;
+ //Always returning false means we are blocking base.OnButtonPressEvent
+ //from doing any changes to selectiong we will do changes in OnButtonReleaseEvent
+ return false;
+ };
+ }
return base.OnButtonPressEvent (evnt);
}
-
//pass click to base it it can update the selection
//unless the node is already selected, in which case we don't want to change the selection
bool res = false;
@@ -64,9 +94,34 @@ namespace MonoDevelop.Components
return res;
}
-
+
protected override bool OnButtonReleaseEvent (Gdk.EventButton evnt)
{
+ this.Selection.SelectFunction = (s, m, p, b) => {
+ return true;
+ };
+ Gtk.TreePath buttonReleasePath;
+ //If OnButtonPressEvent attempted on making deselection and dragging was not started
+ //check if we are on same item as when we clicked(could be different if dragging is disabled)
+ if (selectOnRelease &&
+ GetPathAtPos ((int)evnt.X, (int)evnt.Y, out buttonReleasePath) &&
+ buttonPressPath.Compare (buttonReleasePath) == 0) {
+
+ //Simulate what would happen in OnButtonPressEvent if we were not blocking selection
+ //notice that item is currently 100% selected since this check was performed in OnButtonPressEvent
+ if (Selection.Mode == Gtk.SelectionMode.Multiple &&
+ (evnt.State & Gdk.ModifierType.ControlMask) > 0) {
+ Selection.UnselectPath (buttonReleasePath);
+ } else {
+ //UnselectAll in case multiple were selected we want only our item to be selected now
+ //if it was clicked but not dragged
+ Selection.UnselectAll ();
+ Selection.SelectPath (buttonReleasePath);
+ }
+ buttonPressPath = null;
+ }
+ selectOnRelease = false;
+
bool res = base.OnButtonReleaseEvent (evnt);
if (DoPopupMenu != null && evnt.IsContextMenuButton ()) {
@@ -75,7 +130,7 @@ namespace MonoDevelop.Components
return res;
}
-
+
protected override bool OnPopupMenu ()
{
if (DoPopupMenu != null) {
@@ -84,7 +139,7 @@ namespace MonoDevelop.Components
}
return base.OnPopupMenu ();
}
-
+
bool IsClickedNodeSelected (int x, int y)
{
Gtk.TreePath path;
@@ -93,7 +148,7 @@ namespace MonoDevelop.Components
return false;
}
-
+
bool MultipleNodesSelected ()
{
return Selection.GetSelectedRows ().Length > 1;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs
new file mode 100644
index 0000000000..6514e52452
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Control.cs
@@ -0,0 +1,133 @@
+//
+// Control.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using MonoDevelop.Components.Commands;
+
+#if MAC
+using MonoMac.AppKit;
+using MonoDevelop.Components.Mac;
+#endif
+
+namespace MonoDevelop.Components
+{
+ public class Control: IDisposable
+ {
+ object nativeWidget;
+
+ protected Control ()
+ {
+ }
+
+ public Control (object widget)
+ {
+ this.nativeWidget = widget;
+ }
+
+ ~Control ()
+ {
+ Dispose (false);
+ }
+
+ protected virtual object CreateNativeWidget ()
+ {
+ throw new NotSupportedException ();
+ }
+
+ public T GetNativeWidget<T> ()
+ {
+ if (nativeWidget == null) {
+ var w = CreateNativeWidget ();
+ if (!(w is T))
+ w = ConvertToType (typeof(T), w);
+ if (w is Gtk.Widget) {
+ var c = new CommandRouterContainer ((Gtk.Widget)w, this, true);
+ c.Show ();
+ nativeWidget = c;
+ c.Destroyed += delegate {
+ GC.SuppressFinalize (this);
+ Dispose (true);
+ };
+ }
+ else
+ nativeWidget = w;
+ }
+ if (nativeWidget is T)
+ return (T)nativeWidget;
+ else
+ throw new NotSupportedException ();
+ }
+
+ static object ConvertToType (Type t, object w)
+ {
+ if (t.IsInstanceOfType (w))
+ return w;
+
+ #if MAC
+ if (w is MonoMac.AppKit.NSView && t == typeof(Gtk.Widget)) {
+ var ww = GtkMacInterop.NSViewToGtkWidget ((MonoMac.AppKit.NSView)w);
+ ww.Show ();
+ return ww;
+ }
+ #endif
+ throw new NotSupportedException ();
+ }
+
+ public static implicit operator Gtk.Widget (Control d)
+ {
+ return d.GetNativeWidget<Gtk.Widget> ();
+ }
+
+ public static implicit operator Control (Gtk.Widget d)
+ {
+ return new Control (d);
+ }
+
+ public void GrabFocus ()
+ {
+ // TODO
+ }
+
+ public void Dispose ()
+ {
+ if (nativeWidget is Gtk.Widget) {
+ ((Gtk.Widget)nativeWidget).Destroy ();
+ return;
+ }
+ #if MAC
+ else if (nativeWidget is NSView)
+ ((NSView)nativeWidget).Dispose ();
+ #endif
+
+ GC.SuppressFinalize (this);
+ Dispose (true);
+ }
+
+ protected virtual void Dispose (bool disposing)
+ {
+ }
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBox.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBox.cs
index 88e1d6e5d4..df6e49c424 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBox.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBox.cs
@@ -250,7 +250,7 @@ namespace MonoDevelop.Components
if (DataProvider != null) {
DataProvider.Reset ();
if (DataProvider.IconCount > 0) {
- window = new DropDownBoxListWindow (DataProvider);
+ window = new DropDownBoxListWindow (DataProvider, WindowType.Popup);
window.list.SelectItem += delegate {
SetItem (window.list.Selection);
};
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs
index 221301ab47..e34fee447f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/DropDownBoxListWindow.cs
@@ -62,7 +62,11 @@ namespace MonoDevelop.Components
}
}
- public DropDownBoxListWindow (IListDataProvider provider) : base (WindowType.Toplevel)
+ public DropDownBoxListWindow (IListDataProvider provider) : this (provider, WindowType.Toplevel)
+ {
+ }
+
+ public DropDownBoxListWindow (IListDataProvider provider, WindowType windowType) : base (windowType)
{
this.DataProvider = provider;
this.TransientFor = IdeApp.Workbench.RootWindow;
@@ -388,7 +392,7 @@ namespace MonoDevelop.Components
layout.Ellipsize = Pango.EllipsizeMode.End;
layout.Width = (Allocation.Width - xpos - iconWidth - 2) * (int)Pango.Scale.PangoScale;
- layout.SetMarkup (text);
+ layout.SetMarkup (PathBar.GetFirstLineFromMarkup (text));
int wi, he, typos, iypos;
layout.GetPixelSize (out wi, out he);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FileFilterSet.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FileFilterSet.cs
index f15d3346b7..56cdc9262d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FileFilterSet.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FileFilterSet.cs
@@ -80,11 +80,16 @@ namespace MonoDevelop.Components
throw new InvalidOperationException ("Already called");
useDefaultFilters = true;
-
+
+ if (Platform.IsWindows)
+ filters.Add (SelectFileDialogFilter.AllFiles);
+
foreach (var f in GetDefaultFilters ())
filters.Add (f);
- filters.Add (SelectFileDialogFilter.AllFiles);
-
+
+ if (!Platform.IsWindows)
+ filters.Add (SelectFileDialogFilter.AllFiles);
+
LoadDefaultFilter ();
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FolderListSelector.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FolderListSelector.cs
index c4196d06af..3031053cc0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FolderListSelector.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/FolderListSelector.cs
@@ -46,6 +46,7 @@ namespace MonoDevelop.Components
dirList.Selection.Changed += delegate {
UpdateStatus ();
};
+ UpdateStatus ();
}
public List<string> Directories {
@@ -132,7 +133,7 @@ namespace MonoDevelop.Components
TreeIter it;
dirList.Selection.GetSelected (out it);
string dir = (string) store.GetValue (it, 0);
- int i = directories.IndexOf (dir);
+ int i = store.GetPath (it).Indices [0];
string prevDir = directories [i - 1];
TreeIter pi;
store.IterNthChild (out pi, i - 1);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageLoader.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageLoader.cs
index 9c2fa2f039..ec06229cd2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageLoader.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageLoader.cs
@@ -1,21 +1,22 @@
-//
+//
// ImageLoader.cs
-//
+//
// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2010 Novell, Inc (http://www.novell.com)
-//
+// Jeffrey Stedfast <jeff@xamarin.com>
+// Michael Hutchinson <mhutch@xamarin.com>
+//
+// Copyright (c) 2012-2014 Xamarin Inc.
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,72 +26,173 @@
// THE SOFTWARE.
using System;
-using System.Net;
-using MonoDevelop.Core;
-using MonoDevelop.Core.ProgressMonitoring;
using System.IO;
+using MonoDevelop.Core;
+using System.Net;
namespace MonoDevelop.Components
{
public class ImageLoader
{
- string url;
- Xwt.Drawing.Image image;
- NullProgressMonitor loadMonitor;
- IAsyncOperation loadOperation;
-
- public ImageLoader (string url)
+ readonly object mutex = new object ();
+ Xwt.Drawing.Image image = null;
+ string cachePath, url;
+ double scaleFactor;
+
+ internal ImageLoader (string cacheFile, string url, double scaleFactor)
{
- loadMonitor = new NullProgressMonitor ();
- loadOperation = loadMonitor.AsyncOperation;
+ Downloading = true;
+ this.cachePath = cacheFile;
this.url = url;
+ this.scaleFactor = scaleFactor;
Load ();
}
-
+
public Xwt.Drawing.Image Image {
- get {
- return image;
- }
- }
-
- public IAsyncOperation LoadOperation {
- get { return loadOperation; }
+ get { return image; }
}
-
+
+ public bool Downloading { get; private set; }
+
void Load ()
{
- var monitor = loadMonitor;
- System.Threading.ThreadPool.QueueUserWorkItem (delegate {
+ string tempPath = cachePath + ".tmp";
+
+ LoadFromDisk (cachePath, false);
+
+ var finfo = new FileInfo (cachePath);
+
+ WebRequestHelper.GetResponseAsync (
+ () => (HttpWebRequest)WebRequest.Create (url),
+ r => {
+ if (finfo.Exists)
+ r.IfModifiedSince = finfo.LastWriteTime;
+ }
+ ).ContinueWith (t => {
+ try {
+ if (t.IsFaulted) {
+ var wex = t.Exception.Flatten ().InnerException as WebException;
+ if (wex != null) {
+ var resp = wex.Response as HttpWebResponse;
+ if (resp != null) {
+ // If the errorcode is NotModified the file we cached on disk is still the latest one.
+ if (resp.StatusCode == HttpStatusCode.NotModified) {
+ Cleanup ();
+ return;
+ }
+ //if 404, there is no gravatar for the user
+ if (resp.StatusCode == HttpStatusCode.NotFound) {
+ image = null;
+ Cleanup ();
+ return;
+ }
+ }
+ }
+ }
+
+ using (var response = t.Result) {
+ finfo.Directory.Create ();
+
+ // Copy out the new file and reload it
+ if (response.StatusCode == HttpStatusCode.OK) {
+ using (var tempFile = File.Create (tempPath)) {
+ using (var stream = response.GetResponseStream ()) {
+ stream.CopyTo (tempFile);
+ }
+ }
+ FileService.SystemRename (tempPath, cachePath);
+ }
+ LoadFromDisk (cachePath, true);
+ }
+ } catch (Exception ex) {
+ var aex = ex as AggregateException;
+ if (aex != null)
+ ex = aex.Flatten ().InnerException;
+ var wex = ex as WebException;
+ if (wex != null && wex.Status.IsCannotReachInternetError ())
+ LoggingService.LogWarning ("Gravatar service could not be reached.");
+ else
+ LoggingService.LogError ("Error in Gravatar downloader.", ex);
+ Cleanup ();
+ } finally {
+ try {
+ if (File.Exists (tempPath))
+ File.Delete (tempPath);
+ } catch (Exception ex) {
+ LoggingService.LogError ("Error deleting Gravatar temp file.", ex);
+ }
+ }
+ });
+ }
+
+ void Cleanup ()
+ {
+ Xwt.Application.Invoke (() => UpdateImage (image, true));
+ }
+
+ void LoadFromDisk (string path, bool downloaded)
+ {
+ Xwt.Application.Invoke (delegate {
+ Xwt.Drawing.Image newImage = null;
try {
- HttpWebRequest req = (HttpWebRequest) HttpWebRequest.Create (url);
- WebResponse resp = req.GetResponse ();
- MemoryStream ms = new MemoryStream ();
- using (var s = resp.GetResponseStream ()) {
- s.CopyTo (ms);
+ if (File.Exists (path)) {
+ using (var stream = File.OpenRead (path))
+ newImage = Xwt.Drawing.Image.FromStream (stream);
+ if (Math.Abs (scaleFactor - 1) > 0.2)
+ newImage = Image.Scale (1 / scaleFactor);
}
- var data = ms.ToArray ();
-
- MonoDevelop.Ide.DispatchService.GuiSyncDispatch (delegate {
- Gdk.PixbufLoader l = new Gdk.PixbufLoader (resp.ContentType);
- l.Write (data);
- image = l.Pixbuf.ToXwtImage ();
- l.Close ();
- monitor.Dispose ();
- });
-
- // Replace the async operation to avoid holding references to all
- // objects that subscribed the Completed event.
- loadOperation = NullAsyncOperation.Success;
+ UpdateImage (newImage, downloaded);
} catch (Exception ex) {
- loadMonitor.ReportError (null, ex);
- Gtk.Application.Invoke (delegate {
- monitor.Dispose ();
- });
- loadOperation = NullAsyncOperation.Failure;
+ LoggingService.LogError ("Failed to load cached image", ex);
+ try {
+ File.Delete (path);
+ } catch {
+ LoggingService.LogError ("Failed to delete corrupt cached image", ex);
+ }
+ UpdateImage (null, downloaded);
}
- loadMonitor = null;
});
}
+
+ void UpdateImage (Xwt.Drawing.Image value, bool final)
+ {
+ EventHandler handler;
+
+ lock (mutex) {
+ handler = completed;
+ if (image == value) {
+ handler = null;
+ } else {
+ image = value;
+ }
+
+ // Null out the event handlers once the download has completed so we don't
+ // retain the objects the handler references forever.
+ if (final) {
+ completed = null;
+ Downloading = false;
+ }
+ }
+
+ if (handler != null)
+ handler (this, EventArgs.Empty);
+ }
+
+ EventHandler completed;
+ public event EventHandler Completed {
+ add {
+ lock (mutex) {
+ if (Downloading)
+ completed += value;
+ }
+ value (this, EventArgs.Empty);
+ }
+ remove {
+ lock (mutex) {
+ if (completed != null)
+ completed -= value;
+ }
+ }
+ }
}
}
-
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageView.cs
index fe5eb18698..a501f0c30f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ImageView.cs
@@ -55,7 +55,7 @@ namespace MonoDevelop.Components
public float Xalign {
get { return xalign; }
set {
- xalign = value;
+ xalign = (float)(value * IconScale);
QueueDraw ();
}
}
@@ -64,16 +64,20 @@ namespace MonoDevelop.Components
public float Yalign {
get { return yalign; }
set {
- yalign = value;
+ yalign = (float)(value * IconScale);
QueueDraw ();
}
}
+ double IconScale {
+ get { return Mono.TextEditor.GtkWorkarounds.GetPixelScale (); }
+ }
+
protected override void OnSizeRequested (ref Gtk.Requisition requisition)
{
if (image != null) {
- requisition.Width = (int)image.Width;
- requisition.Height = (int)image.Height;
+ requisition.Width = (int)(image.Width * IconScale);
+ requisition.Height = (int)(image.Height * IconScale);
}
}
@@ -81,9 +85,12 @@ namespace MonoDevelop.Components
{
if (image != null) {
using (var ctx = CairoHelper.Create (evnt.Window)) {
- var x = Allocation.X + (Allocation.Width - image.Width) * xalign;
- var y = Allocation.Y + (Allocation.Height - image.Height) * yalign;
- ctx.DrawImage (this, image, x, y);
+ var x = Allocation.X + (Allocation.Width - image.Width * IconScale) * Xalign;
+ var y = Allocation.Y + (Allocation.Height - image.Height * IconScale) * Yalign;
+ ctx.Save ();
+ ctx.Scale (IconScale, IconScale);
+ ctx.DrawImage (this, image, x / IconScale, y / IconScale);
+ ctx.Restore ();
}
}
return true;
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/IBackgroundMarker.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/GtkMacInterop.cs
index 0657a4b4bd..bda86423bd 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/IBackgroundMarker.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Mac/GtkMacInterop.cs
@@ -1,10 +1,10 @@
//
-// IBackgroundMarker.cs
+// GtkMacInterop.cs
//
// Author:
-// Mike Krüger <mkrueger@xamarin.com>
+// Jérémie Laval <jeremie.laval@xamarin.com>
//
-// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+// Copyright (c) 2012 Xamarin, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -24,26 +24,25 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+#if MAC
+using MonoMac.AppKit;
using System;
-using Gdk;
-using Mono.TextEditor.Highlighting;
-namespace Mono.TextEditor
+namespace MonoDevelop.Components.Mac
{
-
- /// <summary>
- /// A specialized interface to draw text backgrounds.
- /// </summary>
- [Obsolete("This is obsolete - TextLineMarker now handles this")]
- public interface IBackgroundMarker
+ class GtkMacInterop
{
- /// <summary>
- /// Draws the backround of a line part.
- /// </summary>
- /// <returns>
- /// true, when the text view should draw the text, false when the text view should not draw the text.
- /// </returns>
- bool DrawBackground (TextEditor Editor, Cairo.Context cr, TextViewMargin.LayoutWrapper layout, int selectionStart, int selectionEnd, int startOffset, int endOffset, double y, double startXPos, double endXPos, ref bool drawBg);
+ const string LibGdk = "libgdk-quartz-2.0.dylib";
+ const string LibGtk = "libgtk-quartz-2.0";
+
+ [System.Runtime.InteropServices.DllImport (LibGtk)]
+ extern static IntPtr gtk_ns_view_new (IntPtr nsview);
+
+ public static Gtk.Widget NSViewToGtkWidget (NSView view)
+ {
+ return new Gtk.Widget (gtk_ns_view_new ((IntPtr)view.Handle));
+ }
}
-
}
+
+#endif
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs
index b203b17c86..bb0d2499ee 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/PathBar.cs
@@ -163,6 +163,14 @@ namespace MonoDevelop.Components
this.createMenuForItem = createMenuForItem;
EnsureLayout ();
}
+
+ internal static string GetFirstLineFromMarkup (string markup)
+ {
+ var idx = markup.IndexOfAny (new [] { NewLine.CR, NewLine.LF });
+ if (idx >= 0)
+ return markup.Substring (0, idx);
+ return markup;
+ }
public new PathEntry[] Path { get; private set; }
public int ActiveIndex { get { return activeIndex; } }
@@ -214,6 +222,21 @@ namespace MonoDevelop.Components
requisition.Width = Math.Max (WidthRequest, 0);
requisition.Height = height + topPadding + bottomPadding;
}
+
+ int[] GetCurrentWidths (out bool widthReduced)
+ {
+ int totalWidth = widths.Sum ();
+ totalWidth += leftPadding + (arrowSize + arrowRightPadding) * leftPath.Length - 1;
+ totalWidth += rightPadding + arrowSize * rightPath.Length - 1;
+ int[] currentWidths = widths;
+ widthReduced = false;
+ int overflow = totalWidth - Allocation.Width;
+ if (overflow > 0) {
+ currentWidths = ReduceWidths (overflow);
+ widthReduced = true;
+ }
+ return currentWidths;
+ }
protected override bool OnExposeEvent (EventExpose evnt)
{
@@ -232,18 +255,8 @@ namespace MonoDevelop.Components
// Calculate the total required with, and the reduction to be applied in case it doesn't fit the available space
- int totalWidth = widths.Sum ();
- totalWidth += leftPadding + (arrowSize + arrowRightPadding) * leftPath.Length - 1;
- totalWidth += rightPadding + arrowSize * rightPath.Length - 1;
-
- int[] currentWidths = widths;
- bool widthReduced = false;
-
- int overflow = totalWidth - Allocation.Width;
- if (overflow > 0) {
- currentWidths = ReduceWidths (overflow);
- widthReduced = true;
- }
+ bool widthReduced;
+ var currentWidths = GetCurrentWidths (out widthReduced);
// Render the paths
@@ -269,7 +282,7 @@ namespace MonoDevelop.Components
}
layout.Attributes = (i == activeIndex) ? boldAtts : null;
- layout.SetMarkup (leftPath [i].Markup);
+ layout.SetMarkup (GetFirstLineFromMarkup (leftPath [i].Markup));
ctx.Save ();
@@ -327,7 +340,7 @@ namespace MonoDevelop.Components
}
layout.Attributes = (i == activeIndex) ? boldAtts : null;
- layout.SetMarkup (rightPath [i].Markup);
+ layout.SetMarkup (GetFirstLineFromMarkup (rightPath [i].Markup));
ctx.Save ();
@@ -478,18 +491,21 @@ namespace MonoDevelop.Components
public int GetHoverXPosition (out int w)
{
+ bool widthReduced;
+ int[] currentWidths = GetCurrentWidths (out widthReduced);
+
if (Path[hoverIndex].Position == EntryPosition.Left) {
int idx = leftPath.TakeWhile (p => p != Path[hoverIndex]).Count ();
if (idx >= 0) {
- w = widths[idx];
- return widths.Take (idx).Sum () + idx * spacing;
+ w = currentWidths[idx];
+ return currentWidths.Take (idx).Sum () + idx * spacing;
}
} else {
int idx = rightPath.TakeWhile (p => p != Path[hoverIndex]).Count ();
if (idx >= 0) {
- w = widths[idx + leftPath.Length];
- return Allocation.Width - padding - widths[idx + leftPath.Length] - spacing;
+ w = currentWidths[idx + leftPath.Length];
+ return Allocation.Width - padding - currentWidths[idx + leftPath.Length] - spacing;
}
}
w = Allocation.Width;
@@ -585,20 +601,21 @@ namespace MonoDevelop.Components
int xpos = padding, xposRight = Allocation.Width - padding;
if (widths == null || x < xpos || x > xposRight)
return -1;
-
- //could do a binary search, but probably not worth it
- for (int i = 0; i < leftPath.Length; i++) {
- xpos += widths[i] + spacing;
- if (x < xpos)
- return IndexOf (leftPath[i]);
- }
-
+
+ bool widthReduced;
+ int[] currentWidths = GetCurrentWidths (out widthReduced);
+
for (int i = 0; i < rightPath.Length; i++) {
- xposRight -= widths[i + leftPath.Length] - spacing;
+ xposRight -= currentWidths[i + leftPath.Length] + spacing;
if (x > xposRight)
return IndexOf (rightPath[i]);
}
-
+
+ for (int i = 0; i < leftPath.Length; i++) {
+ xpos += currentWidths[i] + spacing;
+ if (x < xpos)
+ return IndexOf (leftPath[i]);
+ }
return -1;
}
@@ -617,7 +634,7 @@ namespace MonoDevelop.Components
for (int i = 0; i < path.Length; i++) {
layout.Attributes = (i == activeIndex)? boldAtts : null;
- layout.SetMarkup (path[i].Markup);
+ layout.SetMarkup (GetFirstLineFromMarkup (path[i].Markup));
layout.Width = -1;
int w, h;
layout.GetPixelSize (out w, out h);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/SearchEntry.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/SearchEntry.cs
index 4643a8f454..ca9f436409 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/SearchEntry.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/SearchEntry.cs
@@ -29,6 +29,7 @@
using System;
using Gtk;
+using MonoDevelop.Core;
using MonoDevelop.Ide.Gui;
namespace MonoDevelop.Components
@@ -132,7 +133,12 @@ namespace MonoDevelop.Components
private void BuildWidget ()
{
- alignment = new Alignment (0.5f, 0.5f, 1f, 0f);
+ var yscale = 0f;
+
+ if (Platform.IsWindows)
+ yscale = (float)GtkWorkarounds.GetScaleFactor (this);
+
+ alignment = new Alignment (0.5f, 0.5f, 1f, yscale);
alignment.SetPadding (1, 1, 3, 3);
VisibleWindow = false;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs
index 500a068746..4a7979c620 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionData.cs
@@ -43,14 +43,9 @@ namespace MonoDevelop.Ide.CodeCompletion
public virtual string Description { get; set; }
public virtual string CompletionText { get; set; }
- [Obsolete("Use GetDisplayDescription (bool isSelected)")]
- public virtual string DisplayDescription { get; set; }
-
public virtual string GetDisplayDescription (bool isSelected)
{
-#pragma warning disable 618
- return DisplayDescription;
-#pragma warning restore 618
+ return null;
}
public virtual string GetRightSideDescription (bool isSelected)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs
index a47ded2bf6..cb1cbdbbe5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs
@@ -39,8 +39,8 @@ namespace MonoDevelop.Ide.CodeCompletion
public class CompletionListWindow : ListWindow, IListDataProvider
{
const int declarationWindowMargin = 3;
-
- TooltipInformationWindow declarationviewwindow = new TooltipInformationWindow ();
+
+ TooltipInformationWindow declarationviewwindow;
ICompletionData currentData;
Widget parsingMessage;
int initialWordLength;
@@ -253,7 +253,7 @@ namespace MonoDevelop.Ide.CodeCompletion
return false;
}
- if (declarationviewwindow.Multiple) {
+ if (declarationviewwindow != null && declarationviewwindow.Multiple) {
if (key == Gdk.Key.Left)
declarationviewwindow.OverloadLeft ();
else
@@ -538,9 +538,21 @@ namespace MonoDevelop.Ide.CodeCompletion
}
}
+ void EnsureDeclarationViewWindow ()
+ {
+ if (declarationviewwindow == null) {
+ declarationviewwindow = new TooltipInformationWindow ();
+ } else {
+ declarationviewwindow.SetDefaultScheme ();
+ }
+ }
+
void RepositionDeclarationViewWindow ()
{
- if (declarationviewwindow == null || base.GdkWindow == null)
+ if (base.GdkWindow == null)
+ return;
+ EnsureDeclarationViewWindow ();
+ if (declarationviewwindow.Overloads == 0)
return;
var selectedItem = List.SelectedItem;
Gdk.Rectangle rect = List.GetRowArea (selectedItem);
@@ -571,7 +583,7 @@ namespace MonoDevelop.Ide.CodeCompletion
filteredOverloads = new ICompletionData[] { data };
}
-
+ EnsureDeclarationViewWindow ();
if (data != currentData) {
declarationviewwindow.Clear ();
var overloads = new List<ICompletionData> (filteredOverloads);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
index 88cbb663b9..8924703e4a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
@@ -603,13 +603,13 @@ namespace MonoDevelop.Ide.CodeCompletion
internal List<int> filteredItems = new List<int> ();
- Category GetCategory (CompletionCategory completionCategory)
+ static Category GetCategory (List<Category> categories, CompletionCategory completionCategory)
{
- foreach (Category cat in categories) {
+ foreach (var cat in categories) {
if (cat.CompletionCategory == completionCategory)
return cat;
}
- Category result = new Category ();
+ var result = new Category ();
result.CompletionCategory = completionCategory;
if (completionCategory == null) {
categories.Add (result);
@@ -622,14 +622,14 @@ namespace MonoDevelop.Ide.CodeCompletion
string oldCompletionString = null;
public void FilterWords ()
{
- categories.Clear ();
+ var newCategories = new List<Category> ();
var matcher = CompletionMatcher.CreateCompletionMatcher (CompletionString);
if (oldCompletionString == null || !CompletionString.StartsWith (oldCompletionString)) {
filteredItems.Clear ();
for (int newSelection = 0; newSelection < win.DataProvider.ItemCount; newSelection++) {
if (string.IsNullOrEmpty (CompletionString) || matcher.IsMatch (win.DataProvider.GetText (newSelection))) {
var completionCategory = win.DataProvider.GetCompletionCategory (newSelection);
- GetCategory (completionCategory).Items.Add (newSelection);
+ GetCategory (newCategories, completionCategory).Items.Add (newSelection);
filteredItems.Add (newSelection);
}
}
@@ -639,7 +639,7 @@ namespace MonoDevelop.Ide.CodeCompletion
foreach (int newSelection in oldItems) {
if (string.IsNullOrEmpty (CompletionString) || matcher.IsMatch (win.DataProvider.GetText (newSelection))) {
var completionCategory = win.DataProvider.GetCompletionCategory (newSelection);
- GetCategory (completionCategory).Items.Add (newSelection);
+ GetCategory (newCategories, completionCategory).Items.Add (newSelection);
filteredItems.Add (newSelection);
}
}
@@ -648,10 +648,11 @@ namespace MonoDevelop.Ide.CodeCompletion
filteredItems.Sort (delegate (int left, int right) {
return win.DataProvider.CompareTo (left, right);
});
- categories.Sort (delegate (Category left, Category right) {
+ newCategories.Sort (delegate (Category left, Category right) {
return left.CompletionCategory != null ? left.CompletionCategory.CompareTo (right.CompletionCategory) : -1;
});
-
+ categories = newCategories;
+
SelectFirstItemInCategory ();
CalcVisibleRows ();
SetAdjustments ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs
index 57a882598f..f52700a1be 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ParameterInformationWindow.cs
@@ -79,6 +79,7 @@ namespace MonoDevelop.Ide.CodeCompletion
this.AllowGrow = false;
this.CanFocus = false;
this.CanDefault = false;
+ Mono.TextEditor.PopupWindow.WindowTransparencyDecorator.Attach (this);
headlabel = new MonoDevelop.Components.FixedWidthWrapLabel ();
headlabel.Indent = -20;
@@ -126,7 +127,7 @@ namespace MonoDevelop.Ide.CodeCompletion
lastParam = currentParam;
ClearDescriptions ();
- var o = provider.CreateTooltipInformation (overload, _currentParam, false);
+ var o = provider.CreateTooltipInformation (overload, currentParam, false);
Theme.NumPages = provider.Count;
Theme.CurrentPage = overload;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs
index e53af48ce2..5340f6ca71 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/TooltipInformationWindow.cs
@@ -57,7 +57,7 @@ namespace MonoDevelop.Ide.CodeCompletion
}
}
- readonly FixedWidthWrapLabel headlabel;
+ readonly FixedWidthWrapLabel headLabel;
public bool Multiple{
get {
return overloads.Count > 1;
@@ -100,7 +100,7 @@ namespace MonoDevelop.Ide.CodeCompletion
protected override void OnSizeRequested (ref Requisition requisition)
{
base.OnSizeRequested (ref requisition);
- var w = Math.Max (headlabel.WidthRequest, headlabel.RealWidth);
+ var w = Math.Max (headLabel.WidthRequest, headLabel.RealWidth);
requisition.Width = (int)Math.Max (w + ContentBox.LeftPadding + ContentBox.RightPadding, requisition.Width);
}
@@ -110,17 +110,17 @@ namespace MonoDevelop.Ide.CodeCompletion
if (current_overload >= 0 && current_overload < overloads.Count) {
var o = overloads[current_overload];
- headlabel.Markup = o.SignatureMarkup;
- headlabel.Visible = true;
+ headLabel.Markup = o.SignatureMarkup;
+ headLabel.Visible = true;
int x, y;
GetPosition (out x, out y);
var geometry = DesktopService.GetUsableMonitorGeometry (Screen, Screen.GetMonitorAtPoint (x, y));
- headlabel.MaxWidth = Math.Max (geometry.Width / 5, 480);
+ headLabel.MaxWidth = Math.Max (geometry.Width / 5, 480);
if (Theme.DrawPager && overloads.Count > 1) {
- headlabel.WidthRequest = headlabel.RealWidth + 70;
+ headLabel.WidthRequest = headLabel.RealWidth + 70;
} else {
- headlabel.WidthRequest = -1;
+ headLabel.WidthRequest = -1;
}
foreach (var cat in o.Categories) {
descriptionBox.PackStart (CreateCategory (cat.Item1, cat.Item2), true, true, 4);
@@ -188,21 +188,10 @@ namespace MonoDevelop.Ide.CodeCompletion
ClearDescriptions ();
overloads.Clear ();
Theme.DrawPager = false;
- headlabel.Markup = "";
+ headLabel.Markup = "";
current_overload = 0;
}
- [Obsolete("Will get removed in later versions.")]
- public void SetFixedWidth (int w)
- {
- /* if (w != -1) {
- headlabel.MaxWidth = w;
- } else {
- headlabel.MaxWidth = -1;
- }*/
- QueueResize ();
- }
-
VBox CreateCategory (string categoryName, string categoryContentMarkup)
{
var vbox = new VBox ();
@@ -230,7 +219,16 @@ namespace MonoDevelop.Ide.CodeCompletion
readonly VBox descriptionBox = new VBox (false, 0);
readonly VBox vb2 = new VBox (false, 0);
- readonly Cairo.Color foreColor;
+ Cairo.Color foreColor;
+
+ internal void SetDefaultScheme ()
+ {
+ var scheme = Mono.TextEditor.Highlighting.SyntaxModeService.GetColorStyle (IdeApp.Preferences.ColorScheme);
+ Theme.SetSchemeColors (scheme);
+ foreColor = scheme.PlainText.Foreground;
+ headLabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
+ }
+
public TooltipInformationWindow () : base ()
{
TypeHint = Gdk.WindowTypeHint.Tooltip;
@@ -244,31 +242,30 @@ namespace MonoDevelop.Ide.CodeCompletion
this.CanDefault = false;
this.Events |= Gdk.EventMask.EnterNotifyMask;
- headlabel = new FixedWidthWrapLabel ();
- headlabel.Indent = -20;
- var des = FontService.GetFontDescription ("Editor").Copy ();
- des.Size = des.Size * 9 / 10;
- headlabel.FontDescription = des;
-// headlabel.MaxWidth = 400;
- headlabel.Wrap = Pango.WrapMode.WordChar;
- headlabel.BreakOnCamelCasing = false;
- headlabel.BreakOnPunctuation = false;
+ headLabel = new FixedWidthWrapLabel ();
+ headLabel.Indent = -20;
+ headLabel.FontDescription = FontService.GetFontDescription ("Editor(TooltipSource)");;
+ headLabel.Wrap = Pango.WrapMode.WordChar;
+ headLabel.BreakOnCamelCasing = false;
+ headLabel.BreakOnPunctuation = false;
+
descriptionBox.Spacing = 4;
+
VBox vb = new VBox (false, 8);
- vb.PackStart (headlabel, true, true, 0);
- vb.PackStart (descriptionBox, true, true, 0);
+ vb.PackStart (headLabel, true, true, 4);
+ vb.PackStart (descriptionBox, true, true, 4);
+
+ HBox hb = new HBox (false, 4);
+ hb.PackStart (vb, true, true, 6);
- HBox hb = new HBox (false, 0);
- hb.PackStart (vb, true, true, 0);
WindowTransparencyDecorator.Attach (this);
vb2.Spacing = 4;
vb2.PackStart (hb, true, true, 0);
ContentBox.Add (vb2);
- var scheme = SyntaxModeService.GetColorStyle (IdeApp.Preferences.ColorScheme);
- Theme.SetSchemeColors (scheme);
- foreColor = scheme.PlainText.Foreground;
- headlabel.ModifyFg (StateType.Normal, foreColor.ToGdkColor ());
+
+ SetDefaultScheme ();
+
ShowAll ();
DesktopService.RemoveWindowShadow (this);
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs
index 7ec0246a82..1e2fb8d0c8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeFormatting/CodeFormattingCommands.cs
@@ -71,6 +71,7 @@ namespace MonoDevelop.Ide.CodeFormatting
} else {
doc.Editor.Text = formatter.FormatText (doc.Project.Policies, doc.Editor.Text);
}
+ doc.Editor.Document.CommitUpdateAll ();
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/ProjectActiveCondition.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/ProjectActiveCondition.cs
index 26ba9a2448..4c3b9bf860 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/ProjectActiveCondition.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/ProjectActiveCondition.cs
@@ -34,6 +34,7 @@ using Mono.Addins;
using MonoDevelop.Core;
using MonoDevelop.Projects;
using MonoDevelop.Ide.Gui;
+using System.Linq;
namespace MonoDevelop.Ide.Codons
{
@@ -61,7 +62,7 @@ namespace MonoDevelop.Ide.Codons
if (activeproject == "*") {
return project != null;
}
- return project != null && project.ProjectType == activeproject;
+ return project != null && project.GetProjectTypes ().All (p => p != activeproject);
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/SolutionPadCodon.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/SolutionPadCodon.cs
index 869847f2fb..634bbcc02f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/SolutionPadCodon.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Codons/SolutionPadCodon.cs
@@ -97,7 +97,7 @@ namespace MonoDevelop.Ide.Codons
void OnExtensionChanged (object s, ExtensionEventArgs args)
{
- string codonpath = Path + "/" + this.Id;
+ string codonpath = Path;
if (args.PathChanged (codonpath)) {
BuildChildren ();
pad.TreeView.UpdateBuilders (builders, options);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
index 31e6ef5bda..261d48979a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/FileCommands.cs
@@ -99,7 +99,7 @@ namespace MonoDevelop.Ide.Commands
IdeApp.Workspace.OpenWorkspaceItem (file, dlg.CloseCurrentWorkspace);
}
else
- IdeApp.Workbench.OpenDocument (file, dlg.Encoding);
+ IdeApp.Workbench.OpenDocument (file, null, dlg.Encoding, OpenDocumentOptions.DefaultInternal);
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
index 8be9cf095a..4f6b0d1812 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/ProjectCommands.cs
@@ -173,7 +173,7 @@ namespace MonoDevelop.Ide.Commands
{
if (IdeApp.Workspace.IsOpen) {
IBuildTarget buildTarget = IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
- info.Enabled = ((buildTarget != null) && (IdeApp.ProjectOperations.CurrentBuildOperation.IsCompleted));
+ info.Enabled = ((buildTarget != null) && (IdeApp.ProjectOperations.CurrentBuildOperation.IsCompleted)) && buildTarget.SupportsTarget (ProjectService.BuildTarget);
if (buildTarget != null) {
info.Text = GettextCatalog.GetString ("B_uild {0}", buildTarget.Name.Replace ("_","__"));
if (buildTarget is SolutionFolder)
@@ -225,7 +225,7 @@ namespace MonoDevelop.Ide.Commands
{
if (IdeApp.Workspace.IsOpen) {
IBuildTarget buildTarget = IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
- info.Enabled = ((buildTarget != null) && (IdeApp.ProjectOperations.CurrentBuildOperation.IsCompleted));
+ info.Enabled = ((buildTarget != null) && (IdeApp.ProjectOperations.CurrentBuildOperation.IsCompleted)) && buildTarget.SupportsTarget (ProjectService.BuildTarget);
if (buildTarget != null) {
info.Text = GettextCatalog.GetString ("R_ebuild {0}", IdeApp.ProjectOperations.CurrentSelectedBuildTarget.Name.Replace ("_","__"));
info.Description = GettextCatalog.GetString ("Rebuild {0}", IdeApp.ProjectOperations.CurrentSelectedBuildTarget.Name);
@@ -409,6 +409,7 @@ namespace MonoDevelop.Ide.Commands
if (IdeApp.ProjectOperations.CurrentSelectedBuildTarget == null)
info.Enabled = false;
else {
+ info.Enabled = IdeApp.ProjectOperations.CurrentSelectedBuildTarget.SupportsTarget (ProjectService.BuildTarget);
info.Text = GettextCatalog.GetString ("C_lean {0}", IdeApp.ProjectOperations.CurrentSelectedBuildTarget.Name.Replace ("_","__"));
info.Description = GettextCatalog.GetString ("Clean {0}", IdeApp.ProjectOperations.CurrentSelectedBuildTarget.Name);
}
@@ -562,8 +563,7 @@ namespace MonoDevelop.Ide.Commands
protected override void Run ()
{
ApplyPolicyDialog dlg = new ApplyPolicyDialog ((IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolutionItem ?? (IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolution);
- MessageService.RunCustomDialog (dlg);
- dlg.Destroy ();
+ MessageService.ShowCustomDialog (dlg);
}
}
@@ -577,8 +577,7 @@ namespace MonoDevelop.Ide.Commands
protected override void Run ()
{
ExportProjectPolicyDialog dlg = new ExportProjectPolicyDialog ((IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolutionItem ?? (IPolicyProvider)IdeApp.ProjectOperations.CurrentSelectedSolution);
- MessageService.RunCustomDialog (dlg);
- dlg.Destroy ();
+ MessageService.ShowCustomDialog (dlg);
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
index 873e6c7002..4897ecb754 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
@@ -206,20 +206,37 @@ namespace MonoDevelop.Ide.CustomTools
} finally {
monitor.Dispose ();
}
-
- if (!result.GeneratedFilePath.IsNullOrEmpty && File.Exists (result.GeneratedFilePath)) {
- Gtk.Application.Invoke (delegate {
- if (genFile == null) {
- genFile = file.Project.AddFile (result.GeneratedFilePath, result.OverrideBuildAction);
- } else if (result.GeneratedFilePath != genFile.FilePath) {
- genFile.Name = result.GeneratedFilePath;
- }
+
+ if (result.GeneratedFilePath.IsNullOrEmpty || !File.Exists (result.GeneratedFilePath))
+ return;
+
+ // broadcast a change event so text editors etc reload the file
+ FileService.NotifyFileChanged (result.GeneratedFilePath);
+
+ // add file to project, update file properties, etc
+ Gtk.Application.Invoke (delegate {
+ bool projectChanged = false;
+ if (genFile == null) {
+ genFile = file.Project.AddFile (result.GeneratedFilePath, result.OverrideBuildAction);
+ projectChanged = true;
+ } else if (result.GeneratedFilePath != genFile.FilePath) {
+ genFile.Name = result.GeneratedFilePath;
+ projectChanged = true;
+ }
+
+ if (file.LastGenOutput != genFileName) {
file.LastGenOutput = genFileName;
+ projectChanged = true;
+ }
+
+ if (genFile.DependsOn != file.FilePath.FileName) {
genFile.DependsOn = file.FilePath.FileName;
-
+ projectChanged = true;
+ }
+
+ if (projectChanged)
IdeApp.ProjectOperations.Save (file.Project);
- });
- }
+ });
}
static void HandleRename (ProjectFileRenamedEventArgs e)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/PublicResXFileCodeGenerator.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/PublicResXFileCodeGenerator.cs
new file mode 100644
index 0000000000..48f9679587
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/PublicResXFileCodeGenerator.cs
@@ -0,0 +1,51 @@
+//
+// PublicResXFileCodeGenerator.cs
+//
+// Author:
+// Kenneth Skovhede <kenneth@hexad.dk>
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+// Bernhard Johannessen <bernhard@voytsje.com>
+//
+// Copyright (C) 2013 Kenneth Skovhede
+// Copyright (C) 2013 Xamarin Inc.
+// Copyright (C) 2014 Bernhard Johannessen
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.IO;
+using System.Text;
+using MonoDevelop.Core;
+using MonoDevelop.Projects;
+using MonoDevelop.Ide.CustomTools;
+using System.Resources.Tools;
+using System.CodeDom.Compiler;
+
+namespace MonoDevelop.Ide.CustomTools
+{
+ public class PublicResXFileCodeGenerator : ISingleFileCustomTool
+ {
+ public IAsyncOperation Generate (IProgressMonitor monitor, ProjectFile file, SingleFileCustomToolResult result)
+ {
+ return new ThreadAsyncOperation (ResXFileCodeGenerator.GenerateFile (file, result, false), result);
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
index 4e386623fc..b54085a249 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/ResXFileCodeGenerator.cs
@@ -4,9 +4,12 @@
// Author:
// Kenneth Skovhede <kenneth@hexad.dk>
// Michael Hutchinson <m.j.hutchinson@gmail.com>
+// Bernhard Johannessen <bernhard@voytsje.com>
+// Matthew Diamond <matthewdiamond96@gmail.com>
//
// Copyright (C) 2013 Kenneth Skovhede
// Copyright (C) 2013 Xamarin Inc.
+// Copyright (C) 2014 Bernhard Johannessen
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -36,6 +39,12 @@ using MonoDevelop.Projects;
using MonoDevelop.Ide.CustomTools;
using System.Resources.Tools;
using System.CodeDom.Compiler;
+using System.CodeDom;
+using System.Linq;
+using MonoDevelop.Core.Assemblies;
+using System.Resources;
+using System.Collections.Generic;
+using System.Collections;
namespace MonoDevelop.Ide.CustomTools
{
@@ -43,7 +52,12 @@ namespace MonoDevelop.Ide.CustomTools
{
public IAsyncOperation Generate (IProgressMonitor monitor, ProjectFile file, SingleFileCustomToolResult result)
{
- return new ThreadAsyncOperation (delegate {
+ return new ThreadAsyncOperation (GenerateFile (file, result, true), result);
+ }
+
+ public static Action GenerateFile (ProjectFile file, SingleFileCustomToolResult result, bool internalClass)
+ {
+ return delegate {
var dnp = file.Project as DotNetProject;
if (dnp == null) {
var err = "ResXFileCodeGenerator can only be used with .NET projects";
@@ -61,9 +75,23 @@ namespace MonoDevelop.Ide.CustomTools
var outputfile = file.FilePath.ChangeExtension (".Designer." + provider.FileExtension);
var ns = CustomToolService.GetFileNamespace (file, outputfile);
var cn = provider.CreateValidIdentifier (file.FilePath.FileNameWithoutExtension);
+ var rd = new Dictionary<object, object> ();
+
+ using (var r = new ResXResourceReader (file.FilePath)) {
+ r.UseResXDataNodes = true;
+ r.BasePath = file.FilePath.ParentDirectory;
+
+ foreach (DictionaryEntry e in r) {
+ rd.Add (e.Key, e.Value);
+ }
+ }
string[] unmatchable;
- var ccu = StronglyTypedResourceBuilder.Create (file.FilePath, cn, ns, provider, true, out unmatchable);
+ var ccu = StronglyTypedResourceBuilder.Create (rd, cn, ns, provider, internalClass, out unmatchable);
+
+ if (TargetsPcl2Framework (dnp)) {
+ FixupPclTypeInfo (ccu);
+ }
foreach (var p in unmatchable) {
var msg = string.Format ("Could not generate property for resource ID '{0}'", p);
@@ -74,7 +102,32 @@ namespace MonoDevelop.Ide.CustomTools
provider.GenerateCodeFromCompileUnit (ccu, w, new CodeGeneratorOptions ());
result.GeneratedFilePath = outputfile;
- }, result);
+ };
+ }
+
+ static bool TargetsPcl2Framework (DotNetProject dnp)
+ {
+ if (dnp.TargetFramework.Id.Identifier != TargetFrameworkMoniker.ID_PORTABLE)
+ return false;
+ var asms = dnp.AssemblyContext.GetAssemblies (dnp.TargetFramework);
+ return asms.Any (a => a.Package != null && a.Package.IsFrameworkPackage && a.Name == "System.Runtime");
+ }
+
+ //works with .NET 4.5.1 and Mono 3.4.0
+ static void FixupPclTypeInfo (CodeCompileUnit ccu)
+ {
+ try {
+ ccu.Namespaces [0].Imports.Add (new CodeNamespaceImport ("System.Reflection"));
+ var assignment = ccu.Namespaces [0].Types [0]
+ .Members.OfType<CodeMemberProperty> ().Single (t => t.Name == "ResourceManager")
+ .GetStatements.OfType<CodeConditionStatement> ().Single ()
+ .TrueStatements.OfType<CodeVariableDeclarationStatement> ().Single ();
+ var initExpr = (CodeObjectCreateExpression) assignment.InitExpression;
+ var typeofExpr = (CodePropertyReferenceExpression) initExpr.Parameters [1];
+ typeofExpr.TargetObject = new CodeMethodInvokeExpression (typeofExpr.TargetObject, "GetTypeInfo");
+ } catch (Exception ex) {
+ LoggingService.LogWarning ("Failed to fixup resgen output for PCL", ex);
+ }
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
index b0c8333362..42b5deb2e8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Desktop/PlatformService.cs
@@ -51,6 +51,8 @@ namespace MonoDevelop.Ide.Desktop
const bool UsePlatformFileIcons = false;
public abstract string DefaultMonospaceFont { get; }
+ public virtual string DefaultSansFont { get { return null; } }
+
public abstract string Name { get; }
/// <summary>
@@ -325,6 +327,12 @@ namespace MonoDevelop.Ide.Desktop
{
return false;
}
+
+ public virtual bool ShowContextMenu (MonoDevelop.Components.Commands.CommandManager commandManager,
+ Gtk.Widget widget, double x, double y, MonoDevelop.Components.Commands.CommandEntrySet entrySet, object initialCommandTarget = null)
+ {
+ return false;
+ }
// Used for preserve the file attributes when monodevelop opens & writes a file.
// This should work on unix & mac platform.
@@ -360,18 +368,9 @@ namespace MonoDevelop.Ide.Desktop
get { return false; }
}
- [Obsolete ("Implement/call OpenTerminal instead")]
- public virtual void OpenInTerminal (FilePath directory)
- {
- throw new InvalidOperationException ();
- }
-
public virtual void OpenTerminal (FilePath directory, IDictionary<string, string> environmentVariables, string title)
{
- // use old version as old fallback, it'll throw if it's not implemted either
- #pragma warning disable 618
- OpenInTerminal (directory);
- #pragma warning restore 618
+ throw new InvalidOperationException ();
}
protected virtual RecentFiles CreateRecentFilesProvider ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
index 6254495928..8ddfbccf09 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
@@ -69,9 +69,9 @@ namespace MonoDevelop.Ide.FindInFiles
Alignment alignment = new Alignment (0.5f, 0.5f, 0f, 0f);
Label label = new Label (button.Label);
HBox hbox = new HBox (false, 2);
- Image image = new Image ();
+ ImageView image = new ImageView ();
- image.Pixbuf = Stetic.IconLoader.LoadIcon (button, stockIcon, IconSize.Button);
+ image.Image = ImageService.GetIcon (stockIcon, IconSize.Menu);
image.Show ();
hbox.Add (image);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs
index f321d75ead..ab63fa2d69 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/MemberCollector.cs
@@ -43,9 +43,61 @@ namespace MonoDevelop.Ide.FindInFiles
{
if (a == null && b == null) return true;
if (a == null || b == null) return false;
- return ParameterListComparer.Instance.Equals (a.Parameters, b.Parameters);
+
+ return Equals (a.Compilation, a.Parameters, b.Parameters);
+ }
+
+ #region Code from NRefactory ParameterListComparer
+
+ public static bool Equals(ICompilation comp, IList<IParameter> x, IList<IParameter> y)
+ {
+ if (x == y)
+ return true;
+ if (x == null || y == null || x.Count != y.Count)
+ return false;
+ for (int i = 0; i < x.Count; i++) {
+ var a = x[i];
+ var b = y[i];
+ if (a == null && b == null)
+ continue;
+ if (a == null || b == null)
+ return false;
+
+ // We want to consider the parameter lists "Method<T>(T a)" and "Method<S>(S b)" as equal.
+ // However, the parameter types are not considered equal, as T is a different type parameter than S.
+ // In order to compare the method signatures, we will normalize all method type parameters.
+ IType aType = a.Type.AcceptVisitor(normalizationVisitor);
+ IType bType = b.Type.AcceptVisitor(normalizationVisitor);
+ bType = comp.Import (bType);
+ if (!aType.Equals(bType))
+ return false;
+ }
+ return true;
+ }
+
+ sealed class NormalizeTypeVisitor : TypeVisitor
+ {
+ public override IType VisitTypeParameter(ITypeParameter type)
+ {
+ if (type.OwnerType == SymbolKind.Method) {
+ return ICSharpCode.NRefactory.TypeSystem.Implementation.DummyTypeParameter.GetMethodTypeParameter(type.Index);
+ } else {
+ return base.VisitTypeParameter(type);
+ }
+ }
+
+ public override IType VisitTypeDefinition(ITypeDefinition type)
+ {
+ if (type.KnownTypeCode == KnownTypeCode.Object)
+ return SpecialType.Dynamic;
+ return base.VisitTypeDefinition(type);
+ }
}
+ static readonly NormalizeTypeVisitor normalizationVisitor = new NormalizeTypeVisitor();
+
+ #endregion
+
/// <summary>
/// find all base types(types that are not derived from other types) in the specified types
/// </summary>
@@ -86,7 +138,6 @@ namespace MonoDevelop.Ide.FindInFiles
if (member.SymbolKind == SymbolKind.Property || !(member is IParameterizedMember)) {
members = members.Where (m => m == member || m.DeclaringType.Kind == TypeKind.Interface);
}*/
-
if (filter != null)
members = members.Where (filter);
return members;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs
index 8958d18654..0600d9f415 100755
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs
@@ -226,11 +226,16 @@ namespace MonoDevelop.Ide.FindInFiles
// execute search
if (monitor != null)
monitor.BeginTask (GettextCatalog.GetString ("Analyzing files..."), totalFiles);
+ var foundOccurrences = new HashSet<Tuple<string, DomRegion>> ();
foreach (var tuple in preparedFinders) {
var finder = tuple.Item1;
foreach (var foundReference in finder.FindReferences (tuple.Item2, tuple.Item3, tuple.Item4, monitor, searchNodes)) {
if (monitor != null && monitor.IsCancelRequested)
yield break;
+ var tag = Tuple.Create (foundReference.FileName, foundReference.Region);
+ if (foundOccurrences.Contains (tag))
+ continue;
+ foundOccurrences.Add (tag);
yield return foundReference;
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs
index 2a7ada1b35..fff1d1202b 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/Scope.cs
@@ -107,11 +107,22 @@ namespace MonoDevelop.Ide.FindInFiles
{
if (IdeApp.Workspace.IsOpen) {
var alreadyVisited = new HashSet<string> ();
+ foreach (var solutionFolder in IdeApp.Workspace.GetAllSolutionItems().OfType<SolutionFolder>()) {
+ monitor.Log.WriteLine (GettextCatalog.GetString ("Looking in solution folder '{0}'", solutionFolder.Name));
+ foreach (var file in solutionFolder.Files.Where (f => filterOptions.NameMatches (f.FileName) && File.Exists (f.FullPath))) {
+ if (!IncludeBinaryFiles && !DesktopService.GetFileIsText (file.FullPath))
+ continue;
+ if (alreadyVisited.Contains (file.FullPath))
+ continue;
+ alreadyVisited.Add (file.FileName);
+ yield return new FileProvider (file.FullPath);
+ }
+ }
foreach (Project project in IdeApp.Workspace.GetAllProjects ()) {
monitor.Log.WriteLine (GettextCatalog.GetString ("Looking in project '{0}'", project.Name));
foreach (ProjectFile file in project.Files.Where (f => filterOptions.NameMatches (f.Name) && File.Exists (f.Name))) {
if (!IncludeBinaryFiles && !DesktopService.GetFileIsText (file.FilePath))
- continue;
+ continue;
if (alreadyVisited.Contains (file.Name))
continue;
alreadyVisited.Add (file.Name);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs
index 6a253cc63b..63db192cab 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResult.cs
@@ -25,17 +25,18 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+
using MonoDevelop.Ide.Editor;
using MonoDevelop.Ide.Editor.Highlighting;
-
+
namespace MonoDevelop.Ide.FindInFiles
{
public class SearchResult
{
public virtual FileProvider FileProvider { get; private set; }
- public int Offset { get; set; }
- public int Length { get; set; }
+ public int Offset { get; set; }
+ public int Length { get; set; }
public virtual string FileName {
get {
@@ -64,10 +65,25 @@ namespace MonoDevelop.Ide.FindInFiles
set;
}
- public Xwt.Drawing.Image Icon {
+ public Xwt.Drawing.Image FileIcon {
+ get;
+ set;
+ }
+
+ public Xwt.Drawing.Image ProjectIcon {
get;
set;
}
+
+ private List<Project> projects;
+ public List<Project> Projects {
+ get {
+ if (projects == null) {
+ projects = new List<Project> (IdeApp.Workspace.GetProjectsContainingFile (FileName));
+ }
+ return projects;
+ }
+ }
#endregion
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
index 7e1dad3374..edf4cafc20 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/SearchResultWidget.cs
@@ -119,14 +119,28 @@ namespace MonoDevelop.Ide.FindInFiles
resultsScroll.Add (treeviewSearchResults);
this.ShowAll ();
-
- var fileNameColumn = new TreeViewColumn {
+
+ var projectColumn = new TreeViewColumn {
Resizable = true,
SortColumnId = 0,
- Title = GettextCatalog.GetString("File")
+ Title = GettextCatalog.GetString ("Project"),
+ FixedWidth = 100
};
- fileNameColumn.FixedWidth = 200;
+ var projectPixbufRenderer = new CellRendererImage ();
+ projectColumn.PackStart (projectPixbufRenderer, false);
+ projectColumn.SetCellDataFunc (projectPixbufRenderer, ResultProjectIconDataFunc);
+
+ projectColumn.PackStart (treeviewSearchResults.TextRenderer, true);
+ projectColumn.SetCellDataFunc (treeviewSearchResults.TextRenderer, ResultProjectDataFunc);
+ treeviewSearchResults.AppendColumn (projectColumn);
+
+ var fileNameColumn = new TreeViewColumn {
+ Resizable = true,
+ SortColumnId = 1,
+ Title = GettextCatalog.GetString ("File"),
+ FixedWidth = 200
+ };
var fileNamePixbufRenderer = new CellRendererImage ();
fileNameColumn.PackStart (fileNamePixbufRenderer, false);
@@ -135,12 +149,8 @@ namespace MonoDevelop.Ide.FindInFiles
fileNameColumn.PackStart (treeviewSearchResults.TextRenderer, true);
fileNameColumn.SetCellDataFunc (treeviewSearchResults.TextRenderer, FileNameDataFunc);
treeviewSearchResults.AppendColumn (fileNameColumn);
-
-// TreeViewColumn lineColumn = treeviewSearchResults.AppendColumn (GettextCatalog.GetString ("Line"), new CellRendererText (), ResultLineDataFunc);
-// lineColumn.SortColumnId = 1;
-// lineColumn.FixedWidth = 50;
-//
-
+
+
TreeViewColumn textColumn = treeviewSearchResults.AppendColumn (GettextCatalog.GetString ("Text"),
treeviewSearchResults.TextRenderer, ResultTextDataFunc);
textColumn.SortColumnId = 2;
@@ -154,9 +164,9 @@ namespace MonoDevelop.Ide.FindInFiles
pathColumn.Resizable = true;
pathColumn.FixedWidth = 500;
-
- store.SetSortFunc (0, CompareFileNames);
-// store.SetSortFunc (1, CompareLineNumbers);
+
+ store.SetSortFunc (0, CompareProjectFileNames);
+ store.SetSortFunc (1, CompareFileNames);
store.SetSortFunc (3, CompareFilePaths);
treeviewSearchResults.RowActivated += TreeviewSearchResultsRowActivated;
@@ -164,7 +174,7 @@ namespace MonoDevelop.Ide.FindInFiles
buttonStop = new ToolButton (Ide.Gui.Stock.Stop) { Sensitive = false };
buttonStop.Clicked += ButtonStopClicked;
-
+
buttonStop.TooltipText = GettextCatalog.GetString ("Stop");
toolbar.Insert (buttonStop, -1);
@@ -194,11 +204,6 @@ namespace MonoDevelop.Ide.FindInFiles
base.OnRealized ();
highlightStyle = SyntaxModeService.GetColorStyle (IdeApp.Preferences.ColorScheme);
}
-
- protected override void OnStyleSet (Gtk.Style previousStyle)
- {
- base.OnStyleSet (previousStyle);
- }
void ButtonPinClicked (object sender, EventArgs e)
{
@@ -244,8 +249,8 @@ namespace MonoDevelop.Ide.FindInFiles
public void EndProgress ()
{
buttonStop.Sensitive = false;
- newStore.SetSortFunc (0, CompareFileNames);
- newStore.SetSortFunc (1, CompareLineNumbers);
+ newStore.SetSortFunc (0, CompareProjectFileNames);
+ newStore.SetSortFunc (1, CompareFileNames);
newStore.SetSortFunc (3, CompareFilePaths);
treeviewSearchResults.Model = newStore;
@@ -306,7 +311,6 @@ namespace MonoDevelop.Ide.FindInFiles
int offset = 0;
-
// This is a workaround for Bug 559804 - Strings in search result pad are near-invisible
// On mac it's not possible to get the white background color with the Base or Background
// methods. If this bug is fixed or a better work around is found - remove this hack.
@@ -357,9 +361,9 @@ namespace MonoDevelop.Ide.FindInFiles
var searchResult = (SearchResult)store.GetValue (iter, SearchResultColumn);
if (searchResult == null)
return;
- if (searchResult.Icon == null)
- searchResult.Icon = DesktopService.GetIconForFile (searchResult.FileName, IconSize.Menu);
- fileNamePixbufRenderer.Image = searchResult.Icon;
+ if (searchResult.FileIcon == null)
+ searchResult.FileIcon = DesktopService.GetIconForFile (searchResult.FileName, IconSize.Menu);
+ fileNamePixbufRenderer.Image = searchResult.FileIcon;
}
@@ -407,7 +411,18 @@ namespace MonoDevelop.Ide.FindInFiles
return -1;
return System.IO.Path.GetFileName (searchResult1.FileName).CompareTo (System.IO.Path.GetFileName (searchResult2.FileName));
}
-
+
+ static int CompareProjectFileNames (TreeModel model, TreeIter first, TreeIter second)
+ {
+ var searchResult1 = (SearchResult)model.GetValue (first, SearchResultColumn);
+ var searchResult2 = (SearchResult)model.GetValue (second, SearchResultColumn);
+ if (searchResult1 == null || searchResult2 == null ||
+ searchResult1.Projects == null || searchResult2.Projects == null ||
+ searchResult1.Projects.Count == 0 || searchResult2.Projects.Count == 0)
+ return -1;
+ return System.IO.Path.GetFileName (searchResult1.Projects[0].FileName).CompareTo (System.IO.Path.GetFileName (searchResult2.Projects[0].FileName));
+ }
+
static int CompareFilePaths (TreeModel model, TreeIter first, TreeIter second)
{
var searchResult1 = (SearchResult)model.GetValue (first, SearchResultColumn);
@@ -430,22 +445,35 @@ namespace MonoDevelop.Ide.FindInFiles
bool didRead = (bool)store.GetValue (iter, DidReadColumn);
pathRenderer.Markup = MarkupText (System.IO.Path.GetDirectoryName (searchResult.FileName), didRead);
}
-
-// void ResultLineDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
-// {
-// if (TreeIter.Zero.Equals (iter))
-// return;
-// var lineRenderer = (CellRendererText)cell;
-// var searchResult = (SearchResult)store.GetValue (iter, SearchResultColumn);
-// if (searchResult == null)
-// return;
-//
-// Document doc = GetDocument (searchResult);
-// int lineNr = doc.OffsetToLineNumber (searchResult.Offset) + 1;
-// bool didRead = (bool)store.GetValue (iter, DidReadColumn);
-// lineRenderer.Markup = MarkupText (lineNr.ToString (), didRead);
-// }
-//
+
+ void ResultProjectIconDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
+ {
+ if (TreeIter.Zero.Equals (iter))
+ return;
+ var fileNamePixbufRenderer = (CellRendererImage) cell;
+ var searchResult = (SearchResult)store.GetValue (iter, SearchResultColumn);
+ if (searchResult == null)
+ return;
+ if (searchResult.ProjectIcon == null && searchResult.Projects.Count > 0)
+ searchResult.ProjectIcon = ImageService.GetIcon (searchResult.Projects [0].StockIcon).WithSize (Gtk.IconSize.Menu);
+ fileNamePixbufRenderer.Image = searchResult.ProjectIcon;
+ }
+
+ void ResultProjectDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
+ {
+ if (TreeIter.Zero.Equals (iter))
+ return;
+ var pathRenderer = (CellRendererText)cell;
+ var searchResult = (SearchResult)store.GetValue (iter, SearchResultColumn);
+ if (searchResult == null)
+ return;
+ bool didRead = (bool)store.GetValue (iter, DidReadColumn);
+ if (searchResult.Projects.Count > 0)
+ pathRenderer.Markup = MarkupText (String.Join (", ", searchResult.Projects.Select (p => p.Name)), didRead);
+ else
+ pathRenderer.Markup = "";
+ }
+
void ResultTextDataFunc (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
{
if (TreeIter.Zero.Equals (iter))
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs
index 4f8dd83a43..87f565324d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Fonts/FontService.cs
@@ -38,7 +38,27 @@ namespace MonoDevelop.Ide.Fonts
static List<FontDescriptionCodon> fontDescriptions = new List<FontDescriptionCodon> ();
static Dictionary<string, FontDescription> loadedFonts = new Dictionary<string, FontDescription> ();
static Properties fontProperties;
- static FontDescription defaultMonospaceFontDescription;
+
+ static string defaultMonospaceFontName, defaultSansFontName;
+ static FontDescription defaultMonospaceFont, defaultSansFont;
+
+ static void LoadDefaults ()
+ {
+ if (defaultMonospaceFont != null) {
+ defaultMonospaceFont.Dispose ();
+ defaultSansFont.Dispose ();
+ }
+
+ #pragma warning disable 618
+ defaultMonospaceFontName = DesktopService.DefaultMonospaceFont;
+ defaultMonospaceFont = FontDescription.FromString (defaultMonospaceFontName);
+ #pragma warning restore 618
+
+ var label = new Gtk.Label ("");
+ defaultSansFont = label.Style.FontDescription.Copy ();
+ label.Destroy ();
+ defaultSansFontName = defaultSansFont.ToString ();
+ }
internal static IEnumerable<FontDescriptionCodon> FontDescriptions {
get {
@@ -46,8 +66,11 @@ namespace MonoDevelop.Ide.Fonts
}
}
- static FontService ()
+ internal static void Initialize ()
{
+ if (fontProperties != null)
+ throw new InvalidOperationException ("Already initialized");
+
fontProperties = PropertyService.Get ("FontProperties", new Properties ());
AddinManager.AddExtensionNodeHandler ("/MonoDevelop/Ide/Fonts", delegate(object sender, ExtensionNodeEventArgs args) {
@@ -62,34 +85,42 @@ namespace MonoDevelop.Ide.Fonts
loadedFonts.Remove (codon.Name);
break;
}
- });
+ });
+
+ LoadDefaults ();
}
+ public static FontDescription MonospaceFont { get { return defaultMonospaceFont; } }
+ public static FontDescription SansFont { get { return defaultSansFont; } }
+
+ public static string MonospaceFontName { get { return defaultMonospaceFontName; } }
+ public static string SansFontName { get { return defaultSansFontName; } }
+
+ [Obsolete ("Use MonospaceFont")]
public static FontDescription DefaultMonospaceFontDescription {
get {
- if (defaultMonospaceFontDescription == null)
- defaultMonospaceFontDescription = LoadFont (DesktopService.DefaultMonospaceFont);
- return defaultMonospaceFontDescription;
+ if (defaultMonospaceFont == null)
+ defaultMonospaceFont = LoadFont (DesktopService.DefaultMonospaceFont);
+ return defaultMonospaceFont;
}
}
static FontDescription LoadFont (string name)
{
var fontName = FilterFontName (name);
- return Pango.FontDescription.FromString (fontName);
+ return FontDescription.FromString (fontName);
}
public static string FilterFontName (string name)
{
- if (name == "_DEFAULT_MONOSPACE")
- return DesktopService.DefaultMonospaceFont;
- if (name == "_DEFAULT_SANS") {
- var label = new Gtk.Label ("");
- string result = label.Style.FontDescription.Family + " " + ((int)label.Style.FontDesc.Size / Pango.Scale.PangoScale);
- label.Destroy ();
- return result;
+ switch (name) {
+ case "_DEFAULT_MONOSPACE":
+ return defaultMonospaceFontName;
+ case "_DEFAULT_SANS":
+ return defaultSansFontName;
+ default:
+ return name;
}
- return name;
}
public static string GetUnderlyingFontName (string name)
@@ -165,4 +196,32 @@ namespace MonoDevelop.Ide.Fonts
list.Remove (callback);
}
}
-} \ No newline at end of file
+
+ public static class FontExtensions
+ {
+ public static FontDescription CopyModified (this FontDescription font, double? scale = null, Pango.Weight? weight = null)
+ {
+ font = font.Copy ();
+
+ if (scale.HasValue)
+ Scale (font, scale.Value);
+
+ if (weight.HasValue)
+ font.Weight = weight.Value;
+
+ return font;
+ }
+
+ static void Scale (FontDescription font, double scale)
+ {
+ if (font.SizeIsAbsolute) {
+ font.AbsoluteSize = scale * font.Size;
+ } else {
+ var size = font.Size;
+ if (size == 0)
+ size = 10;
+ font.Size = (int)(Pango.Scale.PangoScale * (int)(scale * size / Pango.Scale.PangoScale));
+ }
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/DragOperation.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/DragOperation.cs
index 388ee97a86..a332152d00 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/DragOperation.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/DragOperation.cs
@@ -30,6 +30,7 @@ using System;
namespace MonoDevelop.Ide.Gui.Components
{
+ [Flags]
public enum DragOperation {
None = 0,
Copy = 1,
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
index f27b17f0f8..dd84e9d9a9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs
@@ -80,6 +80,7 @@ namespace MonoDevelop.Ide.Gui.Components
TreeNodeNavigator workNode;
TreeNodeNavigator compareNode1;
TreeNodeNavigator compareNode2;
+
internal bool sorting;
object[] copyObjects;
@@ -401,7 +402,8 @@ namespace MonoDevelop.Ide.Gui.Components
if (ShowSelectionPopupButton && text_render.PointerInButton ((int)args.Event.XRoot, (int)args.Event.YRoot)) {
text_render.Pushed = true;
args.RetVal = true;
- var menu = CreateContextMenu ();
+ var entryset = BuildEntrySet ();
+ var menu = IdeApp.CommandService.CreateMenu (entryset, this);
if (menu != null) {
menu.Hidden += HandleMenuHidden;
GtkWorkarounds.ShowContextMenu (menu, tree, text_render.PopupAllocation);
@@ -1453,6 +1455,8 @@ namespace MonoDevelop.Ide.Gui.Components
return string.Compare (tb1.GetNodeName (compareNode1, o1), tb2.GetNodeName (compareNode2, o2), true);
} finally {
sorting = false;
+ compareNode1.MoveToIter (Gtk.TreeIter.Zero);
+ compareNode2.MoveToIter (Gtk.TreeIter.Zero);
}
}
@@ -1647,6 +1651,8 @@ namespace MonoDevelop.Ide.Gui.Components
sb.Insert (0, name);
} while (workNode.MoveToParent ());
+ workNode.MoveToIter (Gtk.TreeIter.Zero);
+
return sb.ToString ();
}
@@ -1765,12 +1771,12 @@ namespace MonoDevelop.Ide.Gui.Components
void ShowPopup (Gdk.EventButton evt)
{
- var menu = CreateContextMenu ();
- if (menu != null)
- IdeApp.CommandService.ShowContextMenu (this, evt, menu, this);
+ var entryset = BuildEntrySet () ?? new CommandEntrySet ();
+
+ IdeApp.CommandService.ShowContextMenu (this, evt, entryset, this);
}
- protected Gtk.Menu CreateContextMenu ()
+ protected CommandEntrySet BuildEntrySet ()
{
ITreeNavigator tnav = GetSelectedNode ();
if (tnav == null)
@@ -1783,7 +1789,7 @@ namespace MonoDevelop.Ide.Gui.Components
opset.AddItem (ViewCommands.TreeDisplayOptionList);
opset.AddItem (Command.Separator);
opset.AddItem (ViewCommands.ResetTreeDisplayOptions);
- return IdeApp.CommandService.CreateMenu (opset, this);
+ return opset;
}
return null;
} else {
@@ -1800,7 +1806,7 @@ namespace MonoDevelop.Ide.Gui.Components
// opset.AddItem (ViewCommands.CollapseAllTreeNodes);
}
eset.AddItem (ViewCommands.RefreshTree);
- return IdeApp.CommandService.CreateMenu (eset, this);
+ return eset;
}
}
@@ -2567,14 +2573,14 @@ namespace MonoDevelop.Ide.Gui.Components
Xwt.Drawing.Image GetResized (Xwt.Drawing.Image value)
{
- if (zoom == 1)
- return value;
-
//this can happen during solution deserialization if the project is unrecognized
//because a line is added into the treeview with no icon
- if (value == null)
+ if (value == null || value == CellRendererImage.NullImage)
return null;
+ if (zoom == 1)
+ return value;
+
Xwt.Drawing.Image resized;
if (resizedCache.TryGetValue (value, out resized))
return resized;
@@ -2591,12 +2597,12 @@ namespace MonoDevelop.Ide.Gui.Components
public override void GetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height)
{
base.GetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height);
- if (overlayBottomLeft != null || overlayBottomRight != null)
+ /* if (overlayBottomLeft != null || overlayBottomRight != null)
height += overlayOverflow;
if (overlayTopLeft != null || overlayTopRight != null)
height += overlayOverflow;
if (overlayBottomRight != null || overlayTopRight != null)
- width += overlayOverflow;
+ width += overlayOverflow;*/
}
const int overlayOverflow = 2;
@@ -2610,14 +2616,17 @@ namespace MonoDevelop.Ide.Gui.Components
Xwt.Drawing.Image image;
GetImageInfo (cell_area, out image, out x, out y);
+ if (image == null)
+ return;
+
using (var ctx = Gdk.CairoHelper.Create (window)) {
- if (overlayBottomLeft != null)
+ if (overlayBottomLeft != null && overlayBottomLeft != NullImage)
ctx.DrawImage (widget, overlayBottomLeft, x - overlayOverflow, y + image.Height - overlayBottomLeft.Height + overlayOverflow);
- if (overlayBottomRight != null)
+ if (overlayBottomRight != null && overlayBottomRight != NullImage)
ctx.DrawImage (widget, overlayBottomRight, x + image.Width - overlayBottomRight.Width + overlayOverflow, y + image.Height - overlayBottomRight.Height + overlayOverflow);
- if (overlayTopLeft != null)
+ if (overlayTopLeft != null && overlayTopLeft != NullImage)
ctx.DrawImage (widget, overlayTopLeft, x - overlayOverflow, y - overlayOverflow);
- if (overlayTopRight != null)
+ if (overlayTopRight != null && overlayTopRight != NullImage)
ctx.DrawImage (widget, overlayTopRight, x + image.Width - overlayTopRight.Width + overlayOverflow, y - overlayOverflow);
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs
index a19b4cc003..b8944e730f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/LogView.cs
@@ -41,19 +41,20 @@ namespace MonoDevelop.Ide.Gui.Components
{
public class LogView : MonoDevelop.Components.CompactScrolledWindow
{
- Gtk.TextBuffer buffer;
- Gtk.TextView textEditorControl;
+ TextBuffer buffer;
+ TextView textEditorControl;
TextMark endMark;
TextTag tag;
TextTag bold;
TextTag errorTag;
TextTag consoleLogTag;
+ TextTag debugTag;
int ident = 0;
List<TextTag> tags = new List<TextTag> ();
Stack<string> indents = new Stack<string> ();
- Queue<QueuedUpdate> updates = new Queue<QueuedUpdate> ();
+ readonly Queue<QueuedUpdate> updates = new Queue<QueuedUpdate> ();
QueuedTextWrite lastTextWrite;
GLib.TimeoutHandler outputDispatcher;
bool outputDispatcherRunning = false;
@@ -66,7 +67,7 @@ namespace MonoDevelop.Ide.Gui.Components
/// </summary>
public class LogTextView : TextView
{
- public LogTextView (Gtk.TextBuffer buf) : base (buf)
+ public LogTextView (TextBuffer buf) : base (buf)
{
}
@@ -74,7 +75,6 @@ namespace MonoDevelop.Ide.Gui.Components
{
}
-
static readonly Regex lineRegex = new Regex ("\\b.*\\s(?<file>(\\w:)?[/\\\\].*):(\\w+\\s)?(?<line>\\d+)\\.?\\s*$", RegexOptions.Compiled);
internal static bool TryExtractFileAndLine (string lineText, out string file, out int line)
@@ -83,11 +83,8 @@ namespace MonoDevelop.Ide.Gui.Components
if (match.Success) {
file = match.Groups["file"].Value;
string lineNumberText = match.Groups["line"].Value;
- try {
- line = int.Parse (lineNumberText);
+ if (int.TryParse (lineNumberText, out line))
return true;
- } catch (Exception) {
- }
}
file = null;
line = 0;
@@ -97,11 +94,11 @@ namespace MonoDevelop.Ide.Gui.Components
protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
{
if (evnt.Type == Gdk.EventType.TwoButtonPress) {
- var cursorPos = base.Buffer.GetIterAtOffset (this.Buffer.CursorPosition);
-
+ var cursorPos = Buffer.GetIterAtOffset (Buffer.CursorPosition);
TextIter iterStart;
TextIter iterEnd;
string lineText;
+
try {
iterStart = Buffer.GetIterAtLine (cursorPos.Line);
iterEnd = Buffer.GetIterAtOffset (iterStart.Offset + iterStart.CharsInLine);
@@ -123,7 +120,7 @@ namespace MonoDevelop.Ide.Gui.Components
fileExists = false;
}
if (fileExists)
- IdeApp.Workbench.OpenDocument (file, lineNumber, 1);
+ IdeApp.Workbench.OpenDocument (file, null, lineNumber, 1);
}
}
}
@@ -133,7 +130,7 @@ namespace MonoDevelop.Ide.Gui.Components
public LogView ()
{
- buffer = new Gtk.TextBuffer (new Gtk.TextTagTable ());
+ buffer = new TextBuffer (new TextTagTable ());
textEditorControl = new LogTextView (buffer);
textEditorControl.Editable = false;
@@ -141,14 +138,18 @@ namespace MonoDevelop.Ide.Gui.Components
Add (textEditorControl);
bold = new TextTag ("bold");
- bold.Weight = Pango.Weight.Bold;
+ bold.Weight = Weight.Bold;
buffer.TagTable.Add (bold);
errorTag = new TextTag ("error");
- errorTag.Foreground = "red";
- errorTag.Weight = Pango.Weight.Bold;
+ errorTag.Foreground = "#dc3122";
+ errorTag.Weight = Weight.Bold;
buffer.TagTable.Add (errorTag);
-
+
+ debugTag = new TextTag ("debug");
+ debugTag.Foreground = "#256ada";
+ buffer.TagTable.Add (debugTag);
+
consoleLogTag = new TextTag ("consoleLog");
consoleLogTag.Foreground = "darkgrey";
buffer.TagTable.Add (consoleLogTag);
@@ -171,6 +172,7 @@ namespace MonoDevelop.Ide.Gui.Components
{
TextIter start;
TextIter end;
+
if (buffer.HasSelection && buffer.GetSelectionBounds (out start, out end)) {
var text = buffer.GetText (start, end, false);
var clipboard = Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
@@ -204,7 +206,7 @@ namespace MonoDevelop.Ide.Gui.Components
void UpdateCustomFont ()
{
- textEditorControl.ModifyFont (IdeApp.Preferences.CustomOutputPadFont ?? FontService.DefaultMonospaceFontDescription);
+ textEditorControl.ModifyFont (IdeApp.Preferences.CustomOutputPadFont ?? FontService.MonospaceFont);
}
//mechanism to to batch copy text when large amounts are being dumped
@@ -215,14 +217,16 @@ namespace MonoDevelop.Ide.Gui.Components
if (updates.Count == 0) {
outputDispatcherRunning = false;
return false;
- } else if (!outputDispatcherRunning) {
+ }
+
+ if (!outputDispatcherRunning) {
updates.Clear ();
return false;
- } else {
- while (updates.Count > 0) {
- QueuedUpdate up = updates.Dequeue ();
- up.Execute (this);
- }
+ }
+
+ while (updates.Count > 0) {
+ var up = updates.Dequeue ();
+ up.Execute (this);
}
}
return true;
@@ -248,20 +252,19 @@ namespace MonoDevelop.Ide.Gui.Components
} else
indents.Push (null);
- if (name != null) {
+ if (name != null)
UnsafeAddText (Environment.NewLine + name + Environment.NewLine, bold);
- }
}
public void BeginTask (string name, int totalWork)
{
- QueuedBeginTask bt = new QueuedBeginTask (name, totalWork);
+ var bt = new QueuedBeginTask (name, totalWork);
addQueuedUpdate (bt);
}
public void EndTask ()
{
- QueuedEndTask et = new QueuedEndTask ();
+ var et = new QueuedEndTask ();
addQueuedUpdate (et);
}
@@ -282,7 +285,8 @@ namespace MonoDevelop.Ide.Gui.Components
}
}
}
- QueuedTextWrite qtw = new QueuedTextWrite (text, null);
+
+ var qtw = new QueuedTextWrite (text, null);
addQueuedUpdate (qtw);
}
@@ -294,32 +298,40 @@ namespace MonoDevelop.Ide.Gui.Components
return;
}
}
- QueuedTextWrite w = new QueuedTextWrite (text, consoleLogTag);
+
+ var w = new QueuedTextWrite (text, consoleLogTag);
addQueuedUpdate (w);
}
public void WriteError (string text)
{
- QueuedTextWrite w = new QueuedTextWrite (text, errorTag);
+ var w = new QueuedTextWrite (text, errorTag);
addQueuedUpdate (w);
}
+
+ public void WriteDebug (int level, string category, string message)
+ {
+ //TODO: Give user ability to filter levels and categories
+ if (string.IsNullOrEmpty (category))
+ addQueuedUpdate (new QueuedTextWrite (message, debugTag));
+ else
+ addQueuedUpdate (new QueuedTextWrite (category + ": " + message, debugTag));
+ }
protected void UnsafeAddText (string text, TextTag extraTag)
{
//don't allow the pad to hold more than MAX_BUFFER_LENGTH chars
int overrun = (buffer.CharCount + text.Length) - MAX_BUFFER_LENGTH;
+
if (overrun > 0) {
TextIter start = buffer.StartIter;
TextIter end = buffer.GetIterAtOffset (overrun);
buffer.Delete (ref start, ref end);
}
-
+
+ bool scrollToEnd = Vadjustment.Value >= Vadjustment.Upper - 2 * Vadjustment.PageSize;
TextIter it = buffer.EndIter;
- ScrolledWindow window = textEditorControl.Parent as ScrolledWindow;
- bool scrollToEnd = true;
- if (window != null) {
- scrollToEnd = window.Vadjustment.Value >= window.Vadjustment.Upper - 2 * window.Vadjustment.PageSize;
- }
+
if (extraTag != null)
buffer.InsertWithTags (ref it, text, tag, extraTag);
else
@@ -364,15 +376,16 @@ namespace MonoDevelop.Ide.Gui.Components
IdeApp.Preferences.CustomOutputPadFontChanged -= HandleCustomFontChanged;
}
- private abstract class QueuedUpdate
+ abstract class QueuedUpdate
{
public abstract void Execute (LogView pad);
}
- private class QueuedTextWrite : QueuedUpdate
+ class QueuedTextWrite : QueuedUpdate
{
- private System.Text.StringBuilder Text;
+ readonly System.Text.StringBuilder Text;
public TextTag Tag;
+
public override void Execute (LogView pad)
{
pad.UnsafeAddText (Text.ToString (), Tag);
@@ -392,7 +405,7 @@ namespace MonoDevelop.Ide.Gui.Components
}
}
- private class QueuedBeginTask : QueuedUpdate
+ class QueuedBeginTask : QueuedUpdate
{
public string Name;
public int TotalWork;
@@ -408,7 +421,7 @@ namespace MonoDevelop.Ide.Gui.Components
}
}
- private class QueuedEndTask : QueuedUpdate
+ class QueuedEndTask : QueuedUpdate
{
public override void Execute (LogView pad)
{
@@ -417,17 +430,18 @@ namespace MonoDevelop.Ide.Gui.Components
}
}
- public class LogViewProgressMonitor : NullProgressMonitor, IConsole
+ public class LogViewProgressMonitor : NullProgressMonitor, IDebugConsole
{
LogView outputPad;
event EventHandler stopRequested;
LogTextWriter logger = new LogTextWriter ();
LogTextWriter internalLogger = new LogTextWriter ();
+ LogTextWriter errorLogger = new LogTextWriter();
NotSupportedTextReader inputReader = new NotSupportedTextReader ();
public LogView LogView {
- get { return this.outputPad; }
+ get { return outputPad; }
}
public LogViewProgressMonitor (LogView pad)
@@ -436,6 +450,7 @@ namespace MonoDevelop.Ide.Gui.Components
outputPad.Clear ();
logger.TextWritten += outputPad.WriteText;
internalLogger.TextWritten += outputPad.WriteConsoleLogText;
+ errorLogger.TextWritten += outputPad.WriteError;
}
public override void BeginTask (string name, int totalWork)
@@ -500,8 +515,13 @@ namespace MonoDevelop.Ide.Gui.Components
}
TextWriter IConsole.Error {
- get { return logger; }
+ get { return errorLogger; }
}
+
+ void IDebugConsole.Debug (int level, string category, string message)
+ {
+ outputPad.WriteDebug (level, category, message);
+ }
bool IConsole.CloseOnDispose {
get { return false; }
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs
index 37d58c2067..42da610592 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/PadTreeView.cs
@@ -62,7 +62,7 @@ namespace MonoDevelop.Ide.Gui.Components
changer.Dispose ();
changer = null;
}
- base.Dispose ();
+ base.OnDestroyed ();
}
// Workaround for Bug 1698 - Error list scroll position doesn't reset when list changes, hides items
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TransactedTreeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TransactedTreeBuilder.cs
index e2e09bed33..7f26bb49af 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TransactedTreeBuilder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TransactedTreeBuilder.cs
@@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using MonoDevelop.Core;
using System.Collections;
+using MonoDevelop.Components;
namespace MonoDevelop.Ide.Gui.Components
{
@@ -834,22 +835,16 @@ namespace MonoDevelop.Ide.Gui.Components
return;
}
tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.TextColumn, node.NodeInfo.Label);
- if (node.NodeInfo.Icon != null)
- tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OpenIconColumn, node.NodeInfo.Icon);
- if (node.NodeInfo.ClosedIcon != null)
- tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.ClosedIconColumn, node.NodeInfo.ClosedIcon);
- if (node.NodeInfo.OverlayBottomRight != null)
- tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayBottomRightColumn, node.NodeInfo.OverlayBottomRight);
- if (node.NodeInfo.OverlayBottomLeft != null)
- tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayBottomLeftColumn, node.NodeInfo.OverlayBottomLeft);
- if (node.NodeInfo.OverlayTopLeft != null)
- tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayTopLeftColumn, node.NodeInfo.OverlayTopLeft);
- if (node.NodeInfo.OverlayTopRight != null)
- tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayTopRightColumn, node.NodeInfo.OverlayTopRight);
+ tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OpenIconColumn, node.NodeInfo.Icon ?? CellRendererImage.NullImage);
+ tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.ClosedIconColumn, node.NodeInfo.ClosedIcon ?? CellRendererImage.NullImage);
+ tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayBottomRightColumn, node.NodeInfo.OverlayBottomRight ?? CellRendererImage.NullImage);
+ tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayBottomLeftColumn, node.NodeInfo.OverlayBottomLeft ?? CellRendererImage.NullImage);
+ tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayTopLeftColumn, node.NodeInfo.OverlayTopLeft ?? CellRendererImage.NullImage);
+ tree.Store.SetValue (node.NodeIter, ExtensibleTreeView.OverlayTopRightColumn, node.NodeInfo.OverlayTopRight ?? CellRendererImage.NullImage);
}
if (node.Children != null) {
foreach (TreeNode cn in node.Children) {
- Gtk.TreeIter it = tree.Store.AppendValues (node.NodeIter, cn.NodeInfo.Label, cn.NodeInfo.Icon, cn.NodeInfo.ClosedIcon, cn.DataItem, cn.BuilderChain, cn.Filled);
+ Gtk.TreeIter it = tree.Store.AppendValues (node.NodeIter, cn.NodeInfo.Label, cn.NodeInfo.Icon, cn.NodeInfo.ClosedIcon, cn.DataItem, cn.BuilderChain, cn.Filled, false, cn.NodeInfo.OverlayBottomRight, cn.NodeInfo.OverlayBottomLeft, cn.NodeInfo.OverlayTopLeft, cn.NodeInfo.OverlayTopRight);
if (!cn.Filled)
tree.Store.AppendNode (it); // Dummy node
// The OnNodeAdded event was already fired when the node was added. There is no need to fire it again.
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TreeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TreeBuilder.cs
index a768592e14..6f064e368f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TreeBuilder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/TreeBuilder.cs
@@ -320,12 +320,12 @@ namespace MonoDevelop.Ide.Gui.Components
void SetNodeInfo (Gtk.TreeIter it, NodeAttributes ats, NodeInfo nodeInfo)
{
store.SetValue (it, ExtensibleTreeView.TextColumn, nodeInfo.Label);
- if (nodeInfo.Icon != null) store.SetValue (it, ExtensibleTreeView.OpenIconColumn, nodeInfo.Icon);
- if (nodeInfo.ClosedIcon != null) store.SetValue (it, ExtensibleTreeView.ClosedIconColumn, nodeInfo.ClosedIcon);
- if (nodeInfo.OverlayBottomLeft != null) store.SetValue (it, ExtensibleTreeView.OverlayBottomLeftColumn, nodeInfo.OverlayBottomLeft);
- if (nodeInfo.OverlayBottomRight != null) store.SetValue (it, ExtensibleTreeView.OverlayBottomRightColumn, nodeInfo.OverlayBottomRight);
- if (nodeInfo.OverlayTopLeft != null) store.SetValue (it, ExtensibleTreeView.OverlayTopLeftColumn, nodeInfo.OverlayTopLeft);
- if (nodeInfo.OverlayTopRight != null) store.SetValue (it, ExtensibleTreeView.OverlayTopRightColumn, nodeInfo.OverlayTopRight);
+ store.SetValue (it, ExtensibleTreeView.OpenIconColumn, nodeInfo.Icon ?? CellRendererImage.NullImage);
+ store.SetValue (it, ExtensibleTreeView.ClosedIconColumn, nodeInfo.ClosedIcon ?? CellRendererImage.NullImage);
+ store.SetValue (it, ExtensibleTreeView.OverlayBottomLeftColumn, nodeInfo.OverlayBottomLeft ?? CellRendererImage.NullImage);
+ store.SetValue (it, ExtensibleTreeView.OverlayBottomRightColumn, nodeInfo.OverlayBottomRight ?? CellRendererImage.NullImage);
+ store.SetValue (it, ExtensibleTreeView.OverlayTopLeftColumn, nodeInfo.OverlayTopLeft ?? CellRendererImage.NullImage);
+ store.SetValue (it, ExtensibleTreeView.OverlayTopRightColumn, nodeInfo.OverlayTopRight ?? CellRendererImage.NullImage);
pad.Tree.QueueDraw ();
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/IUrlHandler.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/IOpenNamedElementHandler.cs
index b811ee0c59..306e4b4fab 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/IUrlHandler.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/IOpenNamedElementHandler.cs
@@ -1,5 +1,5 @@
//
-// IUrlHandler.cs
+// IOpenNamedElementHandler.cs
//
// Author:
// Mike Krüger <mkrueger@novell.com>
@@ -30,12 +30,6 @@ using System;
namespace MonoDevelop.Ide.Gui.Content
{
- [Obsolete("Got replaced by IOpenNamedElementHandler")]
- public interface IUrlHandler
- {
- void Open (string url);
- }
-
public interface IOpenNamedElementHandler
{
void Open (ICSharpCode.NRefactory.TypeSystem.INamedElement element);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
index d2c5a9394c..261a6cc631 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/AboutMonoDevelopTabPage.cs
@@ -84,14 +84,14 @@ namespace MonoDevelop.Ide.Gui.Dialogs
Spacing = 0,
MarginLeft = 12
};
- cbox.PackStart (new Xwt.Label ("© 2011-2013 "));
+ cbox.PackStart (new Xwt.Label ("© 2011-" + DateTime.Now.Year + " "));
cbox.PackStart (new Xwt.LinkLabel () {
Text = string.Format ("Xamarin Inc."),
Uri = new Uri ("http://www.xamarin.com")
});
infoBox.PackStart (cbox);
infoBox.PackStart (new Xwt.Label () {
- Text = "© 2004-2013 MonoDevelop contributors",
+ Text = "© 2004-" + DateTime.Now.Year + " MonoDevelop contributors",
MarginLeft = 12
});
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs
index 03d6e1bad3..2d63a444e0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/FileSelectorDialog.cs
@@ -114,11 +114,11 @@ namespace MonoDevelop.Ide.Gui.Dialogs
return -1;
else if (encodingMenu.History < firstEncIndex || encodingMenu.History == selectOption)
return -1;
- return SeletedEncodings.ConversionEncodings [encodingMenu.History - firstEncIndex];
+ return SelectedEncodings.ConversionEncodings [encodingMenu.History - firstEncIndex];
}
set {
- for (uint n=0; n < SeletedEncodings.ConversionEncodings.Length; n++) {
- if (SeletedEncodings.ConversionEncodings [n] == value) {
+ for (uint n=0; n < SelectedEncodings.ConversionEncodings.Length; n++) {
+ if (SelectedEncodings.ConversionEncodings [n] == value) {
encodingMenu.SetHistory (n + (uint)firstEncIndex);
Menu menu = (Menu)encodingMenu.Menu;
RadioMenuItem rm = (RadioMenuItem) menu.Children [n + firstEncIndex];
@@ -164,7 +164,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
} else
firstEncIndex = 0;
- foreach (var codePage in SeletedEncodings.ConversionEncodings) {
+ foreach (var codePage in SelectedEncodings.ConversionEncodings) {
var enc = Encoding.GetEncoding (codePage);
RadioMenuItem mitem = new RadioMenuItem (enc.EncodingName + " (" + enc.WebName + ")");
menu.Append (mitem);
@@ -190,7 +190,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
encodingMenu.SetHistory (0);
- selectOption = firstEncIndex + SeletedEncodings.ConversionEncodings.Length + 1;
+ selectOption = firstEncIndex + SelectedEncodings.ConversionEncodings.Length + 1;
}
void EncodingChanged (object s, EventArgs args)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/GtkAlertDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/GtkAlertDialog.cs
index e9e80f8a37..89f0ef9835 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/GtkAlertDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/GtkAlertDialog.cs
@@ -87,7 +87,9 @@ namespace MonoDevelop.Ide.Gui.Dialogs
{
Init ();
this.buttons = message.Buttons.ToArray ();
-
+
+ Modal = true;
+
string primaryText;
string secondaryText;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs
index 7fbf771a77..7b1547a1a2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/OptionsDialog.cs
@@ -58,7 +58,7 @@ namespace MonoDevelop.Ide.Gui.Dialogs
HashSet<object> modifiedObjects = new HashSet<object> ();
bool removeEmptySections;
- const string emptyCategoryIcon = "md-empty-category";
+ const string emptyCategoryIcon = "md-prefs-generic";
const Gtk.IconSize treeIconSize = IconSize.Menu;
const Gtk.IconSize headerIconSize = IconSize.Button;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs
index 231daf0f30..1bd10c36ef 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SelectEncodingsDialog.cs
@@ -35,7 +35,7 @@ using System.Collections.Generic;
namespace MonoDevelop.Ide
{
- public static class SeletedEncodings
+ public static class SelectedEncodings
{
static int[] conversionEncodings = null;
public static int[] ConversionEncodings {
@@ -91,7 +91,7 @@ namespace MonoDevelop.Ide
storeAvail.AppendValues (enc.EncodingName, enc.WebName, e.CodePage);
}
- foreach (var e in SeletedEncodings.ConversionEncodings) {
+ foreach (var e in SelectedEncodings.ConversionEncodings) {
var enc = Encoding.GetEncoding (e);
storeSelected.AppendValues (enc.EncodingName, enc.WebName, enc.CodePage);
}
@@ -115,7 +115,7 @@ namespace MonoDevelop.Ide
list.Add (enc);
} while (storeSelected.IterNext (ref iter));
}
- SeletedEncodings.ConversionEncodings = list.ToArray ();
+ SelectedEncodings.ConversionEncodings = list.ToArray ();
}
protected void OnAddClicked (object ob, EventArgs args)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs
index 516b5012d9..a9f61140aa 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/SplashScreen.cs
@@ -54,6 +54,10 @@ namespace MonoDevelop.Ide.Gui.Dialogs {
bitmap.Dispose ();
bitmap = null;
}
+ if (monitor != null) {
+ monitor.Dispose ();
+ monitor = null;
+ }
}
protected override bool OnExposeEvent (Gdk.EventExpose evt)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/LoadSavePanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/LoadSavePanel.cs
index c723e5bf3c..49bd123846 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/LoadSavePanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/LoadSavePanel.cs
@@ -73,8 +73,6 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
partial class LoadSavePanelWidget : Gtk.Bin
{
- List<string> formats = new List<string> ();
-
public LoadSavePanelWidget ()
{
Build ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs
index 6627976cad..61f8b7326b 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/SdkLocationPanel.cs
@@ -54,21 +54,12 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
/// </summary>
public abstract string Label { get; }
- [Obsolete ("Use DefaultSdkLocations")]
- public virtual FilePath DefaultSdkLocation {
- get {
- return FilePath.Null;
- }
- }
-
/// <summary>
/// The default SDK locations that will be searched if the value is blank.
/// </summary>
public virtual FilePath[] DefaultSdkLocations {
get {
-#pragma warning disable 618
- return DefaultSdkLocation.IsNull? new FilePath[0] : new FilePath[] { DefaultSdkLocation };
-#pragma warning restore 618
+ return new FilePath[0];
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs
index f62dbbcb6d..b75cf90dbf 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/FileOperationsBuilderExtension.cs
@@ -67,10 +67,15 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
[AllowMultiSelection]
public void OnOpenFolder ()
{
- HashSet<string> paths = new HashSet<string> ();
+ var paths = new HashSet<string> ();
foreach (ITreeNavigator node in CurrentNodes) {
- string path = GetDir (node.DataItem);
- if (!string.IsNullOrEmpty (path) && paths.Add (path))
+ FilePath path = GetDir (node.DataItem);
+
+ //if folder doesn't exist, walk up to parent that does
+ while (!path.IsNullOrEmpty && !path.IsDirectory)
+ path = path.ParentDirectory;
+
+ if (!path.IsNullOrEmpty && paths.Add (path))
DesktopService.OpenFolder (path);
}
}
@@ -96,7 +101,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
public void OnOpenInTerminal ()
{
foreach (var dir in GetCurrentDirectories ())
- DesktopService.OpenInTerminal (dir);
+ DesktopService.OpenTerminal (dir);
}
IEnumerable<String> GetCurrentDirectories ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs
index 9feb7841af..5725c9dcb4 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFileNodeBuilder.cs
@@ -57,14 +57,19 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
var file = (ProjectFile) dataObject;
return file.Link.IsNullOrEmpty ? file.FilePath.FileName : file.Link.FileName;
}
-
- public override void GetNodeAttributes (ITreeNavigator treeNavigator, object dataObject, ref NodeAttributes attributes)
+
+ public override void GetNodeAttributes (ITreeNavigator parentNode, object dataObject, ref NodeAttributes attributes)
{
- ProjectFile file = (ProjectFile) dataObject;
+ var file = (ProjectFile) dataObject;
+
+ if ((file.Flags & ProjectItemFlags.Hidden) != 0) {
+ attributes |= NodeAttributes.Hidden;
+ return;
+ }
attributes |= NodeAttributes.AllowRename;
- if (!file.Visible && !treeNavigator.Options ["ShowAllFiles"])
+ if (!file.Visible && !parentNode.Options ["ShowAllFiles"])
attributes |= NodeAttributes.Hidden;
}
@@ -98,8 +103,8 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
public override object GetParentObject (object dataObject)
{
- ProjectFile file = (ProjectFile) dataObject;
- FilePath dir = !file.IsLink ? file.FilePath.ParentDirectory : file.Project.BaseDirectory.Combine (file.ProjectVirtualPath).ParentDirectory;
+ var file = (ProjectFile) dataObject;
+ var dir = !file.IsLink ? file.FilePath.ParentDirectory : file.Project.BaseDirectory.Combine (file.ProjectVirtualPath).ParentDirectory;
if (!string.IsNullOrEmpty (file.DependsOn)) {
ProjectFile groupUnder = file.Project.Files.GetFile (file.FilePath.ParentDirectory.Combine (file.DependsOn));
@@ -109,8 +114,8 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
if (dir == file.Project.BaseDirectory)
return file.Project;
- else
- return new ProjectFolder (dir, file.Project, null);
+
+ return new ProjectFolder (dir, file.Project, null);
}
public override int CompareObjects (ITreeNavigator thisNode, ITreeNavigator otherNode)
@@ -127,15 +132,15 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
string name2 = otherNode.NodeName;
//Compare filenames without extension
- string path1 = System.IO.Path.GetFileNameWithoutExtension (name1);
- string path2 = System.IO.Path.GetFileNameWithoutExtension (name2);
- int cmp = string.Compare (path1, path2, true);
+ string path1 = Path.GetFileNameWithoutExtension (name1);
+ string path2 = Path.GetFileNameWithoutExtension (name2);
+ int cmp = string.Compare (path1, path2, StringComparison.CurrentCultureIgnoreCase);
if (cmp != 0)
return cmp;
//Compare extensions
- string ext1 = System.IO.Path.GetExtension (name1);
- string ext2 = System.IO.Path.GetExtension (name2);
- return string.Compare (ext1, ext2, true);
+ string ext1 = Path.GetExtension (name1);
+ string ext2 = Path.GetExtension (name2);
+ return string.Compare (ext1, ext2, StringComparison.CurrentCultureIgnoreCase);
}
public override bool HasChildNodes (ITreeBuilder builder, object dataObject)
@@ -152,8 +157,6 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
foreach (ProjectFile pf in file.DependentChildren)
treeBuilder.AddChild (pf);
}
-
-
}
class ProjectFileNodeCommandHandler: NodeCommandHandler
@@ -168,11 +171,11 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
public override void RenameItem (string newName)
{
ProjectFile newProjectFile = null;
- ProjectFile file = (ProjectFile) CurrentNode.DataItem;
+ var file = (ProjectFile) CurrentNode.DataItem;
- FilePath oldPath, newPath, newLink = FilePath.Null, oldLink = FilePath.Null;
+ FilePath oldPath, newPath, newLink = FilePath.Null;
if (file.IsLink) {
- oldLink = file.ProjectVirtualPath;
+ var oldLink = file.ProjectVirtualPath;
newLink = oldLink.ParentDirectory.Combine (newName);
oldPath = file.Project.BaseDirectory.Combine (oldLink);
newPath = file.Project.BaseDirectory.Combine (newLink);
@@ -200,9 +203,9 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
if (file.Project != null)
IdeApp.ProjectOperations.Save (file.Project);
}
- } catch (System.ArgumentException) { // new file name with wildcard (*, ?) characters in it
+ } catch (ArgumentException) { // new file name with wildcard (*, ?) characters in it
MessageService.ShowWarning (GettextCatalog.GetString ("The name you have chosen contains illegal characters. Please choose a different name."));
- } catch (System.IO.IOException ex) {
+ } catch (IOException ex) {
MessageService.ShowException (ex, GettextCatalog.GetString ("There was an error renaming the file."));
}
}
@@ -291,19 +294,19 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
[AllowMultiSelection]
public override void DeleteMultipleItems ()
{
+ var projects = new Set<SolutionEntityItem> ();
+ var files = new List<ProjectFile> ();
bool hasChildren = false;
- List<ProjectFile> files = new List<ProjectFile> ();
- Set<SolutionEntityItem> projects = new Set<SolutionEntityItem> ();
- foreach (ITreeNavigator node in CurrentNodes) {
- ProjectFile pf = (ProjectFile) node.DataItem;
+
+ foreach (var node in CurrentNodes) {
+ var pf = (ProjectFile) node.DataItem;
projects.Add (pf.Project);
if (pf.HasChildren)
hasChildren = true;
files.Add (pf);
}
-
- AlertButton removeFromProject = new AlertButton (GettextCatalog.GetString ("_Remove from Project"), Gtk.Stock.Remove);
-
+
+ var removeFromProject = new AlertButton (GettextCatalog.GetString ("_Remove from Project"), Gtk.Stock.Remove);
string question, secondaryText;
secondaryText = GettextCatalog.GetString ("The Delete option permanently removes the file from your hard disk. " +
@@ -324,28 +327,28 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
else
question = GettextCatalog.GetString ("Are you sure you want to remove the selected files from the project?");
}
-
- AlertButton result = MessageService.AskQuestion (question, secondaryText,
- AlertButton.Delete, AlertButton.Cancel, removeFromProject);
+
+ var result = MessageService.AskQuestion (question, secondaryText, AlertButton.Delete, AlertButton.Cancel, removeFromProject);
if (result != removeFromProject && result != AlertButton.Delete)
return;
-
- foreach (ProjectFile file in files) {
- Project project = file.Project;
+
+ foreach (var file in files) {
+ var project = file.Project;
var inFolder = project.Files.GetFilesInVirtualPath (file.ProjectVirtualPath.ParentDirectory).ToList ();
- if (inFolder.Count == 1 && inFolder [0] == file) {
+
+ if (inFolder.Count == 1 && inFolder [0] == file && project.Files.GetFileWithVirtualPath (file.ProjectVirtualPath.ParentDirectory) == null) {
// This is the last project file in the folder. Make sure we keep
// a reference to the folder, so it is not deleted from the tree.
- ProjectFile folderFile = new ProjectFile (project.BaseDirectory.Combine (file.ProjectVirtualPath.ParentDirectory));
+ var folderFile = new ProjectFile (project.BaseDirectory.Combine (file.ProjectVirtualPath.ParentDirectory));
folderFile.Subtype = Subtype.Directory;
project.Files.Add (folderFile);
}
-
+
if (file.HasChildren) {
- foreach (ProjectFile f in file.DependentChildren) {
- project.Files.Remove (f);
+ foreach (var child in file.DependentChildren) {
+ project.Files.Remove (child);
if (result == AlertButton.Delete)
- FileService.DeleteFile (f.Name);
+ FileService.DeleteFile (child.Name);
}
}
@@ -423,10 +426,11 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
[CommandUpdateHandler (FileCommands.SetBuildAction)]
public void OnSetBuildActionUpdate (CommandArrayInfo info)
{
- Set<string> toggledActions = new Set<string> ();
+ var toggledActions = new Set<string> ();
Project proj = null;
- foreach (ITreeNavigator node in CurrentNodes) {
- ProjectFile finfo = (ProjectFile) node.DataItem;
+
+ foreach (var node in CurrentNodes) {
+ var finfo = (ProjectFile) node.DataItem;
//disallow multi-slect on more than one project, since available build actions may differ
if (proj == null && finfo.Project != null) {
@@ -437,6 +441,9 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
}
toggledActions.Add (finfo.BuildAction);
}
+
+ if (proj == null)
+ return;
foreach (string action in proj.GetBuildActions ()) {
if (action == "--") {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs
index ec07fd4c68..88b8be8058 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectFolderNodeBuilder.cs
@@ -202,13 +202,23 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
foreach (var folder in folders) {
var project = folder.Project;
+ AlertButton result;
+
+ if (project == null) {
+ deleteOnlyQuestion.Text = GettextCatalog.GetString ("Are you sure you want to remove directory {0}?", folder.Name);
+ result = MessageService.AskQuestion (deleteOnlyQuestion);
+ if (result == AlertButton.Delete) {
+ DeleteFolder (folder);
+ continue;
+ } else
+ break;
+ }
+
var folderRelativePath = folder.Path.ToRelative (project.BaseDirectory);
var files = project.Files.GetFilesInVirtualPath (folderRelativePath).ToList ();
var folderPf = project.Files.GetFileWithVirtualPath (folderRelativePath);
bool isProjectFolder = files.Count == 0 && folderPf == null;
- AlertButton result;
-
//if the parent directory has already been removed, there may be nothing to do
if (isProjectFolder) {
deleteOnlyQuestion.Text = GettextCatalog.GetString ("Are you sure you want to remove directory {0}?", folder.Name);
@@ -236,14 +246,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
}
if (result == AlertButton.Delete) {
- try {
- if (Directory.Exists (folder.Path))
- // FileService events should remove remaining files from the project
- FileService.DeleteDirectory (folder.Path);
- } catch (Exception ex) {
- MessageService.ShowError (GettextCatalog.GetString (
- "The folder {0} could not be deleted from disk: {1}", folder.Path, ex.Message));
- }
+ DeleteFolder (folder);
} else {
//explictly remove the node from the tree, since it currently only tracks real folder deletions
folder.Remove ();
@@ -262,7 +265,19 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
}
IdeApp.ProjectOperations.Save (projects);
}
-
+
+ static void DeleteFolder (ProjectFolder folder)
+ {
+ try {
+ if (Directory.Exists (folder.Path))
+ // FileService events should remove remaining files from the project
+ FileService.DeleteDirectory (folder.Path);
+ }
+ catch (Exception ex) {
+ MessageService.ShowError (GettextCatalog.GetString ("The folder {0} could not be deleted from disk: {1}", folder.Path, ex.Message));
+ }
+ }
+
[CommandUpdateHandler (EditCommands.Delete)]
public void UpdateRemoveItem (CommandInfo info)
{
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs
index 11eb9d8adf..db967f8f2d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectNodeBuilder.cs
@@ -141,7 +141,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
SolutionConfigurationEntry ce = null;
bool noMapping = conf == null || (ce = conf.GetEntryForItem (p)) == null;
bool missingConfig = false;
- if (noMapping || !ce.Build || (missingConfig = p.Configurations [ce.ItemConfiguration] == null)) {
+ if (p.SupportsBuild () && (noMapping || !ce.Build || (missingConfig = p.Configurations [ce.ItemConfiguration] == null))) {
var ticon = Context.GetComposedIcon (nodeInfo.Icon, "project-no-build");
if (ticon == null)
ticon = Context.CacheComposedIcon (nodeInfo.Icon, "project-no-build", nodeInfo.Icon.WithAlpha (0.5));
@@ -366,6 +366,13 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
IdeApp.ProjectOperations.ShowOptions (project);
}
+ [CommandUpdateHandler (ProjectCommands.SetAsStartupProject)]
+ public void UpdateSetAsStartupProject (CommandInfo ci)
+ {
+ Project project = (Project) CurrentNode.DataItem;
+ ci.Visible = project.CanExecute (new ExecutionContext (Runtime.ProcessService.DefaultExecutionHandler, null, IdeApp.Workspace.ActiveExecutionTarget), IdeApp.Workspace.ActiveConfiguration);
+ }
+
[CommandHandler (ProjectCommands.SetAsStartupProject)]
public void SetAsStartupProject ()
{
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs
index 768ac88f87..c86ce21f73 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectReferenceNodeBuilder.cs
@@ -231,7 +231,13 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
}
}
}
-
+
+ [CommandHandler (FileCommands.ShowProperties)]
+ public void OnShowProperties ()
+ {
+ IdeApp.Workbench.Pads.PropertyPad.BringToFront (true);
+ }
+
public override DragOperation CanDragNode ()
{
return DragOperation.Copy;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs
index f59d9ddb27..cb8a60c75c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs
@@ -77,6 +77,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
base.OnCloseWorkspace (sender, e);
IdeApp.ProjectOperations.CurrentSelectedSolutionItem = null;
IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem = null;
+ IdeApp.ProjectOperations.CurrentSelectedItem = null;
}
void OnWindowChanged (object ob, EventArgs args)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SapNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SapNodeBuilder.cs
new file mode 100644
index 0000000000..dcc30c86c1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SapNodeBuilder.cs
@@ -0,0 +1,57 @@
+//
+// SharedProjectNodeBuilder.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@xamarin.com>
+//
+// Copyright (c) 2014 Xamarin, Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using MonoDevelop.Projects.SharedAssetsProjects;
+
+namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
+{
+ class SapNodeBuilder: ProjectNodeBuilder
+ {
+ public override Type NodeDataType {
+ get {
+ return typeof(SharedAssetsProject);
+ }
+ }
+
+ public override Type CommandHandlerType {
+ get {
+ return typeof(SapCommandHandler);
+ }
+ }
+ }
+
+ class SapCommandHandler: ProjectNodeCommandHandler
+ {
+ /* [CommandUpdateHandler (ProjectCommands.SetAsStartupProject)]
+ public void UpdateSetAsStartupProject (CommandInfo ci)
+ {
+ Project project = (Project) CurrentNode.DataItem;
+ ci.Visible = project.SupportsExecute;
+ }*/
+
+ }
+}
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ShowAllFilesBuilderExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ShowAllFilesBuilderExtension.cs
index 18c5e46d3b..0d9fe017ed 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ShowAllFilesBuilderExtension.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ShowAllFilesBuilderExtension.cs
@@ -51,6 +51,9 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
public override bool CanBuildNode (Type dataType)
{
+ if (typeof(SolutionFolder).IsAssignableFrom (dataType))
+ return false;
+
return typeof(IFolderItem).IsAssignableFrom (dataType);
}
@@ -263,13 +266,12 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
{
foreach (FileEventInfo e in args) {
Project project = GetProjectForFile (e.FileName);
- if (project == null) return;
-
+
ITreeBuilder tb = Context.GetTreeBuilder ();
if (e.IsDirectory) {
if (tb.MoveToObject (new ProjectFolder (e.FileName, project))) {
- if (tb.Options ["ShowAllFiles"] && !ProjectFolderCommandHandler.PathExistsInProject (project, e.FileName)) {
+ if (tb.Options ["ShowAllFiles"] && (project == null || !ProjectFolderCommandHandler.PathExistsInProject (project, e.FileName))) {
tb.Remove ();
return;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SolutionFolderFileNodeBuilder.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SolutionFolderFileNodeBuilder.cs
index 16806831fe..a324c03715 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SolutionFolderFileNodeBuilder.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/SolutionFolderFileNodeBuilder.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
+using System.Collections.Generic;
using MonoDevelop.Projects;
using MonoDevelop.Ide.Gui.Components;
using MonoDevelop.Core;
@@ -82,6 +83,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
{
public override void DeleteMultipleItems ()
{
+ var modifiedSolutionsToSave = new HashSet<Solution> ();
QuestionMessage msg = new QuestionMessage ();
msg.SecondaryText = GettextCatalog.GetString ("The Delete option permanently removes the file from your hard disk. Click Remove from Solution if you only want to remove it from your current solution.");
AlertButton removeFromSolution = new AlertButton (GettextCatalog.GetString ("_Remove from Solution"), Gtk.Stock.Remove);
@@ -105,7 +107,13 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
if (result == AlertButton.Delete) {
FileService.DeleteFile (file.FileName);
}
+
+ if (file.Parent != null && file.Parent.ParentSolution != null) {
+ modifiedSolutionsToSave.Add (file.Parent.ParentSolution);
+ }
}
+
+ IdeApp.ProjectOperations.Save (modifiedSolutionsToSave);
}
public override void ActivateItem ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/CommonTextEditorOptions.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/CommonTextEditorOptions.cs
index 6aa8ad7cca..ec10018de1 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/CommonTextEditorOptions.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/CommonTextEditorOptions.cs
@@ -41,7 +41,7 @@ namespace MonoDevelop.Ide.Gui
public CommonTextEditorOptions ()
{
PropertyService.PropertyChanged += PropertyServiceChanged;
- base.FontName = PropertyService.Get ("FontName", MonoDevelop.Ide.DesktopService.DefaultMonospaceFont);
+ base.FontName = PropertyService.Get ("FontName", FontService.MonospaceFontName);
base.ColorScheme = IdeApp.Preferences.ColorScheme;
FontService.RegisterFontChangedCallback ("Editor", UpdateFont);
FontService.RegisterFontChangedCallback ("Editor(Gutter)", UpdateFont);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
index b5953a0d0d..201593b2a9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DefaultWorkbench.cs
@@ -419,7 +419,7 @@ namespace MonoDevelop.Ide.Gui
{
if (node is PadCodon) {
PadCodon pad = (PadCodon) node;
- RegisterPad (pad);
+ AddPad (pad, pad.DefaultPlacement, pad.DefaultStatus);
}
else if (node is CategoryNode) {
foreach (ExtensionNode cn in node.ChildNodes)
@@ -781,10 +781,6 @@ namespace MonoDevelop.Ide.Gui
{
AddinManager.AddExtensionNodeHandler (stockLayoutsPath, OnLayoutsExtensionChanged);
- ExtensionNodeList padCodons = AddinManager.GetExtensionNodes (viewContentPath);
- foreach (ExtensionNode node in padCodons)
- ShowPadNode (node);
-
CreateComponents ();
// Subscribe to changes in the extension
@@ -927,9 +923,10 @@ namespace MonoDevelop.Ide.Gui
}
// create DockItems for all the pads
- foreach (PadCodon content in padContentCollection)
- AddPad (content, content.DefaultPlacement, content.DefaultStatus);
-
+ ExtensionNodeList padCodons = AddinManager.GetExtensionNodes (viewContentPath);
+ foreach (ExtensionNode node in padCodons)
+ ShowPadNode (node);
+
try {
if (System.IO.File.Exists (configFile)) {
dock.LoadLayouts (configFile);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs
index c5943ba91b..0cd11a75fb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DockNotebook.cs
@@ -1108,15 +1108,25 @@ namespace MonoDevelop.Ide.Gui
int textStart = tabBounds.X + padding;
ctx.MoveTo (textStart, tabBounds.Y + TopPadding + TextOffset + VerticalTextSize);
- // ellipses are for space wasting ..., we cant afford that
- using (var lg = new LinearGradient (textStart + w - 5, 0, textStart + w + 3, 0)) {
- var color = tab.Notify ? new Cairo.Color (0, 0, 1) : Styles.TabBarActiveTextColor;
- color = color.MultiplyAlpha (tab.Opacity);
- lg.AddColorStop (0, color);
- color.A = 0;
- lg.AddColorStop (1, color);
- ctx.SetSource (lg);
+ if (!MonoDevelop.Core.Platform.IsMac && !MonoDevelop.Core.Platform.IsWindows) {
+ // This is a work around for a linux specific problem.
+ // A bug in the proprietary ATI driver caused TAB text not to draw.
+ // If that bug get's fixed remove this HACK asap.
+ la.Ellipsize = Pango.EllipsizeMode.End;
+ la.Width = (int)(w * Pango.Scale.PangoScale);
+ ctx.SetSourceColor (tab.Notify ? new Cairo.Color (0, 0, 1) : Styles.TabBarActiveTextColor);
Pango.CairoHelper.ShowLayoutLine (ctx, la.GetLine (0));
+ } else {
+ // ellipses are for space wasting ..., we cant afford that
+ using (var lg = new LinearGradient (textStart + w - 5, 0, textStart + w + 3, 0)) {
+ var color = tab.Notify ? new Cairo.Color (0, 0, 1) : Styles.TabBarActiveTextColor;
+ color = color.MultiplyAlpha (tab.Opacity);
+ lg.AddColorStop (0, color);
+ color.A = 0;
+ lg.AddColorStop (1, color);
+ ctx.SetSource (lg);
+ Pango.CairoHelper.ShowLayoutLine (ctx, la.GetLine (0));
+ }
}
la.Dispose ();
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
index 39a2b981c2..d77a48373a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
@@ -201,8 +201,11 @@ namespace MonoDevelop.Ide.Gui
if (solution != null && IdeApp.Workspace != null) {
var config = IdeApp.Workspace.ActiveConfiguration;
- if (config != null && !solution.GetConfiguration (config).BuildEnabledForItem (project))
- return false;
+ if (config != null) {
+ var sc = solution.GetConfiguration (config);
+ if (sc != null && !sc.BuildEnabledForItem (project))
+ return false;
+ }
}
var pf = project.GetProjectFile (FileName);
@@ -614,6 +617,10 @@ namespace MonoDevelop.Ide.Gui
void InitializeExtensionChain ()
{
Editor.InitializeExtensionChain (this);
+
+ if (window is SdiWorkspaceWindow)
+ ((SdiWorkspaceWindow)window).AttachToPathedDocument (GetContent<MonoDevelop.Ide.Gui.Content.IPathedDocument> ());
+
}
void InitializeEditor ()
@@ -651,9 +658,6 @@ namespace MonoDevelop.Ide.Gui
}
window.Document = this;
-
- if (window is SdiWorkspaceWindow)
- ((SdiWorkspaceWindow)window).AttachToPathedDocument (GetContent<MonoDevelop.Ide.Gui.Content.IPathedDocument> ());
}
/// <summary>
@@ -672,6 +676,11 @@ namespace MonoDevelop.Ide.Gui
e.RunWhenLoaded (action);
}
+ public void AttachToProject (Project project)
+ {
+ SetProject (project);
+ }
+
TypeSystemService.ProjectContentWrapper currentWrapper;
internal void SetProject (Project project)
{
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
index c36df85da1..e86e758451 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/DocumentSwitcher.cs
@@ -659,9 +659,15 @@ namespace MonoDevelop.Ide
return;
}
}
-
+
documentList.ActiveItem = activeItem;
- documentList.NextItem (true);
+
+ ModifierType modifiers;
+ if (Gtk.Global.GetCurrentEventState (out modifiers) && modifiers.HasFlag (ModifierType.ShiftMask))
+ documentList.PrevItem (true);
+ else
+ documentList.NextItem (true);
+
documentList.RequestClose += delegate(object sender, DocumentList.RequestActionEventArgs e) {
try {
if (e.SelectItem) {
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 9506ed784b..9979f38245 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
@@ -405,6 +405,11 @@ namespace MonoDevelop.Ide.Gui
content = null;
}
+ if (subViewToolbar != null) {
+ subViewToolbar.Dispose ();
+ subViewToolbar = null;
+ }
+
DetachFromPathedDocument ();
commandHandler = null;
document = null;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StockIcons.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StockIcons.cs
index 38021ec88f..8966e2dc61 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StockIcons.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/StockIcons.cs
@@ -115,18 +115,19 @@ namespace MonoDevelop.Ide.Gui
public static readonly IconId QuitIcon = Gtk.Stock.Quit;
public static readonly IconId RedoIcon = Gtk.Stock.Redo;
public static readonly IconId Reference = "md-reference";
+ public static readonly IconId ReferenceWarning = "md-reference-warning";
public static readonly IconId ReplaceIcon = Gtk.Stock.FindAndReplace;
public static readonly IconId ReplaceInFiles = "md-replace-in-files";
public static readonly IconId ResourceFileIcon = "md-resource-file-icon";
public static readonly IconId Console = "md-console";
public static readonly IconId RunProgramIcon = Gtk.Stock.Execute;
- public static readonly IconId SaveAllIcon = "md-save-all-icon";
+ public static readonly IconId SaveAllIcon = "md-save-all";
public static readonly IconId SaveAsIcon = Gtk.Stock.SaveAs;
public static readonly IconId SaveIcon = Gtk.Stock.Save;
public static readonly IconId MonoDevelop = "md-monodevelop";
public static readonly IconId Project = "md-project";
public static readonly IconId Struct = "md-struct";
- public static readonly IconId TaskListIcon = "md-task-list-icon";
+ public static readonly IconId TaskListIcon = "md-task-list";
public static readonly IconId TextFileIcon = "md-text-file-icon";
public static readonly IconId ToggleBookmark = "md-toggle-bookmark";
public static readonly IconId UndoIcon = Gtk.Stock.Undo;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Styles.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Styles.cs
index d2714028b4..1a8820cc81 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Styles.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Styles.cs
@@ -102,17 +102,19 @@ namespace MonoDevelop.Ide.Gui
public static readonly Cairo.Color StatusBarInnerColor = new Cairo.Color (0,0,0, 0.08);
public static readonly Cairo.Color StatusBarShadowColor1 = new Cairo.Color (0,0,0, 0.06);
- public static readonly Cairo.Color StatusBarShadowColor2 = new Cairo.Color (0,0,0, 0.03);
+ public static readonly Cairo.Color StatusBarShadowColor2 = new Cairo.Color (0,0,0, 0.02);
public static readonly Cairo.Color StatusBarTextColor = CairoExtensions.ParseColor ("555555");
public static readonly Cairo.Color StatusBarProgressBackgroundColor = new Cairo.Color (0, 0, 0, 0.1);
- public static readonly Cairo.Color StatusBarProgressOutlineColor = new Cairo.Color (0, 0, 0, 0.2);
+ public static readonly Cairo.Color StatusBarProgressOutlineColor = new Cairo.Color (0, 0, 0, 0.1);
public static readonly Pango.FontDescription StatusFont = Pango.FontDescription.FromString ("Normal");
- public static readonly int StatusFontPixelHeight = 12;
- public static readonly int ProgressBarHeight = 16;
- public static readonly int ProgressBarInnerPadding = 3;
- public static readonly int ProgressBarOuterPadding = 3;
+ public static int StatusFontPixelHeight { get { return (int)(11 * PixelScale); } }
+ public static int ProgressBarHeight { get { return (int)(18 * PixelScale); } }
+ public static int ProgressBarInnerPadding { get { return (int)(4 * PixelScale); } }
+ public static int ProgressBarOuterPadding { get { return (int)(4 * PixelScale); } }
+
+ static readonly double PixelScale = Mono.TextEditor.GtkWorkarounds.GetPixelScale ();
// Toolbar
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
index df333c8c47..bcf517170d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
@@ -96,7 +96,7 @@ namespace MonoDevelop.Ide.Gui
[CommandUpdateHandler (FileCommands.ReloadFile)]
protected void OnUpdateReloadFile (CommandInfo info)
{
- info.Enabled = window.ViewContent.ContentName != null && !window.ViewContent.IsViewOnly;
+ info.Enabled = window.ViewContent.ContentName != null && !window.ViewContent.IsViewOnly && window.Document != null && window.Document.IsDirty;
}
[CommandHandler (FileCommands.OpenContainingFolder)]
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 dd629071a0..0ac7e15049 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
@@ -582,12 +582,6 @@ namespace MonoDevelop.Ide.Gui
"MonoDevelop.TextEditor.Document.Document.DefaultDocumentAggregatorProperties",
new Properties()));
- [Obsolete("Will be replaced by 'ShowGlobalPreferencesDialog (Gtk.Window parentWindow, string panelId, Action<OptionsDialog> configurationAction = null)'")]
- public void ShowGlobalPreferencesDialog (Gtk.Window parentWindow, string panelId)
- {
- ShowGlobalPreferencesDialog (parentWindow, panelId, null);
- }
-
public void ShowGlobalPreferencesDialog (Gtk.Window parentWindow, string panelId, Action<OptionsDialog> configurationAction = null)
{
if (parentWindow == null)
@@ -823,12 +817,12 @@ namespace MonoDevelop.Ide.Gui
return;
}
- if (origName.StartsWith ("file://"))
+ if (origName.StartsWith ("file://", StringComparison.Ordinal))
fileName = new Uri (origName).LocalPath;
else
fileName = origName;
- if (!origName.StartsWith ("http://"))
+ if (!origName.StartsWith ("http://", StringComparison.Ordinal))
fileName = fileName.FullPath;
//Debug.Assert(FileService.IsValidPath(fileName));
@@ -838,9 +832,9 @@ namespace MonoDevelop.Ide.Gui
}
// test, if file fileName exists
- if (!origName.StartsWith("http://")) {
+ if (!origName.StartsWith ("http://", StringComparison.Ordinal)) {
// test, if an untitled file should be opened
- if (!System.IO.Path.IsPathRooted(origName)) {
+ if (!Path.IsPathRooted(origName)) {
foreach (Document doc in Documents) {
if (doc.Window.ViewContent.IsUntitled && doc.Window.ViewContent.UntitledName == origName) {
doc.Select ();
@@ -865,17 +859,18 @@ namespace MonoDevelop.Ide.Gui
if (openFileInfo.DisplayBinding != null) {
binding = viewBinding = openFileInfo.DisplayBinding;
} else {
- var bindings = DisplayBindingService.GetDisplayBindings (fileName, null, project).Where (d => d.CanUseAsDefault);
+ var bindings = DisplayBindingService.GetDisplayBindings (fileName, null, project).ToList ();
if (openFileInfo.Options.HasFlag (OpenDocumentOptions.OnlyInternalViewer)) {
- binding = bindings.OfType<IViewDisplayBinding>().FirstOrDefault ();
+ binding = bindings.OfType<IViewDisplayBinding>().FirstOrDefault (d => d.CanUseAsDefault)
+ ?? bindings.OfType<IViewDisplayBinding>().FirstOrDefault ();
viewBinding = (IViewDisplayBinding) binding;
}
else if (openFileInfo.Options.HasFlag (OpenDocumentOptions.OnlyExternalViewer)) {
- binding = bindings.OfType<IExternalDisplayBinding>().FirstOrDefault ();
+ binding = bindings.OfType<IExternalDisplayBinding>().FirstOrDefault (d => d.CanUseAsDefault);
viewBinding = null;
}
else {
- binding = bindings.FirstOrDefault ();
+ binding = bindings.FirstOrDefault (d => d.CanUseAsDefault);
viewBinding = binding as IViewDisplayBinding;
}
}
@@ -1195,12 +1190,6 @@ namespace MonoDevelop.Ide.Gui
public Encoding Encoding { get; set; }
public Project Project { get; set; }
-
- [Obsolete("Use FileOpenInformation (FilePath filePath, Project project)")]
- public FileOpenInformation ()
- {
- }
-
[Obsolete("Use FileOpenInformation (FilePath filePath, Project project, int line, int column, OpenDocumentOptions options)")]
public FileOpenInformation (string fileName, int line, int column, OpenDocumentOptions options)
{
@@ -1342,6 +1331,7 @@ namespace MonoDevelop.Ide.Gui
TryToReuseViewer = 1 << 5,
Default = BringToFront | CenterCaretLine | HighlightCaretLine | TryToReuseViewer,
- Debugger = BringToFront | CenterCaretLine | TryToReuseViewer
+ Debugger = BringToFront | CenterCaretLine | TryToReuseViewer,
+ DefaultInternal = Default | OnlyInternalViewer,
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/DocumentNavigationPoint.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/DocumentNavigationPoint.cs
index f6cac13494..d0f82bfe1e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/DocumentNavigationPoint.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/DocumentNavigationPoint.cs
@@ -77,12 +77,6 @@ namespace MonoDevelop.Ide.Navigation
get { return doc != null? doc.FileName : fileName; }
}
- [Obsolete ("Will be removed. Please use ShowDocument.")]
- public override void Show ()
- {
- DoShow ();
- }
-
public override Document ShowDocument ()
{
return DoShow ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs
index c3846245c7..7c628731b9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs
@@ -58,6 +58,7 @@ namespace MonoDevelop.Ide.Navigation
{
IdeApp.Workspace.LastWorkspaceItemClosed += delegate {
history.Clear ();
+ closedHistory.Clear ();
OnHistoryChanged ();
};
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationPoint.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationPoint.cs
index ac9fb22bf6..7455083ace 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationPoint.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationPoint.cs
@@ -35,14 +35,8 @@ namespace MonoDevelop.Ide.Navigation
public abstract string DisplayName { get; }
//public abstract string Tooltip { get; }
- [Obsolete ("Will be removed. Please use ShowDocument.")]
- public abstract void Show ();
-
public virtual Document ShowDocument ()
{
-#pragma warning disable 618
- Show ();
-#pragma warning restore 618
return null;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/OnlineTemplateService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/OnlineTemplateService.cs
deleted file mode 100644
index c49fe1ea30..0000000000
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/OnlineTemplateService.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-//
-// OnlineTemplateService.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-//
-// Copyright (c) 2011 Novell, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Net;
-using System.Threading.Tasks;
-using System.IO;
-using System.Collections.Generic;
-
-using MonoDevelop.Core;
-using MonoDevelop.Core.ProgressMonitoring;
-
-namespace MonoDevelop.Ide.OnlineTemplates
-{
- static class OnlineTemplateService
- {
- //FIXME: get a URL for the template repo
- const string PROJECT_TEMPLATE_INDEX_URL = "";
-
- static FilePath ProjectTemplateIndexFile {
- get {
- return UserProfile.Current.CacheDir.Combine ("OnlineTemplates", "ProjectTemplateIndex.xml");
- }
- }
-
- internal static string GetOnlineTemplatesRoot ()
- {
- string platform;
- if (Platform.IsWindows)
- platform = "win32";
- else if (Platform.IsMac)
- platform = "mac";
- else
- platform = "linux";
-
- var version = Mono.Addins.AddinManager.CurrentAddin.Version;
-
- return "http://monodevelop.com/online-templates/" + platform + "/" + version + "/";
- }
-
- public static Task<ProjectTemplateIndex> GetProjectTemplates ()
- {
- string url = GetOnlineTemplatesRoot () + "project-template-index.xml";
- var up = UpdateTemplateIndex (url, ProjectTemplateIndexFile, TimeSpan.FromDays (1));
- if (up != null) {
- return up.ContinueWith (t => ProjectTemplateIndex.Load (ProjectTemplateIndexFile));
- } else {
- return Task.Factory.StartNew (() => ProjectTemplateIndex.Load (ProjectTemplateIndexFile));
- }
- }
-
- static Task UpdateTemplateIndex (string url, FilePath file, TimeSpan? updateIfOlderThan)
- {
- LoggingService.LogInfo ("Updating online template index '{0}'.", url);
-
- if (updateIfOlderThan.HasValue) {
- if (File.Exists (file) && (DateTime.Now - File.GetLastWriteTime (file)) < updateIfOlderThan.Value) {
- LoggingService.LogInfo ("Skipped updating online template index because cache is too recent");
- return null;
- }
- }
-
- try {
- return DownloadTemplateIndex (url, file);
- } catch (Exception ex) {
- string message = string.Format ("Online template index '{0}' could not be downloaded.", url);
- LoggingService.LogWarning (message, ex);
- throw;
- }
- }
-
- static Task DownloadTemplateIndex (string url, FilePath file)
- {
- var request = (HttpWebRequest) WebRequest.Create (url);
-
- var fileInfo = new FileInfo (file);
- if (fileInfo.Exists) {
- var lastWrite = fileInfo.LastWriteTime;
- request.IfModifiedSince = lastWrite;
- }
-
- var t = Task_Factory_FromAsync<WebResponse> (request.BeginGetResponse, request.EndGetResponse, null);
- return t.ContinueWith ((Task<WebResponse> twr) => {
- try {
- var response = (HttpWebResponse) twr.Result;
- if (response.StatusCode == HttpStatusCode.OK) {
- if (!Directory.Exists (file.ParentDirectory))
- Directory.CreateDirectory (file.ParentDirectory);
- using (var fs = File.Create (file))
- response.GetResponseStream ().CopyTo (fs);
- LoggingService.LogInfo ("Updated online template index '{0}'.", url);
- }
- } catch (WebException wex) {
- var httpResp = wex.Response as HttpWebResponse;
- if (httpResp != null && httpResp.StatusCode == HttpStatusCode.NotModified) {
- File.SetLastWriteTime (file, DateTime.Now);
- LoggingService.LogInfo ("Online template index is up-to-date.");
- } else {
- string message = string.Format ("Online template index '{0}' could not be downloaded.", url);
- LoggingService.LogWarning (message, wex);
- throw;
- }
- } catch (Exception ex) {
- string message = string.Format ("Online template index '{0}' could not be downloaded.", url);
- LoggingService.LogWarning (message, ex);
- throw;
- }
- });
- }
-
- //Mono 2.8 doesn't implement Task.Factory.FromAsync
- static Task<TResult> Task_Factory_FromAsync<TResult> (Func<AsyncCallback,object,IAsyncResult> beginMethod,
- Func<IAsyncResult,TResult> endMethod, object state)
- {
- var completionSource = new TaskCompletionSource<TResult> (TaskCreationOptions.None);
- beginMethod ((ar) => {
- try {
- completionSource.SetResult (endMethod (ar));
- } catch (Exception e) {
- completionSource.SetException (e);
- }
- }, state);
- return completionSource.Task;
- }
- }
-}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/ProjectTemplateIndex.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/ProjectTemplateIndex.cs
deleted file mode 100644
index 1d053cb318..0000000000
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.OnlineTemplates/ProjectTemplateIndex.cs
+++ /dev/null
@@ -1,164 +0,0 @@
-//
-// ProjectTemplateIndex.cs
-//
-// Author:
-// Michael Hutchinson <mhutchinson@novell.com>
-//
-// Copyright (c) 2011 Novell, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Collections.Generic;
-using System.Xml.Linq;
-
-//************************ WARNING ************************
-// This file should be kept in sync with MDData.Index
-// and the index format should not be changed without
-// bumping the version and maintaining the old format
-//*********************************************************
-
-namespace MonoDevelop.Ide.OnlineTemplates
-{
- class ProjectTemplateIndex : List<ProjectTemplateDescription>
- {
- const int FORMAT_VERSION = 1;
-
- ProjectTemplateIndex ()
- {
- }
-
- public ProjectTemplateIndex (string mdVersion)
- {
- this.MDVersion = mdVersion;
- }
-
- public string MDVersion { get; private set; }
-
- public static ProjectTemplateIndex Load (string file)
- {
- var doc = XDocument.Load (file);
- var idx = new ProjectTemplateIndex ();
-
- var root = doc.Root;
- if (root.Name != "TemplateIndex")
- throw new Exception (string.Format ("Root element was {0}, expected '{1}'", root.Name, "ProjectTemplate"));
- if ((int) root.Attribute ("format") != FORMAT_VERSION)
- throw new Exception ("Invalid format version");
-
- idx.MDVersion = (string) root.Attribute ("version");
-
- return idx;
- }
-
- public void Write (string file)
- {
- var doc = new XDocument ();
- doc.Add (new XElement ("TemplateIndex", new XAttribute ("format", FORMAT_VERSION)));
- foreach (var item in this) {
- doc.Root.Add (item.Write ());
- }
- doc.Save (file);
- }
- }
-
- class ProjectTemplateDescription
- {
- public string Name { get; set; }
- public string Summary { get; set; }
- public string Description { get; set; }
- public string Author { get; set; }
- public string Tags { get; set; }
- public string IconUrl { get; set; }
- public string ScreenshotUrl { get; set; }
- public string TemplateUrl { get; set; }
- public DateTime Modified { get; set; }
-
- public ProjectTemplateDescription Read (XElement element)
- {
- return new ProjectTemplateDescription () {
- Name = (string) element.Element ("Name"),
- Summary = (string) element.Element ("Summary"),
- Description = (string) element.Element ("Description"),
- Author = (string) element.Element ("Author"),
- Tags = (string) element.Element ("Tags"),
- IconUrl = (string) element.Element ("IconUrl"),
- TemplateUrl = (string) element.Element ("TemplateUrl"),
- ScreenshotUrl = (string) element.Element ("ScreenshotUrl"),
- };
- }
-
- public XElement Write ()
- {
- return new XElement ("ProjectTemplate",
- new XAttribute ("modified", Modified),
- new XElement ("Name", Name),
- new XElement ("Summary", Summary),
- new XElement ("Description", Description),
- new XElement ("Author", Author),
- new XElement ("Tags", Tags),
- new XElement ("IconUrl", IconUrl),
- new XElement ("TemplateUrl", TemplateUrl),
- new XElement ("ScreenshotUrl", ScreenshotUrl)
- );
- }
- }
-
- class ProjectTemplateManifest
- {
- const int FORMAT_VERSION = 1;
-
- public string Name { get; set; }
- public string Summary { get; set; }
- public string Description { get; set; }
- public string Author { get; set; }
- public string Tags { get; set; }
- public string IconFile { get; set; }
- public string ScreenshotFile { get; set; }
- public string MinimumVersion { get; set; }
-
- public static ProjectTemplateManifest Load (XDocument doc)
- {
- var root = doc.Root;
- if (root.Name != "ProjectTemplate")
- throw new Exception (string.Format ("Root element was {0}, expected '{1}'", root.Name, "ProjectTemplate"));
- if ((int) root.Attribute ("format") != FORMAT_VERSION)
- throw new Exception ("Invalid format version");
-
- return new ProjectTemplateManifest {
- Name = GetRequiredStringElement (root, "Name"),
- Summary = (string) root.Element ("Summary"),
- Description = GetRequiredStringElement (root, "Description"),
- Author = GetRequiredStringElement (root, "Author"),
- Tags = GetRequiredStringElement (root, "Tags"),
- IconFile = (string) root.Element ("IconFile"),
- ScreenshotFile = (string) root.Element ("ScreenshotFile"),
- };
- }
-
- static string GetRequiredStringElement (XElement parent, string name)
- {
- string value = (string) parent.Element (name);
- if (string.IsNullOrWhiteSpace (value))
- throw new Exception (string.Format ("The '{0}' element cannot be empty", name));
- return value;
- }
- }
-}
-
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
index ddcb0ca136..3a6e6709bb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/CombineConfigurationPanel.cs
@@ -27,7 +27,7 @@
using System;
-using System.Collections;
+using System.Linq;
using MonoDevelop.Projects;
using MonoDevelop.Core;
@@ -43,7 +43,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
public override Widget CreatePanelWidget()
{
- return widget = new CombineConfigurationPanelWidget ((MultiConfigItemOptionsDialog) ParentDialog);
+ return widget = new CombineConfigurationPanelWidget ((MultiConfigItemOptionsDialog) ParentDialog, ConfiguredSolution);
}
public override void LoadConfigData ()
@@ -62,13 +62,20 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
ListStore store;
SolutionConfiguration configuration;
MultiConfigItemOptionsDialog parentDialog;
+ Solution solution;
+
+ const int ProjectNameCol = 0;
+ const int BuildFlagCol = 1;
+ const int ProjectCol = 2;
- public CombineConfigurationPanelWidget (MultiConfigItemOptionsDialog parentDialog)
+ public CombineConfigurationPanelWidget (MultiConfigItemOptionsDialog parentDialog, Solution solution)
{
Build ();
this.parentDialog = parentDialog;
- store = new ListStore (typeof(object), typeof(string), typeof(bool));
+ this.solution = solution;
+
+ store = new ListStore (typeof(string), typeof(bool), typeof(SolutionEntityItem));
configsList.Model = store;
configsList.HeadersVisible = true;
@@ -76,20 +83,20 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
CellRendererText sr = new CellRendererText ();
col.PackStart (sr, true);
col.Expand = true;
- col.AddAttribute (sr, "text", 1);
+ col.AddAttribute (sr, "text", ProjectNameCol);
col.Title = GettextCatalog.GetString ("Solution Item");
configsList.AppendColumn (col);
- col.SortColumnId = 1;
+ col.SortColumnId = ProjectNameCol;
CellRendererToggle tt = new CellRendererToggle ();
tt.Activatable = true;
tt.Toggled += new ToggledHandler (OnBuildToggled);
- configsList.AppendColumn (GettextCatalog.GetString ("Build"), tt, "active", 2);
+ configsList.AppendColumn (GettextCatalog.GetString ("Build"), tt, "active", BuildFlagCol);
CellRendererComboBox comboCell = new CellRendererComboBox ();
comboCell.Changed += new ComboSelectionChangedHandler (OnConfigSelectionChanged);
configsList.AppendColumn (GettextCatalog.GetString ("Configuration"), comboCell, new TreeCellDataFunc (OnSetConfigurationsData));
- store.SetSortColumnId (1, SortType.Ascending);
+ store.SetSortColumnId (ProjectNameCol, SortType.Ascending);
}
public void Load (SolutionConfiguration config)
@@ -97,46 +104,68 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
configuration = config;
store.Clear ();
- foreach (SolutionConfigurationEntry ce in configuration.Configurations) {
- if (ce.Item != null && !(ce.Item is UnknownSolutionItem))
- store.AppendValues (ce, ce.Item.Name, ce.Build);
+ foreach (var it in solution.GetAllSolutionItems ().OfType<SolutionEntityItem> ().Where (s => s.SupportsBuild ())) {
+ var ce = config.GetEntryForItem (it);
+ store.AppendValues (it.Name, ce != null && ce.Build, it);
}
}
void OnSetConfigurationsData (Gtk.TreeViewColumn treeColumn, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
{
- SolutionConfigurationEntry entry = (SolutionConfigurationEntry) store.GetValue (iter, 0);
-
- ConfigurationData data = parentDialog.ConfigurationData.FindConfigurationData (entry.Item);
+ var item = (SolutionEntityItem) store.GetValue (iter, ProjectCol);
+ ConfigurationData data = parentDialog.ConfigurationData.FindConfigurationData (item);
- string[] values = new string [data.Configurations.Count];
- for (int n=0; n<values.Length; n++)
- values [n] = data.Configurations [n].Id;
CellRendererComboBox comboCell = (CellRendererComboBox) cell;
- comboCell.Values = values;
+ comboCell.Values = data.Configurations.Select (c => c.Id).ToArray ();
- var escaped = GLib.Markup.EscapeText (entry.ItemConfiguration);
- if (entry.Item.Configurations [entry.ItemConfiguration] == null)
+ var conf = GetSelectedConfiguration (item);
+ var escaped = GLib.Markup.EscapeText (conf);
+ if (item.Configurations [conf] == null)
comboCell.Markup = string.Format ("<span color='red'>{0}</span>", escaped);
else
comboCell.Markup = escaped;
}
+
+ string GetSelectedConfiguration (SolutionEntityItem item)
+ {
+ var entry = configuration.GetEntryForItem (item);
+ return entry != null ? entry.ItemConfiguration : (item.DefaultConfiguration != null ? item.DefaultConfiguration.Id : "");
+ }
void OnBuildToggled (object sender, ToggledArgs args)
{
TreeIter iter;
if (store.GetIter (out iter, new TreePath (args.Path))) {
- SolutionConfigurationEntry entry = (SolutionConfigurationEntry) store.GetValue (iter, 0);
- entry.Build = !entry.Build;
- store.SetValue (iter, 2, entry.Build);
+ var item = (SolutionEntityItem) store.GetValue (iter, ProjectCol);
+ var entry = configuration.GetEntryForItem (item);
+ if (entry == null) {
+ entry = CreateDefaultMapping (item);
+ entry.Build = true;
+ } else
+ entry.Build = !entry.Build;
+ store.SetValue (iter, BuildFlagCol, entry.Build);
}
}
+
+ SolutionConfigurationEntry CreateDefaultMapping (SolutionEntityItem item)
+ {
+ var conf = GetSelectedConfiguration (item);
+ var entry = configuration.AddItem (item);
+ entry.ItemConfiguration = conf;
+ return entry;
+ }
void OnConfigSelectionChanged (object s, ComboSelectionChangedArgs args)
{
TreeIter iter;
if (store.GetIter (out iter, new TreePath (args.Path))) {
- SolutionConfigurationEntry entry = (SolutionConfigurationEntry) store.GetValue (iter, 0);
+ var item = (SolutionEntityItem) store.GetValue (iter, ProjectCol);
+ var entry = configuration.GetEntryForItem (item);
+ if (entry == null) {
+ entry = CreateDefaultMapping (item);
+ entry.Build = false;
+ }
+
if (args.Active != -1) {
ConfigurationData data = parentDialog.ConfigurationData.FindConfigurationData (entry.Item);
entry.ItemConfiguration = data.Configurations [args.Active].Id;
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 f6ef0a2b11..5176e25e51 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
@@ -28,6 +28,7 @@ using MonoDevelop.Ide.Gui.Dialogs;
using Gtk;
using MonoDevelop.Projects;
+using MonoDevelop.Projects.SharedAssetsProjects;
namespace MonoDevelop.Ide.Projects.OptionPanels
{
@@ -67,6 +68,8 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
if (project is DotNetProject) {
projectDefaultNamespaceEntry.Text = ((DotNetProject)project).DefaultNamespace;
+ } else if (project is SharedAssetsProject) {
+ projectDefaultNamespaceEntry.Text = ((SharedAssetsProject)project).DefaultNamespace;
} else {
defaultNamespaceLabel.Visible = false;
projectDefaultNamespaceEntry.Visible = false;
@@ -89,6 +92,9 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
if (project is DotNetProject) {
((DotNetProject)project).DefaultNamespace = projectDefaultNamespaceEntry.Text;
}
+ else if (project is SharedAssetsProject) {
+ ((SharedAssetsProject)project).DefaultNamespace = projectDefaultNamespaceEntry.Text;
+ }
if (checkSolutionVersion.Active)
project.SyncVersionWithSolution = true;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs
index 81ef4841a9..6a4169cc9e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/PortableRuntimeOptionsPanel.cs
@@ -24,15 +24,11 @@
// THE SOFTWARE.
using System;
-using System.IO;
using System.Text;
using System.Linq;
-using System.Collections;
using System.Collections.Generic;
using MonoDevelop.Projects;
-using MonoDevelop.Ide.Projects;
-using MonoDevelop.Components;
using MonoDevelop.Core;
using MonoDevelop.Core.Assemblies;
@@ -73,8 +69,6 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
ComboBox selectorCombo;
bool disableEvents;
- const bool UseShortDescriptionInSelector = false;
-
class OptionComboItem {
public readonly string Name;
public readonly SupportedFramework Framework;
@@ -235,18 +229,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
string description;
if (fx == missingFramework)
description = " - not installed";
- else if (UseShortDescriptionInSelector) {
- var sb = new StringBuilder ();
- sb.Append (" (");
- foreach (var sfx in fx.SupportedFrameworks) {
- var label = GetShortName (sfx);
- if (sb.Length > 2)
- sb.Append (", ");
- sb.Append (label);
- }
- sb.Append (")");
- description = sb.ToString ();
- } else
+ else
description = string.Empty;
return string.Format (
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/StartupOptionsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/StartupOptionsPanel.cs
index f59a5dcce6..49c15e72d6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/StartupOptionsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects.OptionPanels/StartupOptionsPanel.cs
@@ -55,7 +55,7 @@ namespace MonoDevelop.Ide.Projects.OptionPanels
bool matched = false;
foreach (IExecutionMode mode in mset.ExecutionModes) {
foreach (SolutionConfiguration sc in sol.Configurations) {
- if (it.CanExecute (new ExecutionContext (mode, null), sc.Selector)) {
+ if (it.CanExecute (new ExecutionContext (mode, null, IdeApp.Workspace.ActiveExecutionTarget), sc.Selector)) {
startupItems.Add (it);
matched = true;
break;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs
index 11809d5848..83b1c22d89 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ConfirmProjectDeleteDialog.cs
@@ -36,7 +36,7 @@ using MonoDevelop.Components;
namespace MonoDevelop.Ide.Projects
{
- public partial class ConfirmProjectDeleteDialog : Gtk.Dialog
+ partial class ConfirmProjectDeleteDialog : Gtk.Dialog
{
TreeStore store;
IWorkspaceFileObject item;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
index 91e259e80b..eaac1af0c3 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
@@ -179,10 +179,10 @@ namespace MonoDevelop.Ide.Projects
NewPolicySetDialog dlg = new NewPolicySetDialog (new List<PolicySet> (esets));
try {
- if (MessageService.RunCustomDialog (dlg, this) == (int) Gtk.ResponseType.Ok) {
+ if (MessageService.RunCustomDialog (dlg, this) == (int) ResponseType.Ok) {
PolicySet pset = new PolicySet ();
pset.CopyFrom (dlg.SourceSet);
- pset.Name = dlg.PolicyName;
+ pset.Name = GetUnusedName (dlg.PolicyName);
sets.Add (pset);
FillPolicySets ();
policiesCombo.Active = sets.IndexOf (pset);
@@ -199,7 +199,7 @@ namespace MonoDevelop.Ide.Projects
if (MessageService.RunCustomDialog (dlg, this) == (int) Gtk.ResponseType.Ok) {
PolicySet pset = new PolicySet ();
pset.CopyFrom (dlg.SelectedItem.Policies);
- pset.Name = GetValidName (dlg.PolicyName);
+ pset.Name = GetUnusedName (dlg.PolicyName);
sets.Add (pset);
FillPolicySets ();
policiesCombo.Active = sets.IndexOf (pset);
@@ -223,7 +223,7 @@ namespace MonoDevelop.Ide.Projects
pset.LoadFromFile (dlg.SelectedFile);
if (string.IsNullOrEmpty (pset.Name))
pset.Name = dlg.SelectedFile.FileNameWithoutExtension;
- pset.Name = GetValidName (pset.Name);
+ pset.Name = GetUnusedName (pset.Name);
sets.Add (pset);
ExportProjectPolicyDialog.DefaultFileDialogPolicyDir = dlg.SelectedFile.ParentDirectory;
FillPolicySets ();
@@ -234,7 +234,7 @@ namespace MonoDevelop.Ide.Projects
}
}
- string GetValidName (string name)
+ string GetUnusedName (string name)
{
string finalName = name;
int n = 1;
@@ -292,7 +292,7 @@ namespace MonoDevelop.Ide.Projects
((ListStore)policiesCombo.Model).Clear ();
policiesCombo.WidthRequest = -1;
- sets.Sort ((p1,p2) => p1.Name.CompareTo(p2.Name));
+ sets.Sort ((p1, p2) => string.Compare (p1.Name, p2.Name, StringComparison.CurrentCulture));
foreach (PolicySet pset in sets) {
policiesCombo.AppendText (pset.Name ?? "");
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs
index 9863154e32..576b13aa4f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportProjectPolicyDialog.cs
@@ -96,7 +96,7 @@ namespace MonoDevelop.Ide.Projects
UpdateWidgets ();
}
- protected void OnButtonOkClicked (object sender, System.EventArgs e)
+ protected void OnButtonOkClicked (object sender, EventArgs e)
{
if (radioCustom.Active) {
if (entryName.Text.Length == 0) {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportSolutionDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportSolutionDialog.cs
index f571ea06fe..b3ce373bc7 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportSolutionDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/ExportSolutionDialog.cs
@@ -33,7 +33,7 @@ using MonoDevelop.Projects;
namespace MonoDevelop.Ide.Projects
{
- public partial class ExportSolutionDialog : Gtk.Dialog
+ partial class ExportSolutionDialog : Gtk.Dialog
{
FileFormat[] formats;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
index 3817b96eb6..e0ba04f386 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewFileDialog.cs
@@ -166,9 +166,10 @@ namespace MonoDevelop.Ide.Projects
{
string key = "Dialogs.NewFileDialog.LastSelectedCategory";
if (proj != null) {
- key += "." + proj.ProjectType;
- if (proj is DotNetProject)
- key += "." + ((DotNetProject)proj).LanguageName;
+ key += "." + proj.GetProjectTypes ().First ();
+ var dnp = proj as DotNetProject;
+ if (dnp != null)
+ key += "." + dnp.LanguageName;
}
return key;
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewPolicySetDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewPolicySetDialog.cs
index ba0451c16e..e446130cd6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewPolicySetDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewPolicySetDialog.cs
@@ -29,17 +29,23 @@ using MonoDevelop.Projects.Policies;
namespace MonoDevelop.Ide.Projects
{
- public partial class NewPolicySetDialog : Gtk.Dialog
+ partial class NewPolicySetDialog : Gtk.Dialog
{
List<PolicySet> sets;
public NewPolicySetDialog (List<PolicySet> sets)
{
this.Build ();
+
this.sets = sets;
foreach (var ps in sets)
comboSets.AppendText (ps.Name);
comboSets.Active = 0;
+
+ buttonOk.Sensitive = false;
+ entryName.Changed += delegate {
+ buttonOk.Sensitive = !string.IsNullOrWhiteSpace (entryName.Text);
+ };
}
public string PolicyName {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs
index 8df7906c3d..7b5279036d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectDialog.cs
@@ -50,7 +50,7 @@ namespace MonoDevelop.Ide.Projects {
/// This class displays a new project dialog and sets up and creates a a new project,
/// the project types are described in an XML options file
/// </summary>
- public partial class NewProjectDialog: Gtk.Dialog
+ internal partial class NewProjectDialog: Gtk.Dialog
{
ArrayList alltemplates = new ArrayList();
List<Category> categories = new List<Category> ();
@@ -68,7 +68,8 @@ namespace MonoDevelop.Ide.Projects {
CombineEntryFeatureSelector featureList;
IWorkspaceFileObject newItem;
Category recentCategory;
- List<string> recentIds = new List<string> ();
+ List<string> recentTemplates = new List<string> ();
+ bool disposeNewItem = true;
public NewProjectDialog (SolutionFolder parentFolder, bool openCombine, string basePath)
{
@@ -106,11 +107,13 @@ namespace MonoDevelop.Ide.Projects {
SelectTemplate (iter, id);
}
- ProjectTemplate GetTemplate (string id)
+ ProjectTemplate GetTemplate (string language, string id)
{
foreach (ProjectTemplate template in ProjectTemplate.ProjectTemplates) {
- if (template.Id == id)
- return template;
+ if (template.Id == id) {
+ if (language == null || template.LanguageName == language)
+ return template;
+ }
}
return null;
}
@@ -211,6 +214,10 @@ namespace MonoDevelop.Ide.Projects {
cat_text_render.Destroy ();
cat_text_render = null;
}
+
+ if (disposeNewItem && newItem != null)
+ newItem.Dispose ();
+
base.OnDestroyed ();
}
@@ -314,6 +321,7 @@ namespace MonoDevelop.Ide.Projects {
{
if (!btn_new.Sensitive)
return;
+ btn_new.Sensitive = false;
if (notebook.Page == 0) {
if (!CreateProject ())
@@ -346,6 +354,7 @@ namespace MonoDevelop.Ide.Projects {
}
}
notebook.Page++;
+ btn_new.Sensitive = true;
btn_new.Label = Gtk.Stock.Ok;
return;
}
@@ -376,11 +385,24 @@ namespace MonoDevelop.Ide.Projects {
IdeApp.ProjectOperations.Save (parentFolder.ParentSolution);
else
IdeApp.ProjectOperations.Save (newItem);
-
- if (openSolution)
- selectedItem.OpenCreatedSolution();
- InstallProjectTemplatePackages ();
+ if (openSolution) {
+ var op = selectedItem.OpenCreatedSolution ();
+ op.Completed += delegate {
+ if (op.Success) {
+ var sol = IdeApp.Workspace.GetAllSolutions ().FirstOrDefault ();
+ if (sol != null)
+ InstallProjectTemplatePackages (sol);
+ }
+ };
+ }
+ else {
+ // The item is not a solution being opened, so it is going to be added to
+ // an existing item. In this case, it must not be disposed by the dialog.
+ disposeNewItem = false;
+ if (parentFolder != null)
+ InstallProjectTemplatePackages (parentFolder.ParentSolution);
+ }
Respond (ResponseType.Ok);
}
@@ -389,11 +411,18 @@ namespace MonoDevelop.Ide.Projects {
{
if (templateView.CurrentlySelected != null) {
PropertyService.Set ("Dialogs.NewProjectDialog.LastSelectedCategory", ((ProjectTemplate)templateView.CurrentlySelected).Category);
- recentIds.Remove (templateView.CurrentlySelected.Id);
- recentIds.Insert (0, templateView.CurrentlySelected.Id);
- if (recentIds.Count > 15)
- recentIds.RemoveAt (recentIds.Count - 1);
- string strRecent = string.Join (",", recentIds.ToArray ());
+ string template;
+ // keep the old format if the language is not specified
+ if (String.IsNullOrEmpty(templateView.CurrentlySelected.LanguageName)) {
+ template = templateView.CurrentlySelected.Id;
+ } else { // use the newer format with language before id
+ template = templateView.CurrentlySelected.LanguageName + "/" + templateView.CurrentlySelected.Id;
+ }
+ recentTemplates.Remove (template);
+ recentTemplates.Insert (0, template);
+ if (recentTemplates.Count > 15)
+ recentTemplates.RemoveAt (recentTemplates.Count - 1);
+ string strRecent = string.Join (",", recentTemplates.ToArray ());
PropertyService.Set ("Dialogs.NewProjectDialog.RecentTemplates", strRecent);
PropertyService.SaveProperties ();
//PropertyService.Set("Dialogs.NewProjectDialog.LargeImages", ((RadioButton)ControlDictionary["largeIconsRadioButton"]).Checked);
@@ -432,12 +461,13 @@ namespace MonoDevelop.Ide.Projects {
try {
if (Directory.Exists (ProjectLocation)) {
- var btn = MessageService.AskQuestion (GettextCatalog.GetString ("Directory {0} already exists.\nDo you want to continue the Project creation?", ProjectLocation), AlertButton.No, AlertButton.Yes);
+ var question = GettextCatalog.GetString ("Directory {0} already exists.\nDo you want to continue creating the project?", ProjectLocation);
+ var btn = MessageService.AskQuestion (question, AlertButton.No, AlertButton.Yes);
if (btn != AlertButton.Yes)
return false;
}
- System.IO.Directory.CreateDirectory (location);
+ Directory.CreateDirectory (location);
} catch (IOException) {
MessageService.ShowError (GettextCatalog.GetString ("Could not create directory {0}. File already exists.", location));
return false;
@@ -445,7 +475,11 @@ namespace MonoDevelop.Ide.Projects {
MessageService.ShowError (GettextCatalog.GetString ("You do not have permission to create to {0}", location));
return false;
}
-
+
+ if (newItem != null) {
+ newItem.Dispose ();
+ newItem = null;
+ }
try {
ProjectCreateInformation cinfo = CreateProjectCreateInformation ();
@@ -476,13 +510,13 @@ namespace MonoDevelop.Ide.Projects {
return cinfo;
}
- void InstallProjectTemplatePackages ()
+ void InstallProjectTemplatePackages (Solution sol)
{
if (!selectedItem.HasPackages ())
return;
foreach (ProjectTemplatePackageInstaller installer in AddinManager.GetExtensionObjects ("/MonoDevelop/Ide/ProjectTemplatePackageInstallers")) {
- installer.Run (selectedItem.PackageReferencesForCreatedProjects);
+ installer.Run (sol, selectedItem.PackageReferencesForCreatedProjects);
}
}
@@ -640,10 +674,22 @@ namespace MonoDevelop.Ide.Projects {
recentCategory = new Category (GettextCatalog.GetString ("Recent"));
string strRecent = PropertyService.Get<string> ("Dialogs.NewProjectDialog.RecentTemplates", "");
- recentIds = new List<string> (strRecent.Split (new char[] {','}, StringSplitOptions.RemoveEmptyEntries));
- foreach (string id in recentIds) {
- ProjectTemplate pt = GetTemplate (id);
+ recentTemplates = new List<string> ();
+ foreach (string template in strRecent.Split (new char[] {','}, StringSplitOptions.RemoveEmptyEntries)) {
+ // Some templates can't be identified using only id, sometimes language is needed too
+ string id, language = null;
+ // If the string was serialized with old format leave null value for the language variable
+ int separator = template.IndexOf ('/');
+ if (separator == -1) {
+ id = template;
+ } else { // In other case extract the language
+ language = template.Substring (0, separator);
+ id = template.Substring (separator + 1);
+ }
+ recentTemplates.Add (template);
+
+ ProjectTemplate pt = GetTemplate (language, id);
if (pt != null)
recentCategory.Templates.Add (new TemplateItem (pt) { DisplayCategory = true });
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectOptionsWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectOptionsWidget.cs
index 4bc678a553..8b79a631d0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectOptionsWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/NewProjectOptionsWidget.cs
@@ -32,7 +32,7 @@ using System.Text;
namespace MonoDevelop.Ide.Projects
{
- public class NewProjectOptionsWidget : Bin
+ class NewProjectOptionsWidget : Bin
{
Entry nameEntry;
FileEntry locationEntry;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
index 44ba54407b..2de833b755 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
@@ -145,6 +145,18 @@ namespace MonoDevelop.Ide.Tasks
// Initialize with existing tags.
foreach (Task t in comments)
AddGeneratedTask (t);
+
+ view.Destroyed += delegate {
+ view.RowActivated -= OnRowActivated;
+ TaskService.CommentTasksChanged -= OnCommentTasksChanged;
+ CommentTag.SpecialCommentTagsChanged -= OnCommentTagsChanged;
+ IdeApp.Workspace.WorkspaceItemLoaded -= OnWorkspaceItemLoaded;
+ IdeApp.Workspace.WorkspaceItemUnloaded -= OnWorkspaceItemUnloaded;
+ comments.TasksAdded -= DispatchService.GuiDispatch<TaskEventHandler> (GeneratedTaskAdded);
+ comments.TasksRemoved -= DispatchService.GuiDispatch<TaskEventHandler> (GeneratedTaskRemoved);
+
+ PropertyService.PropertyChanged -= DispatchService.GuiDispatch<EventHandler<PropertyChangedEventArgs>> (OnPropertyUpdated);
+ };
}
void LoadColumnsVisibility ()
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs
index 6d0fef6a3a..09bd276157 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/Task.cs
@@ -209,10 +209,8 @@ namespace MonoDevelop.Ide.Tasks
public virtual void JumpToPosition()
{
if (!file.IsNullOrEmpty) {
- var doc = IdeApp.Workbench.OpenDocument (file, Math.Max (1, line), Math.Max (1, column));
var project = WorkspaceObject as Project;
- if (doc != null && project != null)
- doc.SetProject (project);
+ IdeApp.Workbench.OpenDocument (file, project, Math.Max (1, line), Math.Max (1, column));
} else if (parentObject != null) {
Pad pad = IdeApp.Workbench.GetPad<ProjectSolutionPad> ();
ProjectSolutionPad spad = pad.Content as ProjectSolutionPad;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/FileTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/FileTemplate.cs
index 8b18b08dec..dd3fc5d476 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/FileTemplate.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/FileTemplate.cs
@@ -41,6 +41,7 @@ using System.Collections.Generic;
using System.Collections;
using MonoDevelop.Ide.Codons;
using System.Xml;
+using System.Linq;
namespace MonoDevelop.Ide.Templates
{
@@ -375,7 +376,7 @@ namespace MonoDevelop.Ide.Templates
if (directory != null) {
string fileName = singleFile.SaveFile (policyParent, project, language, directory, name);
if (fileName != null) {
- IdeApp.Workbench.OpenDocument (fileName);
+ IdeApp.Workbench.OpenDocument (fileName, project);
return true;
}
} else {
@@ -406,7 +407,7 @@ namespace MonoDevelop.Ide.Templates
//filter on conditions
if (project != null) {
- if (!string.IsNullOrEmpty(projecttype) && (projecttype != project.ProjectType))
+ if (!string.IsNullOrEmpty (projecttype) && project.GetProjectTypes ().All (p => p != projecttype))
return false;
foreach (FileTemplateCondition condition in conditions)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ParentProjectFileTemplateCondition.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ParentProjectFileTemplateCondition.cs
index 9c40ed492f..741a8b25de 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ParentProjectFileTemplateCondition.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ParentProjectFileTemplateCondition.cs
@@ -30,6 +30,7 @@ using System.Xml;
using System.IO;
using MonoDevelop.Projects;
+using System.Linq;
namespace MonoDevelop.Ide.Templates
{
@@ -83,7 +84,7 @@ namespace MonoDevelop.Ide.Templates
if (proj == null)
return !requireExists;
- if (projectType != null && proj.ProjectType != projectType)
+ if (projectType != null && proj.GetProjectTypes ().All (p => p != projectType))
return false;
//check for permitted creation paths
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs
index 275e1a3595..ce49a15daa 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectDescriptor.cs
@@ -165,8 +165,10 @@ namespace MonoDevelop.Ide.Templates
projectFile.BuildAction = BuildAction.EmbeddedResource;
project.Files.Add (projectFile);
} catch (Exception ex) {
+ if (!IdeApp.IsInitialized)
+ throw;
+ LoggingService.LogError (string.Format ("File {0} could not be written.", resourceTemplate.Name), ex);
MessageService.ShowException (ex, GettextCatalog.GetString ("File {0} could not be written.", resourceTemplate.Name));
- LoggingService.LogError (GettextCatalog.GetString ("File {0} could not be written.", resourceTemplate.Name), ex);
}
}
@@ -174,8 +176,10 @@ namespace MonoDevelop.Ide.Templates
try {
fileTemplate.AddToProject (policyParent, project, defaultLanguage, project.BaseDirectory, null);
} catch (Exception ex) {
+ if (!IdeApp.IsInitialized)
+ throw;
+ LoggingService.LogError (string.Format ("File {0} could not be written.", fileTemplate.Name), ex);
MessageService.ShowException (ex, GettextCatalog.GetString ("File {0} could not be written.", fileTemplate.Name));
- LoggingService.LogError (GettextCatalog.GetString ("File {0} could not be written.", fileTemplate.Name), ex);
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs
index e83b4e5fbb..9640135723 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplate.cs
@@ -45,6 +45,7 @@ using Mono.Addins;
using MonoDevelop.Ide.Codons;
using MonoDevelop.Projects;
using MonoDevelop.Ide.Gui;
+using System.Linq;
namespace MonoDevelop.Ide.Templates
{
@@ -216,16 +217,17 @@ namespace MonoDevelop.Ide.Templates
}
//methods
- public void OpenCreatedSolution ()
+ public IAsyncOperation OpenCreatedSolution ()
{
IAsyncOperation asyncOperation = IdeApp.Workspace.OpenWorkspaceItem (createdSolutionName);
- asyncOperation.WaitForCompleted ();
-
- if (asyncOperation.Success) {
- foreach (string action in actions) {
- IdeApp.Workbench.OpenDocument (Path.Combine (createdProjectInformation.ProjectBasePath, action));
+ asyncOperation.Completed += delegate {
+ if (asyncOperation.Success) {
+ foreach (string action in actions) {
+ IdeApp.Workbench.OpenDocument (Path.Combine (createdProjectInformation.ProjectBasePath, action));
+ }
}
- }
+ };
+ return asyncOperation;
}
public WorkspaceItem CreateWorkspaceItem (ProjectCreateInformation cInfo)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatePackageInstaller.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatePackageInstaller.cs
index 2aaddc361d..8739bee850 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatePackageInstaller.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/ProjectTemplatePackageInstaller.cs
@@ -32,7 +32,7 @@ namespace MonoDevelop.Ide.Templates
{
public abstract class ProjectTemplatePackageInstaller
{
- public abstract void Run(IList<PackageReferencesForCreatedProject> packageReferencesForCreatedProjects);
+ public abstract void Run (Solution solution, IList<PackageReferencesForCreatedProject> packageReferencesForCreatedProjects);
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs
index 13a4bb0a94..09b4639b56 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Templates/SingleFileDescriptionTemplate.cs
@@ -41,6 +41,7 @@ using System.Text;
using MonoDevelop.Ide.Gui.Content;
using MonoDevelop.Ide.CodeFormatting;
using MonoDevelop.Ide.Editor;
+using MonoDevelop.Projects.SharedAssetsProjects;
namespace MonoDevelop.Ide.Templates
{
@@ -339,7 +340,11 @@ namespace MonoDevelop.Ide.Templates
}
//need a default namespace or if there is no project, substitutions can get very messed up
- string ns = netProject != null ? netProject.GetDefaultNamespace (fileName) : "Application";
+ string ns;
+ if (project is IDotNetFileContainer)
+ ns = ((IDotNetFileContainer)project).GetDefaultNamespace (fileName);
+ else
+ ns = "Application";
//need an 'identifier' for tag substitution, e.g. class name or page name
//if not given an identifier, use fileName
@@ -364,8 +369,8 @@ namespace MonoDevelop.Ide.Templates
}
}
- tags ["Namespace"] = ns;
- if (policyParent != null)
+ tags ["Namespace"] = ns;
+ if (policyParent != null)
tags ["SolutionName"] = policyParent.Name;
if (project != null) {
tags ["ProjectName"] = project.Name;
@@ -382,7 +387,7 @@ namespace MonoDevelop.Ide.Templates
if (languageExtension.Length > 0)
tags ["LanguageExtension"] = languageExtension;
- if (fileName != FilePath.Null) {
+ if (fileName != FilePath.Null) {
FilePath fileDirectory = Path.GetDirectoryName (fileName);
if (project != null && project.BaseDirectory != FilePath.Null && fileDirectory.IsChildPathOf (project.BaseDirectory))
tags ["ProjectRelativeDirectory"] = fileDirectory.ToRelative (project.BaseDirectory);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs
index 506f6b3daa..27d7d7169d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/AmbienceService.cs
@@ -152,10 +152,10 @@ namespace MonoDevelop.Ide.TypeSystem
return null;
string documentation = member.Documentation.Xml.Text;
if (!string.IsNullOrEmpty (documentation)) {
- int idx1 = documentation.IndexOf ("<summary>");
- int idx2 = documentation.IndexOf ("</summary>");
+ int idx1 = documentation.IndexOf ("<summary>", StringComparison.Ordinal);
+ int idx2 = documentation.LastIndexOf ("</summary>", StringComparison.Ordinal);
string result;
- if (idx2 >= 0 && idx1 >= 0) {
+ if (idx1 >= 0 && idx2 > idx1) {
try {
var xmlText = documentation.Substring (idx1, idx2 - idx1 + "</summary>".Length);
return ParseBody (member,
@@ -166,7 +166,8 @@ namespace MonoDevelop.Ide.TypeSystem
} catch (Exception e) {
LoggingService.LogWarning ("Malformed documentation xml detected:" + documentation, e);
// may happen on malformed xml.
- result = documentation.Substring (idx1 + "<summary>".Length, idx2 - idx1 - "<summary>".Length);
+ var len = idx2 - idx1 - "</summary>".Length;
+ result = len > 0 ? documentation.Substring (idx1 + "<summary>".Length, len) : documentation;
}
} else if (idx1 >= 0) {
result = documentation.Substring (idx1 + "<summary>".Length);
@@ -213,7 +214,7 @@ namespace MonoDevelop.Ide.TypeSystem
if (entity != null) {
var ambience = new ICSharpCode.NRefactory.CSharp.CSharpAmbience ();
ambience.ConversionFlags = ConversionFlags.ShowParameterList | ConversionFlags.ShowParameterNames | ConversionFlags.ShowTypeParameterList;
- return ambience.ConvertEntity (entity);
+ return ambience.ConvertSymbol (entity);
}
} catch (Exception e) {
LoggingService.LogWarning ("Invalid cref:" + cref, e);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs
index e726d0cc02..93d23a6d38 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemParserNode.cs
@@ -27,13 +27,16 @@ using System;
using Mono.Addins;
using System.Collections.Generic;
using System.Linq;
+using MonoDevelop.Core.StringParsing;
namespace MonoDevelop.Ide.TypeSystem
{
public class TypeSystemParserNode : TypeExtensionNode
{
+ const string ApiDefinitionBuildAction = "ObjcBindingApiDefinition";
+
[NodeAttribute (Description="The build actions.")]
- string[] buildActions = new string[] { MonoDevelop.Projects.BuildAction.Compile };
+ string[] buildActions = { MonoDevelop.Projects.BuildAction.Compile, ApiDefinitionBuildAction };
public string[] BuildActions {
get {
@@ -73,6 +76,12 @@ namespace MonoDevelop.Ide.TypeSystem
return false;
return buildActions.Any (action => string.Equals (action, buildAction, StringComparison.OrdinalIgnoreCase));
}
+
+ public static bool IsCompileBuildAction(string buildAction)
+ {
+ return buildAction == MonoDevelop.Projects.BuildAction.Compile ||
+ buildAction == ApiDefinitionBuildAction;
+ }
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
index e0a5f14bb4..5782105dfd 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
@@ -48,32 +48,12 @@ using ICSharpCode.NRefactory.Completion;
using System.Diagnostics;
using MonoDevelop.Ide.Editor;
using MonoDevelop.Core.Text;
+using MonoDevelop.Projects.SharedAssetsProjects;
namespace MonoDevelop.Ide.TypeSystem
{
public static class TypeSystemServiceExt
{
- [Obsolete ("Don't use this method the caller should always have the project and get the type system from that instead the other way around.")]
- public static Project GetProject (this IProjectContent content)
- {
- return TypeSystemService.GetProject (content.Location);
- }
-
- [Obsolete ("Use TryGetSourceProject.")]
- public static Project GetSourceProject (this ITypeDefinition type)
- {
- var location = type.Compilation.MainAssembly.UnresolvedAssembly.Location;
- if (string.IsNullOrEmpty (location))
- return null;
- return TypeSystemService.GetProject (location);
- }
-
- [Obsolete ("Use TryGetSourceProject.")]
- public static Project GetSourceProject (this IType type)
- {
- return type.GetDefinition ().GetSourceProject ();
- }
-
/// <summary>
/// Tries to the get source project for a given type definition. This operation may fall if it was called on an outdated
/// compilation unit or the correspondening project was unloaded.
@@ -120,13 +100,9 @@ namespace MonoDevelop.Ide.TypeSystem
internal static Project GetProjectWhereTypeIsDefined (this IType type)
{
- return type.GetDefinition ().GetSourceProject ();
- }
-
- [Obsolete ("Don't use this method the caller should always have the project and get the type system from that instead the other way around.")]
- public static IProjectContent GetProjectContent (this IType type)
- {
- return TypeSystemService.GetProjectContext (type.GetSourceProject ());
+ Project project;
+ TryGetSourceProject (type, out project);
+ return project;
}
public static ICSharpCode.NRefactory.TextLocation GetLocation (this IType type)
@@ -168,41 +144,6 @@ namespace MonoDevelop.Ide.TypeSystem
var resolvedType = def.Resolve (ctx);
return resolvedType;
}
-
- [Obsolete ("Do not use this method. Use type references to resolve types. Type references from full reflection names can be got from ReflectionHelper.ParseReflectionName.")]
- public static ITypeDefinition LookupType (this ICompilation compilation, string ns, string name, int typeParameterCount = -1)
- {
- var tc = Math.Max (typeParameterCount, 0);
- ITypeDefinition result;
- foreach (var refAsm in compilation.Assemblies) {
- result = refAsm.GetTypeDefinition (ns, name, tc);
- if (result != null)
- return result;
- }
- if (typeParameterCount < 0) {
- for (int i = 1; i < 50; i++) {
- result = LookupType (compilation, ns, name, i);
- if (result != null)
- return result;
- }
- }
- return null;
- }
-
- [Obsolete ("Do not use this method. Use type references to resolve types. Type references from full reflection names can be got from ReflectionHelper.ParseReflectionName.")]
- public static ITypeDefinition LookupType (this ICompilation compilation, string fullName, int typeParameterCount = -1)
- {
- int idx = fullName.LastIndexOf ('.');
- string ns, name;
- if (idx > 0) {
- ns = fullName.Substring (0, idx);
- name = fullName.Substring (idx + 1);
- } else {
- ns = "";
- name = fullName;
- }
- return compilation.LookupType (ns, name, typeParameterCount);
- }
}
/// <summary>
@@ -310,10 +251,12 @@ namespace MonoDevelop.Ide.TypeSystem
static void HandleActiveConfigurationChanged (object sender, EventArgs e)
{
- foreach (var pr in projectContents.Keys.ToArray ()) {
- var project = pr as DotNetProject;
+ foreach (var pr in projectContents.ToArray ()) {
+ var project = pr.Key as DotNetProject;
if (project != null)
CheckProjectOutput (project, true);
+
+ pr.Value.ReconnectAssemblyReferences ();
}
}
@@ -323,7 +266,7 @@ namespace MonoDevelop.Ide.TypeSystem
{
if (project == null)
throw new ArgumentNullException ("project");
- if (outputTrackedProjects.Contains (project.ProjectType, StringComparer.OrdinalIgnoreCase)) {
+ if (project.GetProjectTypes ().Any (p => outputTrackedProjects.Contains (p, StringComparer.OrdinalIgnoreCase))) {
var fileName = project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration);
var wrapper = GetProjectContentWrapper (project);
@@ -410,8 +353,8 @@ namespace MonoDevelop.Ide.TypeSystem
}
static readonly object projectWrapperUpdateLock = new object ();
-
- public static ParsedDocument ParseFile (Project project, string fileName, string mimeType, TextReader content)
+
+ public static ParsedDocument ParseFile (Project project, string fileName, string mimeType, string content)
{
if (fileName == null)
throw new ArgumentNullException ("fileName");
@@ -421,7 +364,7 @@ namespace MonoDevelop.Ide.TypeSystem
var t = Counters.ParserService.FileParsed.BeginTiming (fileName);
try {
- var result = parser.Parse (true, fileName, content, project);
+ var result = parser.Parse (true, fileName, new StringReader (content), project);
lock (projectWrapperUpdateLock) {
ProjectContentWrapper wrapper;
if (project != null) {
@@ -444,11 +387,13 @@ namespace MonoDevelop.Ide.TypeSystem
if (cnt.Key == project)
continue;
// Use the project context because file lookup is faster there than in the project class.
- var file = cnt.Value.Content.GetFile (fileName);
+ var pcnt = cnt.Value;
+ var file = pcnt.Content.GetFile (fileName);
if (file != null) {
- cnt.Value.UpdateContent (c => c.AddOrUpdateFiles (result.ParsedFile));
- cnt.Value.InformFileRemoved (new ParsedFileEventArgs (file));
- cnt.Value.InformFileAdded (new ParsedFileEventArgs (result.ParsedFile));
+ var newResult = parser.Parse (false, fileName, new StringReader (content), pcnt.Project);
+ pcnt.UpdateContent (c => c.AddOrUpdateFiles (newResult.ParsedFile));
+ pcnt.InformFileRemoved (new ParsedFileEventArgs (file));
+ pcnt.InformFileAdded (new ParsedFileEventArgs (newResult.ParsedFile));
}
}
}
@@ -461,10 +406,9 @@ namespace MonoDevelop.Ide.TypeSystem
}
}
- public static ParsedDocument ParseFile (Project project, string fileName, string mimeType, string content)
+ public static ParsedDocument ParseFile (Project project, string fileName, string mimeType, TextReader content)
{
- using (var reader = new StringReader (content))
- return ParseFile (project, fileName, mimeType, reader);
+ return ParseFile (project, fileName, mimeType, content.ReadToEnd ());
}
public static ParsedDocument ParseFile (Project project, IReadonlyTextDocument data)
@@ -1306,11 +1250,7 @@ namespace MonoDevelop.Ide.TypeSystem
public IEnumerable<Project> ReferencedProjects {
get {
- foreach (var pr in Project.GetReferencedItems (ConfigurationSelector.Default)) {
- var referencedProject = pr as Project;
- if (referencedProject != null)
- yield return referencedProject;
- }
+ return Project.GetReferencedItems (ConfigurationSelector.Default).OfType<DotNetProject> ();
}
}
@@ -1620,7 +1560,7 @@ namespace MonoDevelop.Ide.TypeSystem
}
var newReferencedAssemblies = new List<UnresolvedAssemblyProxy>();
try {
- foreach (string file in netProject.GetReferencedAssemblies (ConfigurationSelector.Default, false)) {
+ foreach (string file in netProject.GetReferencedAssemblies (IdeApp.IsInitialized ? IdeApp.Workspace.ActiveConfiguration : ConfigurationSelector.Default, false)) {
string fileName;
if (!Path.IsPathRooted (file)) {
fileName = Path.Combine (Path.GetDirectoryName (netProject.FileName), file);
@@ -1816,7 +1756,6 @@ namespace MonoDevelop.Ide.TypeSystem
}
}
- var oldCache = cachedAssemblyContents.Values.ToList ();
cachedAssemblyContents.Clear ();
lock (parseQueueLock) {
parseQueueIndex.Clear ();
@@ -2465,20 +2404,18 @@ namespace MonoDevelop.Ide.TypeSystem
static IEnumerable<SystemAssembly> GetFrameworkAssemblies (DotNetProject netProject)
{
var assemblies = new Dictionary<string, SystemAssembly> ();
- foreach (var systemPackage in netProject.AssemblyContext.GetPackages ()) {
- foreach (var assembly in systemPackage.Assemblies) {
- SystemAssembly existing;
- if (assemblies.TryGetValue (assembly.Name, out existing)) {
- Version v1, v2;
- if (!Version.TryParse (existing.Version, out v1))
- continue;
- if (!Version.TryParse (assembly.Version, out v2))
- continue;
- if (v1 > v2)
- continue;
- }
- assemblies [assembly.Name] = assembly;
+ foreach (var assembly in netProject.AssemblyContext.GetAssemblies ()) {
+ SystemAssembly existing;
+ if (assemblies.TryGetValue (assembly.Name, out existing)) {
+ Version v1, v2;
+ if (!Version.TryParse (existing.Version, out v1))
+ continue;
+ if (!Version.TryParse (assembly.Version, out v2))
+ continue;
+ if (v1 > v2)
+ continue;
}
+ assemblies [assembly.Name] = assembly;
}
return assemblies.Values;
}
@@ -2665,7 +2602,6 @@ namespace MonoDevelop.Ide.TypeSystem
TypeSystemParserNode node = null;
TypeSystemParser parser = null;
var tags = Context.GetExtensionObject <ProjectCommentTags> ();
- string mimeType = null, oldExtension = null, buildAction = null;
try {
Context.BeginLoadOperation ();
var parsedFiles = new List<Tuple<ParsedDocument, IUnresolvedFile>> ();
@@ -2673,7 +2609,7 @@ namespace MonoDevelop.Ide.TypeSystem
if (token.IsCancellationRequested)
return;
var fileName = file.FilePath;
- if (file.BuildAction != BuildAction.Compile || filesSkippedInParseThread.Any (f => f == fileName)) {
+ if (filesSkippedInParseThread.Any (f => f == fileName)) {
continue;
}
if (node == null || !node.CanParse (fileName, file.BuildAction)) {
@@ -2966,6 +2902,7 @@ namespace MonoDevelop.Ide.TypeSystem
int pending = 0;
IProgressMonitor monitor = null;
var token = loadCancellationSource.Token;
+ StartParseOperation ();
try {
do {
if (pending > 5 && monitor == null) {
@@ -2993,6 +2930,7 @@ namespace MonoDevelop.Ide.TypeSystem
} finally {
if (monitor != null)
monitor.Dispose ();
+ EndParseOperation ();
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs
index ab7aab5979..5c4855320f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Updater/UpdateService.cs
@@ -35,7 +35,7 @@ namespace MonoDevelop.Ide.Updater
{
public static class UpdateService
{
- static readonly TimeSpan AutoUpdateSpan = TimeSpan.FromDays (3);
+ static readonly TimeSpan AutoUpdateSpan = TimeSpan.FromDays (1);
static UpdateService ()
{
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/Style.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/Style.cs
index bcc10f04ae..559bda975e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/Style.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/Style.cs
@@ -7,7 +7,7 @@ namespace MonoDevelop.Ide.WelcomePage
public static class WelcomeScreen
{
public const string FontFamilyMac = "Lucida Grande";
- public const string FontFamilyWindows = "Calibri";
+ public const string FontFamilyWindows = "Calibri"; // TODO: VV: "Segoe UI"
public const int VerticalPadding = 24;
public const int HorizontalPadding = 50;
public const string BackgroundTile = "./images/tiny_grid.png";
@@ -29,7 +29,7 @@ namespace MonoDevelop.Ide.WelcomePage
public static class Pad
{
public const string TitleFontFamilyMac = "Lucida Grande";
- public const string TitleFontFamilyWindows = "Calibri";
+ public const string TitleFontFamilyWindows = "Calibri"; // TODO: VV: "Segoe UI"
public const int Padding = 20;
public const string BackgroundColor = "#FFF";
public const string BorderColor = "#CCC";
@@ -47,7 +47,7 @@ namespace MonoDevelop.Ide.WelcomePage
public const string SmallTitleColor = "#777777";
public const int SmallTitleFontSize = 13;
public const int SummaryFontSize = 12;
- public const string SummaryFontFamily = "Arial";
+ public const string SummaryFontFamily = "Arial"; // TODO: VV: "Segoe UI"
public const int SummaryLineHeight = 19;
public const int SummaryParagraphMarginTop = 8;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
index 7ea068f8c1..ad4cf0d263 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
@@ -104,6 +104,8 @@ namespace MonoDevelop.Ide.WelcomePage
foreach (var child in OnLoadNews (news).Take (limit))
AddNewsItem (box, child);
}
+ box.PackStart (new Label(), true, false, 4);
+
} catch (Exception ex) {
LoggingService.LogWarning ("Error loading news feed.", ex);
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
index 6ef9828d38..c17f52194c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
@@ -39,6 +39,36 @@
<NoWarn>1591;1573</NoWarn>
<DocumentationFile>..\..\..\build\AddIns\MonoDevelop.Ide.xml</DocumentationFile>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugMac|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\build\bin</OutputPath>
+ <DefineConstants>DEBUG,MAC</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>3</WarningLevel>
+ <DocumentationFile>..\..\..\build\bin\MonoDevelop.Ide.xml</DocumentationFile>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Execution>
+ <Execution clr-version="Net_2_0" />
+ </Execution>
+ <NoWarn>1591;1573</NoWarn>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseMac|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\..\build\AddIns\</OutputPath>
+ <DefineConstants>MAC</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\..\build\AddIns\MonoDevelop.Ide.xml</DocumentationFile>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <Execution>
+ <Execution clr-version="Net_2_0" />
+ </Execution>
+ <NoWarn>1591;1573</NoWarn>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
@@ -70,6 +100,10 @@
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Design" />
<Reference Include="System.Runtime.Serialization" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="MonoMac" Condition=" '$(Configuration)' == 'DebugMac' ">
+ <HintPath>..\..\..\external\monomac\src\MonoMac.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MonoDevelop.Core\MonoDevelop.Core.csproj">
@@ -181,8 +215,11 @@
<EmbeddedResource Include="icons\light\project-reference-overlay-16%402x.png">
<LogicalName>project-reference-overlay-light-16@2x.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\parser-16.png">
- <LogicalName>parser-16.png</LogicalName>
+ <EmbeddedResource Include="icons\light\parser-16.png">
+ <LogicalName>parser-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\parser-16%402x.png">
+ <LogicalName>parser-light-16@2x.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="templates\GenericProject.xpt.xml">
<LogicalName>GenericProject.xpt.xml</LogicalName>
@@ -214,12 +251,6 @@
<EmbeddedResource Include="options\KeyBindingSchemeMonoDevelop1.xml">
<LogicalName>KeyBindingSchemeMonoDevelop1.xml</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\keyboard-shortcuts-16.png">
- <LogicalName>keyboard-shortcuts-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\text-editor-16.png">
- <LogicalName>text-editor-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\navigate-next-16.png">
<LogicalName>navigate-next-16.png</LogicalName>
</EmbeddedResource>
@@ -259,17 +290,17 @@
<EmbeddedResource Include="MonoDevelop.Ide.StandardHeader\LGPL3LicencePolicy.xml">
<LogicalName>LGPL3LicencePolicy.xml</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\tools-external-tools-16.png">
- <LogicalName>tools-external-tools-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="MonoDevelop.Ide.CodeFormatting\InvariantTextStylePolicy.xml">
<LogicalName>InvariantTextStylePolicy.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\add-namespace-16.png">
<LogicalName>add-namespace-16.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\assembly-project-16.png">
- <LogicalName>assembly-project-16.png</LogicalName>
+ <EmbeddedResource Include="icons\light\assembly-project-16.png">
+ <LogicalName>assembly-project-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\assembly-project-16%402x.png">
+ <LogicalName>assembly-project-light-16@2x.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\breakpoint-16.png">
<LogicalName>breakpoint-light-16.png</LogicalName>
@@ -314,16 +345,16 @@
<LogicalName>build-solution-16.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\element-template-16.png">
- <LogicalName>element-template-16.png</LogicalName>
+ <LogicalName>element-template-light-16.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\element-template-16%402x.png">
- <LogicalName>element-template-16@2x.png</LogicalName>
+ <LogicalName>element-template-light-16@2x.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\element-template-surroundwith-16.png">
- <LogicalName>element-template-surroundwith-16.png</LogicalName>
+ <LogicalName>element-template-surroundwith-light-16.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\element-template-surroundwith-16%402x.png">
- <LogicalName>element-template-surroundwith-16@2x.png</LogicalName>
+ <LogicalName>element-template-surroundwith-light-16@2x.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\comment-16.png">
<LogicalName>comment-light-16.png</LogicalName>
@@ -331,12 +362,6 @@
<EmbeddedResource Include="icons\light\comment-16%402x.png">
<LogicalName>comment-light-16@2x.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\compiler-options-16.png">
- <LogicalName>compiler-options-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\custom-commands-16.png">
- <LogicalName>custom-commands-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\edit-find-next-16.png">
<LogicalName>edit-find-next-16.png</LogicalName>
</EmbeddedResource>
@@ -397,8 +422,11 @@
<EmbeddedResource Include="icons\light\element-method-16%402x.png">
<LogicalName>element-method-light-16@2x.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\element-method-new-16.png">
- <LogicalName>element-method-new-16.png</LogicalName>
+ <EmbeddedResource Include="icons\light\element-method-new-16.png">
+ <LogicalName>element-method-new-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-method-new-16%402x.png">
+ <LogicalName>element-method-new-light-16@2x.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\element-namespace-16.png">
<LogicalName>element-namespace-light-16.png</LogicalName>
@@ -454,20 +482,26 @@
<EmbeddedResource Include="icons\light\file-xml-32%402x.png">
<LogicalName>file-xml-light-32@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\file-script-16.png">
+ <LogicalName>file-script-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\file-script-16%402x.png">
+ <LogicalName>file-script-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\file-script-32.png">
+ <LogicalName>file-script-light-32.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\file-script-32%402x.png">
+ <LogicalName>file-script-light-32@2x.png</LogicalName>
+ </EmbeddedResource>
<EmbeddedResource Include="icons\folder-new-16.png">
<LogicalName>folder-new-16.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\formatting-16.png">
- <LogicalName>formatting-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\light\element-keyword-16.png">
- <LogicalName>element-keyword-16.png</LogicalName>
+ <LogicalName>element-keyword-light-16.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\element-keyword-16%402x.png">
- <LogicalName>element-keyword-16@2x.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\markers-rulers-16.png">
- <LogicalName>markers-rulers-16.png</LogicalName>
+ <LogicalName>element-keyword-light-16@2x.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\monodevelop-16.png">
<LogicalName>monodevelop-16.png</LogicalName>
@@ -481,11 +515,17 @@
<EmbeddedResource Include="icons\monodevelop-48.png">
<LogicalName>monodevelop-48.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\light\package-22.png">
- <LogicalName>package-light-22.png</LogicalName>
+ <EmbeddedResource Include="icons\light\package-16.png">
+ <LogicalName>package-light-16.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\light\package-22%402x.png">
- <LogicalName>package-light-22@2x.png</LogicalName>
+ <EmbeddedResource Include="icons\light\package-16%402x.png">
+ <LogicalName>package-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\package-24.png">
+ <LogicalName>package-light-24.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\package-24%402x.png">
+ <LogicalName>package-light-24@2x.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\package-32.png">
<LogicalName>package-light-32.png</LogicalName>
@@ -535,9 +575,27 @@
<EmbeddedResource Include="icons\light\project-library-overlay-32%402x.png">
<LogicalName>project-library-overlay-light-32@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\project-shared-assets-overlay-32.png">
+ <LogicalName>project-shared-assets-overlay-light-32.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\project-shared-assets-overlay-32%402x.png">
+ <LogicalName>project-shared-assets-overlay-light-32@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\project-package-overlay-32.png">
+ <LogicalName>project-package-overlay-light-32.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\project-package-overlay-32%402x.png">
+ <LogicalName>project-package-overlay-light-32@2x.png</LogicalName>
+ </EmbeddedResource>
<EmbeddedResource Include="icons\project-new-16.png">
<LogicalName>project-new-16.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\package-source-16.png">
+ <LogicalName>package-source-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\package-source-16%402x.png">
+ <LogicalName>package-source-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
<EmbeddedResource Include="icons\light\reference-16.png">
<LogicalName>reference-light-16.png</LogicalName>
</EmbeddedResource>
@@ -562,24 +620,6 @@
<EmbeddedResource Include="icons\solution-new-16.png">
<LogicalName>solution-new-16.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\syntax-highlighting-16.png">
- <LogicalName>syntax-highlighting-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\text-editor-behavior-16.png">
- <LogicalName>text-editor-behavior-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\letters-16.png">
- <LogicalName>letters-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\hammer-16.png">
- <LogicalName>hammer-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\drive-16.png">
- <LogicalName>drive-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\monkey-16.png">
- <LogicalName>monkey-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\light\element-visibility-internal-overlay-16.png">
<LogicalName>element-visibility-internal-overlay-light-16.png</LogicalName>
</EmbeddedResource>
@@ -694,9 +734,6 @@
<EmbeddedResource Include="MonoDevelop.Components.Commands\CommandsExtensionModel.addin.xml">
<LogicalName>CommandsExtensionModel.addin.xml</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\text-quickfix-16.png">
- <LogicalName>text-quickfix-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="MonoDevelop.Ide.Gui.Pads.ClassPad\ClassPadContextMenu.addin.xml">
<LogicalName>ClassPadContextMenu.addin.xml</LogicalName>
</EmbeddedResource>
@@ -923,9 +960,6 @@
<EmbeddedResource Include="icons\light\file-resource-32%402x.png">
<LogicalName>file-resource-light-32@2x.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\save-all-16.png">
- <LogicalName>save-all-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\light\file-text-32.png">
<LogicalName>file-text-light-32.png</LogicalName>
</EmbeddedResource>
@@ -1148,6 +1182,48 @@
<EmbeddedResource Include="icons\light\information-16%402x.png">
<LogicalName>information-light-16@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\information-24.png">
+ <LogicalName>information-light-24.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\information-24%402x.png">
+ <LogicalName>information-light-24@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\information-32.png">
+ <LogicalName>information-light-32.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\information-32%402x.png">
+ <LogicalName>information-light-32@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\information-48.png">
+ <LogicalName>information-light-48.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\information-48%402x.png">
+ <LogicalName>information-light-48@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-16.png">
+ <LogicalName>question-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-16%402x.png">
+ <LogicalName>question-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-24.png">
+ <LogicalName>question-light-24.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-24%402x.png">
+ <LogicalName>question-light-24@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-32.png">
+ <LogicalName>question-light-32.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-32%402x.png">
+ <LogicalName>question-light-32@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-48.png">
+ <LogicalName>question-light-48.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\question-48%402x.png">
+ <LogicalName>question-light-48@2x.png</LogicalName>
+ </EmbeddedResource>
<EmbeddedResource Include="icons\light\command-16.png">
<LogicalName>command-light-16.png</LogicalName>
</EmbeddedResource>
@@ -1220,18 +1296,12 @@
<EmbeddedResource Include="MonoDevelop.Ide.WelcomePage\icons\open_solution.png">
<LogicalName>open_solution.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\locale-16.png">
- <LogicalName>locale-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\light\link-overlay-16.png">
<LogicalName>link-overlay-light-16.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\link-overlay-16%402x.png">
<LogicalName>link-overlay-light-16@2x.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\sdk-locations-16.png">
- <LogicalName>sdk-locations-16.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\light\pad-error-list-16.png">
<LogicalName>pad-error-list-light-16.png</LogicalName>
</EmbeddedResource>
@@ -1295,6 +1365,36 @@
<EmbeddedResource Include="icons\light\element-variable-16%402x.png">
<LogicalName>element-variable-light-16@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-exception-16.png">
+ <LogicalName>element-exception-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-exception-16%402x.png">
+ <LogicalName>element-exception-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-fs-field-16.png">
+ <LogicalName>element-fs-field-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-fs-field-16%402x.png">
+ <LogicalName>element-fs-field-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-module-16.png">
+ <LogicalName>element-module-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-module-16%402x.png">
+ <LogicalName>element-module-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-other-declaration-16.png">
+ <LogicalName>element-other-declaration-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-other-declaration-16%402x.png">
+ <LogicalName>element-other-declaration-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-type-16.png">
+ <LogicalName>element-type-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\element-type-16%402x.png">
+ <LogicalName>element-type-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
<EmbeddedResource Include="icons\light\file-source-16.png">
<LogicalName>file-source-light-16.png</LogicalName>
</EmbeddedResource>
@@ -1451,24 +1551,18 @@
<EmbeddedResource Include="icons\light\add-16%402x.png">
<LogicalName>add-light-16@2x.png</LogicalName>
</EmbeddedResource>
- <EmbeddedResource Include="icons\light\bubble-error-16.png">
- <LogicalName>bubble-error-light-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\light\bubble-error-16%402x.png">
- <LogicalName>bubble-error-light-16@2x.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\light\bubble-warning-16.png">
- <LogicalName>bubble-warning-light-16.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="icons\light\bubble-warning-16%402x.png">
- <LogicalName>bubble-warning-light-16@2x.png</LogicalName>
- </EmbeddedResource>
<EmbeddedResource Include="icons\light\warning-overlay-9.png">
<LogicalName>warning-overlay-light-9.png</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icons\light\warning-overlay-9%402x.png">
<LogicalName>warning-overlay-light-9@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\warning-8.png">
+ <LogicalName>warning-light-8.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\warning-8%402x.png">
+ <LogicalName>warning-light-8@2x.png</LogicalName>
+ </EmbeddedResource>
<EmbeddedResource Include="icons\light\warning-16.png">
<LogicalName>warning-light-16.png</LogicalName>
</EmbeddedResource>
@@ -1523,6 +1617,12 @@
<EmbeddedResource Include="icons\light\done-16%402x.png">
<LogicalName>done-light-16@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\edit-16.png">
+ <LogicalName>edit-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\edit-16%402x.png">
+ <LogicalName>edit-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
<EmbeddedResource Include="icons\light\star-16.png">
<LogicalName>star-light-16.png</LogicalName>
</EmbeddedResource>
@@ -1583,6 +1683,273 @@
<EmbeddedResource Include="icons\light\properties-16%402x.png">
<LogicalName>properties-light-16@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-load-save-16.png">
+ <LogicalName>prefs-load-save-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-load-save-16%402x.png">
+ <LogicalName>prefs-load-save-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-code-formatting-16.png">
+ <LogicalName>prefs-code-formatting-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-code-formatting-16%402x.png">
+ <LogicalName>prefs-code-formatting-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-language-16.png">
+ <LogicalName>prefs-language-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-language-16%402x.png">
+ <LogicalName>prefs-language-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-key-bindings-16.png">
+ <LogicalName>prefs-key-bindings-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-key-bindings-16%402x.png">
+ <LogicalName>prefs-key-bindings-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-fonts-16.png">
+ <LogicalName>prefs-fonts-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-fonts-16%402x.png">
+ <LogicalName>prefs-fonts-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-author-information-16.png">
+ <LogicalName>prefs-author-information-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-author-information-16%402x.png">
+ <LogicalName>prefs-author-information-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-sdk-locations-16.png">
+ <LogicalName>prefs-sdk-locations-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-sdk-locations-16%402x.png">
+ <LogicalName>prefs-sdk-locations-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-external-tools-16.png">
+ <LogicalName>prefs-external-tools-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-external-tools-16%402x.png">
+ <LogicalName>prefs-external-tools-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-build-16.png">
+ <LogicalName>prefs-build-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-build-16%402x.png">
+ <LogicalName>prefs-build-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-play-16.png">
+ <LogicalName>prefs-play-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-play-16%402x.png">
+ <LogicalName>prefs-play-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-updates-16.png">
+ <LogicalName>prefs-updates-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-updates-16%402x.png">
+ <LogicalName>prefs-updates-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-task-list-16.png">
+ <LogicalName>prefs-task-list-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-task-list-16%402x.png">
+ <LogicalName>prefs-task-list-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-generic-16.png">
+ <LogicalName>prefs-generic-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-generic-16%402x.png">
+ <LogicalName>prefs-generic-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-csharp-16.png">
+ <LogicalName>prefs-csharp-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-csharp-16%402x.png">
+ <LogicalName>prefs-csharp-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-standard-header-16.png">
+ <LogicalName>prefs-standard-header-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-standard-header-16%402x.png">
+ <LogicalName>prefs-standard-header-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-dotnet-naming-policies-16.png">
+ <LogicalName>prefs-dotnet-naming-policies-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-dotnet-naming-policies-16%402x.png">
+ <LogicalName>prefs-dotnet-naming-policies-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-code-templates-16.png">
+ <LogicalName>prefs-code-templates-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-code-templates-16%402x.png">
+ <LogicalName>prefs-code-templates-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-name-conventions-16.png">
+ <LogicalName>prefs-name-conventions-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\prefs-name-conventions-16%402x.png">
+ <LogicalName>prefs-name-conventions-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\copy-16.png">
+ <LogicalName>copy-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\copy-16%402x.png">
+ <LogicalName>copy-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\find-16.png">
+ <LogicalName>find-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\find-16%402x.png">
+ <LogicalName>find-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\find-and-replace-16.png">
+ <LogicalName>find-and-replace-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\find-and-replace-16%402x.png">
+ <LogicalName>find-and-replace-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-back-16.png">
+ <LogicalName>go-back-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-back-16%402x.png">
+ <LogicalName>go-back-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-down-16.png">
+ <LogicalName>go-down-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-down-16%402x.png">
+ <LogicalName>go-down-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-forward-16.png">
+ <LogicalName>go-forward-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-forward-16%402x.png">
+ <LogicalName>go-forward-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-up-16.png">
+ <LogicalName>go-up-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\go-up-16%402x.png">
+ <LogicalName>go-up-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\undo-16.png">
+ <LogicalName>undo-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\undo-16%402x.png">
+ <LogicalName>undo-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\home-16.png">
+ <LogicalName>home-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\home-16%402x.png">
+ <LogicalName>home-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\jump-to-16.png">
+ <LogicalName>jump-to-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\jump-to-16%402x.png">
+ <LogicalName>jump-to-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\media-play-16.png">
+ <LogicalName>media-play-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\media-play-16%402x.png">
+ <LogicalName>media-play-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\missing-image-16.png">
+ <LogicalName>missing-image-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\missing-image-16%402x.png">
+ <LogicalName>missing-image-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\open-16.png">
+ <LogicalName>open-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\refresh-16.png">
+ <LogicalName>refresh-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\refresh-16%402x.png">
+ <LogicalName>refresh-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\save-16.png">
+ <LogicalName>save-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\save-all-16.png">
+ <LogicalName>save-all-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\zoom-in-16.png">
+ <LogicalName>zoom-in-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\zoom-in-16%402x.png">
+ <LogicalName>zoom-in-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\zoom-out-16.png">
+ <LogicalName>zoom-out-light-16.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\zoom-out-16%402x.png">
+ <LogicalName>zoom-out-light-16@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-1.png">
+ <LogicalName>spinner-light-14-1.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-1%402x.png">
+ <LogicalName>spinner-light-14-1@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-2.png">
+ <LogicalName>spinner-light-14-2.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-2%402x.png">
+ <LogicalName>spinner-light-14-2@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-3.png">
+ <LogicalName>spinner-light-14-3.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-3%402x.png">
+ <LogicalName>spinner-light-14-3@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-4.png">
+ <LogicalName>spinner-light-14-4.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-4%402x.png">
+ <LogicalName>spinner-light-14-4@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-5.png">
+ <LogicalName>spinner-light-14-5.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-14-5%402x.png">
+ <LogicalName>spinner-light-14-5@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-1.png">
+ <LogicalName>spinner-light-18-1.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-1%402x.png">
+ <LogicalName>spinner-light-18-1@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-2.png">
+ <LogicalName>spinner-light-18-2.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-2%402x.png">
+ <LogicalName>spinner-light-18-2@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-3.png">
+ <LogicalName>spinner-light-18-3.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-3%402x.png">
+ <LogicalName>spinner-light-18-3@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-4.png">
+ <LogicalName>spinner-light-18-4.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-4%402x.png">
+ <LogicalName>spinner-light-18-4@2x.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-5.png">
+ <LogicalName>spinner-light-18-5.png</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="icons\light\spinner-18-5%402x.png">
+ <LogicalName>spinner-light-18-5@2x.png</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="MonoDevelop.Ide.Commands\CustomStringTagProvider.cs" />
@@ -1752,7 +2119,7 @@
<Compile Include="MonoDevelop.Ide.Gui.Components\TreeOptions.cs" />
<Compile Include="MonoDevelop.Ide.Gui.Components\TransactedTreeBuilder.cs" />
<Compile Include="MonoDevelop.Ide.Gui.Content\INavigable.cs" />
- <Compile Include="MonoDevelop.Ide.Gui.Content\IUrlHandler.cs" />
+ <Compile Include="MonoDevelop.Ide.Gui.Content\IOpenNamedElementHandler.cs" />
<Compile Include="MonoDevelop.Ide.Gui.Content\ISmartIndenter.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="MonoDevelop.Ide.Gui.Content\ITextEditorResolver.cs" />
@@ -2158,7 +2525,6 @@
<Compile Include="MonoDevelop.Components.Extensions\TextQuestionDialog.cs" />
<Compile Include="MonoDevelop.Components.Extensions\ErrorDialog.cs" />
<Compile Include="MonoDevelop.Ide.Gui.Dialogs\GtkErrorDialog.cs" />
- <Compile Include="MonoDevelop.Components\ImageLoader.cs" />
<Compile Include="MonoDevelop.Ide.CodeFormatting\ICodeFormatter.cs" />
<Compile Include="MonoDevelop.Ide.CodeFormatting\IAdvancedCodeFormatter.cs" />
<Compile Include="MonoDevelop.Ide.CodeFormatting\DefaultCodeFormatter.cs" />
@@ -2171,8 +2537,6 @@
<Compile Include="MonoDevelop.Ide.Extensions\StartupHandlerExtensionAttribute.cs" />
<Compile Include="MonoDevelop.Ide.FindInFiles\ReferencesFinder.cs" />
<Compile Include="MonoDevelop.Components\SectionList.cs" />
- <Compile Include="MonoDevelop.Ide.OnlineTemplates\OnlineTemplateService.cs" />
- <Compile Include="MonoDevelop.Ide.OnlineTemplates\ProjectTemplateIndex.cs" />
<Compile Include="MonoDevelop.Ide.Projects\TemplatePickerWidget.cs" />
<Compile Include="MonoDevelop.Ide.Projects\NewProjectOptionsWidget.cs" />
<Compile Include="MonoDevelop.Ide.Extensions\FileTypeCondition.cs" />
@@ -2436,6 +2800,11 @@
<Compile Include="MonoDevelop.Ide.Editor\TextLinkModeOptions.cs" />
<Compile Include="MonoDevelop.Ide.Editor.Extension\AbstractEditorExtension.cs" />
<Compile Include="MonoDevelop.Ide.Editor.Extension\CompletionTextEditorExtension.cs" />
+ <Compile Include="MonoDevelop.Ide.Gui.Pads.ProjectPad\SapNodeBuilder.cs" />
+ <Compile Include="MonoDevelop.Ide.CustomTools\PublicResXFileCodeGenerator.cs" />
+ <Compile Include="MonoDevelop.Components\ImageLoader.cs" />
+ <Compile Include="MonoDevelop.Components\Mac\GtkMacInterop.cs" />
+ <Compile Include="MonoDevelop.Components\Control.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Makefile.am" />
@@ -2466,7 +2835,6 @@
<Folder Include="MonoDevelop.Ide\" />
<Folder Include="MonoDevelop.Ide.Gui.Dialogs\" />
<Folder Include="MonoDevelop.Ide.Projects.OptionPanels\" />
- <Folder Include="MonoDevelop.Ide.NavigateToDialog\" />
<Folder Include="MonoDevelop.Ide.Navigation\" />
<Folder Include="MonoDevelop.Components.AutoTest\" />
<Folder Include="MonoDevelop.Ide.Fonts\" />
@@ -2493,5 +2861,8 @@
<Content Include="gtkrc">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="gtkrc.win32-vista">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
</ItemGroup>
</Project>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs
index 5b40dbd623..97de83cfeb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs
@@ -32,6 +32,7 @@ using MonoDevelop.Core;
using System.IO;
using MonoDevelop.Components;
using MonoDevelop.Components.MainToolbar;
+using MonoDevelop.Ide.Fonts;
namespace MonoDevelop.Ide
{
@@ -42,9 +43,8 @@ namespace MonoDevelop.Ide
static PlatformService PlatformService {
get {
- if (platformService == null) {
- Initialize ();
- }
+ if (platformService == null)
+ throw new InvalidOperationException ("Not initialized");
return platformService;
}
}
@@ -71,6 +71,8 @@ namespace MonoDevelop.Ide
// Ensure we initialize the native toolkit on the UI thread immediately
// so that we can safely access this property later in other threads
GC.KeepAlive (NativeToolkit);
+
+ FontService.Initialize ();
}
/// <summary>
@@ -89,7 +91,8 @@ namespace MonoDevelop.Ide
{
return PlatformService.GetApplications (filename);
}
-
+
+ [Obsolete ("Use FontService")]
public static string DefaultMonospaceFont {
get { return PlatformService.DefaultMonospaceFont; }
}
@@ -189,6 +192,12 @@ namespace MonoDevelop.Ide
return PlatformService.GetIconForType (mimeType).WithSize (size);
}
+ public static bool ShowContextMenu (MonoDevelop.Components.Commands.CommandManager commandManager,
+ Gtk.Widget widget, double x, double y, MonoDevelop.Components.Commands.CommandEntrySet entrySet, object initialCommandTarget = null)
+ {
+ return PlatformService.ShowContextMenu (commandManager, widget, x, y, entrySet, initialCommandTarget);
+ }
+
public static bool SetGlobalMenu (MonoDevelop.Components.Commands.CommandManager commandManager,
string commandMenuAddinPath, string appMenuAddinPath)
{
@@ -218,12 +227,6 @@ namespace MonoDevelop.Ide
}
}
- [Obsolete ("Use OpenTerminal")]
- public static void OpenInTerminal (FilePath directory)
- {
- OpenTerminal (directory, null, null);
- }
-
/// <summary>
/// Opens an external terminal window.
/// </summary>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/FeedbackService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/FeedbackService.cs
index e4724d6217..32e4e54210 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/FeedbackService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/FeedbackService.cs
@@ -34,6 +34,7 @@ using MonoDevelop.Ide.Extensions;
using System.Reflection;
using System.Linq;
using Mono.Addins;
+using System.Threading.Tasks;
namespace MonoDevelop.Ide
{
@@ -174,24 +175,24 @@ namespace MonoDevelop.Ide
{
string email = feedbackElem.GetAttribute ("email");
string body = feedbackElem.InnerText;
- var request = (HttpWebRequest) HttpWebRequest.Create (feedbackUrl.Value + "?m=" + email);
- request.Method = "POST";
- request.BeginGetRequestStream (delegate (IAsyncResult res) {
- HandleGetRequestStream (res, request, body);
- }, null);
+
+ WebRequestHelper.GetResponseAsync (
+ () => (HttpWebRequest)WebRequest.Create (feedbackUrl.Value + "?m=" + email),
+ r => {
+ r.Method = "POST";
+ using (var sw = new StreamWriter (r.GetRequestStream ())) {
+ sw.Write (body);
+ }
+ }
+ ).ContinueWith (HandleResponse);
}
- static void HandleGetRequestStream (IAsyncResult res, HttpWebRequest request, string body)
+ static void HandleResponse (Task<HttpWebResponse> t)
{
try {
- Stream s = request.EndGetRequestStream (res);
- using (var sw = new StreamWriter (s)) {
- sw.Write (body);
- }
- WebResponse resp = request.GetResponse ();
- s = resp.GetResponseStream ();
+ WebResponse resp = t.Result;
string result;
- using (var sr = new StreamReader (s))
+ using (var sr = new StreamReader (resp.GetResponseStream ()))
result = sr.ReadToEnd ();
if (result != "OK")
throw new Exception (result);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs
index 373075661a..648180e7c6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/Ide.cs
@@ -58,7 +58,6 @@ namespace MonoDevelop.Ide
static IdeServices ideServices;
static RootWorkspace workspace;
static IdePreferences preferences;
- static IdeCustomizer customizer;
public const int CurrentRevision = 5;
@@ -283,8 +282,10 @@ namespace MonoDevelop.Ide
}
}
- if (initializedEvent != null)
+ if (initializedEvent != null) {
initializedEvent (null, EventArgs.Empty);
+ initializedEvent = null;
+ }
// load previous combine
if ((bool)PropertyService.Get("SharpDevelop.LoadPrevProjectOnStartup", false)) {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs
index a5260314d2..00e54c306a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdePreferences.cs
@@ -75,18 +75,6 @@ namespace MonoDevelop.Ide
});
}
- [Obsolete ("Default format cannot be customized globally")]
- public string DefaultProjectFileFormat {
- get { return Services.ProjectService.DefaultFileFormatId; }
- set { throw new InvalidOperationException (); }
- }
-
- [Obsolete ("Default format does not change")]
- public event EventHandler<PropertyChangedEventArgs> DefaultProjectFileFormatChanged {
- add { /* nop */ }
- remove { /* nop */ }
- }
-
public bool LoadPrevSolutionOnStartup {
get { return PropertyService.Get ("SharpDevelop.LoadPrevProjectOnStartup", false); }
set { PropertyService.Set ("SharpDevelop.LoadPrevProjectOnStartup", value); }
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
index 686a630d27..8e1322204e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs
@@ -348,6 +348,9 @@ namespace MonoDevelop.Ide
var gtkrc = "gtkrc";
if (Platform.IsWindows) {
gtkrc += ".win32";
+ var osv = Environment.OSVersion.Version;
+ if (osv.Major == 6 && osv.Minor < 1)
+ gtkrc += "-vista";
} else if (Platform.IsMac) {
gtkrc += ".mac";
}
@@ -458,11 +461,11 @@ namespace MonoDevelop.Ide
continue;
file += c;
}
- GLib.Idle.Add (delegate(){ return openFile (file); });
+ GLib.Idle.Add (() => OpenFile (file));
}
}
- bool openFile (string file)
+ static bool OpenFile (string file)
{
if (string.IsNullOrEmpty (file))
return false;
@@ -485,7 +488,7 @@ namespace MonoDevelop.Ide
MonoDevelop.Projects.Services.ProjectService.IsSolutionItemFile (file)) {
IdeApp.Workspace.OpenWorkspaceItem (file);
} else {
- IdeApp.Workbench.OpenDocument (file, line, column);
+ IdeApp.Workbench.OpenDocument (file, null, line, column, OpenDocumentOptions.DefaultInternal);
}
} catch {
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs
index d889447725..f1a451bf2d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ImageService.cs
@@ -12,10 +12,10 @@
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -35,11 +35,16 @@ using MonoDevelop.Components;
using System.Text;
using System.Linq;
using MonoDevelop.Ide.Gui.Components;
+using System.Threading.Tasks;
+using System.Net;
+using Xwt.Backends;
namespace MonoDevelop.Ide
{
public static class ImageService
{
+ const string IconsExtensionPath = "/MonoDevelop/Core/StockIcons";
+
static Gtk.IconFactory iconFactory = new Gtk.IconFactory ();
// Mapping of icon spec to stock icon id.
@@ -53,21 +58,20 @@ namespace MonoDevelop.Ide
static List<RuntimeAddin> addins = new List<RuntimeAddin> ();
static Dictionary<string, string> composedIcons = new Dictionary<string, string> ();
- static Dictionary<Gdk.Pixbuf, string> namedIcons = new Dictionary<Gdk.Pixbuf, string> ();
// Dictionary of extension nodes by stock icon id. It holds nodes that have not yet been loaded
static Dictionary<string, List<StockIconCodon>> iconStock = new Dictionary<string, List<StockIconCodon>> ();
-
+
static Gtk.Requisition[] iconSizes = new Gtk.Requisition[7];
-
+
static ImageService ()
{
iconFactory.AddDefault ();
IconId.IconNameRequestHandler = delegate (string stockId) {
EnsureStockIconIsLoaded (stockId);
};
-
- AddinManager.AddExtensionNodeHandler ("/MonoDevelop/Core/StockIcons", delegate (object sender, ExtensionNodeEventArgs args) {
+
+ AddinManager.AddExtensionNodeHandler (IconsExtensionPath, delegate (object sender, ExtensionNodeEventArgs args) {
StockIconCodon iconCodon = (StockIconCodon)args.ExtensionNode;
switch (args.Change) {
case ExtensionChange.Add:
@@ -77,7 +81,7 @@ namespace MonoDevelop.Ide
break;
}
});
-
+
for (int i = 0; i < iconSizes.Length; i++) {
int w, h;
if (!Gtk.Icon.SizeLookup ((Gtk.IconSize)i, out w, out h))
@@ -88,51 +92,74 @@ namespace MonoDevelop.Ide
if (Platform.IsWindows) {
iconSizes[(int)Gtk.IconSize.Menu].Width = 16;
iconSizes[(int)Gtk.IconSize.Menu].Height = 16;
- }
+ }
+
+ // Preload icons defined in MD.Ide. Ensures that the gtk icon overrides are available.
+ var current = AddinManager.CurrentAddin;
+ foreach (var id in AddinManager.GetExtensionNodes (IconsExtensionPath).OfType<StockIconCodon> ().Where (c => c.Addin == current).Select (c => c.StockId).Distinct ())
+ EnsureStockIconIsLoaded (id);
}
-
- static void LoadStockIcon (StockIconCodon iconCodon, bool forceWildcard)
+
+ static Xwt.Drawing.Image LoadStockIcon (StockIconCodon iconCodon, bool forceWildcard)
{
try {
Gdk.Pixbuf pixbuf = null, pixbuf2x = null;
AnimatedIcon animatedIcon = null;
+ Func<Stream[]> imageLoader = null;
if (!string.IsNullOrEmpty (iconCodon.Resource) || !string.IsNullOrEmpty (iconCodon.File)) {
// using the stream directly produces a gdk warning.
byte[] buffer;
- Stream stream, stream2x = null;
if (iconCodon.Resource != null) {
- stream = iconCodon.Addin.GetResource (iconCodon.Resource);
- stream2x = iconCodon.Addin.GetResource2x (iconCodon.Resource);
+ imageLoader = delegate {
+ var stream = iconCodon.Addin.GetResource (iconCodon.Resource);
+ var stream2x = iconCodon.Addin.GetResource2x (iconCodon.Resource);
+ if (stream2x == null)
+ return new [] { stream };
+ else
+ return new [] { stream, stream2x };
+ };
}
else {
- var file = iconCodon.Addin.GetFilePath (iconCodon.File);
- stream = File.OpenRead (file);
- var file2x = Path.Combine (Path.GetDirectoryName (file), Path.GetFileNameWithoutExtension (file) + "@2x" + Path.GetExtension (file));
- if (File.Exists (file2x))
- stream2x = File.OpenRead (file2x);
- else {
- file2x = file + "@2x";
+ imageLoader = delegate {
+ var file = iconCodon.Addin.GetFilePath (iconCodon.File);
+ var stream = File.OpenRead (file);
+ Stream stream2x = null;
+ var file2x = Path.Combine (Path.GetDirectoryName (file), Path.GetFileNameWithoutExtension (file) + "@2x" + Path.GetExtension (file));
if (File.Exists (file2x))
stream2x = File.OpenRead (file2x);
- }
+ else {
+ file2x = file + "@2x";
+ if (File.Exists (file2x))
+ stream2x = File.OpenRead (file2x);
+ }
+ if (stream2x == null)
+ return new [] { stream };
+ else
+ return new [] { stream, stream2x };
+ };
}
- using (stream) {
- if (stream == null || stream.Length < 0) {
- LoggingService.LogError ("Did not find resource '{0}' in addin '{1}' for icon '{2}'",
- iconCodon.Resource, iconCodon.Addin.Id, iconCodon.StockId);
- return;
+ var streams = imageLoader ();
+
+ var st = streams[0];
+ var st2x = streams.Length > 1 ? streams[1] : null;
+
+ using (st) {
+ if (st == null || st.Length < 0) {
+ LoggingService.LogError ("Did not find resource '{0}' in addin '{1}' for icon '{2}'",
+ iconCodon.Resource, iconCodon.Addin.Id, iconCodon.StockId);
+ return null;
}
- buffer = new byte [stream.Length];
- stream.Read (buffer, 0, (int)stream.Length);
+ buffer = new byte [st.Length];
+ st.Read (buffer, 0, (int)st.Length);
}
pixbuf = new Gdk.Pixbuf (buffer);
- using (stream2x) {
- if (stream2x != null && stream2x.Length >= 0) {
- buffer = new byte [stream2x.Length];
- stream2x.Read (buffer, 0, (int)stream2x.Length);
+ using (st2x) {
+ if (st2x != null && st2x.Length >= 0) {
+ buffer = new byte [st2x.Length];
+ st2x.Read (buffer, 0, (int)st2x.Length);
pixbuf2x = new Gdk.Pixbuf (buffer);
}
}
@@ -157,8 +184,18 @@ namespace MonoDevelop.Ide
if (animatedIcon != null)
AddToAnimatedIconFactory (iconCodon.StockId, animatedIcon);
+ var img = Xwt.Toolkit.CurrentEngine.WrapImage (pixbuf);
+ if (pixbuf2x != null) {
+ var img2x = Xwt.Toolkit.CurrentEngine.WrapImage (pixbuf2x);
+ img = Xwt.Drawing.Image.CreateMultiResolutionImage (new [] { img, img2x });
+ }
+ if (imageLoader != null)
+ img.SetStreamSource (imageLoader);
+ return img;
+
} catch (Exception ex) {
LoggingService.LogError (string.Format ("Error loading icon '{0}'", iconCodon.StockId), ex);
+ return null;
}
}
@@ -171,7 +208,7 @@ namespace MonoDevelop.Ide
{
return GtkWorkarounds.Get2xVariant (px);
}
-
+
static void Set2xIconVariant (Gdk.Pixbuf px, Gdk.Pixbuf variant2x)
{
GtkWorkarounds.Set2xVariant (px, variant2x);
@@ -195,7 +232,7 @@ namespace MonoDevelop.Ide
Xwt.Drawing.Image img;
if (icons.TryGetValue (name, out img))
- return img;
+ return img;
if (string.IsNullOrEmpty (name)) {
LoggingService.LogWarning ("Empty icon requested. Stack Trace: " + Environment.NewLine + Environment.StackTrace);
@@ -211,6 +248,10 @@ namespace MonoDevelop.Ide
EnsureStockIconIsLoaded (name);
+ // Try again since it may have already been registered
+ if (icons.TryGetValue (name, out img))
+ return img;
+
Gtk.IconSet iconset = Gtk.IconFactory.LookupDefault (name);
if (iconset == null && !Gtk.IconTheme.Default.HasIcon (name) && generateDefaultIcon) {
LoggingService.LogWarning ("Unknown icon: " + name);
@@ -241,11 +282,11 @@ namespace MonoDevelop.Ide
LoggingService.LogWarning ("Can't get stock id for " + name + " : " + Environment.NewLine + Environment.StackTrace);
return CreateColorBlock ("#FF0000", size);
}
-
+
Gtk.IconSet iconset = Gtk.IconFactory.LookupDefault (stockid);
- if (iconset != null)
+ if (iconset != null)
return iconset.RenderIcon (Gtk.Widget.DefaultStyle, Gtk.TextDirection.Ltr, Gtk.StateType.Normal, size, null, null);
-
+
if (Gtk.IconTheme.Default.HasIcon (stockid)) {
int h = iconSizes[(int)size].Height;
Gdk.Pixbuf result = Gtk.IconTheme.Default.LoadIcon (stockid, h, (Gtk.IconLookupFlags)0);
@@ -257,35 +298,7 @@ namespace MonoDevelop.Ide
}
return null;
}
-
- static Dictionary<string,ImageLoader> userIcons = new Dictionary<string, ImageLoader> ();
- public static ImageLoader GetUserIcon (string email, int size)
- {
- string key = email + size;
- ImageLoader img;
- if (!userIcons.TryGetValue (key, out img)) {
- var md5 = System.Security.Cryptography.MD5.Create ();
- byte[] hash = md5.ComputeHash (Encoding.UTF8.GetBytes (email.Trim ().ToLower ()));
- StringBuilder sb = new StringBuilder ();
- foreach (byte b in hash)
- sb.Append (b.ToString ("x2"));
- string url = "http://www.gravatar.com/avatar/" + sb.ToString () + "?d=mm&s=" + size;
- userIcons [key] = img = new ImageLoader (url);
- }
- return img;
- }
-
- public static void LoadUserIcon (this Gtk.Image image, string email, int size)
- {
- image.WidthRequest = size;
- image.HeightRequest = size;
- ImageLoader loader = GetUserIcon (email, size);
- loader.LoadOperation.Completed += delegate {
- image.Pixbuf = loader.Image.ToPixbuf ();
- };
- }
-
internal static void EnsureStockIconIsLoaded (string stockId)
{
if (string.IsNullOrEmpty (stockId))
@@ -293,6 +306,7 @@ namespace MonoDevelop.Ide
List<StockIconCodon> stockIcon;
if (iconStock.TryGetValue (stockId, out stockIcon)) {
+ var frames = new List<Xwt.Drawing.Image> ();
//determine whether there's a wildcarded image
bool hasWildcard = false;
foreach (var i in stockIcon) {
@@ -301,7 +315,9 @@ namespace MonoDevelop.Ide
}
//load all the images
foreach (var i in stockIcon) {
- LoadStockIcon (i, false);
+ var si = LoadStockIcon (i, false);
+ if (si != null)
+ frames.Add (si);
}
//if there's no wildcard, find the "biggest" version and make it a wildcard
if (!hasWildcard) {
@@ -315,10 +331,13 @@ namespace MonoDevelop.Ide
}
// LoggingService.LogWarning ("Stock icon '{0}' registered without wildcarded version.", stockId);
LoadStockIcon (stockIcon[biggest], true);
-
+
}
// Icon loaded, it can be removed from the pending icon collection
iconStock.Remove (stockId);
+
+ if (frames.Count > 0)
+ icons [stockId] = Xwt.Drawing.Image.CreateMultiSizeIcon (frames);
}
}
@@ -420,7 +439,7 @@ namespace MonoDevelop.Ide
val = (val << 8) | 0xff;
return true;
}
-
+
public static Gtk.Image GetImage (string name, Gtk.IconSize size)
{
var img = new Gtk.Image ();
@@ -433,18 +452,6 @@ namespace MonoDevelop.Ide
return InternalGetStockIdFromResource (addin, id);
}
*/
-
- [Obsolete ("Easy to misuse and leak memory. Register icon properly, or use pixbuf directly.")]
- public static string GetStockId (Gdk.Pixbuf pixbuf, Gtk.IconSize size)
- {
- string id;
- if (namedIcons.TryGetValue (pixbuf, out id))
- return id;
- id = "__ni_" + namedIcons.Count;
- namedIcons[pixbuf] = id;
- AddToIconFactory (id, pixbuf, null, size);
- return id;
- }
public static string GetStockId (string filename)
{
@@ -454,7 +461,7 @@ namespace MonoDevelop.Ide
{
return GetStockIdForImageSpec (filename, iconSize);
}
-
+
public static string GetStockId (RuntimeAddin addin, string filename)
{
return GetStockId (addin, filename, Gtk.IconSize.Invalid);
@@ -463,7 +470,7 @@ namespace MonoDevelop.Ide
{
return GetStockIdForImageSpec (addin, filename, iconSize);
}
-
+
static void AddToIconFactory (string stockId, Gdk.Pixbuf pixbuf, Gdk.Pixbuf pixbuf2x, Gtk.IconSize iconSize)
{
Gtk.IconSet iconSet = iconFactory.Lookup (stockId);
@@ -475,7 +482,13 @@ namespace MonoDevelop.Ide
Gtk.IconSource source = new Gtk.IconSource ();
Gtk.IconSource source2x = null;
- source.Pixbuf = pixbuf;
+ if (Platform.IsWindows) {
+ var pixel_scale = Mono.TextEditor.GtkWorkarounds.GetPixelScale ();
+ source.Pixbuf = pixbuf.ScaleSimple ((int)(pixbuf.Width * pixel_scale), (int)(pixbuf.Height * pixel_scale), Gdk.InterpType.Bilinear);
+ } else {
+ source.Pixbuf = pixbuf;
+ }
+
source.Size = iconSize;
source.SizeWildcarded = iconSize == Gtk.IconSize.Invalid;
@@ -505,7 +518,7 @@ namespace MonoDevelop.Ide
static string InternalGetStockIdFromResource (RuntimeAddin addin, string id, Gtk.IconSize size)
{
- if (!id.StartsWith ("res:"))
+ if (!id.StartsWith ("res:", StringComparison.Ordinal))
return id;
id = id.Substring (4);
@@ -539,12 +552,12 @@ namespace MonoDevelop.Ide
stream = addin.GetResource (id + "@2x");
return stream;
}
-
+
static string InternalGetStockIdFromAnimation (RuntimeAddin addin, string id, Gtk.IconSize size)
{
if (!id.StartsWith ("animation:"))
return id;
-
+
id = id.Substring (10);
Dictionary<string, string> hash;
int addinId;
@@ -604,7 +617,7 @@ namespace MonoDevelop.Ide
continue;
}
- if (icon.Width != px.Width || icon.Height != px.Height)
+ if (icon.Width != px.Width || icon.Height != px.Height)
px = px.WithSize (icon.Width, icon.Height);
ib.Context.DrawImage (px, 0, 0);
@@ -749,6 +762,59 @@ namespace MonoDevelop.Ide
ainfo.Dispose ();
animatedImages.RemoveAll (a => (AnimatedImageInfo)a.Target == ainfo);
}
+
+ //TODO: size-limit the in-memory cache
+ //TODO: size-limit the on-disk cache
+ static Dictionary<string,ImageLoader> gravatars = new Dictionary<string,ImageLoader> ();
+
+ public static ImageLoader GetUserIcon (string email, int size, Xwt.Screen screen = null)
+ {
+
+ if (screen == null) {
+ screen = Xwt.Desktop.PrimaryScreen;
+ }
+
+ //only support integer scaling for now
+ var scaleFactor = (int) screen.ScaleFactor;
+ size = size * scaleFactor;
+
+ var hash = GetMD5Hash (email);
+ string key = hash + "@" + size + "x" + size;
+
+ if (scaleFactor != 1) {
+ key += "x" + scaleFactor;
+ }
+
+ ImageLoader loader;
+ if (!gravatars.TryGetValue (key, out loader) || (!loader.Downloading && loader.Image == null)) {
+ var cacheFile = UserProfile.Current.TempDir.Combine ("Gravatars", key);
+ string url = "https://www.gravatar.com/avatar/" + hash + "?d=404&s=" + size;
+ gravatars[key] = loader = new ImageLoader (cacheFile, url, scaleFactor);
+ }
+
+ return loader;
+ }
+
+ static string GetMD5Hash (string email)
+ {
+ var md5 = System.Security.Cryptography.MD5.Create ();
+ byte[] hash = md5.ComputeHash (Encoding.UTF8.GetBytes (email.Trim ().ToLower ()));
+ StringBuilder sb = new StringBuilder ();
+ foreach (byte b in hash)
+ sb.Append (b.ToString ("x2"));
+ return sb.ToString ();
+ }
+
+ public static void LoadUserIcon (this Gtk.Image image, string email, int size)
+ {
+ image.WidthRequest = size;
+ image.HeightRequest = size;
+ ImageLoader gravatar = GetUserIcon (email, size);
+ gravatar.Completed += delegate {
+ if (gravatar.Image != null)
+ image.Pixbuf = gravatar.Image.ToPixbuf ();
+ };
+ }
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
index 61039ebbf2..c781988a7a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
@@ -179,7 +179,7 @@ namespace MonoDevelop.Ide
public static AlertButton ShowException (Gtk.Window parent, Exception e, string message, string title, params AlertButton[] buttons)
{
if (!IdeApp.IsInitialized)
- throw new Exception ("IdeApp has not been initialized. Progagating the exception.", e);
+ throw new Exception ("IdeApp has not been initialized. Propagating the exception.", e);
return messageService.ShowException (parent, title, message, e, buttons);
}
#endregion
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
index 24c74a2250..6fff680ea8 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/ProjectOperations.cs
@@ -803,30 +803,32 @@ namespace MonoDevelop.Ide
if (!IdeApp.Workspace.RequestItemUnload (prj))
return;
ConfirmProjectDeleteDialog dlg = new ConfirmProjectDeleteDialog (prj);
- if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
-
- // Remove the project before removing the files to avoid unnecessary events
- RemoveItemFromSolution (prj);
-
- List<FilePath> files = dlg.GetFilesToDelete ();
- dlg.Destroy ();
- using (IProgressMonitor monitor = new MessageDialogProgressMonitor (true)) {
- monitor.BeginTask (GettextCatalog.GetString ("Deleting Files..."), files.Count);
- foreach (FilePath file in files) {
- try {
- if (Directory.Exists (file))
- FileService.DeleteDirectory (file);
- else
- FileService.DeleteFile (file);
- } catch (Exception ex) {
- monitor.ReportError (GettextCatalog.GetString ("The file or directory '{0}' could not be deleted.", file), ex);
+ try {
+ if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
+
+ // Remove the project before removing the files to avoid unnecessary events
+ RemoveItemFromSolution (prj);
+
+ List<FilePath> files = dlg.GetFilesToDelete ();
+ using (IProgressMonitor monitor = new MessageDialogProgressMonitor (true)) {
+ monitor.BeginTask (GettextCatalog.GetString ("Deleting Files..."), files.Count);
+ foreach (FilePath file in files) {
+ try {
+ if (Directory.Exists (file))
+ FileService.DeleteDirectory (file);
+ else
+ FileService.DeleteFile (file);
+ } catch (Exception ex) {
+ monitor.ReportError (GettextCatalog.GetString ("The file or directory '{0}' could not be deleted.", file), ex);
+ }
+ monitor.Step (1);
}
- monitor.Step (1);
+ monitor.EndTask ();
}
- monitor.EndTask ();
}
- } else
+ } finally {
dlg.Destroy ();
+ }
}
else if (result == AlertButton.Remove && IdeApp.Workspace.RequestItemUnload (prj)) {
RemoveItemFromSolution (prj);
@@ -1027,7 +1029,7 @@ namespace MonoDevelop.Ide
public bool CanExecuteFile (string file, IExecutionHandler handler)
{
- ExecutionContext context = new ExecutionContext (handler, IdeApp.Workbench.ProgressMonitors);
+ ExecutionContext context = new ExecutionContext (handler, IdeApp.Workbench.ProgressMonitors, IdeApp.Workspace.ActiveExecutionTarget);
return CanExecuteFile (file, context);
}
@@ -1049,7 +1051,7 @@ namespace MonoDevelop.Ide
public IAsyncOperation ExecuteFile (string file, IExecutionHandler handler)
{
- ExecutionContext context = new ExecutionContext (handler, IdeApp.Workbench.ProgressMonitors);
+ ExecutionContext context = new ExecutionContext (handler, IdeApp.Workbench.ProgressMonitors, IdeApp.Workspace.ActiveExecutionTarget);
return ExecuteFile (file, context);
}
@@ -1155,6 +1157,8 @@ namespace MonoDevelop.Ide
} catch (Exception ex) {
monitor.ReportError (GettextCatalog.GetString ("Build failed."), ex);
result.AddError ("Build failed. See the build log for details.");
+ if (result.SourceTarget == null)
+ result.SourceTarget = entry;
} finally {
tt.Trace ("Done building");
}
@@ -1776,7 +1780,7 @@ namespace MonoDevelop.Ide
// a reference to the folder, so it is not deleted from the tree.
if (removeFromSource && sourceProject != null && pfolder.CanonicalPath != sourceProject.BaseDirectory.CanonicalPath && pfolder.IsChildPathOf (sourceProject.BaseDirectory)) {
pfolder = pfolder.ToRelative (sourceProject.BaseDirectory);
- if (!sourceProject.Files.GetFilesInVirtualPath (pfolder).Any ()) {
+ if (!sourceProject.Files.GetFilesInVirtualPath (pfolder).Any () && sourceProject.Files.GetFileWithVirtualPath (pfolder) == null) {
var folderFile = new ProjectFile (sourceProject.BaseDirectory.Combine (pfolder));
folderFile.Subtype = Subtype.Directory;
sourceProject.Files.Add (folderFile);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
index 34a48c16d0..2a26de38a5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
@@ -263,6 +263,7 @@ namespace MonoDevelop.Ide
}
}
+ [Obsolete("Use GetProjectsContainingFile() (plural) instead")]
public Project GetProjectContainingFile (string fileName)
{
foreach (WorkspaceItem it in Items) {
@@ -272,7 +273,16 @@ namespace MonoDevelop.Ide
}
return null;
}
-
+
+ public IEnumerable<Project> GetProjectsContainingFile (string fileName)
+ {
+ foreach (WorkspaceItem it in Items) {
+ foreach (Project p in it.GetProjectsContainingFile (fileName)) {
+ yield return p;
+ }
+ }
+ }
+
#endregion
#region Build and run operations
@@ -347,7 +357,7 @@ namespace MonoDevelop.Ide
{
BuildResult result = null;
List<WorkspaceItem> items = new List<WorkspaceItem> (Items);
- foreach (WorkspaceItem it in items) {
+ foreach (WorkspaceItem it in items.Where (i => i.SupportsTarget (target))) {
BuildResult res = it.RunTarget (monitor, target, configuration);
if (res != null) {
if (result == null)
@@ -358,6 +368,15 @@ namespace MonoDevelop.Ide
return result;
}
+ bool IBuildTarget.SupportsTarget (string target)
+ {
+ foreach (WorkspaceItem it in Items.ToArray ()) {
+ if (it.SupportsTarget (target))
+ return true;
+ }
+ return false;
+ }
+
public void Execute (IProgressMonitor monitor, ExecutionContext context, ConfigurationSelector configuration)
{
Solution sol = IdeApp.ProjectOperations.CurrentSelectedSolution;
@@ -487,6 +506,7 @@ namespace MonoDevelop.Ide
}
}
Items.Remove (item);
+ item.Dispose ();
}
}
@@ -516,21 +536,29 @@ namespace MonoDevelop.Ide
public IAsyncOperation OpenWorkspaceItem (string filename, bool closeCurrent, bool loadPreferences)
{
+ if (filename.StartsWith ("file://", StringComparison.Ordinal))
+ filename = new Uri(filename).LocalPath;
+
+ var item = GetAllItems<WorkspaceItem> ().FirstOrDefault (w => w.FileName == filename);
+ if (item != null) {
+ IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem = item;
+ IdeApp.Workbench.StatusBar.ShowWarning (GettextCatalog.GetString ("{0} is already opened", item.FileName.FileName));
+ return MonoDevelop.Core.ProgressMonitoring.NullAsyncOperation.Success;
+ }
+
if (closeCurrent) {
if (!Close ())
return MonoDevelop.Core.ProgressMonitoring.NullAsyncOperation.Failure;
}
- if (filename.StartsWith ("file://", StringComparison.Ordinal))
- filename = new Uri(filename).LocalPath;
-
- var monitor = IdeApp.Workbench.ProgressMonitors.GetProjectLoadProgressMonitor (true);
- bool reloading = IsReloading;
+ using (var monitor = IdeApp.Workbench.ProgressMonitors.GetProjectLoadProgressMonitor (true)) {
+ bool reloading = IsReloading;
- DispatchService.BackgroundDispatch (delegate {
- BackgroundLoadWorkspace (monitor, filename, loadPreferences, reloading);
- });
- return monitor.AsyncOperation;
+ DispatchService.BackgroundDispatch (delegate {
+ BackgroundLoadWorkspace (monitor, filename, loadPreferences, reloading);
+ });
+ return monitor.AsyncOperation;
+ }
}
void ReattachDocumentProjects (IEnumerable<string> closedDocs)
@@ -564,14 +592,6 @@ namespace MonoDevelop.Ide
return;
}
- for (int i = 0; i < Items.Count; i++) {
- if (Items[i].FileName == filename) {
- IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem = Items[i];
- monitor.Dispose ();
- return;
- }
- }
-
if (!Services.ProjectService.IsWorkspaceItemFile (filename)) {
if (!Services.ProjectService.IsSolutionItemFile (filename)) {
monitor.ReportError (GettextCatalog.GetString ("File is not a project or solution: {0}", filename), null);
@@ -759,11 +779,11 @@ namespace MonoDevelop.Ide
void CheckWorkspaceItems (object sender, FileEventArgs args)
{
- List<FilePath> files = args.Select (e => e.FileName.CanonicalPath).ToList ();
- foreach (Solution s in GetAllSolutions ().Where (sol => files.Contains (sol.FileName.CanonicalPath)))
+ HashSet<FilePath> files = new HashSet<FilePath> (args.Select (e => e.FileName.CanonicalPath));
+ foreach (Solution s in GetAllSolutions ().Where (sol => sol.GetItemFiles (false).Any (f => files.Contains (f.CanonicalPath))))
OnCheckWorkspaceItem (s);
- foreach (Project p in GetAllProjects ().Where (proj => files.Contains (proj.FileName.CanonicalPath)))
+ foreach (Project p in GetAllProjects ().Where (proj => proj.GetItemFiles (false).Any (f => files.Contains (f.CanonicalPath))))
OnCheckProject (p);
}
@@ -990,14 +1010,14 @@ namespace MonoDevelop.Ide
WorkspaceItemEventArgs args = new WorkspaceItemEventArgs (item);
NotifyDescendantItemAdded (this, args);
NotifyConfigurationsChanged (null, args);
-
- if (WorkspaceItemOpened != null)
- WorkspaceItemOpened (this, args);
+
if (Items.Count == 1 && !reloading) {
IdeApp.Workbench.CurrentLayout = "Solution";
if (FirstWorkspaceItemOpened != null)
FirstWorkspaceItemOpened (this, args);
}
+ if (WorkspaceItemOpened != null)
+ WorkspaceItemOpened (this, args);
}
internal void NotifyItemRemoved (WorkspaceItem item)
@@ -1021,16 +1041,16 @@ namespace MonoDevelop.Ide
}
item.ConfigurationsChanged -= configurationsChanged;
- if (Items.Count == 0 && !reloading) {
- if (LastWorkspaceItemClosed != null)
- LastWorkspaceItemClosed (this, EventArgs.Empty);
- }
-
WorkspaceItemEventArgs args = new WorkspaceItemEventArgs (item);
NotifyConfigurationsChanged (null, args);
if (WorkspaceItemClosed != null)
WorkspaceItemClosed (this, args);
+
+ if (Items.Count == 0 && !reloading) {
+ if (LastWorkspaceItemClosed != null)
+ LastWorkspaceItemClosed (this, EventArgs.Empty);
+ }
MonoDevelop.Ide.TypeSystem.TypeSystemService.Unload (item);
// ParserDatabase.Unload (item);
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs
index b7b8e84cd0..754e9bc1ee 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog.cs
@@ -2,18 +2,28 @@
// This file has been generated by the GUI designer. Do not modify.
namespace MonoDevelop.Ide.Projects
{
- public partial class ConfirmProjectDeleteDialog
+ internal partial class ConfirmProjectDeleteDialog
{
private global::Gtk.VBox vbox2;
+
private global::Gtk.Label label1;
+
private global::Gtk.RadioButton radioDeleteAll;
+
private global::Gtk.Alignment alignment1;
+
private global::Gtk.Label labelProjectDir;
+
private global::Gtk.RadioButton radioDeleteSel;
+
private global::Gtk.Alignment alignment2;
+
private global::Gtk.ScrolledWindow GtkScrolledWindow;
+
private global::Gtk.TreeView fileList;
+
private global::Gtk.Button buttonCancel;
+
private global::Gtk.Button buttonOk;
protected virtual void Build ()
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportSolutionDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportSolutionDialog.cs
index 724ca014f5..451ebc0865 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportSolutionDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.ExportSolutionDialog.cs
@@ -2,17 +2,26 @@
// This file has been generated by the GUI designer. Do not modify.
namespace MonoDevelop.Ide.Projects
{
- public partial class ExportSolutionDialog
+ internal partial class ExportSolutionDialog
{
private global::Gtk.VBox vbox2;
+
private global::Gtk.Table table;
+
private global::Gtk.ComboBox comboFormat;
+
private global::MonoDevelop.Components.FolderEntry folderEntry;
+
private global::Gtk.Label label2;
+
private global::Gtk.Label label4;
+
private global::Gtk.Label labelNewFormat;
+
private global::Gtk.Label newFormatLabel;
+
private global::Gtk.Button button51;
+
private global::Gtk.Button buttonOk;
protected virtual void Build ()
@@ -54,6 +63,7 @@ namespace MonoDevelop.Ide.Projects
// Container child table.Gtk.Table+TableChild
this.folderEntry = new global::MonoDevelop.Components.FolderEntry ();
this.folderEntry.Name = "folderEntry";
+ this.folderEntry.DisplayAsRelativePath = false;
this.table.Add (this.folderEntry);
global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table [this.folderEntry]));
w3.TopAttach = ((uint)(2));
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewPolicySetDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewPolicySetDialog.cs
index f292c6fd49..e1736e8342 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewPolicySetDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewPolicySetDialog.cs
@@ -2,14 +2,20 @@
// This file has been generated by the GUI designer. Do not modify.
namespace MonoDevelop.Ide.Projects
{
- public partial class NewPolicySetDialog
+ internal partial class NewPolicySetDialog
{
private global::Gtk.VBox vbox2;
+
private global::Gtk.Label label1;
+
private global::Gtk.Entry entryName;
+
private global::Gtk.Label label2;
+
private global::Gtk.ComboBox comboSets;
+
private global::Gtk.Button buttonCancel;
+
private global::Gtk.Button buttonOk;
protected virtual void Build ()
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewProjectDialog.cs b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewProjectDialog.cs
index 634ef24699..fc31f2fdfb 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewProjectDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/MonoDevelop.Ide.Projects.NewProjectDialog.cs
@@ -1,382 +1,411 @@
-
-// This file has been generated by the GUI designer. Do not modify.
-namespace MonoDevelop.Ide.Projects
-{
- public partial class NewProjectDialog
- {
- private global::Gtk.Notebook notebook;
- private global::Gtk.VBox vbox1;
- private global::Gtk.VBox vbox2;
- private global::Gtk.HBox hbox1;
- private global::Gtk.VBox vbox4;
- private global::Gtk.HPaned hpaned1;
- private global::Gtk.ScrolledWindow scrolledwindow1;
- private global::Gtk.TreeView lst_template_types;
- private global::Gtk.HPaned panedTemplates;
- private global::Gtk.VBox boxTemplates;
- private global::Gtk.ScrolledWindow scrolledInfo;
- private global::Gtk.VBox boxInfo;
- private global::Gtk.Label labelTemplateTitle;
- private global::Gtk.Label lbl_template_descr;
- private global::Gtk.VBox vbox3;
- private global::Gtk.Table table1;
- private global::MonoDevelop.Components.FolderEntry entry_location;
- private global::Gtk.HBox hbox2;
- private global::Gtk.Entry txt_subdirectory;
- private global::Gtk.CheckButton chk_combine_directory;
- private global::Gtk.Label lbl_location;
- private global::Gtk.Label lbl_name;
- private global::Gtk.Label lbl_subdirectory;
- private global::Gtk.Entry txt_name;
- private global::Gtk.Label lbl_will_save_in;
- private global::Gtk.Label label1;
- private global::Gtk.VBox vbox5;
- private global::Gtk.Label label3;
- private global::Gtk.Label label4;
- private global::Gtk.Label label2;
- private global::Gtk.Button btn_close;
- private global::Gtk.Button btn_new;
-
- protected virtual void Build ()
- {
- global::Stetic.Gui.Initialize (this);
- // Widget MonoDevelop.Ide.Projects.NewProjectDialog
- this.WidthRequest = 930;
- this.Name = "MonoDevelop.Ide.Projects.NewProjectDialog";
- this.Title = "New Solution";
- this.TypeHint = ((global::Gdk.WindowTypeHint)(1));
- this.WindowPosition = ((global::Gtk.WindowPosition)(1));
- this.BorderWidth = ((uint)(6));
- this.DestroyWithParent = true;
- // Internal child MonoDevelop.Ide.Projects.NewProjectDialog.VBox
- global::Gtk.VBox w1 = this.VBox;
- w1.Name = "dialog-vbox1";
- w1.Spacing = 6;
- w1.BorderWidth = ((uint)(2));
- // Container child dialog-vbox1.Gtk.Box+BoxChild
- this.notebook = new global::Gtk.Notebook ();
- this.notebook.CanFocus = true;
- this.notebook.Name = "notebook";
- this.notebook.CurrentPage = 0;
- this.notebook.ShowBorder = false;
- this.notebook.BorderWidth = ((uint)(6));
- // Container child notebook.Gtk.Notebook+NotebookChild
- this.vbox1 = new global::Gtk.VBox ();
- this.vbox1.Name = "vbox1";
- this.vbox1.Spacing = 7;
- // Container child vbox1.Gtk.Box+BoxChild
- this.vbox2 = new global::Gtk.VBox ();
- this.vbox2.Name = "vbox2";
- this.vbox2.Spacing = 6;
- // Container child vbox2.Gtk.Box+BoxChild
- this.hbox1 = new global::Gtk.HBox ();
- this.hbox1.Name = "hbox1";
- // Container child hbox1.Gtk.Box+BoxChild
- this.vbox4 = new global::Gtk.VBox ();
- this.vbox4.Name = "vbox4";
- this.vbox4.Spacing = 6;
- // Container child vbox4.Gtk.Box+BoxChild
- this.hpaned1 = new global::Gtk.HPaned ();
- this.hpaned1.CanFocus = true;
- this.hpaned1.Name = "hpaned1";
- this.hpaned1.Position = 188;
- // Container child hpaned1.Gtk.Paned+PanedChild
- this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
- this.scrolledwindow1.Name = "scrolledwindow1";
- this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
- // Container child scrolledwindow1.Gtk.Container+ContainerChild
- this.lst_template_types = new global::Gtk.TreeView ();
- this.lst_template_types.Name = "lst_template_types";
- this.lst_template_types.HeadersVisible = false;
- this.scrolledwindow1.Add (this.lst_template_types);
- this.hpaned1.Add (this.scrolledwindow1);
- global::Gtk.Paned.PanedChild w3 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow1]));
- w3.Resize = false;
- // Container child hpaned1.Gtk.Paned+PanedChild
- this.panedTemplates = new global::Gtk.HPaned ();
- this.panedTemplates.CanFocus = true;
- this.panedTemplates.Name = "panedTemplates";
- this.panedTemplates.Position = 430;
- // Container child panedTemplates.Gtk.Paned+PanedChild
- this.boxTemplates = new global::Gtk.VBox ();
- this.boxTemplates.Name = "boxTemplates";
- this.boxTemplates.Spacing = 6;
- this.panedTemplates.Add (this.boxTemplates);
- global::Gtk.Paned.PanedChild w4 = ((global::Gtk.Paned.PanedChild)(this.panedTemplates [this.boxTemplates]));
- w4.Resize = false;
- // Container child panedTemplates.Gtk.Paned+PanedChild
- this.scrolledInfo = new global::Gtk.ScrolledWindow ();
- this.scrolledInfo.CanFocus = true;
- this.scrolledInfo.Name = "scrolledInfo";
- this.scrolledInfo.HscrollbarPolicy = ((global::Gtk.PolicyType)(2));
- this.scrolledInfo.ShadowType = ((global::Gtk.ShadowType)(1));
- // Container child scrolledInfo.Gtk.Container+ContainerChild
- global::Gtk.Viewport w5 = new global::Gtk.Viewport ();
- w5.ShadowType = ((global::Gtk.ShadowType)(0));
- // Container child GtkViewport.Gtk.Container+ContainerChild
- this.boxInfo = new global::Gtk.VBox ();
- this.boxInfo.Name = "boxInfo";
- this.boxInfo.Spacing = 6;
- this.boxInfo.BorderWidth = ((uint)(3));
- // Container child boxInfo.Gtk.Box+BoxChild
- this.labelTemplateTitle = new global::Gtk.Label ();
- this.labelTemplateTitle.WidthRequest = 30;
- this.labelTemplateTitle.Name = "labelTemplateTitle";
- this.labelTemplateTitle.Xalign = 0F;
- this.labelTemplateTitle.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Console Project</b>");
- this.labelTemplateTitle.UseMarkup = true;
- this.labelTemplateTitle.Wrap = true;
- this.boxInfo.Add (this.labelTemplateTitle);
- global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.boxInfo [this.labelTemplateTitle]));
- w6.Position = 0;
- w6.Expand = false;
- w6.Fill = false;
- // Container child boxInfo.Gtk.Box+BoxChild
- this.lbl_template_descr = new global::Gtk.Label ();
- this.lbl_template_descr.WidthRequest = 116;
- this.lbl_template_descr.Name = "lbl_template_descr";
- this.lbl_template_descr.Xalign = 0F;
- this.lbl_template_descr.Yalign = 0F;
- this.lbl_template_descr.LabelProp = global::Mono.Unix.Catalog.GetString ("Creates a new C# Project");
- this.lbl_template_descr.Wrap = true;
- this.boxInfo.Add (this.lbl_template_descr);
- global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.boxInfo [this.lbl_template_descr]));
- w7.Position = 1;
- w7.Expand = false;
- w7.Fill = false;
- w5.Add (this.boxInfo);
- this.scrolledInfo.Add (w5);
- this.panedTemplates.Add (this.scrolledInfo);
- global::Gtk.Paned.PanedChild w10 = ((global::Gtk.Paned.PanedChild)(this.panedTemplates [this.scrolledInfo]));
- w10.Resize = false;
- this.hpaned1.Add (this.panedTemplates);
- this.vbox4.Add (this.hpaned1);
- global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hpaned1]));
- w12.Position = 0;
- this.hbox1.Add (this.vbox4);
- global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4]));
- w13.Position = 0;
- this.vbox2.Add (this.hbox1);
- global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
- w14.Position = 0;
- this.vbox1.Add (this.vbox2);
- global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.vbox2]));
- w15.Position = 0;
- // Container child vbox1.Gtk.Box+BoxChild
- this.vbox3 = new global::Gtk.VBox ();
- this.vbox3.Name = "vbox3";
- this.vbox3.Spacing = 6;
- // Container child vbox3.Gtk.Box+BoxChild
- this.table1 = new global::Gtk.Table (((uint)(3)), ((uint)(2)), false);
- this.table1.Name = "table1";
- this.table1.RowSpacing = ((uint)(6));
- this.table1.ColumnSpacing = ((uint)(6));
- // Container child table1.Gtk.Table+TableChild
- this.entry_location = new global::MonoDevelop.Components.FolderEntry ();
- this.entry_location.Name = "entry_location";
- this.entry_location.DisplayAsRelativePath = false;
- this.table1.Add (this.entry_location);
- global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1 [this.entry_location]));
- w16.TopAttach = ((uint)(1));
- w16.BottomAttach = ((uint)(2));
- w16.LeftAttach = ((uint)(1));
- w16.RightAttach = ((uint)(2));
- w16.XOptions = ((global::Gtk.AttachOptions)(4));
- w16.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.hbox2 = new global::Gtk.HBox ();
- this.hbox2.Name = "hbox2";
- this.hbox2.Spacing = 6;
- // Container child hbox2.Gtk.Box+BoxChild
- this.txt_subdirectory = new global::Gtk.Entry ();
- this.txt_subdirectory.Name = "txt_subdirectory";
- this.txt_subdirectory.IsEditable = true;
- this.txt_subdirectory.ActivatesDefault = true;
- this.txt_subdirectory.InvisibleChar = '●';
- this.hbox2.Add (this.txt_subdirectory);
- global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.txt_subdirectory]));
- w17.Position = 0;
- // Container child hbox2.Gtk.Box+BoxChild
- this.chk_combine_directory = new global::Gtk.CheckButton ();
- this.chk_combine_directory.Name = "chk_combine_directory";
- this.chk_combine_directory.Label = global::Mono.Unix.Catalog.GetString ("_Create directory for solution");
- this.chk_combine_directory.Active = true;
- this.chk_combine_directory.DrawIndicator = true;
- this.chk_combine_directory.UseUnderline = true;
- this.hbox2.Add (this.chk_combine_directory);
- global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.chk_combine_directory]));
- w18.Position = 1;
- w18.Expand = false;
- w18.Fill = false;
- this.table1.Add (this.hbox2);
- global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.table1 [this.hbox2]));
- w19.TopAttach = ((uint)(2));
- w19.BottomAttach = ((uint)(3));
- w19.LeftAttach = ((uint)(1));
- w19.RightAttach = ((uint)(2));
- w19.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.lbl_location = new global::Gtk.Label ();
- this.lbl_location.Name = "lbl_location";
- this.lbl_location.Xalign = 0F;
- this.lbl_location.Yalign = 0F;
- this.lbl_location.LabelProp = global::Mono.Unix.Catalog.GetString ("_Location:");
- this.lbl_location.UseUnderline = true;
- this.table1.Add (this.lbl_location);
- global::Gtk.Table.TableChild w20 = ((global::Gtk.Table.TableChild)(this.table1 [this.lbl_location]));
- w20.TopAttach = ((uint)(1));
- w20.BottomAttach = ((uint)(2));
- w20.XOptions = ((global::Gtk.AttachOptions)(4));
- w20.YOptions = ((global::Gtk.AttachOptions)(0));
- // Container child table1.Gtk.Table+TableChild
- this.lbl_name = new global::Gtk.Label ();
- this.lbl_name.Name = "lbl_name";
- this.lbl_name.Xalign = 0F;
- this.lbl_name.Yalign = 0F;
- this.lbl_name.LabelProp = global::Mono.Unix.Catalog.GetString ("N_ame:");
- this.lbl_name.UseUnderline = true;
- this.table1.Add (this.lbl_name);
- global::Gtk.Table.TableChild w21 = ((global::Gtk.Table.TableChild)(this.table1 [this.lbl_name]));
- w21.XOptions = ((global::Gtk.AttachOptions)(4));
- w21.YOptions = ((global::Gtk.AttachOptions)(0));
- // Container child table1.Gtk.Table+TableChild
- this.lbl_subdirectory = new global::Gtk.Label ();
- this.lbl_subdirectory.Name = "lbl_subdirectory";
- this.lbl_subdirectory.Xalign = 0F;
- this.lbl_subdirectory.LabelProp = global::Mono.Unix.Catalog.GetString ("_Solution name:");
- this.lbl_subdirectory.UseUnderline = true;
- this.table1.Add (this.lbl_subdirectory);
- global::Gtk.Table.TableChild w22 = ((global::Gtk.Table.TableChild)(this.table1 [this.lbl_subdirectory]));
- w22.TopAttach = ((uint)(2));
- w22.BottomAttach = ((uint)(3));
- w22.XOptions = ((global::Gtk.AttachOptions)(4));
- w22.YOptions = ((global::Gtk.AttachOptions)(4));
- // Container child table1.Gtk.Table+TableChild
- this.txt_name = new global::Gtk.Entry ();
- this.txt_name.Name = "txt_name";
- this.txt_name.IsEditable = true;
- this.txt_name.ActivatesDefault = true;
- this.txt_name.InvisibleChar = '●';
- this.table1.Add (this.txt_name);
- global::Gtk.Table.TableChild w23 = ((global::Gtk.Table.TableChild)(this.table1 [this.txt_name]));
- w23.LeftAttach = ((uint)(1));
- w23.RightAttach = ((uint)(2));
- w23.YOptions = ((global::Gtk.AttachOptions)(0));
- this.vbox3.Add (this.table1);
- global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.table1]));
- w24.Position = 0;
- w24.Expand = false;
- w24.Fill = false;
- // Container child vbox3.Gtk.Box+BoxChild
- this.lbl_will_save_in = new global::Gtk.Label ();
- this.lbl_will_save_in.WidthRequest = 580;
- this.lbl_will_save_in.Name = "lbl_will_save_in";
- this.lbl_will_save_in.Xalign = 0F;
- this.lbl_will_save_in.Yalign = 0F;
- this.lbl_will_save_in.LabelProp = "Project will be saved in: /dev/null";
- this.lbl_will_save_in.Wrap = true;
- this.vbox3.Add (this.lbl_will_save_in);
- global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lbl_will_save_in]));
- w25.Position = 1;
- w25.Expand = false;
- w25.Fill = false;
- this.vbox1.Add (this.vbox3);
- global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.vbox3]));
- w26.Position = 1;
- w26.Expand = false;
- this.notebook.Add (this.vbox1);
- // Notebook tab
- this.label1 = new global::Gtk.Label ();
- this.label1.Name = "label1";
- this.label1.LabelProp = "page1";
- this.notebook.SetTabLabel (this.vbox1, this.label1);
- this.label1.ShowAll ();
- // Container child notebook.Gtk.Notebook+NotebookChild
- this.vbox5 = new global::Gtk.VBox ();
- this.vbox5.Name = "vbox5";
- this.vbox5.Spacing = 6;
- // Container child vbox5.Gtk.Box+BoxChild
- this.label3 = new global::Gtk.Label ();
- this.label3.Name = "label3";
- this.label3.Xalign = 0F;
- this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Project Features</b>");
- this.label3.UseMarkup = true;
- this.vbox5.Add (this.label3);
- global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.label3]));
- w28.Position = 0;
- w28.Expand = false;
- w28.Fill = false;
- // Container child vbox5.Gtk.Box+BoxChild
- this.label4 = new global::Gtk.Label ();
- this.label4.WidthRequest = 632;
- this.label4.Name = "label4";
- this.label4.Xalign = 0F;
- this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("<small>This list shows a set of features you can enable in the new project. After" +
- " creating the project those features can be enabled or disabled in the Project O" +
- "ptions dialog, or by adding new projects to the solution.</small>");
- this.label4.UseMarkup = true;
- this.label4.Wrap = true;
- this.vbox5.Add (this.label4);
- global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.label4]));
- w29.Position = 1;
- w29.Expand = false;
- w29.Fill = false;
- this.notebook.Add (this.vbox5);
- global::Gtk.Notebook.NotebookChild w30 = ((global::Gtk.Notebook.NotebookChild)(this.notebook [this.vbox5]));
- w30.Position = 1;
- // Notebook tab
- this.label2 = new global::Gtk.Label ();
- this.label2.Name = "label2";
- this.label2.LabelProp = "page2";
- this.notebook.SetTabLabel (this.vbox5, this.label2);
- this.label2.ShowAll ();
- w1.Add (this.notebook);
- global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(w1 [this.notebook]));
- w31.Position = 0;
- // Internal child MonoDevelop.Ide.Projects.NewProjectDialog.ActionArea
- global::Gtk.HButtonBox w32 = this.ActionArea;
- w32.Name = "dialog-action_area1";
- w32.Spacing = 6;
- w32.BorderWidth = ((uint)(5));
- w32.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
- // Container child dialog-action_area1.Gtk.ButtonBox+ButtonBoxChild
- this.btn_close = new global::Gtk.Button ();
- this.btn_close.CanDefault = true;
- this.btn_close.Name = "btn_close";
- this.btn_close.UseStock = true;
- this.btn_close.UseUnderline = true;
- this.btn_close.Label = "gtk-cancel";
- this.AddActionWidget (this.btn_close, -6);
- global::Gtk.ButtonBox.ButtonBoxChild w33 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w32 [this.btn_close]));
- w33.Expand = false;
- w33.Fill = false;
- // Container child dialog-action_area1.Gtk.ButtonBox+ButtonBoxChild
- this.btn_new = new global::Gtk.Button ();
- this.btn_new.CanDefault = true;
- this.btn_new.Name = "btn_new";
- this.btn_new.UseStock = true;
- this.btn_new.UseUnderline = true;
- this.btn_new.Label = "gtk-go-forward";
- w32.Add (this.btn_new);
- global::Gtk.ButtonBox.ButtonBoxChild w34 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w32 [this.btn_new]));
- w34.Position = 1;
- w34.Expand = false;
- w34.Fill = false;
- if ((this.Child != null)) {
- this.Child.ShowAll ();
- }
- this.DefaultWidth = 930;
- this.DefaultHeight = 539;
- this.lbl_name.MnemonicWidget = this.txt_name;
- this.lbl_subdirectory.MnemonicWidget = this.txt_subdirectory;
- this.Hide ();
- this.scrolledInfo.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnScrolledInfoSizeAllocated);
- this.boxInfo.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnBoxInfoSizeAllocated);
- this.txt_name.Changed += new global::System.EventHandler (this.NameChanged);
- this.txt_subdirectory.Changed += new global::System.EventHandler (this.PathChanged);
- this.chk_combine_directory.Clicked += new global::System.EventHandler (this.SolutionCheckChanged);
- this.btn_close.Clicked += new global::System.EventHandler (this.cancelClicked);
- this.btn_new.Clicked += new global::System.EventHandler (this.OpenEvent);
- }
- }
-}
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace MonoDevelop.Ide.Projects
+{
+ internal partial class NewProjectDialog
+ {
+ private global::Gtk.Notebook notebook;
+
+ private global::Gtk.VBox vbox1;
+
+ private global::Gtk.VBox vbox2;
+
+ private global::Gtk.HBox hbox1;
+
+ private global::Gtk.VBox vbox4;
+
+ private global::Gtk.HPaned hpaned1;
+
+ private global::Gtk.ScrolledWindow scrolledwindow1;
+
+ private global::Gtk.TreeView lst_template_types;
+
+ private global::Gtk.HPaned panedTemplates;
+
+ private global::Gtk.VBox boxTemplates;
+
+ private global::Gtk.ScrolledWindow scrolledInfo;
+
+ private global::Gtk.VBox boxInfo;
+
+ private global::Gtk.Label labelTemplateTitle;
+
+ private global::Gtk.Label lbl_template_descr;
+
+ private global::Gtk.VBox vbox3;
+
+ private global::Gtk.Table table1;
+
+ private global::MonoDevelop.Components.FolderEntry entry_location;
+
+ private global::Gtk.HBox hbox2;
+
+ private global::Gtk.Entry txt_subdirectory;
+
+ private global::Gtk.CheckButton chk_combine_directory;
+
+ private global::Gtk.Label lbl_location;
+
+ private global::Gtk.Label lbl_name;
+
+ private global::Gtk.Label lbl_subdirectory;
+
+ private global::Gtk.Entry txt_name;
+
+ private global::Gtk.Label lbl_will_save_in;
+
+ private global::Gtk.Label label1;
+
+ private global::Gtk.VBox vbox5;
+
+ private global::Gtk.Label label3;
+
+ private global::Gtk.Label label4;
+
+ private global::Gtk.Label label2;
+
+ private global::Gtk.Button btn_close;
+
+ private global::Gtk.Button btn_new;
+
+ protected virtual void Build ()
+ {
+ global::Stetic.Gui.Initialize (this);
+ // Widget MonoDevelop.Ide.Projects.NewProjectDialog
+ this.WidthRequest = 930;
+ this.Name = "MonoDevelop.Ide.Projects.NewProjectDialog";
+ this.Title = "New Solution";
+ this.TypeHint = ((global::Gdk.WindowTypeHint)(1));
+ this.WindowPosition = ((global::Gtk.WindowPosition)(1));
+ this.BorderWidth = ((uint)(6));
+ this.DestroyWithParent = true;
+ // Internal child MonoDevelop.Ide.Projects.NewProjectDialog.VBox
+ global::Gtk.VBox w1 = this.VBox;
+ w1.Name = "dialog-vbox1";
+ w1.Spacing = 6;
+ w1.BorderWidth = ((uint)(2));
+ // Container child dialog-vbox1.Gtk.Box+BoxChild
+ this.notebook = new global::Gtk.Notebook ();
+ this.notebook.CanFocus = true;
+ this.notebook.Name = "notebook";
+ this.notebook.CurrentPage = 0;
+ this.notebook.ShowBorder = false;
+ this.notebook.BorderWidth = ((uint)(6));
+ // Container child notebook.Gtk.Notebook+NotebookChild
+ this.vbox1 = new global::Gtk.VBox ();
+ this.vbox1.Name = "vbox1";
+ this.vbox1.Spacing = 7;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.vbox2 = new global::Gtk.VBox ();
+ this.vbox2.Name = "vbox2";
+ this.vbox2.Spacing = 6;
+ // Container child vbox2.Gtk.Box+BoxChild
+ this.hbox1 = new global::Gtk.HBox ();
+ this.hbox1.Name = "hbox1";
+ // Container child hbox1.Gtk.Box+BoxChild
+ this.vbox4 = new global::Gtk.VBox ();
+ this.vbox4.Name = "vbox4";
+ this.vbox4.Spacing = 6;
+ // Container child vbox4.Gtk.Box+BoxChild
+ this.hpaned1 = new global::Gtk.HPaned ();
+ this.hpaned1.CanFocus = true;
+ this.hpaned1.Name = "hpaned1";
+ this.hpaned1.Position = 188;
+ // Container child hpaned1.Gtk.Paned+PanedChild
+ this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
+ this.scrolledwindow1.Name = "scrolledwindow1";
+ this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child scrolledwindow1.Gtk.Container+ContainerChild
+ this.lst_template_types = new global::Gtk.TreeView ();
+ this.lst_template_types.Name = "lst_template_types";
+ this.lst_template_types.HeadersVisible = false;
+ this.scrolledwindow1.Add (this.lst_template_types);
+ this.hpaned1.Add (this.scrolledwindow1);
+ global::Gtk.Paned.PanedChild w3 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow1]));
+ w3.Resize = false;
+ // Container child hpaned1.Gtk.Paned+PanedChild
+ this.panedTemplates = new global::Gtk.HPaned ();
+ this.panedTemplates.CanFocus = true;
+ this.panedTemplates.Name = "panedTemplates";
+ this.panedTemplates.Position = 430;
+ // Container child panedTemplates.Gtk.Paned+PanedChild
+ this.boxTemplates = new global::Gtk.VBox ();
+ this.boxTemplates.Name = "boxTemplates";
+ this.boxTemplates.Spacing = 6;
+ this.panedTemplates.Add (this.boxTemplates);
+ global::Gtk.Paned.PanedChild w4 = ((global::Gtk.Paned.PanedChild)(this.panedTemplates [this.boxTemplates]));
+ w4.Resize = false;
+ // Container child panedTemplates.Gtk.Paned+PanedChild
+ this.scrolledInfo = new global::Gtk.ScrolledWindow ();
+ this.scrolledInfo.CanFocus = true;
+ this.scrolledInfo.Name = "scrolledInfo";
+ this.scrolledInfo.HscrollbarPolicy = ((global::Gtk.PolicyType)(2));
+ this.scrolledInfo.ShadowType = ((global::Gtk.ShadowType)(1));
+ // Container child scrolledInfo.Gtk.Container+ContainerChild
+ global::Gtk.Viewport w5 = new global::Gtk.Viewport ();
+ w5.ShadowType = ((global::Gtk.ShadowType)(0));
+ // Container child GtkViewport.Gtk.Container+ContainerChild
+ this.boxInfo = new global::Gtk.VBox ();
+ this.boxInfo.Name = "boxInfo";
+ this.boxInfo.Spacing = 6;
+ this.boxInfo.BorderWidth = ((uint)(3));
+ // Container child boxInfo.Gtk.Box+BoxChild
+ this.labelTemplateTitle = new global::Gtk.Label ();
+ this.labelTemplateTitle.WidthRequest = 30;
+ this.labelTemplateTitle.Name = "labelTemplateTitle";
+ this.labelTemplateTitle.Xalign = 0F;
+ this.labelTemplateTitle.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Console Project</b>");
+ this.labelTemplateTitle.UseMarkup = true;
+ this.labelTemplateTitle.Wrap = true;
+ this.boxInfo.Add (this.labelTemplateTitle);
+ global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.boxInfo [this.labelTemplateTitle]));
+ w6.Position = 0;
+ w6.Expand = false;
+ w6.Fill = false;
+ // Container child boxInfo.Gtk.Box+BoxChild
+ this.lbl_template_descr = new global::Gtk.Label ();
+ this.lbl_template_descr.WidthRequest = 116;
+ this.lbl_template_descr.Name = "lbl_template_descr";
+ this.lbl_template_descr.Xalign = 0F;
+ this.lbl_template_descr.Yalign = 0F;
+ this.lbl_template_descr.LabelProp = global::Mono.Unix.Catalog.GetString ("Creates a new C# Project");
+ this.lbl_template_descr.Wrap = true;
+ this.boxInfo.Add (this.lbl_template_descr);
+ global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.boxInfo [this.lbl_template_descr]));
+ w7.Position = 1;
+ w7.Expand = false;
+ w7.Fill = false;
+ w5.Add (this.boxInfo);
+ this.scrolledInfo.Add (w5);
+ this.panedTemplates.Add (this.scrolledInfo);
+ global::Gtk.Paned.PanedChild w10 = ((global::Gtk.Paned.PanedChild)(this.panedTemplates [this.scrolledInfo]));
+ w10.Resize = false;
+ this.hpaned1.Add (this.panedTemplates);
+ this.vbox4.Add (this.hpaned1);
+ global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hpaned1]));
+ w12.Position = 0;
+ this.hbox1.Add (this.vbox4);
+ global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4]));
+ w13.Position = 0;
+ this.vbox2.Add (this.hbox1);
+ global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
+ w14.Position = 0;
+ this.vbox1.Add (this.vbox2);
+ global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.vbox2]));
+ w15.Position = 0;
+ // Container child vbox1.Gtk.Box+BoxChild
+ this.vbox3 = new global::Gtk.VBox ();
+ this.vbox3.Name = "vbox3";
+ this.vbox3.Spacing = 6;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.table1 = new global::Gtk.Table (((uint)(3)), ((uint)(2)), false);
+ this.table1.Name = "table1";
+ this.table1.RowSpacing = ((uint)(6));
+ this.table1.ColumnSpacing = ((uint)(6));
+ // Container child table1.Gtk.Table+TableChild
+ this.entry_location = new global::MonoDevelop.Components.FolderEntry ();
+ this.entry_location.Name = "entry_location";
+ this.entry_location.DisplayAsRelativePath = false;
+ this.table1.Add (this.entry_location);
+ global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1 [this.entry_location]));
+ w16.TopAttach = ((uint)(1));
+ w16.BottomAttach = ((uint)(2));
+ w16.LeftAttach = ((uint)(1));
+ w16.RightAttach = ((uint)(2));
+ w16.XOptions = ((global::Gtk.AttachOptions)(4));
+ w16.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.hbox2 = new global::Gtk.HBox ();
+ this.hbox2.Name = "hbox2";
+ this.hbox2.Spacing = 6;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.txt_subdirectory = new global::Gtk.Entry ();
+ this.txt_subdirectory.Name = "txt_subdirectory";
+ this.txt_subdirectory.IsEditable = true;
+ this.txt_subdirectory.ActivatesDefault = true;
+ this.txt_subdirectory.InvisibleChar = '●';
+ this.hbox2.Add (this.txt_subdirectory);
+ global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.txt_subdirectory]));
+ w17.Position = 0;
+ // Container child hbox2.Gtk.Box+BoxChild
+ this.chk_combine_directory = new global::Gtk.CheckButton ();
+ this.chk_combine_directory.Name = "chk_combine_directory";
+ this.chk_combine_directory.Label = global::Mono.Unix.Catalog.GetString ("_Create directory for solution");
+ this.chk_combine_directory.Active = true;
+ this.chk_combine_directory.DrawIndicator = true;
+ this.chk_combine_directory.UseUnderline = true;
+ this.hbox2.Add (this.chk_combine_directory);
+ global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.chk_combine_directory]));
+ w18.Position = 1;
+ w18.Expand = false;
+ w18.Fill = false;
+ this.table1.Add (this.hbox2);
+ global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.table1 [this.hbox2]));
+ w19.TopAttach = ((uint)(2));
+ w19.BottomAttach = ((uint)(3));
+ w19.LeftAttach = ((uint)(1));
+ w19.RightAttach = ((uint)(2));
+ w19.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.lbl_location = new global::Gtk.Label ();
+ this.lbl_location.Name = "lbl_location";
+ this.lbl_location.Xalign = 0F;
+ this.lbl_location.Yalign = 0F;
+ this.lbl_location.LabelProp = global::Mono.Unix.Catalog.GetString ("_Location:");
+ this.lbl_location.UseUnderline = true;
+ this.table1.Add (this.lbl_location);
+ global::Gtk.Table.TableChild w20 = ((global::Gtk.Table.TableChild)(this.table1 [this.lbl_location]));
+ w20.TopAttach = ((uint)(1));
+ w20.BottomAttach = ((uint)(2));
+ w20.XOptions = ((global::Gtk.AttachOptions)(4));
+ w20.YOptions = ((global::Gtk.AttachOptions)(0));
+ // Container child table1.Gtk.Table+TableChild
+ this.lbl_name = new global::Gtk.Label ();
+ this.lbl_name.Name = "lbl_name";
+ this.lbl_name.Xalign = 0F;
+ this.lbl_name.Yalign = 0F;
+ this.lbl_name.LabelProp = global::Mono.Unix.Catalog.GetString ("N_ame:");
+ this.lbl_name.UseUnderline = true;
+ this.table1.Add (this.lbl_name);
+ global::Gtk.Table.TableChild w21 = ((global::Gtk.Table.TableChild)(this.table1 [this.lbl_name]));
+ w21.XOptions = ((global::Gtk.AttachOptions)(4));
+ w21.YOptions = ((global::Gtk.AttachOptions)(0));
+ // Container child table1.Gtk.Table+TableChild
+ this.lbl_subdirectory = new global::Gtk.Label ();
+ this.lbl_subdirectory.Name = "lbl_subdirectory";
+ this.lbl_subdirectory.Xalign = 0F;
+ this.lbl_subdirectory.LabelProp = global::Mono.Unix.Catalog.GetString ("_Solution name:");
+ this.lbl_subdirectory.UseUnderline = true;
+ this.table1.Add (this.lbl_subdirectory);
+ global::Gtk.Table.TableChild w22 = ((global::Gtk.Table.TableChild)(this.table1 [this.lbl_subdirectory]));
+ w22.TopAttach = ((uint)(2));
+ w22.BottomAttach = ((uint)(3));
+ w22.XOptions = ((global::Gtk.AttachOptions)(4));
+ w22.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.txt_name = new global::Gtk.Entry ();
+ this.txt_name.Name = "txt_name";
+ this.txt_name.IsEditable = true;
+ this.txt_name.ActivatesDefault = true;
+ this.txt_name.InvisibleChar = '●';
+ this.table1.Add (this.txt_name);
+ global::Gtk.Table.TableChild w23 = ((global::Gtk.Table.TableChild)(this.table1 [this.txt_name]));
+ w23.LeftAttach = ((uint)(1));
+ w23.RightAttach = ((uint)(2));
+ w23.YOptions = ((global::Gtk.AttachOptions)(0));
+ this.vbox3.Add (this.table1);
+ global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.table1]));
+ w24.Position = 0;
+ w24.Expand = false;
+ w24.Fill = false;
+ // Container child vbox3.Gtk.Box+BoxChild
+ this.lbl_will_save_in = new global::Gtk.Label ();
+ this.lbl_will_save_in.WidthRequest = 580;
+ this.lbl_will_save_in.Name = "lbl_will_save_in";
+ this.lbl_will_save_in.Xalign = 0F;
+ this.lbl_will_save_in.Yalign = 0F;
+ this.lbl_will_save_in.LabelProp = "Project will be saved in: /dev/null";
+ this.lbl_will_save_in.Wrap = true;
+ this.vbox3.Add (this.lbl_will_save_in);
+ global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lbl_will_save_in]));
+ w25.Position = 1;
+ w25.Expand = false;
+ w25.Fill = false;
+ this.vbox1.Add (this.vbox3);
+ global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.vbox3]));
+ w26.Position = 1;
+ w26.Expand = false;
+ this.notebook.Add (this.vbox1);
+ // Notebook tab
+ this.label1 = new global::Gtk.Label ();
+ this.label1.Name = "label1";
+ this.label1.LabelProp = "page1";
+ this.notebook.SetTabLabel (this.vbox1, this.label1);
+ this.label1.ShowAll ();
+ // Container child notebook.Gtk.Notebook+NotebookChild
+ this.vbox5 = new global::Gtk.VBox ();
+ this.vbox5.Name = "vbox5";
+ this.vbox5.Spacing = 6;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.label3 = new global::Gtk.Label ();
+ this.label3.Name = "label3";
+ this.label3.Xalign = 0F;
+ this.label3.LabelProp = global::Mono.Unix.Catalog.GetString ("<b>Project Features</b>");
+ this.label3.UseMarkup = true;
+ this.vbox5.Add (this.label3);
+ global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.label3]));
+ w28.Position = 0;
+ w28.Expand = false;
+ w28.Fill = false;
+ // Container child vbox5.Gtk.Box+BoxChild
+ this.label4 = new global::Gtk.Label ();
+ this.label4.WidthRequest = 632;
+ this.label4.Name = "label4";
+ this.label4.Xalign = 0F;
+ this.label4.LabelProp = global::Mono.Unix.Catalog.GetString ("<small>This list shows a set of features you can enable in the new project. After creating the project those features can be enabled or disabled in the Project Options dialog, or by adding new projects to the solution.</small>");
+ this.label4.UseMarkup = true;
+ this.label4.Wrap = true;
+ this.vbox5.Add (this.label4);
+ global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.label4]));
+ w29.Position = 1;
+ w29.Expand = false;
+ w29.Fill = false;
+ this.notebook.Add (this.vbox5);
+ global::Gtk.Notebook.NotebookChild w30 = ((global::Gtk.Notebook.NotebookChild)(this.notebook [this.vbox5]));
+ w30.Position = 1;
+ // Notebook tab
+ this.label2 = new global::Gtk.Label ();
+ this.label2.Name = "label2";
+ this.label2.LabelProp = "page2";
+ this.notebook.SetTabLabel (this.vbox5, this.label2);
+ this.label2.ShowAll ();
+ w1.Add (this.notebook);
+ global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(w1 [this.notebook]));
+ w31.Position = 0;
+ // Internal child MonoDevelop.Ide.Projects.NewProjectDialog.ActionArea
+ global::Gtk.HButtonBox w32 = this.ActionArea;
+ w32.Name = "dialog-action_area1";
+ w32.Spacing = 6;
+ w32.BorderWidth = ((uint)(5));
+ w32.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+ // Container child dialog-action_area1.Gtk.ButtonBox+ButtonBoxChild
+ this.btn_close = new global::Gtk.Button ();
+ this.btn_close.CanDefault = true;
+ this.btn_close.Name = "btn_close";
+ this.btn_close.UseStock = true;
+ this.btn_close.UseUnderline = true;
+ this.btn_close.Label = "gtk-cancel";
+ this.AddActionWidget (this.btn_close, -6);
+ global::Gtk.ButtonBox.ButtonBoxChild w33 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w32 [this.btn_close]));
+ w33.Expand = false;
+ w33.Fill = false;
+ // Container child dialog-action_area1.Gtk.ButtonBox+ButtonBoxChild
+ this.btn_new = new global::Gtk.Button ();
+ this.btn_new.CanDefault = true;
+ this.btn_new.Name = "btn_new";
+ this.btn_new.UseStock = true;
+ this.btn_new.UseUnderline = true;
+ this.btn_new.Label = "gtk-go-forward";
+ w32.Add (this.btn_new);
+ global::Gtk.ButtonBox.ButtonBoxChild w34 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w32 [this.btn_new]));
+ w34.Position = 1;
+ w34.Expand = false;
+ w34.Fill = false;
+ if ((this.Child != null)) {
+ this.Child.ShowAll ();
+ }
+ this.DefaultWidth = 930;
+ this.DefaultHeight = 539;
+ this.lbl_name.MnemonicWidget = this.txt_name;
+ this.lbl_subdirectory.MnemonicWidget = this.txt_subdirectory;
+ this.Hide ();
+ this.scrolledInfo.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnScrolledInfoSizeAllocated);
+ this.boxInfo.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnBoxInfoSizeAllocated);
+ this.txt_name.Changed += new global::System.EventHandler (this.NameChanged);
+ this.txt_subdirectory.Changed += new global::System.EventHandler (this.PathChanged);
+ this.chk_combine_directory.Clicked += new global::System.EventHandler (this.SolutionCheckChanged);
+ this.btn_close.Clicked += new global::System.EventHandler (this.cancelClicked);
+ this.btn_new.Clicked += new global::System.EventHandler (this.OpenEvent);
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
index d8078c5191..b21ff3ba7a 100644
--- a/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
+++ b/main/src/core/MonoDevelop.Ide/gtk-gui/gui.stetic
@@ -14,6 +14,7 @@
<property name="MemberName" />
<property name="Visible">False</property>
<property name="Events">ButtonPressMask</property>
+ <property name="GeneratePublic">False</property>
<property name="Title" translatable="yes">Export Solution</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="BorderWidth">6</property>
@@ -240,6 +241,7 @@
<property name="MemberName" />
<property name="WidthRequest">930</property>
<property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
<property name="Title">New Solution</property>
<property name="TypeHint">Dialog</property>
<property name="WindowPosition">Center</property>
@@ -6261,6 +6263,7 @@ All solutions</property>
<widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.ConfirmProjectDeleteDialog" design-size="512 387">
<property name="MemberName" />
<property name="Visible">False</property>
+ <property name="GeneratePublic">False</property>
<property name="Title" translatable="yes">Delete Project</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="Modal">True</property>
@@ -10699,6 +10702,7 @@ Visual Studio generates a default ID for embedded resources, instead of simply u
</widget>
<widget class="Gtk.Dialog" id="MonoDevelop.Ide.Projects.NewPolicySetDialog" design-size="429 200">
<property name="MemberName" />
+ <property name="GeneratePublic">False</property>
<property name="Title" translatable="yes">New Policy</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="Buttons">2</property>
diff --git a/main/src/core/MonoDevelop.Ide/gtkrc.win32 b/main/src/core/MonoDevelop.Ide/gtkrc.win32
index cd65fb1c52..af0fa8c5bd 100644
--- a/main/src/core/MonoDevelop.Ide/gtkrc.win32
+++ b/main/src/core/MonoDevelop.Ide/gtkrc.win32
@@ -24,6 +24,7 @@ gtk-auto-mnemonics = 1
gtk-alternative-button-order = 1
gtk-error-bell = 0
gtk-show-input-method-menu = 0
+gtk-font-name = "Segoe UI 9"
style "default" {
xthickness = 1
diff --git a/main/src/core/MonoDevelop.Ide/gtkrc.win32-vista b/main/src/core/MonoDevelop.Ide/gtkrc.win32-vista
new file mode 100644
index 0000000000..db29eeb54d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/gtkrc.win32-vista
@@ -0,0 +1,344 @@
+# Windows Theme for Xamarin composed by Lanedo GmbH
+# Copyright 2012 Xamarin Inc.
+# Authors:
+# Christian Kellner <christian.kellner@lanedo.com>
+# Carlos Garnacho <carlos.garnacho@lanedo.com>
+
+gtk-color-scheme =
+"bg_color: #f5f5f5
+fg_color: #000
+base_color: #fff
+text_color: #000
+selected_bg_color: #649dd6
+selected_fg_color: #fff
+tooltip_bg_color: #fff9e5
+tooltip_fg_color: #000"
+
+gtk-button-images = 0
+gtk-menu-images = 0
+gtk-toolbar-style = 0
+gtk-enable-mnemonics = 1
+gtk-icon-sizes = "gtk-small-toolbar=16,16:gtk-large-toolbar=22,22"
+gtk-toolbar-icon-size = large-toolbar
+gtk-auto-mnemonics = 1
+gtk-alternative-button-order = 1
+gtk-error-bell = 0
+gtk-show-input-method-menu = 0
+gtk-font-name = "Tahoma 8"
+
+style "default" {
+ xthickness = 1
+ ythickness = 1
+
+ ### colours
+ bg[NORMAL] = @bg_color
+ bg[PRELIGHT] = @bg_color
+ bg[SELECTED] = @selected_bg_color
+ bg[INSENSITIVE] = @bg_color
+ bg[ACTIVE] = @bg_color
+
+ fg[NORMAL] = @fg_color
+ fg[PRELIGHT] = @fg_color
+ fg[SELECTED] = @selected_fg_color
+ fg[INSENSITIVE] = darker (@bg_color)
+ fg[ACTIVE] = @fg_color
+
+ text[NORMAL] = @text_color
+ text[PRELIGHT] = @text_color
+ text[SELECTED] = @selected_fg_color
+ text[INSENSITIVE] = darker (@bg_color)
+ text[ACTIVE] = @text_color
+
+ base[NORMAL] = @base_color
+ base[PRELIGHT] = @selected_bg_color
+ base[SELECTED] = @selected_bg_color
+ base[INSENSITIVE] = @bg_color
+ base[ACTIVE] = shade (1.3, @selected_bg_color)
+
+ ### style properties
+ GtkWidget::new-tooltip-style = 1
+
+ GtkEntry::honors-transparent-bg-hint = 1
+ GtkEntry::inner-border = { 2, 2, 2, 2 }
+
+ GtkButton::child-displacement-x = 0
+ GtkButton::child-displacement-y = 0
+ GtkButton::default-border = { 0, 0, 0, 0 }
+ GtkButton::inner-border = { 2, 2, 2, 2 }
+
+ GtkTreeView::odd-row-color = @base_color
+
+ GtkScrolledWindow::scrollbar-spacing = 0
+ GtkScale::slider-length = 14
+
+ GtkMenu::horizontal-padding = 3
+ GtkMenu::vertical-padding = 3
+ GtkMenuItem::horizontal-padding = 2
+ GtkSeparatorMenuItem::horizontal-padding = 2
+
+ GtkTreeView::expander-size = 8
+ GtkExpander::expander-size = 8
+ GtkComboBox::arrow-size = 8
+
+ engine "xamarin" {
+
+ arrowstyle = 2
+ rgba = TRUE
+ roundness = 3
+ glazestyle = 0
+
+ menustyle = 0
+ menuitemstyle = 0
+ menubaritemstyle = 0
+ comboboxstyle = 1
+ spinbuttonstyle = 1
+ colorize_scrollbar = FALSE
+ progressbarstyle = 0
+ trough_shades = { 0.842, 0.886 }
+ }
+}
+
+style "wide" = "default" {
+ xthickness = 2
+ ythickness = 2
+}
+
+style "wider" = "default" {
+ xthickness = 3
+ ythickness = 3
+}
+
+
+style "button" {
+ xthickness = 2
+ ythickness = 1
+
+ engine "wimp" {
+ }
+}
+
+style "menu" = "default" {
+ xthickness = 0
+ ythickness = 0
+
+ engine "wimp" {
+ }
+}
+
+style "menu-item" = "default" {
+ xthickness = 5
+ ythickness = 3
+
+ engine "wimp" {
+ }
+}
+
+style "toolbar" = "default"
+{
+ bg[NORMAL] = "#ddd"
+ engine "xamarin" {
+ toolbarstyle = 2
+ }
+}
+
+style "toolbar-button"
+{
+ engine "xamarin" {
+ contrast = 1.0
+ focus_color = @bg_color
+ }
+}
+
+style "tooltip"
+{
+ xthickness = 5
+ ythickness = 5
+
+ fg[NORMAL] = @tooltip_fg_color
+ bg[NORMAL] = @tooltip_bg_color
+
+ engine "xamarin" {
+ roundness = 0
+ }
+}
+
+style "treeview" = "default"
+{
+ GtkTreeView::odd-row-color = "#f5f5f5"
+
+ base[SELECTED] = "#bcd0d4"
+ base[ACTIVE] = "#bcd0d4"
+ text[SELECTED] = "#000"
+
+ engine "xamarin" {
+ roundness = 0
+ gradient_shades = {1.0, 0.95, 0.95, 0.90}
+ glazestyle = 1
+ }
+}
+
+style "tree-header" = "wide"
+{
+ bg[NORMAL] = "#f2f2f2"
+
+ engine "xamarin" {
+ listviewheaderstyle = 3
+ separatorstyle = 1
+ }
+}
+
+style "icon-view" = "default"
+{
+ bg[SELECTED] = "#f5f7fa"
+ base[SELECTED] = "#f5f7fa"
+ fg[SELECTED] = "#000"
+ text[SELECTED] = "#000"
+}
+
+style "toolbar-combo-box" = "default"
+{
+ fg[NORMAL] = @fg_color
+ text[NORMAL] = @fg_color
+ bg[NORMAL] = "#fff"
+ base[NORMAL] = "#fff"
+
+ engine "wimp" {
+ comboboxstyle = 0
+ arrowstyle = 2
+ }
+}
+
+style "combo-box" = "default"
+{
+ fg[NORMAL] = "#616161"
+
+ engine "wimp" {
+ arrowstyle = 3
+ }
+}
+
+style "combo-box-label" = "combo-box"
+{
+ fg[NORMAL] = "#595959"
+}
+
+style "notebook" = "default"
+{
+ GtkNotebook::tab-overlap = 1
+ bg[ACTIVE] = @base_color
+ bg[NORMAL] = @base_color
+
+ engine "xamarin" {
+ gradient_shades = { 0.945, 0.945, 0.945, 0.685 }
+ }
+}
+
+style "radio-button" = "default"
+{
+ GtkCheckButton::indicator-size = 15
+ text[NORMAL] = lighter (@text_color)
+ base[NORMAL] = @base_color
+ text[ACTIVE] = lighter(@text_color)
+}
+
+style "check-box" = "default"
+{
+ GtkCheckButton::indicator-size = 15
+ base[NORMAL] = "#f8f8f8"
+ text[NORMAL] = "#404040"
+ text[ACTIVE] = "#404040"
+}
+
+style "entry" = "default"
+{
+ xthickness = 4
+ ythickness = 4
+ GtkEntry::inner-border = { 2, 2, 2, 2 }
+}
+
+style "search-entry" = "wider"
+{
+ GtkEntry::inner-border = { 0, 0, 0, 0 }
+ xthickness = 6
+ ythickness = 4
+ bg[NORMAL] = @base_color
+}
+
+style "scrollbar" = "default"
+{
+ GtkRange::slider-width = 7
+ GtkRange::trough-border = 2
+
+ engine "wimp" {
+ }
+}
+
+style "progressbar" = "default"
+{
+ bg[SELECTED] = "#62b3ec"
+ fg[SELECTED] = "#3a67a6"
+ xthickness = 0
+ ythickness = 0
+}
+
+style "scrolled-window" = "default"
+{
+ xthickness = 1
+ ythickness = 1
+}
+
+style "scale" = "default"
+{
+ engine "xamarin" {
+ roundness = 7
+ }
+}
+
+### Apply the styles
+class "GtkWidget" style "default"
+
+class "GtkEntry" style "entry"
+class "GtkSpinButton" style "wider"
+class "GtkFrame" style "wide"
+class "GtkRange" style "wide"
+class "GtkSeparator" style "wide"
+class "GtkScrollbar" style "scrollbar"
+class "GtkProgressBar" style "progressbar"
+class "GtkScrolledWindow" style "scrolled-window"
+class "GtkNotebook" style "notebook"
+class "GtkButton" style "button"
+
+class "GtkRadioButton" style "radio-button"
+class "GtkCheckButton" style "check-box"
+class "GtkScale" style "scale"
+
+widget "*GtkEntry" style:highest "entry"
+widget "*search-entry*" style "search-entry"
+
+widget_class "*<GtkButton>" style "button"
+widget "*.GtkToggleButton" style "button"
+
+widget_class "*<GtkMenu>*" style "menu"
+widget_class "*<GtkMenuItem>*" style "menu-item"
+
+widget_class "*<GtkToolbar>*" style "toolbar"
+widget_class "*ToolButton*" style "toolbar-button"
+
+widget_class "*.<GtkTreeView>*" style "treeview"
+widget_class "*.GtkTreeView.GtkButton" style "tree-header"
+widget_class "*.GtkList.GtkButton" style "tree-header"
+
+widget_class "*<GtkIconView>" style "icon-view"
+
+class "GtkComboBox" style "combo-box"
+widget_class "*.<GtkComboBox>.*" style "combo-box"
+widget_class "*.<GtkComboBoxText>.*" style "combo-box"
+widget_class "*.<GtkComboBoxEntry>.*" style "combo-box"
+widget_class "*.<GtkComboBoxText>.<GtkEntry>" style "entry"
+widget_class "*.<GtkComboBox>.*.GtkLabel" style "combo-box-label"
+
+# Comboboxes within toolbars
+widget_class "*.<GtkToolbar>.*.<GtkComboBox>.*" style "toolbar-combo-box"
+widget "*MainToolbar*.GtkComboBox.*" style "toolbar-combo-box"
+
+widget "gtk-tooltip*" style "tooltip"
diff --git a/main/src/core/MonoDevelop.Ide/icons/assembly-project-16.png b/main/src/core/MonoDevelop.Ide/icons/assembly-project-16.png
deleted file mode 100644
index 00b7896904..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/assembly-project-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/compiler-options-16.png b/main/src/core/MonoDevelop.Ide/icons/compiler-options-16.png
deleted file mode 100644
index b78f93e965..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/compiler-options-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/custom-commands-16.png b/main/src/core/MonoDevelop.Ide/icons/custom-commands-16.png
deleted file mode 100644
index 8cde617d3b..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/custom-commands-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/drive-16.png b/main/src/core/MonoDevelop.Ide/icons/drive-16.png
deleted file mode 100755
index b6822468da..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/drive-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/element-method-new-16.png b/main/src/core/MonoDevelop.Ide/icons/element-method-new-16.png
deleted file mode 100644
index 18462cd716..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/element-method-new-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/formatting-16.png b/main/src/core/MonoDevelop.Ide/icons/formatting-16.png
deleted file mode 100644
index e756df0546..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/formatting-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/hammer-16.png b/main/src/core/MonoDevelop.Ide/icons/hammer-16.png
deleted file mode 100755
index 970bdaa911..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/hammer-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/keyboard-shortcuts-16.png b/main/src/core/MonoDevelop.Ide/icons/keyboard-shortcuts-16.png
deleted file mode 100755
index 8b9c740f41..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/keyboard-shortcuts-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/letters-16.png b/main/src/core/MonoDevelop.Ide/icons/letters-16.png
deleted file mode 100755
index 8f22ae6273..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/letters-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/add-16.png b/main/src/core/MonoDevelop.Ide/icons/light/add-16.png
index 269fbb39be..1885122981 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/add-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/add-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/add-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/add-16@2x.png
index 2c0ba56029..3b6dece125 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/add-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/add-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16.png b/main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16.png
new file mode 100644
index 0000000000..52552a1e07
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16@2x.png
new file mode 100644
index 0000000000..a38862f132
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/assembly-project-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16.png
index cc19a5ade7..c0c017eb32 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16@2x.png
index 53c8edb69a..9f68a52e2f 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16.png
index 9d6386ab10..c7075c7e8c 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16@2x.png
index 8186681899..6a684c6baf 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-invalid-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16.png
index f3b20d1c1f..186cab63bc 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16@2x.png
index d29f35d0be..fd0345e0d9 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-new-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16.png
index 5a4fe826c1..99a37a5497 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16@2x.png
index 2611c196cb..4bdfc0bd33 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/breakpoint-on-off-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16.png b/main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16.png
deleted file mode 100644
index 971e1efd8a..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16@2x.png
deleted file mode 100644
index 0937a14bbf..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/light/bubble-error-16@2x.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16.png b/main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16.png
deleted file mode 100644
index e78e182895..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16@2x.png
deleted file mode 100644
index e5b40a38ac..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/light/bubble-warning-16@2x.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16.png b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16.png
index d7ca5bfe6e..51fa67e549 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16@2x.png
index 1a2c0cc7e7..b950a73ec0 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-osx-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16.png b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16.png
index 21fad341a6..891aa54875 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16@2x.png
index bfaa5a2c6c..553126f036 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/component-folder-win-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/copy-16.png b/main/src/core/MonoDevelop.Ide/icons/light/copy-16.png
new file mode 100644
index 0000000000..574162bafa
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/copy-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/copy-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/copy-16@2x.png
new file mode 100644
index 0000000000..343cabc06c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/copy-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/done-16.png b/main/src/core/MonoDevelop.Ide/icons/light/done-16.png
index 469f60c5e3..7799066c43 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/done-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/done-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/done-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/done-16@2x.png
index 7b24c97916..c63d3974d1 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/done-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/done-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/edit-16.png b/main/src/core/MonoDevelop.Ide/icons/light/edit-16.png
new file mode 100644
index 0000000000..2854ace426
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/edit-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/edit-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/edit-16@2x.png
new file mode 100644
index 0000000000..0e181c6ec5
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/edit-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-exception-16.png b/main/src/core/MonoDevelop.Ide/icons/light/element-exception-16.png
new file mode 100644
index 0000000000..d25657e2af
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-exception-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-exception-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/element-exception-16@2x.png
new file mode 100644
index 0000000000..e926c3c9ab
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-exception-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16.png b/main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16.png
new file mode 100644
index 0000000000..fdfd653023
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16@2x.png
new file mode 100644
index 0000000000..2e1b4c5ec9
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-fs-field-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16.png b/main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16.png
new file mode 100644
index 0000000000..440b505bb8
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16@2x.png
new file mode 100644
index 0000000000..d6011bb744
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-method-new-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-module-16.png b/main/src/core/MonoDevelop.Ide/icons/light/element-module-16.png
new file mode 100644
index 0000000000..8c866474da
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-module-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-module-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/element-module-16@2x.png
new file mode 100644
index 0000000000..bd2192282e
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-module-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16.png b/main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16.png
new file mode 100644
index 0000000000..bb9955fb86
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16@2x.png
new file mode 100644
index 0000000000..e94d4d8b38
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-other-declaration-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-type-16.png b/main/src/core/MonoDevelop.Ide/icons/light/element-type-16.png
new file mode 100644
index 0000000000..53a2f5f33f
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-type-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/element-type-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/element-type-16@2x.png
new file mode 100644
index 0000000000..11fcb74fd6
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/element-type-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-16.png b/main/src/core/MonoDevelop.Ide/icons/light/error-16.png
index d9c4c975f2..30b5da6e9b 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/error-16@2x.png
index 22dfe0c16c..adfd2b7b19 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-24.png b/main/src/core/MonoDevelop.Ide/icons/light/error-24.png
index 5fd87a9170..637ab79bff 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-24.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-24.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-24@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/error-24@2x.png
index 6973c54f8d..bf5a3b9f70 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-24@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-24@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-32.png b/main/src/core/MonoDevelop.Ide/icons/light/error-32.png
index 22dfe0c16c..adfd2b7b19 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-32.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-32.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-32@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/error-32@2x.png
index da95643e4a..f422cb3969 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-32@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-32@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-48.png b/main/src/core/MonoDevelop.Ide/icons/light/error-48.png
index 6973c54f8d..bf5a3b9f70 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-48.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-48.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/error-48@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/error-48@2x.png
index 9ab708779d..1e2cd50f70 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/error-48@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/error-48@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/file-script-16.png b/main/src/core/MonoDevelop.Ide/icons/light/file-script-16.png
new file mode 100644
index 0000000000..78fab9fae2
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/file-script-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/file-script-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/file-script-16@2x.png
new file mode 100644
index 0000000000..a77dfbe024
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/file-script-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/file-script-32.png b/main/src/core/MonoDevelop.Ide/icons/light/file-script-32.png
new file mode 100644
index 0000000000..a77dfbe024
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/file-script-32.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/file-script-32@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/file-script-32@2x.png
new file mode 100644
index 0000000000..892e70fc93
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/file-script-32@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/find-16.png b/main/src/core/MonoDevelop.Ide/icons/light/find-16.png
new file mode 100644
index 0000000000..85e5d0df07
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/find-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/find-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/find-16@2x.png
new file mode 100644
index 0000000000..f53fae3769
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/find-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16.png b/main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16.png
new file mode 100644
index 0000000000..4fd9e05804
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16@2x.png
new file mode 100644
index 0000000000..9ae65404e5
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/find-and-replace-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-back-16.png b/main/src/core/MonoDevelop.Ide/icons/light/go-back-16.png
new file mode 100644
index 0000000000..a812575428
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-back-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-back-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/go-back-16@2x.png
new file mode 100644
index 0000000000..dd2620713e
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-back-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-down-16.png b/main/src/core/MonoDevelop.Ide/icons/light/go-down-16.png
new file mode 100644
index 0000000000..24c499b29c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-down-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-down-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/go-down-16@2x.png
new file mode 100644
index 0000000000..2df5aecf13
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-down-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-forward-16.png b/main/src/core/MonoDevelop.Ide/icons/light/go-forward-16.png
new file mode 100644
index 0000000000..1d338ba1bb
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-forward-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-forward-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/go-forward-16@2x.png
new file mode 100644
index 0000000000..cd6c264767
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-forward-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-up-16.png b/main/src/core/MonoDevelop.Ide/icons/light/go-up-16.png
new file mode 100644
index 0000000000..3d7f56a783
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-up-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/go-up-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/go-up-16@2x.png
new file mode 100644
index 0000000000..d768f10cfa
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/go-up-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/home-16.png b/main/src/core/MonoDevelop.Ide/icons/light/home-16.png
new file mode 100644
index 0000000000..33f0f125d1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/home-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/home-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/home-16@2x.png
new file mode 100644
index 0000000000..4911d16866
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/home-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-16.png b/main/src/core/MonoDevelop.Ide/icons/light/information-16.png
index 9356e63b4c..fbddc185a4 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/information-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/information-16@2x.png
index 80e73da7ee..5557a3de4a 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/information-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-24.png b/main/src/core/MonoDevelop.Ide/icons/light/information-24.png
new file mode 100644
index 0000000000..28e68fb1e2
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-24.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-24@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/information-24@2x.png
new file mode 100644
index 0000000000..b11eeacab1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-24@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-32.png b/main/src/core/MonoDevelop.Ide/icons/light/information-32.png
new file mode 100644
index 0000000000..5557a3de4a
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-32.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-32@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/information-32@2x.png
new file mode 100644
index 0000000000..e793ec82ae
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-32@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-48.png b/main/src/core/MonoDevelop.Ide/icons/light/information-48.png
new file mode 100644
index 0000000000..b11eeacab1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-48.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/information-48@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/information-48@2x.png
new file mode 100644
index 0000000000..8f1fc67009
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/information-48@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/jump-to-16.png b/main/src/core/MonoDevelop.Ide/icons/light/jump-to-16.png
new file mode 100644
index 0000000000..274255670b
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/jump-to-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/jump-to-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/jump-to-16@2x.png
new file mode 100644
index 0000000000..2c0c87596d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/jump-to-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/media-play-16.png b/main/src/core/MonoDevelop.Ide/icons/light/media-play-16.png
new file mode 100644
index 0000000000..7b5e2a5b1f
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/media-play-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/media-play-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/media-play-16@2x.png
new file mode 100644
index 0000000000..4e2eaf097d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/media-play-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/missing-image-16.png b/main/src/core/MonoDevelop.Ide/icons/light/missing-image-16.png
new file mode 100644
index 0000000000..bf13fbba53
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/missing-image-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/missing-image-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/missing-image-16@2x.png
new file mode 100644
index 0000000000..71dba1ed78
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/missing-image-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/open-16.png b/main/src/core/MonoDevelop.Ide/icons/light/open-16.png
new file mode 100644
index 0000000000..fbb0cec986
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/open-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-16.png b/main/src/core/MonoDevelop.Ide/icons/light/package-16.png
new file mode 100644
index 0000000000..be53353283
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/package-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/package-16@2x.png
new file mode 100644
index 0000000000..6f21d7aa77
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/package-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-22.png b/main/src/core/MonoDevelop.Ide/icons/light/package-22.png
deleted file mode 100644
index 1f766f555e..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/light/package-22.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-22@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/package-22@2x.png
deleted file mode 100644
index 5ea3ad546e..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/light/package-22@2x.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-24.png b/main/src/core/MonoDevelop.Ide/icons/light/package-24.png
new file mode 100644
index 0000000000..0e2e9604a4
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/package-24.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-24@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/package-24@2x.png
new file mode 100644
index 0000000000..81a5324fce
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/package-24@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-source-16.png b/main/src/core/MonoDevelop.Ide/icons/light/package-source-16.png
new file mode 100644
index 0000000000..c01c3f5eb0
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/package-source-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/package-source-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/package-source-16@2x.png
new file mode 100644
index 0000000000..7e19f0f3b1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/package-source-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/parser-16.png b/main/src/core/MonoDevelop.Ide/icons/light/parser-16.png
new file mode 100644
index 0000000000..ab202bec62
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/parser-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/parser-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/parser-16@2x.png
new file mode 100644
index 0000000000..3e5e73d7ad
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/parser-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16.png
new file mode 100644
index 0000000000..a911510938
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16@2x.png
new file mode 100644
index 0000000000..e6de7cb721
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-author-information-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16.png
new file mode 100644
index 0000000000..45fd2732a6
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16@2x.png
new file mode 100644
index 0000000000..2e6aec66a5
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-build-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16.png
new file mode 100644
index 0000000000..66313da3bc
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16@2x.png
new file mode 100644
index 0000000000..243e316934
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-formatting-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16.png
new file mode 100644
index 0000000000..ba48bc0df4
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16@2x.png
new file mode 100644
index 0000000000..052e26edf7
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-code-templates-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16.png
new file mode 100644
index 0000000000..34b7ac06e1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16@2x.png
new file mode 100644
index 0000000000..df5ea2bdc6
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-csharp-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16.png
new file mode 100644
index 0000000000..e7e0d6f2e6
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16@2x.png
new file mode 100644
index 0000000000..a5443dde5b
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-dotnet-naming-policies-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16.png
new file mode 100644
index 0000000000..73668287fb
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16@2x.png
new file mode 100644
index 0000000000..3fb43534d5
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-external-tools-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16.png
new file mode 100644
index 0000000000..72ed2240e2
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16@2x.png
new file mode 100644
index 0000000000..00609d0eca
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-fonts-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16.png
new file mode 100644
index 0000000000..7e65a86774
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16@2x.png
new file mode 100644
index 0000000000..593606db5f
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-generic-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16.png
new file mode 100644
index 0000000000..52c35f86fb
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16@2x.png
new file mode 100644
index 0000000000..5184aa50c6
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-key-bindings-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16.png
new file mode 100644
index 0000000000..19f2663360
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16@2x.png
new file mode 100644
index 0000000000..1e4d00deb6
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-language-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16.png
new file mode 100644
index 0000000000..4cda9212c9
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16@2x.png
new file mode 100644
index 0000000000..93c03d1a65
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-load-save-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16.png
new file mode 100644
index 0000000000..e6a8ac57cf
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16@2x.png
new file mode 100644
index 0000000000..3267cddee2
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-name-conventions-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16.png
new file mode 100644
index 0000000000..66bf188a37
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16@2x.png
new file mode 100644
index 0000000000..417e6855b3
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-play-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16.png
new file mode 100644
index 0000000000..800b76d447
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16@2x.png
new file mode 100644
index 0000000000..c319f59bc2
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-sdk-locations-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16.png
new file mode 100644
index 0000000000..83f9bcee6d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16@2x.png
new file mode 100644
index 0000000000..05d18fb6bd
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-standard-header-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16.png
new file mode 100644
index 0000000000..17e0ea108d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16@2x.png
new file mode 100644
index 0000000000..fe974de727
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-task-list-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16.png
new file mode 100644
index 0000000000..818f09fb65
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16@2x.png
new file mode 100644
index 0000000000..0582e35d0c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/prefs-updates-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32.png b/main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32.png
new file mode 100644
index 0000000000..ba79bfa5fa
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32@2x.png
new file mode 100644
index 0000000000..755c6c6ef4
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/project-package-overlay-32@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32.png b/main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32.png
new file mode 100644
index 0000000000..22a964cdf1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32@2x.png
new file mode 100644
index 0000000000..69e1d3ec2b
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/project-shared-assets-overlay-32@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-16.png b/main/src/core/MonoDevelop.Ide/icons/light/question-16.png
new file mode 100644
index 0000000000..eaaa5ef50c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/question-16@2x.png
new file mode 100644
index 0000000000..37cf140f47
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-24.png b/main/src/core/MonoDevelop.Ide/icons/light/question-24.png
new file mode 100644
index 0000000000..9f6e40ebf4
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-24.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-24@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/question-24@2x.png
new file mode 100644
index 0000000000..9dd68c7f5a
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-24@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-32.png b/main/src/core/MonoDevelop.Ide/icons/light/question-32.png
new file mode 100644
index 0000000000..37cf140f47
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-32.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-32@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/question-32@2x.png
new file mode 100644
index 0000000000..a6c00f792f
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-32@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-48.png b/main/src/core/MonoDevelop.Ide/icons/light/question-48.png
new file mode 100644
index 0000000000..9dd68c7f5a
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-48.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/question-48@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/question-48@2x.png
new file mode 100644
index 0000000000..589e1b09b4
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/question-48@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/refresh-16.png b/main/src/core/MonoDevelop.Ide/icons/light/refresh-16.png
new file mode 100644
index 0000000000..b7ffd20c72
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/refresh-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/refresh-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/refresh-16@2x.png
new file mode 100644
index 0000000000..b65a18fc0a
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/refresh-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/remove-16.png b/main/src/core/MonoDevelop.Ide/icons/light/remove-16.png
index df22807792..7e76236f64 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/remove-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/remove-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/remove-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/remove-16@2x.png
index bc36be9fb8..21318f43f2 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/remove-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/remove-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/save-16.png b/main/src/core/MonoDevelop.Ide/icons/light/save-16.png
new file mode 100644
index 0000000000..50d6447f3e
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/save-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/save-all-16.png b/main/src/core/MonoDevelop.Ide/icons/light/save-all-16.png
new file mode 100644
index 0000000000..6c6ae344d2
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/save-all-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16.png b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16.png
index 0fa4ff431d..43c2b89ca3 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16@2x.png
index 1327938fdf..89e8b80498 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-osx-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16.png b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16.png
index 8e42fc4516..883bee1822 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16@2x.png
index f012aad6aa..fe3524f326 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/special-folder-win-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1.png
new file mode 100644
index 0000000000..46bcd36296
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1@2x.png
new file mode 100644
index 0000000000..d223e473fc
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-1@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2.png
new file mode 100644
index 0000000000..b7d78f7bc1
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2@2x.png
new file mode 100644
index 0000000000..6a1b63bca9
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-2@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3.png
new file mode 100644
index 0000000000..778197b418
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3@2x.png
new file mode 100644
index 0000000000..8832d93af8
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-3@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4.png
new file mode 100644
index 0000000000..bd3aada045
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4@2x.png
new file mode 100644
index 0000000000..910e6006e7
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-4@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5.png
new file mode 100644
index 0000000000..c6ca97cdac
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5@2x.png
new file mode 100644
index 0000000000..1d65ac1a40
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-14-5@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1.png
new file mode 100644
index 0000000000..13f98ff915
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1@2x.png
new file mode 100644
index 0000000000..519289fc89
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-1@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2.png
new file mode 100644
index 0000000000..5c52a0e30c
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2@2x.png
new file mode 100644
index 0000000000..f0fd719b19
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-2@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3.png
new file mode 100644
index 0000000000..951c2ed964
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3@2x.png
new file mode 100644
index 0000000000..4be02f16ab
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-3@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4.png
new file mode 100644
index 0000000000..eb6291bba3
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4@2x.png
new file mode 100644
index 0000000000..5a05ec623d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-4@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5.png
new file mode 100644
index 0000000000..ed0c2abec5
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5@2x.png
new file mode 100644
index 0000000000..967eecfee7
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/spinner-18-5@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/stop-16.png b/main/src/core/MonoDevelop.Ide/icons/light/stop-16.png
index 7b09206fac..ea37d34b8c 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/stop-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/stop-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/stop-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/stop-16@2x.png
index e69e660db4..d281d4f5be 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/stop-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/stop-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/undo-16.png b/main/src/core/MonoDevelop.Ide/icons/light/undo-16.png
new file mode 100644
index 0000000000..8a5836ce43
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/undo-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/undo-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/undo-16@2x.png
new file mode 100644
index 0000000000..103f68d4bd
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/undo-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/updates-16.png b/main/src/core/MonoDevelop.Ide/icons/light/updates-16.png
index 6d68a87461..818f09fb65 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/updates-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/updates-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/updates-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/updates-16@2x.png
index 64d9c9cfe6..0582e35d0c 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/updates-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/updates-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/warning-8.png b/main/src/core/MonoDevelop.Ide/icons/light/warning-8.png
new file mode 100644
index 0000000000..888e69f00f
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/warning-8.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/warning-8@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/warning-8@2x.png
new file mode 100644
index 0000000000..36e3484d08
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/warning-8@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16.png b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16.png
index bd92bcbcf4..b017bd788e 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16@2x.png
index 68e6a8d4d8..e4f89773dd 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-osx-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16.png b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16.png
index aa9b96885e..0f412c1753 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16@2x.png
index 821056da5f..6b404b4007 100644
--- a/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16@2x.png
+++ b/main/src/core/MonoDevelop.Ide/icons/light/web-reference-folder-win-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16.png b/main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16.png
new file mode 100644
index 0000000000..74a0653a80
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16@2x.png
new file mode 100644
index 0000000000..a92d18dfa0
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/zoom-in-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16.png b/main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16.png
new file mode 100644
index 0000000000..ea2ea187f3
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16@2x.png b/main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16@2x.png
new file mode 100644
index 0000000000..34e563fcce
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/icons/light/zoom-out-16@2x.png
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/locale-16.png b/main/src/core/MonoDevelop.Ide/icons/locale-16.png
deleted file mode 100644
index 22b7913c19..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/locale-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/markers-rulers-16.png b/main/src/core/MonoDevelop.Ide/icons/markers-rulers-16.png
deleted file mode 100755
index f1ee975bdb..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/markers-rulers-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/monkey-16.png b/main/src/core/MonoDevelop.Ide/icons/monkey-16.png
deleted file mode 100755
index df60d4de1a..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/monkey-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/parser-16.png b/main/src/core/MonoDevelop.Ide/icons/parser-16.png
deleted file mode 100644
index 6b87d3e9fb..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/parser-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/save-all-16.png b/main/src/core/MonoDevelop.Ide/icons/save-all-16.png
deleted file mode 100644
index 16a2642c70..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/save-all-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/sdk-locations-16.png b/main/src/core/MonoDevelop.Ide/icons/sdk-locations-16.png
deleted file mode 100755
index 12f988e94e..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/sdk-locations-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/syntax-highlighting-16.png b/main/src/core/MonoDevelop.Ide/icons/syntax-highlighting-16.png
deleted file mode 100644
index 449f0f7e4b..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/syntax-highlighting-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/text-editor-16.png b/main/src/core/MonoDevelop.Ide/icons/text-editor-16.png
deleted file mode 100644
index 188e1c12bd..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/text-editor-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/text-editor-behavior-16.png b/main/src/core/MonoDevelop.Ide/icons/text-editor-behavior-16.png
deleted file mode 100644
index 007ab18815..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/text-editor-behavior-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/text-quickfix-16.png b/main/src/core/MonoDevelop.Ide/icons/text-quickfix-16.png
deleted file mode 100755
index 5f0e34f490..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/text-quickfix-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/icons/tools-external-tools-16.png b/main/src/core/MonoDevelop.Ide/icons/tools-external-tools-16.png
deleted file mode 100755
index fe8428588b..0000000000
--- a/main/src/core/MonoDevelop.Ide/icons/tools-external-tools-16.png
+++ /dev/null
Binary files differ
diff --git a/main/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml b/main/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml
index 5946730557..24dd969d95 100644
--- a/main/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml
+++ b/main/src/core/MonoDevelop.Ide/options/KeyBindingSchemeVisualStudio.xml
@@ -1,9 +1,10 @@
<scheme version="1.0">
- <binding command="MonoDevelop.Ide.Commands.DebugCommands.Pause" shortcut="Control+F8" />
+ <binding command="MonoDevelop.Ide.Commands.DebugCommands.Pause" shortcut="Control+Alt+Break" />
<binding command="MonoDevelop.Ide.Commands.DebugCommands.StepInto" shortcut="F11" />
<binding command="MonoDevelop.Ide.Commands.DebugCommands.StepOut" shortcut="Shift+F11" />
<binding command="MonoDevelop.Ide.Commands.DebugCommands.StepOver" shortcut="F10" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.LowercaseSelection" shortcut="Control+U" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.UppercaseSelection" shortcut="Control+Shift+U" />
<binding command="MonoDevelop.Ide.Commands.FileCommands.CloseFile" shortcut="Control+F4" />
<binding command="MonoDevelop.Ide.Commands.FileCommands.SaveAll" shortcut="Control+Shift+S" />
<binding command="MonoDevelop.Ide.Commands.FileCommands.SaveAs" shortcut="" />
@@ -23,21 +24,23 @@
<binding command="MonoDevelop.Ide.Commands.EditCommands.FoldDefinitions" shortcut="Control+M|Control+O" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleAllFoldings" shortcut="Control+M|Control+L" />
<binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleFolding" shortcut="Control+M|Control+M" />
- <binding command="MonoDevelop.Ide.Commands.EditCommands.ToggleCodeComment" shortcut="Control+K|Control+C" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.AddCodeComment" shortcut="Control+E|C" />
+ <binding command="MonoDevelop.Ide.Commands.EditCommands.RemoveCodeComment" shortcut="Control+E|U" />
<binding command="MonoDevelop.Ide.Commands.ProjectCommands.AddNewFiles" shortcut="Control+Shift+A" />
<binding command="MonoDevelop.Ide.Commands.ProjectCommands.AddItem" shortcut="Alt+Shift+A" />
<binding command="MonoDevelop.Ide.Commands.ViewCommands.ShowNext" shortcut="F8" />
<binding command="MonoDevelop.Ide.Commands.ViewCommands.ShowPrevious" shortcut="Shift+F8" />
<binding command="MonoDevelop.Ide.Commands.SearchCommands.GotoType" shortcut="Control+K|Control+V" />
- <binding command="MonoDevelop.Ide.Commands.WindowCommands.SwitchSplitWindow" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.WindowCommands.SwitchSplitWindow" shortcut="" />
<binding command="MonoDevelop.Debugger.DebugCommands.Debug" shortcut="F5" />
<binding command="MonoDevelop.Debugger.DebugCommands.StepInto" shortcut="F11" />
<binding command="MonoDevelop.Debugger.DebugCommands.StepOver" shortcut="F10" />
- <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteToLineEnd" shortcut="" />
- <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLine" shortcut="Control+L" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteToLineEnd" shortcut="" />
+ <binding command="MonoDevelop.Ide.Commands.TextEditorCommands.DeleteLine" shortcut="Control+L" />
<binding command="Pad|MonoDevelop.Ide.Gui.Pads.ErrorListPad" shortcut="Control+W|E" />
<binding command="Pad|MonoDevelop.Debugger.LocalsPad" shortcut="Control+D|L" />
<binding command="Pad|MonoDevelop.Debugger.StackTracePad" shortcut="Control+D|C" />
+ <binding command="Pad|MonoDevelop.Debugger.ImmediatePad" shortcut="Control+D|I" />
<binding command="Pad|MonoDevelop.Debugger.DebugCommands.ExpressionEvaluator" shortcut="Control+D|Q" />
<binding command="Pad|MonoDevelop.Debugger.WatchPad" shortcut="Control+D|W" />
<binding command="Pad|ClassPad" shortcut="Control+W|C" />
@@ -55,4 +58,7 @@
<binding command="MonoDevelop.Ide.Commands.ViewCommands.ZoomIn" shortcut="Control+Alt++" />
<binding command="MonoDevelop.Ide.Commands.ViewCommands.ZoomOut" shortcut="Control+Alt+-" />
<binding command="MonoDevelop.Refactoring.RefactoryCommands.QuickFix" shortcut="Control+." />
+ <binding command="MonoDevelop.Ide.CodeFormatting.CodeFormattingCommands.FormatBuffer" shortcut="Control+E|D" />
+ <binding command="MonoDevelop.Ide.CodeFormatting.CodeFormattingCommands.FormatSelection" shortcut="Control+E|F" />
+ <binding command="MonoDevelop.Debugger.DebugCommands.SelectExceptions" shortcut="Control+Alt+E" />
</scheme>
diff --git a/main/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml b/main/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml
index b221cadb62..bfe1d9d579 100644
--- a/main/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml
+++ b/main/src/core/MonoDevelop.Ide/templates/EmptyResourceFile.xft.xml
@@ -2,19 +2,31 @@
<Template Originator="Mike Krueger" Language="ResourceFiles" Created="6/10/2001" LastModified="6/10/2001">
<TemplateConfiguration>
- <_Name>Empty Resource File</_Name>
+ <_Name>Resource File</_Name>
<Icon>md-resource-file-icon</Icon>
<_Category>Misc</_Category>
<ProjectType>DotNet</ProjectType>
- <_Description>Creates an empty resource file.</_Description>
- <DefaultFilename>EmptyResourcefile</DefaultFilename>
+ <_Description>Creates a resx resource file.</_Description>
+ <DefaultFilename>Resources</DefaultFilename>
</TemplateConfiguration>
<TemplateFiles>
<ProjectResource>
<File name="${Name}.resx" CustomTool="ResXFileCodeGenerator">
- <![CDATA[<?xml version="1.0" encoding="utf-8"?>
+<![CDATA[<?xml version="1.0" encoding="utf-8"?>
<root>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
</root>
]]>
</File>
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/Main.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/Main.cs
index 2b8b5144a1..7436777040 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/Main.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/Main.cs
@@ -51,7 +51,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
ObjRef oref = RemotingServices.Marshal (builderEngine);
var ms = new MemoryStream ();
bf.Serialize (ms, oref);
- Console.Error.WriteLine (Convert.ToBase64String (ms.ToArray ()));
+ Console.Error.WriteLine ("[MonoDevelop]" + Convert.ToBase64String (ms.ToArray ()));
if (WaitHandle.WaitAny (new WaitHandle[] { builderEngine.WaitHandle, exitEvent }) == 0) {
// Wait before exiting, so that the remote call that disposed the builder can be completed
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.csproj b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.csproj
index 0dd7cecb4e..76cae3f03b 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.csproj
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.csproj
@@ -41,7 +41,6 @@
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ProjectBuilder.cs" />
- <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\LocalLogger.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ILogWriter.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\IProjectBuilder.cs" />
@@ -49,6 +48,9 @@
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\IBuildEngine.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ConsoleLogger.cs" />
<Compile Include="AssemblyInfo.v4.0.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildTargetResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildEvaluatedItem.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v12.0.csproj b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v12.0.csproj
index 37a4cb9462..782f0b2266 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v12.0.csproj
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v12.0.csproj
@@ -51,7 +51,6 @@
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AssemblyInfo.cs" />
- <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\LocalLogger.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ILogWriter.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\IProjectBuilder.cs" />
@@ -59,6 +58,9 @@
<Compile Include="AssemblyInfo.v12.0.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ProjectBuilder.v4.0.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\BuildEngine.v4.0.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildTargetResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildEvaluatedItem.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v4.0.csproj b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v4.0.csproj
index f29e31bd76..63a67e8f28 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v4.0.csproj
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.dotnet.v4.0.csproj
@@ -45,7 +45,6 @@
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="AssemblyInfo.cs" />
- <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\LocalLogger.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ILogWriter.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\IProjectBuilder.cs" />
@@ -53,6 +52,9 @@
<Compile Include="AssemblyInfo.v4.0.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ProjectBuilder.v4.0.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\BuildEngine.v4.0.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildTargetResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildEvaluatedItem.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj
index d38044660b..cf8930ff78 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild.v4.0.csproj
@@ -43,7 +43,6 @@
<Compile Include="Main.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ProjectBuilder.cs" />
- <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\LocalLogger.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ILogWriter.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\IProjectBuilder.cs" />
@@ -51,6 +50,9 @@
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\IBuildEngine.cs" />
<Compile Include="MonoDevelop.Projects.Formats.MSBuild\ConsoleLogger.cs" />
<Compile Include="AssemblyInfo.v4.0.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildTargetResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildResult.cs" />
+ <Compile Include="MonoDevelop.Projects.Formats.MSBuild\MSBuildEvaluatedItem.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs
index f27b93dd8b..b50b65b1e7 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.cs
@@ -49,7 +49,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
readonly ManualResetEvent doneEvent = new ManualResetEvent (false);
readonly Dictionary<string,string> unsavedProjects = new Dictionary<string, string> ();
- internal Engine Engine { get; private set; }
+ internal readonly Engine Engine = new Engine { DefaultToolsVersion = MSBuildConsts.Version };
public void Dispose ()
{
@@ -60,10 +60,17 @@ namespace MonoDevelop.Projects.Formats.MSBuild
get { return doneEvent; }
}
- public void Initialize (string slnFile, CultureInfo uiCulture)
+ public void SetCulture (CultureInfo uiCulture)
{
BuildEngine.uiCulture = uiCulture;
- Engine = InitializeEngine (slnFile);
+
+ }
+
+ public void SetGlobalProperties (IDictionary<string, string> properties)
+ {
+ var gp = Engine.GlobalProperties;
+ foreach (var p in properties)
+ gp.SetProperty (p.Key, p.Value);
}
public IProjectBuilder LoadProject (string file)
@@ -82,31 +89,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return null;
}
- static Engine InitializeEngine (string slnFile)
- {
- var engine = new Engine ();
- engine.DefaultToolsVersion = MSBuildConsts.Version;
- var gp = engine.GlobalProperties;
-
- //this causes build targets to behave how they should inside an IDE, instead of in a command-line process
- gp.SetProperty ("BuildingInsideVisualStudio", "true");
-
- //we don't have host compilers in MD, and this is set to true by some of the MS targets
- //which causes it to always run the CoreCompile task if BuildingInsideVisualStudio is also
- //true, because the VS in-process compiler would take care of the deps tracking
- gp.SetProperty ("UseHostCompilerIfAvailable", "false");
-
- if (string.IsNullOrEmpty (slnFile))
- return engine;
-
- gp.SetProperty ("SolutionPath", Path.GetFullPath (slnFile));
- gp.SetProperty ("SolutionName", Path.GetFileNameWithoutExtension (slnFile));
- gp.SetProperty ("SolutionFilename", Path.GetFileName (slnFile));
- gp.SetProperty ("SolutionDir", Path.GetDirectoryName (slnFile) + Path.DirectorySeparatorChar);
-
- return engine;
- }
-
internal void UnloadProject (string file)
{
lock (unsavedProjects)
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
index 03d365b6f0..d184314662 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/BuildEngine.v4.0.cs
@@ -48,7 +48,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
readonly ManualResetEvent doneEvent = new ManualResetEvent (false);
readonly Dictionary<string, string> unsavedProjects = new Dictionary<string, string> ();
- ProjectCollection engine;
+ readonly ProjectCollection engine = new ProjectCollection { DefaultToolsVersion = MSBuildConsts.Version };
public void Dispose ()
{
@@ -59,13 +59,18 @@ namespace MonoDevelop.Projects.Formats.MSBuild
get { return doneEvent; }
}
- public void Initialize (string solutionFile, CultureInfo uiCulture)
+ public void SetCulture (CultureInfo uiCulture)
{
BuildEngine.uiCulture = uiCulture;
- engine = InitializeEngine (solutionFile);
- }
-
- public IProjectBuilder LoadProject (string file)
+ }
+
+ public void SetGlobalProperties (IDictionary<string, string> properties)
+ {
+ foreach (var p in properties)
+ engine.SetGlobalProperty (p.Key, p.Value);
+ }
+
+ public IProjectBuilder LoadProject (string file)
{
return new ProjectBuilder (this, engine, file);
}
@@ -96,30 +101,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return null;
}
- static ProjectCollection InitializeEngine (string slnFile)
- {
- var engine = new ProjectCollection ();
- engine.DefaultToolsVersion = MSBuildConsts.Version;
-
- //this causes build targets to behave how they should inside an IDE, instead of in a command-line process
- engine.SetGlobalProperty ("BuildingInsideVisualStudio", "true");
-
- //we don't have host compilers in MD, and this is set to true by some of the MS targets
- //which causes it to always run the CoreCompile task if BuildingInsideVisualStudio is also
- //true, because the VS in-process compiler would take care of the deps tracking
- engine.SetGlobalProperty ("UseHostCompilerIfAvailable", "false");
-
- if (string.IsNullOrEmpty (slnFile))
- return engine;
-
- engine.SetGlobalProperty ("SolutionPath", Path.GetFullPath (slnFile));
- engine.SetGlobalProperty ("SolutionName", Path.GetFileNameWithoutExtension (slnFile));
- engine.SetGlobalProperty ("SolutionFilename", Path.GetFileName (slnFile));
- engine.SetGlobalProperty ("SolutionDir", Path.GetDirectoryName (slnFile) + Path.DirectorySeparatorChar);
-
- return engine;
- }
-
internal void UnloadProject (string file)
{
lock (unsavedProjects)
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs
index c90f698137..6de6830e73 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ConsoleLogger.cs
@@ -69,7 +69,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild {
}
public MDConsoleLogger (LoggerVerbosity verbosity)
- : this (LoggerVerbosity.Normal, null, null, null)
+ : this (verbosity, null, null, null)
{
}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IBuildEngine.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IBuildEngine.cs
index 98b06a6fea..9b25cae19b 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IBuildEngine.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IBuildEngine.cs
@@ -26,12 +26,14 @@
using System;
using System.Globalization;
+using System.Collections.Generic;
namespace MonoDevelop.Projects.Formats.MSBuild
{
public interface IBuildEngine: IDisposable
{
- void Initialize (string solutionFile, CultureInfo uiCulture);
+ void SetCulture (CultureInfo uiCulture);
+ void SetGlobalProperties (IDictionary<string, string> properties);
IProjectBuilder LoadProject (string projectFile);
void UnloadProject (IProjectBuilder pb);
}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IProjectBuilder.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IProjectBuilder.cs
index d85aa365a2..0160085979 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IProjectBuilder.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/IProjectBuilder.cs
@@ -30,11 +30,12 @@ namespace MonoDevelop.Projects.Formats.MSBuild
{
public interface IProjectBuilder : IDisposable
{
- MSBuildResult[] RunTarget (string target, ProjectConfigurationInfo[] configurations, ILogWriter logWriter,
- MSBuildVerbosity verbosity);
- string[] GetAssemblyReferences (ProjectConfigurationInfo[] configurations);
void Refresh ();
void RefreshWithContent (string projectContent);
+ MSBuildResult Run (
+ ProjectConfigurationInfo[] configurations, ILogWriter logWriter, MSBuildVerbosity verbosity,
+ string[] runTargets, string[] evaluateItems, string[] evaluateProperties
+ );
}
[Serializable]
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/LocalLogger.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/LocalLogger.cs
index 4b1771de39..7d08df441e 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/LocalLogger.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/LocalLogger.cs
@@ -35,7 +35,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
public class LocalLogger: Logger
{
IEventSource eventSource;
- readonly List<MSBuildResult> results = new List<MSBuildResult> ();
+ readonly List<MSBuildTargetResult> results = new List<MSBuildTargetResult> ();
readonly string projectFile;
public LocalLogger (string projectFile)
@@ -43,7 +43,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
this.projectFile = projectFile;
}
- public List<MSBuildResult> BuildResult {
+ public List<MSBuildTargetResult> BuildResult {
get { return results; }
}
@@ -63,7 +63,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
void EventSourceWarningRaised (object sender, BuildWarningEventArgs e)
{
//NOTE: as of Mono 3.2.7, e.ProjectFile does not exist, so we use our projectFile variable instead
- results.Add (new MSBuildResult (
+ results.Add (new MSBuildTargetResult (
projectFile, true, e.Subcategory, e.Code, e.File,
e.LineNumber, e.ColumnNumber, e.ColumnNumber, e.EndLineNumber,
e.Message, e.HelpKeyword)
@@ -73,7 +73,7 @@ namespace MonoDevelop.Projects.Formats.MSBuild
void EventSourceErrorRaised (object sender, BuildErrorEventArgs e)
{
//NOTE: as of Mono 3.2.7, e.ProjectFile does not exist, so we use our projectFile variable instead
- results.Add (new MSBuildResult (
+ results.Add (new MSBuildTargetResult (
projectFile, false, e.Subcategory, e.Code, e.File,
e.LineNumber, e.ColumnNumber, e.ColumnNumber, e.EndLineNumber,
e.Message, e.HelpKeyword)
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/IIconBarMarker.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildEvaluatedItem.cs
index 63472f2fa7..221eb11b24 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/IIconBarMarker.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildEvaluatedItem.cs
@@ -1,10 +1,10 @@
//
-// IIconBarMarker.cs
+// MSBuildEvaluatedItem.cs
//
// Author:
-// Mike Krüger <mkrueger@xamarin.com>
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
//
-// Copyright (c) 2013 Xamarin Inc. (http://xamarin.com)
+// Copyright (c) 2014 Xamarin Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -25,25 +25,23 @@
// THE SOFTWARE.
using System;
-using Gdk;
-using Mono.TextEditor.Highlighting;
+using System.Collections.Generic;
-namespace Mono.TextEditor
+namespace MonoDevelop.Projects.Formats.MSBuild
{
- /// <summary>
- /// A specialized text marker interface to draw icons in the bookmark margin.
- /// </summary>
- [Obsolete("Use MarginMarker instead.")]
- public interface IIconBarMarker
+ [Serializable]
+ public class MSBuildEvaluatedItem
{
- bool CanDrawBackground { get; }
- void DrawBackground (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double xPos, double yPos, double width, double height);
+ public MSBuildEvaluatedItem (string name, string itemSpec)
+ {
+ Name = name;
+ ItemSpec = itemSpec;
+ Metadata = new Dictionary<string, string> ();
+ }
- void DrawIcon (TextEditor editor, Cairo.Context cr, DocumentLine line, int lineNumber, double xPos, double yPos, double width, double height);
- void MousePress (MarginMouseEventArgs args);
- void MouseRelease (MarginMouseEventArgs args);
- void MouseHover (MarginMouseEventArgs args);
+ public Dictionary<string,string> Metadata { get; private set; }
+ public string ItemSpec { get; private set; }
+ public string Name { get; private set; }
}
-
}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildResult.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildResult.cs
index 0c9af43e85..358659d42a 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildResult.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildResult.cs
@@ -1,21 +1,21 @@
-//
+//
// MSBuildResult.cs
-//
+//
// Author:
-// Lluis Sanchez Gual <lluis@novell.com>
-//
-// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
-//
+// Michael Hutchinson <m.j.hutchinson@gmail.com>
+//
+// Copyright (c) 2014 Xamarin Inc.
+//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -25,90 +25,35 @@
// THE SOFTWARE.
using System;
-using System.Text;
+using System.Collections.Generic;
namespace MonoDevelop.Projects.Formats.MSBuild
{
[Serializable]
public class MSBuildResult
{
- public MSBuildResult (
- string projectFile, bool isWarning, string subcategory, string code, string file,
- int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber,
- string message, string helpKeyword)
+ readonly MSBuildTargetResult[] errors;
+ readonly Dictionary<string,string> properties;
+ readonly Dictionary<string,List<MSBuildEvaluatedItem>> items;
+
+ public MSBuildResult (MSBuildTargetResult[] errors)
{
- ProjectFile = projectFile;
- IsWarning = isWarning;
- Subcategory = subcategory;
- Code = code;
- File = file;
- LineNumber = lineNumber;
- ColumnNumber = columnNumber;
- EndLineNumber = endLineNumber;
- EndColumnNumber = endColumnNumber;
- Message = message;
- HelpKeyword = helpKeyword;
+ this.errors = errors;
+ this.properties = new Dictionary<string,string> ();
+ this.items = new Dictionary<string,List<MSBuildEvaluatedItem>> ();
}
-
- public string ProjectFile { get; set; }
- public bool IsWarning { get; set; }
- public string Subcategory { get; set; }
- public string Code { get; set; }
- public string File { get; set; }
- public int LineNumber { get; set; }
- public int ColumnNumber { get; set; }
- public int EndLineNumber { get; set; }
- public int EndColumnNumber { get; set; }
- public string Message { get; set; }
- public string HelpKeyword { get; set; }
- public override string ToString ()
- {
- var sb = new StringBuilder ();
- if (!string.IsNullOrEmpty (File)) {
- sb.Append (File);
- if (LineNumber > 0) {
- //(line)
- sb.Append ("(");
- sb.Append (LineNumber);
- if (ColumnNumber > 0) {
- //(line,col)
- sb.Append (",");
- sb.Append (ColumnNumber);
- if (EndColumnNumber > 0) {
- if (EndLineNumber > 0) {
- //(line,col,line,col)
- sb.Append (",");
- sb.Append (EndLineNumber);
- sb.Append (",");
- sb.Append (EndColumnNumber);
- } else {
- //(line,col-col)
- sb.Append ("-");
- sb.Append (EndColumnNumber);
- }
- }
- } else if (EndLineNumber > 0) {
- //(line-line)
- sb.Append ("-");
- sb.Append (EndLineNumber);
- }
- sb.Append (")");
- }
- sb.Append (": ");
- }
- if (!string.IsNullOrEmpty (Subcategory)) {
- sb.Append (Subcategory);
- sb.Append (" ");
- }
- sb.Append (IsWarning ? "warning" : "error");
- if (!string.IsNullOrEmpty (Code)) {
- sb.Append (" ");
- sb.Append (Code);
- }
- sb.Append (": ");
- sb.Append (Message);
- return sb.ToString ();
+ public MSBuildTargetResult[] Errors {
+ get { return errors; }
+ }
+
+ public Dictionary<string,List<MSBuildEvaluatedItem>> Items {
+ get { return items; }
+ }
+
+ public Dictionary<string, string> Properties {
+ get { return properties; }
}
}
+
}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildTargetResult.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildTargetResult.cs
new file mode 100644
index 0000000000..78115749b3
--- /dev/null
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/MSBuildTargetResult.cs
@@ -0,0 +1,114 @@
+//
+// MSBuildTargetResult.cs
+//
+// Author:
+// Lluis Sanchez Gual <lluis@novell.com>
+//
+// Copyright (c) 2009 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Text;
+
+namespace MonoDevelop.Projects.Formats.MSBuild
+{
+ [Serializable]
+ public class MSBuildTargetResult
+ {
+ public MSBuildTargetResult (
+ string projectFile, bool isWarning, string subcategory, string code, string file,
+ int lineNumber, int columnNumber, int endLineNumber, int endColumnNumber,
+ string message, string helpKeyword)
+ {
+ ProjectFile = projectFile;
+ IsWarning = isWarning;
+ Subcategory = subcategory;
+ Code = code;
+ File = file;
+ LineNumber = lineNumber;
+ ColumnNumber = columnNumber;
+ EndLineNumber = endLineNumber;
+ EndColumnNumber = endColumnNumber;
+ Message = message;
+ HelpKeyword = helpKeyword;
+ }
+
+ public string ProjectFile { get; set; }
+ public bool IsWarning { get; set; }
+ public string Subcategory { get; set; }
+ public string Code { get; set; }
+ public string File { get; set; }
+ public int LineNumber { get; set; }
+ public int ColumnNumber { get; set; }
+ public int EndLineNumber { get; set; }
+ public int EndColumnNumber { get; set; }
+ public string Message { get; set; }
+ public string HelpKeyword { get; set; }
+
+ public override string ToString ()
+ {
+ var sb = new StringBuilder ();
+ if (!string.IsNullOrEmpty (File)) {
+ sb.Append (File);
+ if (LineNumber > 0) {
+ //(line)
+ sb.Append ("(");
+ sb.Append (LineNumber);
+ if (ColumnNumber > 0) {
+ //(line,col)
+ sb.Append (",");
+ sb.Append (ColumnNumber);
+ if (EndColumnNumber > 0) {
+ if (EndLineNumber > 0) {
+ //(line,col,line,col)
+ sb.Append (",");
+ sb.Append (EndLineNumber);
+ sb.Append (",");
+ sb.Append (EndColumnNumber);
+ } else {
+ //(line,col-col)
+ sb.Append ("-");
+ sb.Append (EndColumnNumber);
+ }
+ }
+ } else if (EndLineNumber > 0) {
+ //(line-line)
+ sb.Append ("-");
+ sb.Append (EndLineNumber);
+ }
+ sb.Append (")");
+ }
+ sb.Append (": ");
+ }
+ if (!string.IsNullOrEmpty (Subcategory)) {
+ sb.Append (Subcategory);
+ sb.Append (" ");
+ }
+ sb.Append (IsWarning ? "warning" : "error");
+ if (!string.IsNullOrEmpty (Code)) {
+ sb.Append (" ");
+ sb.Append (Code);
+ }
+ sb.Append (": ");
+ sb.Append (Message);
+ return sb.ToString ();
+ }
+ }
+}
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs
index d35f408d88..f72c2205ce 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.cs
@@ -33,6 +33,9 @@ using System.Collections;
using System.Reflection;
//this is the builder for the deprecated build engine API
+using System.Linq;
+
+
#pragma warning disable 618
namespace MonoDevelop.Projects.Formats.MSBuild
@@ -72,36 +75,63 @@ namespace MonoDevelop.Projects.Formats.MSBuild
if (currentLogWriter != null)
currentLogWriter.WriteLine (txt);
}
-
- public MSBuildResult[] RunTarget (string target, ProjectConfigurationInfo[] configurations, ILogWriter logWriter,
- MSBuildVerbosity verbosity)
+
+ //HACK: Mono does not implement 3.5 CustomMetadataNames API
+ FieldInfo evaluatedMetadataField = typeof(BuildItem).GetField ("evaluatedMetadata", BindingFlags.NonPublic | BindingFlags.Instance);
+
+ public MSBuildResult Run (
+ ProjectConfigurationInfo[] configurations, ILogWriter logWriter, MSBuildVerbosity verbosity,
+ string[] runTargets, string[] evaluateItems, string[] evaluateProperties)
{
- MSBuildResult[] result = null;
- BuildEngine.RunSTA (delegate
- {
+ MSBuildResult result = null;
+ BuildEngine.RunSTA (delegate {
try {
var project = SetupProject (configurations);
currentLogWriter = logWriter;
+ buildEngine.Engine.UnregisterAllLoggers ();
+
var logger = new LocalLogger (file);
- buildEngine.Engine.UnregisterAllLoggers ();
buildEngine.Engine.RegisterLogger (logger);
- buildEngine.Engine.RegisterLogger (consoleLogger);
+ if (logWriter != null) {
+ buildEngine.Engine.RegisterLogger (consoleLogger);
+ consoleLogger.Verbosity = GetVerbosity (verbosity);
+ }
+
+ if (runTargets != null && runTargets.Length > 0) {
+ // We are using this BuildProject overload and the BuildSettings.None argument as a workaround to
+ // an xbuild bug which causes references to not be resolved after the project has been built once.
+ buildEngine.Engine.BuildProject (project, runTargets, new Hashtable (), BuildSettings.None);
+ }
+
+ result = new MSBuildResult (logger.BuildResult.ToArray ());
- consoleLogger.Verbosity = GetVerbosity (verbosity);
+ if (evaluateProperties != null) {
+ foreach (var name in evaluateProperties)
+ result.Properties [name] = project.GetEvaluatedProperty (name);
+ }
- // We are using this BuildProject overload and the BuildSettings.None argument as a workaround to
- // an xbuild bug which causes references to not be resolved after the project has been built once.
- buildEngine.Engine.BuildProject (project, new [] { target }, new Hashtable (), BuildSettings.None);
-
- result = logger.BuildResult.ToArray ();
+ if (evaluateItems != null) {
+ foreach (var name in evaluateItems) {
+ BuildItemGroup grp = project.GetEvaluatedItemsByName (name);
+ var list = new List<MSBuildEvaluatedItem> ();
+ foreach (BuildItem item in grp) {
+ var evItem = new MSBuildEvaluatedItem (name, UnescapeString (item.FinalItemSpec));
+ foreach (DictionaryEntry de in (IDictionary) evaluatedMetadataField.GetValue (item)) {
+ evItem.Metadata [(string)de.Key] = UnescapeString ((string)de.Value);
+ }
+ list.Add (evItem);
+ }
+ result.Items[name] = list;
+ }
+ }
} catch (InvalidProjectFileException ex) {
- var r = new MSBuildResult (
+ var r = new MSBuildTargetResult (
file, false, ex.ErrorSubcategory, ex.ErrorCode, ex.ProjectFile,
ex.LineNumber, ex.ColumnNumber, ex.EndLineNumber, ex.EndColumnNumber,
ex.BaseMessage, ex.HelpKeyword);
logWriter.WriteLine (r.ToString ());
- result = new [] { r };
+ result = new MSBuildResult (new [] { r });
} finally {
currentLogWriter = null;
}
@@ -124,26 +154,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return LoggerVerbosity.Diagnostic;
}
}
-
- public string[] GetAssemblyReferences (ProjectConfigurationInfo[] configurations)
- {
- string[] refsArray = null;
-
- BuildEngine.RunSTA (delegate
- {
- var project = SetupProject (configurations);
-
- // We are using this BuildProject overload and the BuildSettings.None argument as a workaround to
- // an xbuild bug which causes references to not be resolved after the project has been built once.
- buildEngine.Engine.BuildProject (project, new [] { "ResolveAssemblyReferences" }, new Hashtable (), BuildSettings.None);
- BuildItemGroup grp = project.GetEvaluatedItemsByName ("ReferencePath");
- var refs = new List<string> ();
- foreach (BuildItem item in grp)
- refs.Add (UnescapeString (item.Include));
- refsArray = refs.ToArray ();
- });
- return refsArray;
- }
Project SetupProject (ProjectConfigurationInfo[] configurations)
{
diff --git a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs
index ef907cb758..604d42c45e 100644
--- a/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs
+++ b/main/src/core/MonoDevelop.Projects.Formats.MSBuild/MonoDevelop.Projects.Formats.MSBuild/ProjectBuilder.v4.0.cs
@@ -74,34 +74,64 @@ namespace MonoDevelop.Projects.Formats.MSBuild
if (currentLogWriter != null)
currentLogWriter.WriteLine (txt);
}
-
- public MSBuildResult[] RunTarget (string target, ProjectConfigurationInfo[] configurations, ILogWriter logWriter,
- MSBuildVerbosity verbosity)
+
+ public MSBuildResult Run (
+ ProjectConfigurationInfo[] configurations, ILogWriter logWriter, MSBuildVerbosity verbosity,
+ string[] runTargets, string[] evaluateItems, string[] evaluateProperties)
{
- MSBuildResult[] result = null;
- BuildEngine.RunSTA (delegate
- {
+ if (runTargets == null || runTargets.Length == 0)
+ throw new ArgumentException ("runTargets is empty");
+
+ MSBuildResult result = null;
+ BuildEngine.RunSTA (delegate {
try {
var project = SetupProject (configurations);
currentLogWriter = logWriter;
- var logger = new LocalLogger (file);
- engine.UnregisterAllLoggers ();
- engine.RegisterLogger (logger);
- engine.RegisterLogger (consoleLogger);
+ ILogger[] loggers;
+ var logger = new LocalLogger (file);
+ if (logWriter != null) {
+ consoleLogger.Verbosity = GetVerbosity (verbosity);
+ loggers = new ILogger[] { logger, consoleLogger };
+ } else {
+ loggers = new ILogger[] { logger };
+ }
- consoleLogger.Verbosity = GetVerbosity (verbosity);
-
- project.Build (target);
-
- result = logger.BuildResult.ToArray ();
+ //building the project will create items and alter properties, so we use a new instance
+ var pi = project.CreateProjectInstance ();
+
+ pi.Build (runTargets, loggers);
+
+ result = new MSBuildResult (logger.BuildResult.ToArray ());
+
+ if (evaluateProperties != null) {
+ foreach (var name in evaluateProperties) {
+ var prop = pi.GetProperty (name);
+ result.Properties [name] = prop != null? prop.EvaluatedValue : null;
+ }
+ }
+
+ if (evaluateItems != null) {
+ foreach (var name in evaluateItems) {
+ var grp = pi.GetItems (name);
+ var list = new List<MSBuildEvaluatedItem> ();
+ foreach (var item in grp) {
+ var evItem = new MSBuildEvaluatedItem (name, UnescapeString (item.EvaluatedInclude));
+ foreach (var m in item.Metadata) {
+ evItem.Metadata [m.Name] = UnescapeString (m.EvaluatedValue);
+ }
+ list.Add (evItem);
+ }
+ result.Items[name] = list;
+ }
+ }
} catch (Microsoft.Build.Exceptions.InvalidProjectFileException ex) {
- var r = new MSBuildResult (
- file, false, ex.ErrorSubcategory, ex.ErrorCode, ex.ProjectFile,
- ex.LineNumber, ex.ColumnNumber, ex.EndLineNumber, ex.EndColumnNumber,
- ex.BaseMessage, ex.HelpKeyword);
- logWriter.WriteLine (r.ToString ());
- result = new [] { r };
+ var r = new MSBuildTargetResult (
+ file, false, ex.ErrorSubcategory, ex.ErrorCode, ex.ProjectFile,
+ ex.LineNumber, ex.ColumnNumber, ex.EndLineNumber, ex.EndColumnNumber,
+ ex.BaseMessage, ex.HelpKeyword);
+ logWriter.WriteLine (r.ToString ());
+ result = new MSBuildResult (new [] { r });
} finally {
currentLogWriter = null;
}
@@ -125,26 +155,6 @@ namespace MonoDevelop.Projects.Formats.MSBuild
return LoggerVerbosity.Diagnostic;
}
}
-
- public string[] GetAssemblyReferences (ProjectConfigurationInfo[] configurations)
- {
- string[] refsArray = null;
-
- BuildEngine.RunSTA (delegate
- {
- var project = SetupProject (configurations);
-
- // We are using this BuildProject overload and the BuildSettings.None argument as a workaround to
- // an xbuild bug which causes references to not be resolved after the project has been built once.
- var pi = project.CreateProjectInstance ();
- pi.Build ("ResolveAssemblyReferences", null);
- var refs = new List<string> ();
- foreach (ProjectItemInstance item in pi.GetItems ("ReferencePath"))
- refs.Add (UnescapeString (item.EvaluatedInclude));
- refsArray = refs.ToArray ();
- });
- return refsArray;
- }
Project SetupProject (ProjectConfigurationInfo[] configurations)
{
diff --git a/main/src/core/MonoDevelop.TextEditor.Tests/Makefile.am b/main/src/core/MonoDevelop.TextEditor.Tests/Makefile.am
new file mode 100644
index 0000000000..c9cc87438f
--- /dev/null
+++ b/main/src/core/MonoDevelop.TextEditor.Tests/Makefile.am
@@ -0,0 +1 @@
+include $(top_srcdir)/xbuild.include
diff --git a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests.DefaultEditActions/DeleteActionTests.cs b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests.DefaultEditActions/DeleteActionTests.cs
index 77dec627db..74543f0706 100644
--- a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests.DefaultEditActions/DeleteActionTests.cs
+++ b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests.DefaultEditActions/DeleteActionTests.cs
@@ -32,7 +32,7 @@ namespace Mono.TextEditor.Tests.Actions
[TestFixture()]
public class DeleteActionTests : TextEditorTestBase
{
- [Test()]
+ [Test]
public void TestBackspace ()
{
var data = Create (@"1234$567890");
@@ -40,7 +40,7 @@ namespace Mono.TextEditor.Tests.Actions
Check (data, @"123$567890");
}
- [Test()]
+ [Test]
public void TestBackspaceCase1 ()
{
var data = Create (@"$1234567890");
@@ -48,7 +48,7 @@ namespace Mono.TextEditor.Tests.Actions
Check (data, @"$1234567890");
}
- [Test()]
+ [Test]
public void TestDelete ()
{
var data = Create (@"1234$567890");
@@ -56,7 +56,7 @@ namespace Mono.TextEditor.Tests.Actions
Check (data, @"1234$67890");
}
- [Test()]
+ [Test]
public void TestBackspaceDeleteCase1 ()
{
var data = Create (@"1234567890$");
@@ -64,7 +64,7 @@ namespace Mono.TextEditor.Tests.Actions
Check (data, @"1234567890$");
}
- [Test()]
+ [Test]
public void TestDeleteCaretLine ()
{
var data = Create (@"1234567890
@@ -75,7 +75,7 @@ namespace Mono.TextEditor.Tests.Actions
1234567890", data.Document.Text);
}
- [Test()]
+ [Test]
public void TestDeleteCaretLineWithFoldings ()
{
var data = Create (@"1234567890
@@ -88,7 +88,7 @@ namespace Mono.TextEditor.Tests.Actions
1234567890", data.Document.Text);
}
- [Test()]
+ [Test]
public void TestDeleteCaretLineWithFoldingsCase2 ()
{
var data = Create (@"1234567890
@@ -100,9 +100,22 @@ namespace Mono.TextEditor.Tests.Actions
Assert.AreEqual (@"1234567890
1234567890", data.Document.Text);
}
-
- [Test()]
+ [Test]
+ public void TestDeleteCaretLineWithSelection ()
+ {
+ var data = Create (@"1234567890
+1234$<-67890
+1234567890
+12345->67890
+1234567890");
+ DeleteActions.CaretLine (data);
+ Assert.AreEqual (@"1234567890
+1234567890", data.Document.Text);
+ }
+
+
+ [Test]
public void TestDeleteCaretLineToEnd ()
{
var data = Create (@"1234567890
@@ -114,7 +127,7 @@ namespace Mono.TextEditor.Tests.Actions
1234567890", data.Document.Text);
}
- [Test()]
+ [Test]
public void TestDeleteCaretLineToEndWithFoldings ()
{
var data = Create (@"1234567890
@@ -130,7 +143,7 @@ namespace Mono.TextEditor.Tests.Actions
- [Test()]
+ [Test]
public void TestDeletePreviousWord ()
{
var data = Create (@" word1 word2 word3$");
@@ -142,7 +155,7 @@ namespace Mono.TextEditor.Tests.Actions
Check (data, @" $");
}
- [Test()]
+ [Test]
public void TestDeletePreviousSubword ()
{
var data = Create (@" SomeLongWord$");
@@ -154,7 +167,7 @@ namespace Mono.TextEditor.Tests.Actions
Check (data, @" $");
}
- [Test()]
+ [Test]
public void TestDeleteNextWord ()
{
var data = Create (@" $word1 word2 word3");
@@ -166,7 +179,7 @@ namespace Mono.TextEditor.Tests.Actions
Check (data, @" $");
}
- [Test()]
+ [Test]
public void TestDeleteNextSubword ()
{
var data = Create (@" $SomeLongWord");
diff --git a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/HtmlWriterTests.cs b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/HtmlWriterTests.cs
index 16d76cf5fb..9431a9a511 100644
--- a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/HtmlWriterTests.cs
+++ b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/HtmlWriterTests.cs
@@ -39,7 +39,7 @@ namespace Mono.TextEditor.Tests
if (Platform.IsWindows)
Assert.Inconclusive ();
var data = Create ("class Foo {}");
- data.ColorStyle = SyntaxModeService.GetColorStyle ("TangoLight");
+ data.ColorStyle = SyntaxModeService.GetColorStyle ("Tango");
data.Document.SyntaxMode = SyntaxModeService.GetSyntaxMode (data.Document, "text/x-csharp");
string generatedHtml = HtmlWriter.GenerateHtml (data);
Assert.AreEqual (
@@ -51,7 +51,7 @@ namespace Mono.TextEditor.Tests
</HEAD>
<BODY>
<FONT face = 'Mono'>
-<SPAN style='color:#009695;'>class</SPAN><SPAN style='color:#444444;'>&nbsp;Foo&nbsp;</SPAN><SPAN style='color:#444444;'>{}</SPAN></FONT>
+<SPAN style='color:#3364a4;'>class</SPAN><SPAN style='color:#000000;'>&nbsp;Foo&nbsp;</SPAN><SPAN style='color:#000000;'>{}</SPAN></FONT>
</BODY></HTML>
", generatedHtml);
}
@@ -66,10 +66,9 @@ namespace Mono.TextEditor.Tests
attr1 = ""1""
attr2 = ""2""
/>");
- data.ColorStyle = SyntaxModeService.GetColorStyle ("TangoLight");
+ data.ColorStyle = SyntaxModeService.GetColorStyle ("Tango");
data.Document.SyntaxMode = SyntaxModeService.GetSyntaxMode (data.Document, "application/xml");
string generatedHtml = HtmlWriter.GenerateHtml (data);
- Console.WriteLine (generatedHtml);
Assert.AreEqual (
@"<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">
<HTML>
@@ -79,10 +78,10 @@ namespace Mono.TextEditor.Tests
</HEAD>
<BODY>
<FONT face = 'Mono'>
-<SPAN style='color:#444444;'>&lt;</SPAN><SPAN style='color:#3364a4;'>foo</SPAN><BR>
-<SPAN style='color:#3364a4;'>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style='color:#444444;'>attr1</SPAN><SPAN style='color:#444444;'>&nbsp;=</SPAN><SPAN style='color:#3364a4;'>&nbsp;</SPAN><SPAN style='color:#f57d00;'>&quot;</SPAN><SPAN style='color:#f57d00;'>1</SPAN><SPAN style='color:#f57d00;'>&quot;</SPAN><BR>
-<SPAN style='color:#3364a4;'>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style='color:#444444;'>attr2</SPAN><SPAN style='color:#444444;'>&nbsp;=</SPAN><SPAN style='color:#3364a4;'>&nbsp;</SPAN><SPAN style='color:#f57d00;'>&quot;</SPAN><SPAN style='color:#f57d00;'>2</SPAN><SPAN style='color:#f57d00;'>&quot;</SPAN><BR>
-<SPAN style='color:#444444;'>/</SPAN><SPAN style='color:#444444;'>&gt;</SPAN></FONT>
+<SPAN style='color:#000000;'>&lt;</SPAN><SPAN style='color:#204987;'>foo</SPAN><BR>
+<SPAN style='color:#204987;'>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style='color:#f57800;'>attr1</SPAN><SPAN style='color:#000000;'>&nbsp;=</SPAN><SPAN style='color:#204987;'>&nbsp;</SPAN><SPAN style='color:#a40000;'>&quot;</SPAN><SPAN style='color:#a40000;'>1</SPAN><SPAN style='color:#a40000;'>&quot;</SPAN><BR>
+<SPAN style='color:#204987;'>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style='color:#f57800;'>attr2</SPAN><SPAN style='color:#000000;'>&nbsp;=</SPAN><SPAN style='color:#204987;'>&nbsp;</SPAN><SPAN style='color:#a40000;'>&quot;</SPAN><SPAN style='color:#a40000;'>2</SPAN><SPAN style='color:#a40000;'>&quot;</SPAN><BR>
+<SPAN style='color:#000000;'>/</SPAN><SPAN style='color:#000000;'>&gt;</SPAN></FONT>
</BODY></HTML>
"
, generatedHtml);
diff --git a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/RtfWriterTests.cs b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/RtfWriterTests.cs
index 1f1a963599..98e9074143 100644
--- a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/RtfWriterTests.cs
+++ b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/RtfWriterTests.cs
@@ -39,7 +39,7 @@ namespace Mono.TextEditor.Tests
if (Platform.IsWindows)
Assert.Inconclusive ();
var data = Create ("class Foo {}");
- data.ColorStyle = SyntaxModeService.GetColorStyle ("TangoLight");
+ data.ColorStyle = SyntaxModeService.GetColorStyle ("Tango");
data.Document.SyntaxMode = SyntaxModeService.GetSyntaxMode (data.Document, "text/x-csharp");
string generatedRtf = RtfWriter.GenerateRtf (data);
Assert.AreEqual (
@@ -47,7 +47,7 @@ namespace Mono.TextEditor.Tests
{\fonttbl
{\f0\fnil\fprq1\fcharset128 Mono;}
}
-{\colortbl ;\red0\green150\blue149;\red68\green68\blue68;}\viewkind4\uc1\pard
+{\colortbl ;\red51\green100\blue164;\red0\green0\blue0;}\viewkind4\uc1\pard
\f0
\fs20\cf1
\cf1 class\cf2 Foo \{\}\line
@@ -63,14 +63,14 @@ namespace Mono.TextEditor.Tests
if (Platform.IsWindows)
Assert.Inconclusive ();
var data = Create ("class Foo {}");
- data.ColorStyle = SyntaxModeService.GetColorStyle ("TangoLight");
+ data.ColorStyle = SyntaxModeService.GetColorStyle ("Tango");
string generatedRtf = RtfWriter.GenerateRtf (data);
Assert.AreEqual (
@"{\rtf1\ansi\deff0\adeflang1025
{\fonttbl
{\f0\fnil\fprq1\fcharset128 Mono;}
}
-{\colortbl ;\red68\green68\blue68;}\viewkind4\uc1\pard
+{\colortbl ;\red0\green0\blue0;}\viewkind4\uc1\pard
\f0
\fs20\cf1
\cf1 class Foo \{\}\line
@@ -86,14 +86,14 @@ namespace Mono.TextEditor.Tests
if (Platform.IsWindows)
Assert.Inconclusive ();
var data = Create ("✔");
- data.ColorStyle = SyntaxModeService.GetColorStyle ("TangoLight");
+ data.ColorStyle = SyntaxModeService.GetColorStyle ("Tango");
string generatedRtf = RtfWriter.GenerateRtf (data);
Assert.AreEqual (
@"{\rtf1\ansi\deff0\adeflang1025
{\fonttbl
{\f0\fnil\fprq1\fcharset128 Mono;}
}
-{\colortbl ;\red68\green68\blue68;}\viewkind4\uc1\pard
+{\colortbl ;\red0\green0\blue0;}\viewkind4\uc1\pard
\f0
\fs20\cf1
\cf1 \uc1\u10004*\line
@@ -111,10 +111,11 @@ namespace Mono.TextEditor.Tests
attr1 = ""1""
attr2 = ""2""
/>");
- data.ColorStyle = SyntaxModeService.GetColorStyle ("TangoLight");
+ data.ColorStyle = SyntaxModeService.GetColorStyle ("Tango");
data.Document.SyntaxMode = SyntaxModeService.GetSyntaxMode (data.Document, "application/xml");
string generatedRtf = RtfWriter.GenerateRtf (data);
+
Assert.AreEqual (
@"{\rtf1\ansi\deff0\adeflang1025
{\fonttbl
diff --git a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/SyntaxHighlightingTests.cs b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/SyntaxHighlightingTests.cs
index 097e026db7..3dc7361e19 100644
--- a/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/SyntaxHighlightingTests.cs
+++ b/main/src/core/MonoDevelop.TextEditor.Tests/Mono.TextEditor.Tests/SyntaxHighlightingTests.cs
@@ -132,5 +132,14 @@ namespace Mono.TextEditor.Tests
TestOutput ("///<summary>foo bar</summary>",
"<span foreground=\"#888888\" style=\"Italic\">///</span><span foreground=\"#888888\" style=\"Italic\">&lt;</span><span foreground=\"#888888\" style=\"Italic\">summary</span><span foreground=\"#888888\" style=\"Italic\">&gt;</span><span foreground=\"#888888\" style=\"Italic\">foo bar</span><span foreground=\"#888888\" style=\"Italic\">&lt;</span><span foreground=\"#888888\" style=\"Italic\">/</span><span foreground=\"#888888\" style=\"Italic\">summary</span><span foreground=\"#888888\" style=\"Italic\">&gt;</span>");
}
+
+ [Test]
+ public void TestFSharpLineBug ()
+ {
+ TestOutput (
+ "\n\n\nlet x = 2",
+ "<span foreground=\"#009695\">let </span><span foreground=\"#333333\">x = </span><span foreground=\"#F57D00\">2</span>",
+ "text/x-fsharp");
+ }
}
}