diff --git a/data/schemas/AddIn.xsd b/data/schemas/AddIn.xsd index 73830581df..f702fea82b 100644 --- a/data/schemas/AddIn.xsd +++ b/data/schemas/AddIn.xsd @@ -63,11 +63,38 @@ + + + + + + + Hide the AddIn from the AddInManager. + + + + + + + Show the AddIn in the AddInManager (this is the default value). + + + + + + + Show the AddIn only if the user chooses to view 'preinstalled' AddIns. + + + + + + @@ -237,8 +264,8 @@ - The fully qualified type name of the class to create an instace of. - + The fully qualified type name of the class to create an instace of. + @@ -258,16 +285,16 @@ - Name of the ICodeCompletionBinding class (normally deriving from DefaultCodeCompletionBinding). - + Name of the ICodeCompletionBinding class (normally deriving from DefaultCodeCompletionBinding). + - List of semicolon-separated entries of the file extensions handled by the binding. - If no extensions attribute is specified, the binding is activated in all files. - + List of semicolon-separated entries of the file extensions handled by the binding. + If no extensions attribute is specified, the binding is activated in all files. + @@ -286,30 +313,30 @@ - The name of the MSBuild meta data. - + The name of the MSBuild meta data. + - The display name of the property. - + The display name of the property. + - The description text for the property. - + The description text for the property. + - Boolean property specifying whether the custom tool should be run when the property value is changed - by the user. Default: false. - + Boolean property specifying whether the custom tool should be run when the property value is changed + by the user. Default: false. + @@ -328,23 +355,23 @@ - ID used to identify the custom tool. - + ID used to identify the custom tool. + - Name of the ICustomTool class. - + Name of the ICustomTool class. + - Regular expression that specifies the file names for which the custom tool - can be used. Example: "\.res(x|ources)$" - + Regular expression that specifies the file names for which the custom tool + can be used. Example: "\.res(x|ources)$" + @@ -363,43 +390,43 @@ - Name of the IDebugger class. - + Name of the IDebugger class. + - Specifies if the debugger supports the 'Start' command. Default: true - + Specifies if the debugger supports the 'Start' command. Default: true + - Specifies if the debugger supports the 'StartWithoutDebugger' command. Default: true - + Specifies if the debugger supports the 'StartWithoutDebugger' command. Default: true + - Specifies if the debugger supports the 'Stop' (kill running process) command. Default: true - + Specifies if the debugger supports the 'Stop' (kill running process) command. Default: true + - Specifies if the debugger supports stepping. Default: false - + Specifies if the debugger supports stepping. Default: false + - Specifies if the debugger supports execution control (break, resume). Default: false - + Specifies if the debugger supports execution control (break, resume). Default: false + @@ -424,15 +451,15 @@ - Name of the IDialogPanel class. Optional if the page has subpages. - + Name of the IDialogPanel class. Optional if the page has subpages. + - Caption of the dialog panel. - + Caption of the dialog panel. + @@ -451,8 +478,8 @@ - Path relative to the directory which contains the .addin file defining the codon. - + Path relative to the directory which contains the .addin file defining the codon. + @@ -471,22 +498,22 @@ - Name of the IDisplayBinding or ISecondaryDisplayBinding class. - + Name of the IDisplayBinding or ISecondaryDisplayBinding class. + - Title of the display binding to use in the "Open With" dialog. - + Title of the display binding to use in the "Open With" dialog. + - Type of the display binding (either "Primary" or "Secondary"). Default: "Primary". - + Type of the display binding (either "Primary" or "Secondary"). Default: "Primary". + @@ -498,9 +525,9 @@ - Regular expression that specifies the file names for which the display binding - will be used. Example: "\.res(x|ources)$" - + Regular expression that specifies the file names for which the display binding + will be used. Example: "\.res(x|ources)$" + @@ -522,16 +549,16 @@ - Comma-separated list of keyboard shortcuts that activate the edit action. - E.g. "Control|C,Control|Insert" - + Comma-separated list of keyboard shortcuts that activate the edit action. + E.g. "Control|C,Control|Insert" + - Name of the IEditAction class. - + Name of the IEditAction class. + @@ -550,15 +577,15 @@ - The name of the file filter entry. - + The name of the file filter entry. + - The extensions associated with this file filter entry. - + The extensions associated with this file filter entry. + @@ -577,24 +604,24 @@ - The name of a bitmap resource in the resource service. - + The name of a bitmap resource in the resource service. + - This attribute is specified when a project icon association should be created. - It specifies the language of the project types that use the icon. - + This attribute is specified when a project icon association should be created. + It specifies the language of the project types that use the icon. + - This attribute is specified when a file icon association should be created. - It specifies the semicolon-separated list of file types that use the icon. - + This attribute is specified when a file icon association should be created. + It specifies the semicolon-separated list of file types that use the icon. + @@ -614,18 +641,18 @@ - When this attribute is used, the include doozer builds the item that is at the - addin tree location specified by this attribute. - + When this attribute is used, the include doozer builds the item that is at the + addin tree location specified by this attribute. + - When this attribute is used, the include doozer builds all items inside the - path addin tree location specified by this attribute and returns an - IBuildItemsModifier which includes all items in the output list. - + When this attribute is used, the include doozer builds all items inside the + path addin tree location specified by this attribute and returns an + IBuildItemsModifier which includes all items in the output list. + @@ -646,29 +673,29 @@ - Project type GUID of the project used by MsBuild. - + Project type GUID of the project used by MsBuild. + - Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo") - + Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo") + - File extension of project files. (e.g. ".booproj") - + File extension of project files. (e.g. ".booproj") + - Name of the ILanguageBinding class. - + Name of the ILanguageBinding class. + @@ -693,18 +720,18 @@ - Label of the menu item. - + Label of the menu item. + - This attribute must be one of these values: - Separator, CheckBox, Item=Command, Menu (=with subitems), - Builder (=class implementing ISubmenuBuilder). - Default: Command. - + This attribute must be one of these values: + Separator, CheckBox, Item=Command, Menu (=with subitems), + Builder (=class implementing ISubmenuBuilder). + Default: Command. + @@ -720,39 +747,39 @@ - Only for the type "Item"/"Command". - When set to false, the command class is loaded - immediately instead of the usual lazy-loading. - + Only for the type "Item"/"Command". + When set to false, the command class is loaded + immediately instead of the usual lazy-loading. + - Icon of the menu item. - + Icon of the menu item. + - Command class that is run when item is clicked. - + Command class that is run when item is clicked. + - Only for the type "Item"/"Command". Opens a webpage instead of running a command when - clicking the item. - + Only for the type "Item"/"Command". Opens a webpage instead of running a command when + clicking the item. + - Shortcut that activates the command (e.g. "Control|S"). - + Shortcut that activates the command (e.g. "Control|S"). + @@ -771,43 +798,43 @@ - IPadContent class that is loaded when the pad content is shown for the first time. - + IPadContent class that is loaded when the pad content is shown for the first time. + - Title of the pad that is shown in the user interface. - Should be a resource string, e.g. "${res:AddIns.HtmlHelp2.Contents}" - + Title of the pad that is shown in the user interface. + Should be a resource string, e.g. "${res:AddIns.HtmlHelp2.Contents}" + - Specifies the name of the icon resource used for the pad. - Pad icon resources must be registered with the ResourceService before the - workbench is loaded! - + Specifies the name of the icon resource used for the pad. + Pad icon resources must be registered with the ResourceService before the + workbench is loaded! + - Category of the pad. It is possible to create menu items that automatically - contain show commands for all pads in a certain category. - Pads in the category "Main" will show up in the "View" menu, the category - "Tools" in the "View -> Tools" menu, the category "Debugger" in the - "View -> Debugger" menu. - + Category of the pad. It is possible to create menu items that automatically + contain show commands for all pads in a certain category. + Pads in the category "Main" will show up in the "View" menu, the category + "Tools" in the "View -> Tools" menu, the category "Debugger" in the + "View -> Debugger" menu. + - Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T"). - + Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T"). + @@ -826,22 +853,22 @@ - Semicolon-separated list of file extensions for which the parser is used. (e.g. ".boo") - + Semicolon-separated list of file extensions for which the parser is used. (e.g. ".boo") + - File extension of project files. (e.g. ".booproj") - + File extension of project files. (e.g. ".booproj") + - Name of the IParser class. - + Name of the IParser class. + @@ -860,8 +887,8 @@ - Name of the ProjectContentRegistry class. - + Name of the ProjectContentRegistry class. + @@ -880,15 +907,15 @@ - Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage') - + Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage') + - Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension). - + Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension). + @@ -907,8 +934,8 @@ - The string to return. - + The string to return. + @@ -927,22 +954,22 @@ - Name of the language for which the syntax mode is used. - + Name of the language for which the syntax mode is used. + - Semicolon-separated list of file extensions for which the syntax mode is used. - + Semicolon-separated list of file extensions for which the syntax mode is used. + - Fully qualified name of the resource file. - + Fully qualified name of the resource file. + @@ -962,16 +989,16 @@ - Name of the IMSBuildAdditionalLogger class. - + Name of the IMSBuildAdditionalLogger class. + - Specifies the name of the MSBuild task that must be running for - this logger to be active. - + Specifies the name of the MSBuild task that must be running for + this logger to be active. + @@ -997,23 +1024,23 @@ - Label of the tool bar item. - + Label of the tool bar item. + - Icon of the tool bar item. - + Icon of the tool bar item. + - This attribute must be one of these values: - Separator, CheckBox, Item, ComboBox, DropDownButton - + This attribute must be one of these values: + Separator, CheckBox, Item, ComboBox, DropDownButton + @@ -1028,24 +1055,24 @@ - Only for the type "Item". When set to false, the command class is loaded - immediately instead of the usual lazy-loading. - + Only for the type "Item". When set to false, the command class is loaded + immediately instead of the usual lazy-loading. + - Tooltip of the tool bar item. - + Tooltip of the tool bar item. + - Command class that is run when item is clicked; or class that manages - the ComboBox/DropDownButton. Required for everything except "Separator". - + Command class that is run when item is clicked; or class that manages + the ComboBox/DropDownButton. Required for everything except "Separator". + diff --git a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin index 1c91f94315..611081376f 100644 --- a/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin +++ b/src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin @@ -2,15 +2,15 @@ author = "Daniel Grunwald" copyright = "prj:///doc/copyright.txt" url = "http://boo.codehaus.org/Boo+AddIn+For+SharpDevelop" - description = "Backing binding for Boo"> + description = "Backing binding for Boo" + addInManagerHidden = "preinstalled"> - + - diff --git a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin index 771ec12f2f..186ec1b7fd 100644 --- a/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin +++ b/src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin @@ -1,7 +1,8 @@ + description = "Backing binding for C#" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin index b0a388a294..8a065b0129 100644 --- a/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin +++ b/src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin @@ -1,7 +1,8 @@ + description = "Backend binding for F#" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin b/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin index 2c7a61c695..0f036d0614 100644 --- a/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin +++ b/src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin @@ -1,7 +1,8 @@ + description = "Backing binding for IL Assembler" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin b/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin index da00a2ead0..3bc7486f60 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin @@ -1,7 +1,8 @@  + description = "Backend binding for IronPython" + addInManagerHidden="preinstalled"> @@ -15,14 +16,14 @@ - + - - + - + - + - @@ -61,7 +62,7 @@ @@ -93,26 +94,26 @@ - + - - + + label="Python" + class="ICSharpCode.PythonBinding.PythonOptionsPanel"/> - + - + - - - - + + - + +// +// +// +// $Revision$ +// + +using System; +using ICSharpCode.PythonBinding; +using ICSharpCode.SharpDevelop.Dom; +using IronPython.Compiler.Ast; +using NUnit.Framework; +using PythonBinding.Tests; + +namespace PythonBinding.Tests.Parsing +{ + /// + /// The IronPython parser will throw an invalid cast exception for the following code: + /// + /// class Project(id): + /// def __init__ Project_ID(): + /// #i + /// + /// System.InvalidCastException: Unable to cast object of type 'IronPython.Compiler.Ast.ErrorExpression' to type 'IronPython.Compiler.Ast.NameExpression'. + /// at IronPython.Compiler.Parser.ParseParameter(Int32 position, Dictionary`2 names) + /// at IronPython.Compiler.Parser.ParseVarArgsList(TokenKind terminator) + /// at IronPython.Compiler.Parser.ParseFuncDef() + /// at IronPython.Compiler.Parser.ParseStmt() + /// at IronPython.Compiler.Parser.ParseSuite() + /// at IronPython.Compiler.Parser.ParseClassDef() + /// at IronPython.Compiler.Parser.ParseStmt() + /// at IronPython.Compiler.Parser.ParseFile(Boolean makeModule) + /// at ICSharpCode.PythonBinding.PythonParser.CreateAst(String fileName, String fileContent) + /// + [TestFixture] + public class InvalidCastInPythonParserTestFixture + { + string code = "class Project(id): \r\n" + + " def __init__ Project_ID(): \r\n" + + " #i\r\n"; + + /// + /// Check that IronPython bug still exists. + /// + [Test] + [ExpectedException(typeof(InvalidCastException))] + public void CreateAstShouldThrowInvalidCastException() + { + PythonParser parser = new PythonParser(); + PythonAst ast = parser.CreateAst(@"d:\projects\test\test.py", code); + } + + [Test] + public void ParseShouldNotThrowInvalidCastException() + { + PythonParser parser = new PythonParser(); + ICompilationUnit unit = parser.Parse(new DefaultProjectContent(), @"d:\projects\test\test.py", code); + Assert.AreEqual(0, unit.Classes.Count); + } + } +} diff --git a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj index fba600177a..dc6bc3d99b 100644 --- a/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj +++ b/src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj @@ -178,11 +178,11 @@ - AddInOptionsTestFixture.cs + diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll index 7351f206cc..1d81fb278c 100755 Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll differ diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll index 58a0818ca0..128372b510 100755 Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll differ diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll index ee80ba679e..43a85060f3 100755 Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll differ diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll index 08b48baa88..428fab62c5 100644 Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll differ diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll index c17f191e10..593be03cde 100755 Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll and b/src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll differ diff --git a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe index a84ceccbf2..94dad4106a 100755 Binary files a/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe and b/src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe differ diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs index e41f53cbd6..30ff1c4ddf 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs @@ -331,9 +331,9 @@ namespace VBNetBinding.FormattingStrategy count--; lineNr++; if (lineNr < area.Document.TotalNumberOfLines) - lineText = area.Document.GetText(area.Document.GetLineSegment(lineNr)); + lineText = area.Document.GetText(area.Document.GetLineSegment(lineNr)); } - + return (count > 0); } diff --git a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin index 4705401f56..17b992eba2 100644 --- a/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin +++ b/src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin @@ -1,7 +1,8 @@ + description = "Backing binding for VB.NET" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/BackendBindings/WixBinding/Project/WixBinding.addin b/src/AddIns/BackendBindings/WixBinding/Project/WixBinding.addin index fd170a1506..114e0f7222 100644 --- a/src/AddIns/BackendBindings/WixBinding/Project/WixBinding.addin +++ b/src/AddIns/BackendBindings/WixBinding/Project/WixBinding.addin @@ -2,7 +2,8 @@ author = "Matt Ward" copyright = "prj:///doc/copyright.txt" url = "http://icsharpcode.net" - description = "Binding for the WiX installer."> + description = "Binding for the WiX installer." + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.addin b/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.addin index 6d309cd212..49a5431816 100644 --- a/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.addin +++ b/src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.addin @@ -2,7 +2,8 @@ + description = "Shows a visual class diagram of the project." + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin b/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin index 43633b250e..29935f039d 100644 --- a/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin +++ b/src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin @@ -1,7 +1,8 @@ + description = "Windows Forms Designer" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin b/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin index 47932bf872..b52412207d 100644 --- a/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin +++ b/src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin @@ -1,7 +1,8 @@ + description = "Hexadecimal Editor DisplayBinding" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.addin b/src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.addin index 1934f02cc8..9d08261bb7 100644 --- a/src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.addin +++ b/src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.addin @@ -1,7 +1,8 @@  + description = "Allows viewing .ico files inside SharpDevelop" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin b/src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin index 3c233159de..1768c2799d 100644 --- a/src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin +++ b/src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin @@ -1,7 +1,8 @@  + description = "A display binding for *.resources and *.resx files." + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin b/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin index d9cf1c1021..d998eeba01 100644 --- a/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin +++ b/src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin @@ -1,7 +1,8 @@ + description = "Xml Editor" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/AddInManager/Project/AddInManager.addin b/src/AddIns/Misc/AddInManager/Project/AddInManager.addin index 0bdaf772d2..52c8666b10 100644 --- a/src/AddIns/Misc/AddInManager/Project/AddInManager.addin +++ b/src/AddIns/Misc/AddInManager/Project/AddInManager.addin @@ -1,7 +1,8 @@  + description = "Can install, enable, disable and uninstall AddIns" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs b/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs index f4aa52f445..59c467894d 100644 --- a/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs +++ b/src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs @@ -90,10 +90,14 @@ namespace ICSharpCode.AddInManager addInList.Sort(delegate(AddIn a, AddIn b) { return a.Name.CompareTo(b.Name); }); + bool hasPreinstalledAddIns = false; foreach (AddIn addIn in addInList) { - string identity = addIn.Manifest.PrimaryIdentity; - if (addIn.Properties["addInManagerHidden"] == "true") + if (string.Equals(addIn.Properties["addInManagerHidden"], "true", StringComparison.OrdinalIgnoreCase) + && IsInstalledInApplicationRoot(addIn)) + { + hasPreinstalledAddIns = true; continue; + } addInControl = new AddInControl(addIn); addInControl.Dock = DockStyle.Top; addInControl.TabIndex = index++; @@ -105,10 +109,9 @@ namespace ICSharpCode.AddInManager splitContainer.Panel1.Controls.Add(stack.Pop()); } ShowPreinstalledAddInsCheckBoxCheckedChanged(null, null); - #if SHOWALLADDINS - showPreinstalledAddInsCheckBox.Visible = false; - showPreinstalledAddInsCheckBox.Checked = true; - #endif + if (!hasPreinstalledAddIns) { + showPreinstalledAddInsCheckBox.Visible = false; + } splitContainer.Panel2Collapsed = true; } @@ -144,7 +147,11 @@ namespace ICSharpCode.AddInManager } else { if (ctl == oldFocus) oldFocus = null; - visible = !FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, ctl.AddIn.FileName); + if (IsInstalledInApplicationRoot(ctl.AddIn)) { + visible = !string.Equals(ctl.AddIn.Properties["addInManagerHidden"], "preinstalled", StringComparison.OrdinalIgnoreCase); + } else { + visible = true; + } } if (visible) visibleAddInCount += 1; @@ -153,6 +160,11 @@ namespace ICSharpCode.AddInManager UpdateActionBox(); } + static bool IsInstalledInApplicationRoot(AddIn addin) + { + return FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, addin.FileName); + } + void OnControlClick(object sender, EventArgs e) { // clicking again on already focused item: @@ -245,7 +257,7 @@ namespace ICSharpCode.AddInManager allInstalling &= addIn.Action == AddInAction.Install; allUninstalling &= addIn.Action == AddInAction.Uninstall; if (allUninstallable) { - if (FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, addIn.FileName)) { + if (IsInstalledInApplicationRoot(addIn)) { allUninstallable = false; } } diff --git a/src/AddIns/Misc/AddinScout/Project/AddInScout.addin b/src/AddIns/Misc/AddinScout/Project/AddInScout.addin index 57fcc3c09a..cb3377a803 100644 --- a/src/AddIns/Misc/AddinScout/Project/AddInScout.addin +++ b/src/AddIns/Misc/AddinScout/Project/AddInScout.addin @@ -2,7 +2,8 @@ author = "Satguru P Srivastava" copyright = "prj:///doc/copyright.txt" url = "http://home.mchsi.com/~ssatguru" - description = "Display AddIn Information"> + description = "Display AddIn Information" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/CodeAnalysis/CodeAnalysis.addin b/src/AddIns/Misc/CodeAnalysis/CodeAnalysis.addin index fc3f280c38..5ff49b321b 100644 --- a/src/AddIns/Misc/CodeAnalysis/CodeAnalysis.addin +++ b/src/AddIns/Misc/CodeAnalysis/CodeAnalysis.addin @@ -1,7 +1,8 @@  + description = "Integrates FxCop code analysis" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin b/src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin index 3dd43811d6..b8502e8598 100644 --- a/src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin +++ b/src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin @@ -1,7 +1,8 @@ + description = "Code Coverage AddIn for SharpDevelop using PartCover" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.addin b/src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.addin index 45392ffe1d..fc2431151c 100644 --- a/src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.addin +++ b/src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.addin @@ -2,7 +2,8 @@ author="Matt Ward" url="http://oaklandsoftware.com/" copyright="prj:///doc/copyright.txt" - description="Component Inspector AddIn for SharpDevelop"> + description="Component Inspector AddIn for SharpDevelop" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin index 174f2455eb..e90edc33e1 100644 --- a/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin +++ b/src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin @@ -1,4 +1,9 @@ - + + diff --git a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MemoryReadWrite.cs b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MemoryReadWrite.cs index 40b78f4b20..2276f4ac5d 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MemoryReadWrite.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MemoryReadWrite.cs @@ -74,8 +74,8 @@ namespace Debugger.Tests { MemoryReadWrite.exe (Has symbols) System.dll (No symbols) Break MemoryReadWrite.cs:18,4-18,40 - EC 8 33 79 6 0 0 0 5 0 0 0 48 0 65 0 6C 0 6C 0 6F 0 - EC 8 33 79 7 0 0 0 6 0 0 0 20 0 20 0 20 0 20 0 20 0 21 0 + 0 A 33 79 6 0 0 0 5 0 0 0 48 0 65 0 6C 0 6C 0 6F 0 + 0 A 33 79 7 0 0 0 6 0 0 0 20 0 20 0 20 0 20 0 20 0 21 0 System.Configuration.dll (No symbols) System.Xml.dll (No symbols) Hello world!\r\n diff --git a/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin b/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin index dce27d1e93..716a6242f0 100644 --- a/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin +++ b/src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin @@ -1,10 +1,12 @@ + description = "Registers files in the Windows Explorer for #Develop" + addInManagerHidden = "preinstalled"> + diff --git a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.DynamicHelp.addin b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.DynamicHelp.addin deleted file mode 100644 index 88b4919146..0000000000 --- a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.DynamicHelp.addin +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin index 5aa39f9fba..8702faf50f 100644 --- a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin +++ b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin @@ -1,10 +1,11 @@ + addInManagerHidden = "preinstalled"> + @@ -14,11 +15,11 @@ - + - + + @@ -81,6 +87,12 @@ class = "HtmlHelp2.ShowIndexResultsMenuCommand" insertafter = "SearchPadCommand" insertbefore = "Separator1"/> + diff --git a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj index 5384603a88..d6943b9dbc 100644 --- a/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj +++ b/src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj @@ -107,9 +107,6 @@ - - Always - Configuration\GlobalAssemblyInfo.cs diff --git a/src/AddIns/Misc/PInvokeAddIn/Project/PInvoke.addin b/src/AddIns/Misc/PInvokeAddIn/Project/PInvoke.addin index 82667280a6..b4cdc1f07e 100644 --- a/src/AddIns/Misc/PInvokeAddIn/Project/PInvoke.addin +++ b/src/AddIns/Misc/PInvokeAddIn/Project/PInvoke.addin @@ -1,11 +1,12 @@ + description = "PInvoke.Net integration for SharpDevelop." + addInManagerHidden = "preinstalled"> - + diff --git a/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.addin b/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.addin index 53518c191a..b401f093ed 100644 --- a/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.addin +++ b/src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.addin @@ -1,15 +1,16 @@  + description = "Can open Red Gate's .NET Reflector on a selected class or member." + addInManagerHidden = "preinstalled"> - + + - diff --git a/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin b/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin index 34b6c4579c..5f74344bf9 100644 --- a/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin +++ b/src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin @@ -1,7 +1,8 @@ + description = "Testing toolkit for regular expressions" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/ResourceToolkit/Project/Hornung.ResourceToolkit.addin b/src/AddIns/Misc/ResourceToolkit/Project/Hornung.ResourceToolkit.addin index f4c3fef5b4..8ef15a4e39 100644 --- a/src/AddIns/Misc/ResourceToolkit/Project/Hornung.ResourceToolkit.addin +++ b/src/AddIns/Misc/ResourceToolkit/Project/Hornung.ResourceToolkit.addin @@ -1,7 +1,8 @@  + description = "Provides tooltips and code completion for resource entries to simplify working with localizable resources using the standard .NET framework classes or ICSharpCode.Core." + addInManagerHidden = "preinstalled"> @@ -12,7 +13,6 @@ - diff --git a/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin b/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin index 39050d48e7..3471ed13c5 100644 --- a/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin +++ b/src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin @@ -1,5 +1,6 @@  + description = "Implements the Search & Replace feature for the text editor" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/SharpRefactoring/SharpRefactoring.addin b/src/AddIns/Misc/SharpRefactoring/SharpRefactoring.addin index d046a85ba4..d97c65ff75 100644 --- a/src/AddIns/Misc/SharpRefactoring/SharpRefactoring.addin +++ b/src/AddIns/Misc/SharpRefactoring/SharpRefactoring.addin @@ -1,6 +1,7 @@ + description = "Provides refactorings in SharpDevelop" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/SourceAnalysis/SourceAnalysis.addin b/src/AddIns/Misc/SourceAnalysis/SourceAnalysis.addin index 38d4f7b1d4..a704d14cb0 100644 --- a/src/AddIns/Misc/SourceAnalysis/SourceAnalysis.addin +++ b/src/AddIns/Misc/SourceAnalysis/SourceAnalysis.addin @@ -1,7 +1,8 @@  + description = "Integrates StyleCop code analysis" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/StartPage/Project/StartPage.addin b/src/AddIns/Misc/StartPage/Project/StartPage.addin index 7a7e28ade3..d396a2068a 100644 --- a/src/AddIns/Misc/StartPage/Project/StartPage.addin +++ b/src/AddIns/Misc/StartPage/Project/StartPage.addin @@ -1,7 +1,8 @@ + description = "VS like Start Page for #develop" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin b/src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin index 285cd7fd55..169cadb44b 100644 --- a/src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin +++ b/src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin @@ -1,7 +1,8 @@ + description = "Adds support for Subversion to the project browser" + addInManagerHidden = "preinstalled"> diff --git a/src/AddIns/Misc/UnitTesting/UnitTesting.addin b/src/AddIns/Misc/UnitTesting/UnitTesting.addin index 6f37d6d656..1f386fd586 100644 --- a/src/AddIns/Misc/UnitTesting/UnitTesting.addin +++ b/src/AddIns/Misc/UnitTesting/UnitTesting.addin @@ -1,10 +1,12 @@  + description = "Runs NUnit tests inside #Develop" + addInManagerHidden = "preinstalled"> + diff --git a/src/Libraries/NRefactory/Project/Src/OperatorPrecedence.cs b/src/Libraries/NRefactory/Project/Src/OperatorPrecedence.cs index a6df6178bc..7487e7ef57 100644 --- a/src/Libraries/NRefactory/Project/Src/OperatorPrecedence.cs +++ b/src/Libraries/NRefactory/Project/Src/OperatorPrecedence.cs @@ -73,8 +73,8 @@ namespace ICSharpCode.NRefactory public static int ComparePrecedenceCSharp(BinaryOperatorType op1, BinaryOperatorType op2) { - int p1 = GetOperatorPrecedence(vbDict, op1); - int p2 = GetOperatorPrecedence(vbDict, op2); + int p1 = GetOperatorPrecedence(csharpDict, op1); + int p2 = GetOperatorPrecedence(csharpDict, op2); return p1.CompareTo(p2); } diff --git a/src/Main/Base/Project/Src/Commands/ToolsCommands.cs b/src/Main/Base/Project/Src/Commands/ToolsCommands.cs index 401140c186..d0524a2719 100644 --- a/src/Main/Base/Project/Src/Commands/ToolsCommands.cs +++ b/src/Main/Base/Project/Src/Commands/ToolsCommands.cs @@ -14,27 +14,31 @@ namespace ICSharpCode.SharpDevelop.Commands { public class OptionsCommand : AbstractMenuCommand { - public static void ShowTabbedOptions(string dialogTitle, AddInTreeNode node) + public static bool? ShowTabbedOptions(string dialogTitle, AddInTreeNode node) { TabbedOptionsDialog o = new TabbedOptionsDialog(node.BuildChildItems(null)); o.Title = dialogTitle; o.Owner = WorkbenchSingleton.MainWindow; - o.ShowDialog(); + return o.ShowDialog(); } - public static void ShowTreeOptions(string dialogTitle, AddInTreeNode node) + public static bool? ShowTreeOptions(string dialogTitle, AddInTreeNode node) { TreeViewOptionsDialog o = new TreeViewOptionsDialog(node.BuildChildItems(null)); o.Title = dialogTitle; o.Owner = WorkbenchSingleton.MainWindow; - o.ShowDialog(); + return o.ShowDialog(); } public override void Run() { - ShowTreeOptions( + bool? result = ShowTreeOptions( ResourceService.GetString("Dialog.Options.TreeViewOptions.DialogName"), AddInTree.GetTreeNode("/SharpDevelop/Dialogs/OptionsDialog")); + if (result ?? false) { + // save properties after changing options + PropertyService.Save(); + } } } diff --git a/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs b/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs index a5e528a5fd..f513aff250 100644 --- a/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs +++ b/src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs @@ -72,10 +72,23 @@ namespace ICSharpCode.SharpDevelop.Gui versionInfoTextBox.ScrollBars = ScrollBars.Both; versionInfoTextBox.TabIndex = 9; versionInfoTextBox.Font = WinFormsResourceService.LoadFont("Courier New", 8); + versionInfoTextBox.KeyDown += new KeyEventHandler(versionInfoTextBox_KeyDown); Controls.Add(versionInfoTextBox); Dock = DockStyle.Fill; } + + void versionInfoTextBox_KeyDown(object sender, KeyEventArgs e) + { + #if DEBUG + if (e.KeyData == (Keys.Control | Keys.Shift | Keys.E)) { + throw new ClownFishException(); + } + #endif + } + + [Serializable] + class ClownFishException : Exception { } public static string LicenseSentence { get { diff --git a/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs b/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs index 0d955cbaf2..978c46af52 100644 --- a/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs +++ b/src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs @@ -57,19 +57,18 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser base.Initialize(); Nodes.Clear(); - List contentList = new List(1); - contentList.Add(null); + List contentList = new List(); if (ProjectService.OpenSolution != null) { foreach (IProject project in ProjectService.OpenSolution.Projects) { IProjectContent projectContent = ParserService.GetProjectContent(project); if (projectContent != null) { - contentList[0] = projectContent; - foreach (IClass derivedClass in RefactoringService.FindDerivedClasses(c, contentList, true)) { - new ClassNode(project, derivedClass).AddTo(this); - } + contentList.Add(projectContent); } } } + foreach (IClass derivedClass in RefactoringService.FindDerivedClasses(c, contentList, true)) { + new ClassNode(project, derivedClass).AddTo(this); + } if (Nodes.Count == 0) { SetIcon(ClosedIcon); diff --git a/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs b/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs index d17d1de80f..26a6183388 100644 --- a/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs +++ b/src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs @@ -329,7 +329,14 @@ namespace ICSharpCode.SharpDevelop.Gui public void ShowView(IViewContent content, bool switchToOpenedView) { - System.Diagnostics.Debug.Assert(layout != null); + if (content == null) + throw new ArgumentNullException("content"); + if (content.WorkbenchWindow != null) + throw new ArgumentException("Cannot show view content that is already visible in another workbench window"); + + if (layout == null) + throw new InvalidOperationException("No layout is attached."); + primaryViewContentCollection.Add(content); if (PropertyService.Get("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable) { try { diff --git a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs index 4c5b502baf..225f32321b 100644 --- a/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs +++ b/src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs @@ -20,7 +20,7 @@ namespace ICSharpCode.SharpDevelop public bool IsValid(object caller, Condition condition) { IProject project = (caller as IProject) ?? ProjectService.CurrentProject; - return !project.ReadOnly; + return project != null && !project.ReadOnly; } } } diff --git a/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs b/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs index 3381a4f8ab..7ab26f8edc 100644 --- a/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs +++ b/src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop /// This class handles the installed display bindings /// and provides a simple access point to these bindings. /// - internal static class DisplayBindingService + public static class DisplayBindingService { const string displayBindingPath = "/SharpDevelop/Workbench/DisplayBindings"; @@ -39,6 +39,7 @@ namespace ICSharpCode.SharpDevelop public static DisplayBindingDescriptor AddExternalProcessDisplayBinding(ExternalProcessDisplayBinding binding) { + WorkbenchSingleton.AssertMainThread(); if (binding == null) throw new ArgumentNullException("binding"); DisplayBindingDescriptor descriptor = AddExternalProcessDisplayBindingInternal(binding); @@ -64,6 +65,7 @@ namespace ICSharpCode.SharpDevelop public static void RemoveExternalProcessDisplayBinding(ExternalProcessDisplayBinding binding) { + WorkbenchSingleton.AssertMainThread(); if (binding == null) throw new ArgumentNullException("binding"); if (!externalProcessDisplayBindings.Remove(binding)) @@ -83,6 +85,7 @@ namespace ICSharpCode.SharpDevelop /// public static IDisplayBinding GetBindingPerFileName(string filename) { + WorkbenchSingleton.AssertMainThread(); DisplayBindingDescriptor codon = GetDefaultCodonPerFileName(filename); return codon == null ? null : codon.Binding; } @@ -92,6 +95,8 @@ namespace ICSharpCode.SharpDevelop /// public static DisplayBindingDescriptor GetDefaultCodonPerFileName(string filename) { + WorkbenchSingleton.AssertMainThread(); + string defaultCommandID = displayBindingServiceProperties.Get("Default" + Path.GetExtension(filename).ToLowerInvariant()) as string; if (!string.IsNullOrEmpty(defaultCommandID)) { foreach (DisplayBindingDescriptor binding in bindings) { @@ -113,11 +118,12 @@ namespace ICSharpCode.SharpDevelop public static void SetDefaultCodon(string extension, DisplayBindingDescriptor bindingDescriptor) { + WorkbenchSingleton.AssertMainThread(); if (bindingDescriptor == null) throw new ArgumentNullException("bindingDescriptor"); if (extension == null) throw new ArgumentNullException("extension"); - if (!extension.StartsWith(".")) + if (!extension.StartsWith(".", StringComparison.Ordinal)) throw new ArgumentException("extension must start with '.'"); displayBindingServiceProperties.Set("Default" + extension.ToLowerInvariant(), bindingDescriptor.Id); @@ -128,6 +134,8 @@ namespace ICSharpCode.SharpDevelop /// public static IList GetCodonsPerFileName(string filename) { + WorkbenchSingleton.AssertMainThread(); + List list = new List(); foreach (DisplayBindingDescriptor binding in bindings) { if (IsPrimaryBindingValidForFileName(binding, filename)) { @@ -154,6 +162,10 @@ namespace ICSharpCode.SharpDevelop /// This is a reattaching pass public static void AttachSubWindows(IViewContent viewContent, bool isReattaching) { + WorkbenchSingleton.AssertMainThread(); + if (viewContent == null) + throw new ArgumentNullException("viewContent"); + foreach (DisplayBindingDescriptor binding in bindings) { if (binding.IsSecondary && binding.CanOpenFile(viewContent.PrimaryFileName)) { ISecondaryDisplayBinding displayBinding = binding.SecondaryBinding; diff --git a/src/Main/Base/Project/Src/Services/DisplayBinding/ExternalProcessDisplayBinding.cs b/src/Main/Base/Project/Src/Services/DisplayBinding/ExternalProcessDisplayBinding.cs index b0763a7aeb..c80fe9e402 100644 --- a/src/Main/Base/Project/Src/Services/DisplayBinding/ExternalProcessDisplayBinding.cs +++ b/src/Main/Base/Project/Src/Services/DisplayBinding/ExternalProcessDisplayBinding.cs @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop /// Display binding for opening a file in an external process. /// [TypeConverter(typeof(ExternalProcessDisplayBindingConverter))] - sealed class ExternalProcessDisplayBinding : IDisplayBinding + public sealed class ExternalProcessDisplayBinding : IDisplayBinding { public string FileExtension { get; set; } public string CommandLine { get; set; } diff --git a/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs b/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs index 49825f14d8..1cf343b323 100644 --- a/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs +++ b/src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs @@ -159,7 +159,7 @@ namespace ICSharpCode.SharpDevelop.Refactoring progressMonitor.BeginTask("${res:SharpDevelop.Refactoring.FindingReferences}", files.Count, true); } #if DEBUG - if (System.Windows.Forms.Control.ModifierKeys == System.Windows.Forms.Keys.Control) { + if (System.Windows.Forms.Control.ModifierKeys == DefaultEditor.Gui.Editor.SharpDevelopTextAreaControl.DebugBreakModifiers) { System.Diagnostics.Debugger.Break(); } #endif diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionDataProvider.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionDataProvider.cs index 2573c5cd07..3b76322fb7 100644 --- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionDataProvider.cs +++ b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionDataProvider.cs @@ -50,7 +50,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor } #if DEBUG - public bool DebugMode = false; + internal bool DebugMode = false; #endif protected void GenerateCompletionData(TextArea textArea, ExpressionResult expressionResult) diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs index a884712006..a64360b2b5 100644 --- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs +++ b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs @@ -208,11 +208,15 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor } } + #if DEBUG + internal const Keys DebugBreakModifiers = Keys.Control | Keys.Shift | Keys.Alt; + #endif + void GenerateEditActions() { #if DEBUG - editactions[Keys.Control | Keys.OemPeriod] = new DebugDotCompletionAction(); - editactions[Keys.Control | Keys.Shift | Keys.Space] = new DebugCtrlSpaceCodeCompletionAction(); + editactions[DebugBreakModifiers | Keys.OemPeriod] = new DebugDotCompletionAction(); + editactions[DebugBreakModifiers | Keys.Space] = new DebugCtrlSpaceCodeCompletionAction(); #endif try { IEditAction[] actions = (IEditAction[])(AddInTree.GetTreeNode(editActionsPath).BuildChildItems(this)).ToArray(typeof(IEditAction)); diff --git a/src/Main/Core/Project/Src/AddInTree/AddInTree.cs b/src/Main/Core/Project/Src/AddInTree/AddInTree.cs index 01bb0bd5a2..c31e94c323 100644 --- a/src/Main/Core/Project/Src/AddInTree/AddInTree.cs +++ b/src/Main/Core/Project/Src/AddInTree/AddInTree.cs @@ -44,16 +44,20 @@ namespace ICSharpCode.Core { System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach (AddIn addIn in AddIns) { - if (!FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, addIn.FileName)) { - if (sb.Length > 0) sb.Append(", "); - sb.Append("["); - sb.Append(addIn.Name); - sb.Append(", Enabled="); - sb.Append(addIn.Enabled); - sb.Append(", Action="); - sb.Append(addIn.Action.ToString()); - sb.Append("]"); + // Skip preinstalled AddIns (show only third party AddIns) + if (FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, addIn.FileName)) { + string hidden = addIn.Properties["addInManagerHidden"]; + if (string.Equals(hidden, "true", StringComparison.OrdinalIgnoreCase) || string.Equals(hidden, "preinstalled", StringComparison.OrdinalIgnoreCase)) + continue; } + if (sb.Length > 0) sb.Append(", "); + sb.Append("["); + sb.Append(addIn.Name); + sb.Append(", Enabled="); + sb.Append(addIn.Enabled); + sb.Append(", Action="); + sb.Append(addIn.Action.ToString()); + sb.Append("]"); } return sb.ToString(); } diff --git a/src/Setup/Files.wxs b/src/Setup/Files.wxs index e45f68fd7c..59fd6412fe 100644 --- a/src/Setup/Files.wxs +++ b/src/Setup/Files.wxs @@ -1457,7 +1457,6 @@ - @@ -1564,7 +1563,7 @@ - +