Browse Source

Merge 3.0 to trunk.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3815 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
3898950c40
  1. 27
      data/schemas/AddIn.xsd
  2. 6
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin
  3. 3
      src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin
  4. 3
      src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin
  5. 3
      src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin
  6. 11
      src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin
  7. 4
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonParser.cs
  8. 15
      src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInFileTestFixture.cs
  9. 61
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/InvalidCastInPythonParserTestFixture.cs
  10. 2
      src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj
  11. BIN
      src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll
  12. BIN
      src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll
  13. BIN
      src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll
  14. BIN
      src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll
  15. BIN
      src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll
  16. BIN
      src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe
  17. 3
      src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin
  18. 3
      src/AddIns/BackendBindings/WixBinding/Project/WixBinding.addin
  19. 3
      src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.addin
  20. 3
      src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin
  21. 3
      src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin
  22. 3
      src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.addin
  23. 3
      src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin
  24. 3
      src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin
  25. 3
      src/AddIns/Misc/AddInManager/Project/AddInManager.addin
  26. 26
      src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs
  27. 3
      src/AddIns/Misc/AddinScout/Project/AddInScout.addin
  28. 3
      src/AddIns/Misc/CodeAnalysis/CodeAnalysis.addin
  29. 3
      src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin
  30. 3
      src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.addin
  31. 7
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin
  32. 4
      src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MemoryReadWrite.cs
  33. 4
      src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin
  34. 30
      src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.DynamicHelp.addin
  35. 14
      src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin
  36. 3
      src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj
  37. 5
      src/AddIns/Misc/PInvokeAddIn/Project/PInvoke.addin
  38. 7
      src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.addin
  39. 3
      src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin
  40. 4
      src/AddIns/Misc/ResourceToolkit/Project/Hornung.ResourceToolkit.addin
  41. 3
      src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin
  42. 3
      src/AddIns/Misc/SharpRefactoring/SharpRefactoring.addin
  43. 3
      src/AddIns/Misc/SourceAnalysis/SourceAnalysis.addin
  44. 3
      src/AddIns/Misc/StartPage/Project/StartPage.addin
  45. 3
      src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin
  46. 4
      src/AddIns/Misc/UnitTesting/UnitTesting.addin
  47. 4
      src/Libraries/NRefactory/Project/Src/OperatorPrecedence.cs
  48. 14
      src/Main/Base/Project/Src/Commands/ToolsCommands.cs
  49. 13
      src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs
  50. 9
      src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs
  51. 9
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs
  52. 2
      src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs
  53. 16
      src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs
  54. 2
      src/Main/Base/Project/Src/Services/DisplayBinding/ExternalProcessDisplayBinding.cs
  55. 2
      src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs
  56. 2
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionDataProvider.cs
  57. 8
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs
  58. 8
      src/Main/Core/Project/Src/AddInTree/AddInTree.cs
  59. 3
      src/Setup/Files.wxs

27
data/schemas/AddIn.xsd

@ -63,11 +63,38 @@ @@ -63,11 +63,38 @@
<xs:attribute name="copyright" type="xs:string" use="optional" />
<xs:attribute name="url" type="xs:anyURI" use="optional" />
<xs:attribute name="description" type="xs:string" use="optional" />
<xs:attribute name="addInManagerHidden" type="AddInManagerHiddenEnum" use="optional" />
</xs:complexType>
<xs:simpleType name="AddInManagerHiddenEnum">
<xs:restriction base="xs:string">
<xs:enumeration value="true">
<xs:annotation>
<xs:documentation>
Hide the AddIn from the AddInManager.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="false">
<xs:annotation>
<xs:documentation>
Show the AddIn in the AddInManager (this is the default value).
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="preinstalled">
<xs:annotation>
<xs:documentation>
Show the AddIn only if the user chooses to view 'preinstalled' AddIns.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:element name="AddIn" type="AddIn" />
<xs:complexType name="AddInReference">
<xs:attribute name="addin" type="xs:string" use="required" />
<xs:attribute name="version" type="xs:string" use="optional" />
<xs:attribute name="requirePreload" type="xs:boolean" use="optional" />
</xs:complexType>
<xs:complexType name="Import">
<xs:choice maxOccurs="unbounded">

6
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.addin

@ -2,15 +2,15 @@ @@ -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">
<Manifest>
<Identity name = "ICSharpCode.BooBinding"/>
<Dependency addin = "ICSharpCode.FormsDesigner"/>
<Dependency addin = "ICSharpCode.FormsDesigner" requirePreload="true"/>
</Manifest>
<Runtime>
<Import assembly = "$ICSharpCode.FormsDesigner/FormsDesigner.dll"/>
<Import assembly = "BooBinding.dll"/>
<Import assembly = ":ICSharpCode.SharpDevelop"/>
</Runtime>

3
src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "C# Binding"
author = "Mike Krueger"
copyright = "prj:///doc/copyright.txt"
description = "Backing binding for C#">
description = "Backing binding for C#"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.CSharpBinding"/>

3
src/AddIns/BackendBindings/FSharp/FSharpBinding/Project/FSharpBinding.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "F# Binding"
author = "Robert Pickering"
copyright = "prj:///doc/copyright.txt"
description = "Backend binding for F#">
description = "Backend binding for F#"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.FSharpBinding"/>

3
src/AddIns/BackendBindings/ILAsmBinding/Project/ILAsmBinding.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "ILAsm binding"
author = "Mike Krueger"
copyright = "prj:///doc/copyright.txt"
description = "Backing binding for IL Assembler">
description = "Backing binding for IL Assembler"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.ILAsmBinding"/>

11
src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Python Binding"
author = "Matt Ward"
copyright = "prj:///doc/copyright.txt"
description = "Backend binding for IronPython">
description = "Backend binding for IronPython"
addInManagerHidden="preinstalled">
<Manifest>
<Identity name="ICSharpCode.PythonBinding"/>
@ -130,15 +131,15 @@ @@ -130,15 +131,15 @@
</Path>
<!-- Python display binding -->
<!--<Path name="/SharpDevelop/Workbench/DisplayBindings">
<Path name="/SharpDevelop/Workbench/DisplayBindings">
<DisplayBinding id="PythonDisplayBinding"
type="Secondary"
fileNamePattern="\.py$"
languagePattern="^Python$"
class="ICSharpCode.PythonBinding.PythonFormsDesignerDisplayBinding" />
</Path>-->
</Path>
<!--<Path name="/SharpDevelop/Workbench/MainMenu/Tools/ConvertCode">
<Path name="/SharpDevelop/Workbench/MainMenu/Tools/ConvertCode">
<ComplexCondition action="Disable">
<Or>
<Condition name="ActiveContentExtension" activeextension=".cs"/>
@ -150,7 +151,7 @@ @@ -150,7 +151,7 @@
label="Python"
class="ICSharpCode.PythonBinding.ConvertToPythonMenuCommand"/>
</ComplexCondition>
</Path>-->
</Path>
<Path name = "/SharpDevelop/Workbench/Pads">
<Pad id = "PythonConsole"

4
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonParser.cs

@ -98,10 +98,14 @@ namespace ICSharpCode.PythonBinding @@ -98,10 +98,14 @@ namespace ICSharpCode.PythonBinding
public ICompilationUnit Parse(IProjectContent projectContent, string fileName, string fileContent)
{
if (fileContent != null) {
try {
PythonAst ast = CreateAst(fileName, fileContent);
PythonAstWalker walker = new PythonAstWalker(projectContent, fileName);
walker.Walk(ast);
return walker.CompilationUnit;
} catch (InvalidCastException) {
// Ignore.
}
}
DefaultCompilationUnit compilationUnit = new DefaultCompilationUnit(projectContent);

15
src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInFileTestFixture.cs

@ -495,84 +495,72 @@ namespace PythonBinding.Tests @@ -495,84 +495,72 @@ namespace PythonBinding.Tests
}
[Test]
[Ignore("Not ported")]
public void PythonDisplayBindingExists()
{
Assert.IsNotNull(displayBindingCodon);
}
[Test]
[Ignore("Not ported")]
public void PythonDisplayBindingIsSecondary()
{
Assert.AreEqual("Secondary", displayBindingCodon["type"]);
}
[Test]
[Ignore("Not ported")]
public void PythonDisplayBindingFileNamePattern()
{
Assert.AreEqual(@"\.py$", displayBindingCodon["fileNamePattern"]);
}
[Test]
[Ignore("Not ported")]
public void PythonDisplayBindingLanguagePattern()
{
Assert.AreEqual(@"^Python$", displayBindingCodon["languagePattern"]);
}
[Test]
[Ignore("Not ported")]
public void PythonDisplayBindingClass()
{
Assert.AreEqual("ICSharpCode.PythonBinding.PythonFormsDesignerDisplayBinding", displayBindingCodon["class"]);
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeCodonExists()
{
Assert.IsNotNull(convertCodeCodon);
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeCodonIsMenuItem()
{
Assert.AreEqual("MenuItem", convertCodeCodon.Name);
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeCodonInsertedAfterCSharp()
{
Assert.AreEqual("CSharp", convertCodeCodon.InsertAfter);
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeCodonInsertedBeforeVBNet()
{
Assert.AreEqual("VBNet", convertCodeCodon.InsertBefore);
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeCodonLabel()
{
Assert.AreEqual("Python", convertCodeCodon["label"]);
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeCodonClass()
{
Assert.AreEqual("ICSharpCode.PythonBinding.ConvertToPythonMenuCommand", convertCodeCodon["class"]);
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeMenuConditionAction()
{
ICondition condition = convertCodeCodon.Conditions[0];
@ -580,7 +568,6 @@ namespace PythonBinding.Tests @@ -580,7 +568,6 @@ namespace PythonBinding.Tests
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeMenuConditionName()
{
ICondition condition = convertCodeCodon.Conditions[0];
@ -588,7 +575,6 @@ namespace PythonBinding.Tests @@ -588,7 +575,6 @@ namespace PythonBinding.Tests
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeMenuConditionIsOrCondition()
{
OrCondition orCondition = convertCodeCodon.Conditions[0] as OrCondition;
@ -596,7 +582,6 @@ namespace PythonBinding.Tests @@ -596,7 +582,6 @@ namespace PythonBinding.Tests
}
[Test]
[Ignore("Not ported")]
public void ConvertCodeMenuConditionActiveExtension()
{
OrCondition orCondition = convertCodeCodon.Conditions[0] as OrCondition;

61
src/AddIns/BackendBindings/Python/PythonBinding/Test/Parsing/InvalidCastInPythonParserTestFixture.cs

@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.PythonBinding;
using ICSharpCode.SharpDevelop.Dom;
using IronPython.Compiler.Ast;
using NUnit.Framework;
using PythonBinding.Tests;
namespace PythonBinding.Tests.Parsing
{
/// <summary>
/// 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)
/// </summary>
[TestFixture]
public class InvalidCastInPythonParserTestFixture
{
string code = "class Project(id): \r\n" +
" def __init__ Project_ID(): \r\n" +
" #i\r\n";
/// <summary>
/// Check that IronPython bug still exists.
/// </summary>
[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);
}
}
}

2
src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj

@ -178,11 +178,11 @@ @@ -178,11 +178,11 @@
<Compile Include="Expressions\RemoveLastPartTests.cs" />
<Compile Include="FormsDesignerDisplayBindingTestFixture.cs" />
<Compile Include="FromImportCompletion.cs">
<DependentUpon>AddInOptionsTestFixture.cs</DependentUpon>
</Compile>
<Compile Include="ImportCompletionTestFixture.cs" />
<Compile Include="LanguageBindingTestFixture.cs" />
<Compile Include="Parsing\ClassWithBaseClassTestFixture.cs" />
<Compile Include="Parsing\InvalidCastInPythonParserTestFixture.cs" />
<Compile Include="Parsing\MethodWithParametersTestFixture.cs" />
<Compile Include="Parsing\MissingLastParameterFromMethodTestFixture.cs" />
<Compile Include="Parsing\ParseClassWithCtorTestFixture.cs" />

BIN
src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.Modules.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Python/RequiredLibraries/IronPython.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.Core.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.ExtensionAttribute.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Python/RequiredLibraries/Microsoft.Scripting.dll

Binary file not shown.

BIN
src/AddIns/BackendBindings/Python/RequiredLibraries/ipy.exe

Binary file not shown.

3
src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "VB Binding"
author = "Mike Krueger, Markus Palme"
copyright = "prj:///doc/copyright.txt"
description = "Backing binding for VB.NET">
description = "Backing binding for VB.NET"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.VBNetBinding"/>

3
src/AddIns/BackendBindings/WixBinding/Project/WixBinding.addin

@ -2,7 +2,8 @@ @@ -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">
<Manifest>
<Identity name = "ICSharpCode.WixBinding"/>

3
src/AddIns/DisplayBindings/ClassDiagram/ClassDiagramAddin/ClassDiagramAddin.addin

@ -2,7 +2,8 @@ @@ -2,7 +2,8 @@
<AddIn name = "Class Diagram"
author = "Itai Bar-Haim"
url = "http://sdclassdiagram.sf.net"
description = "Shows a visual class diagram of the project.">
description = "Shows a visual class diagram of the project."
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name="ClassDiagram"/>

3
src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Forms Designer"
author = "Mike Krueger"
copyright = "prj:///doc/copyright.txt"
description = "Windows Forms Designer">
description = "Windows Forms Designer"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.FormsDesigner"/>

3
src/AddIns/DisplayBindings/HexEditor/Project/HexEditor.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "HexEditor"
author = "Siegfried Pammer"
url = ""
description = "Hexadecimal Editor DisplayBinding">
description = "Hexadecimal Editor DisplayBinding"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name="SiegfriedPammer.HexEditor" />

3
src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "IconViewerAddIn"
author = "Daniel Grunwald"
copyright = "prj:///doc/copyright.txt"
description = "Allows viewing .ico files inside SharpDevelop">
description = "Allows viewing .ico files inside SharpDevelop"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.IconEditor"/>

3
src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Resource Editor"
author = "Mike Krueger"
copyright = "prj:///doc/copyright.txt"
description = "A display binding for *.resources and *.resx files.">
description = "A display binding for *.resources and *.resx files."
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.ResourceEditor"/>

3
src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Xml Editor"
author = "Matt Ward"
copyright = "prj:///doc/copyright.txt"
description = "Xml Editor">
description = "Xml Editor"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.XmlEditor"/>

3
src/AddIns/Misc/AddInManager/Project/AddInManager.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "AddInManager"
author = "Daniel Grunwald"
copyright = "prj:///doc/copyright.txt"
description = "Can install, enable, disable and uninstall AddIns">
description = "Can install, enable, disable and uninstall AddIns"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.AddInManager"/>

26
src/AddIns/Misc/AddInManager/Project/Src/ManagerForm.cs

@ -90,10 +90,14 @@ namespace ICSharpCode.AddInManager @@ -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 @@ -105,10 +109,9 @@ namespace ICSharpCode.AddInManager
splitContainer.Panel1.Controls.Add(stack.Pop());
}
ShowPreinstalledAddInsCheckBoxCheckedChanged(null, null);
#if SHOWALLADDINS
if (!hasPreinstalledAddIns) {
showPreinstalledAddInsCheckBox.Visible = false;
showPreinstalledAddInsCheckBox.Checked = true;
#endif
}
splitContainer.Panel2Collapsed = true;
}
@ -144,7 +147,11 @@ namespace ICSharpCode.AddInManager @@ -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 @@ -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 @@ -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;
}
}

3
src/AddIns/Misc/AddinScout/Project/AddInScout.addin

@ -2,7 +2,8 @@ @@ -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">
<Manifest>
<Identity name = "ICSharpCode.AddInScout"/>

3
src/AddIns/Misc/CodeAnalysis/CodeAnalysis.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "CodeAnalysis"
author = "Daniel Grunwald"
copyright = "prj:///doc/copyright.txt"
description = "Integrates FxCop code analysis">
description = "Integrates FxCop code analysis"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.CodeAnalysis"/>

3
src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "CodeCoverageAddIn"
author = "Matt Ward"
copyright = "prj:///doc/copyright.txt"
description = "Code Coverage AddIn for SharpDevelop using PartCover">
description = "Code Coverage AddIn for SharpDevelop using PartCover"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.CodeCoverage"/>

3
src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.addin

@ -2,7 +2,8 @@ @@ -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">
<Manifest>
<Identity name="ICSharpCode.ComponentInspector"/>

7
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.addin

@ -1,4 +1,9 @@ @@ -1,4 +1,9 @@
<AddIn name="Debugger" author="David Srbecký" copyright="prj:///doc/copyright.txt" description="SharpDevelop Managed Debugger">
<AddIn name="Debugger"
author="David Srbecký"
copyright="prj:///doc/copyright.txt"
description="SharpDevelop Managed Debugger"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.Debugger"/>
</Manifest>

4
src/AddIns/Misc/Debugger/Debugger.Tests/Project/Src/TestPrograms/MemoryReadWrite.cs

@ -74,8 +74,8 @@ namespace Debugger.Tests { @@ -74,8 +74,8 @@ namespace Debugger.Tests {
<ModuleLoaded>MemoryReadWrite.exe (Has symbols)</ModuleLoaded>
<ModuleLoaded>System.dll (No symbols)</ModuleLoaded>
<DebuggingPaused>Break MemoryReadWrite.cs:18,4-18,40</DebuggingPaused>
<hello>EC 8 33 79 6 0 0 0 5 0 0 0 48 0 65 0 6C 0 6C 0 6F 0 </hello>
<world>EC 8 33 79 7 0 0 0 6 0 0 0 20 0 20 0 20 0 20 0 20 0 21 0 </world>
<hello>0 A 33 79 6 0 0 0 5 0 0 0 48 0 65 0 6C 0 6C 0 6F 0 </hello>
<world>0 A 33 79 7 0 0 0 6 0 0 0 20 0 20 0 20 0 20 0 20 0 21 0 </world>
<ModuleLoaded>System.Configuration.dll (No symbols)</ModuleLoaded>
<ModuleLoaded>System.Xml.dll (No symbols)</ModuleLoaded>
<LogMessage>Hello world!\r\n</LogMessage>

4
src/AddIns/Misc/FiletypeRegisterer/Project/FiletypeRegisterer.addin

@ -1,10 +1,12 @@ @@ -1,10 +1,12 @@
<AddIn name = "Filetype Registerer"
author = "Georg Brandl"
copyright = "prj:///doc/copyright.txt"
description = "Registers files in the Windows Explorer for #Develop">
description = "Registers files in the Windows Explorer for #Develop"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.FiletypeRegisterer"/>
<Dependency addin="SharpDevelop"/>
</Manifest>
<Runtime>

30
src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.DynamicHelp.addin

@ -1,30 +0,0 @@ @@ -1,30 +0,0 @@
<AddIn name = "Dynamic help pad for SharpDevelop"
author = "Mathias Simmack"
description = "integrates Microsoft's Help 2.0 Environment">
<Manifest>
<Identity name = "ICSharpCode.HtmlHelp2.DynamicHelpPad"/>
</Manifest>
<Runtime>
<Import assembly="HtmlHelp2.dll"/>
</Runtime>
<Path name = "/SharpDevelop/Workbench/Pads">
<Pad id = "DynamicHelpPad"
category = "Help2"
title = "${res:AddIns.HtmlHelp2.DynamicHelp}"
icon = "HtmlHelp2.16x16.DynamicHelp"
class = "HtmlHelp2.HtmlHelp2DynamicHelpPad"
defaultPosition = "Right, Hidden" />
</Path>
<Path name = "/SharpDevelop/Workbench/MainMenu/Help">
<MenuItem id = "DynamicHelpPadCommand"
insertbefore = "TocPadCommand"
label = "${res:AddIns.HtmlHelp2.DynamicHelp}"
icon = "HtmlHelp2.16x16.DynamicHelp"
shortcut = "Control|F1"
class = "HtmlHelp2.ShowDynamicHelpMenuCommand"/>
</Path>
</AddIn>

14
src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.addin

@ -1,10 +1,11 @@ @@ -1,10 +1,11 @@
<AddIn name = "Help 2.0 Environment for SharpDevelop"
author = "Mathias Simmack"
description = "integrates Microsoft's Help 2.0 Environment"
addInManagerHidden = "true">
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.HtmlHelp2"/>
<Dependency addin="SharpDevelop"/>
</Manifest>
<Runtime>
@ -44,6 +45,11 @@ @@ -44,6 +45,11 @@
icon = "HtmlHelp2.16x16.IndexResults"
class = "HtmlHelp2.HtmlHelp2IndexResultsPad"
defaultPosition = "Bottom, Hidden" />
<Pad id = "DynamicHelpPad"
category = "Help2"
title = "${res:AddIns.HtmlHelp2.DynamicHelp}"
icon = "HtmlHelp2.16x16.DynamicHelp"
class = "HtmlHelp2.HtmlHelp2DynamicHelpPad"/>
</Path>
<Path name = "/SharpDevelop/Dialogs/OptionsDialog/ToolsOptions">
@ -81,6 +87,12 @@ @@ -81,6 +87,12 @@
class = "HtmlHelp2.ShowIndexResultsMenuCommand"
insertafter = "SearchPadCommand"
insertbefore = "Separator1"/>
<MenuItem id = "DynamicHelpPadCommand"
insertbefore = "TocPadCommand"
label = "${res:AddIns.HtmlHelp2.DynamicHelp}"
icon = "HtmlHelp2.16x16.DynamicHelp"
shortcut = "Control|F1"
class = "HtmlHelp2.ShowDynamicHelpMenuCommand"/>
</Path>
<Path name = "/SharpDevelop/ViewContent/Browser/Toolbar">

3
src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj

@ -107,9 +107,6 @@ @@ -107,9 +107,6 @@
<EmbeddedResource Include="Resources\HtmlHelp2.16x16.Toc.png" />
<EmbeddedResource Include="Resources\HtmlHelp2.16x16.Index.png" />
<Compile Include="src\Service\SharpDevLanguageClass.cs" />
<None Include="HtmlHelp2.DynamicHelp.addin">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<Compile Include="..\..\..\..\Main\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>

5
src/AddIns/Misc/PInvokeAddIn/Project/PInvoke.addin

@ -1,11 +1,12 @@ @@ -1,11 +1,12 @@
<AddIn name = "PInvoke Add-in"
author = "Matt Ward"
copyright = "prj:///doc/copyright.txt"
description = "PInvoke.Net integration for SharpDevelop.">
description = "PInvoke.Net integration for SharpDevelop."
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.PInvokeAddIn"/>
<Dependency addin = "SharpDevelop"/>
<Dependency addin="SharpDevelop"/>
</Manifest>
<Runtime>

7
src/AddIns/Misc/ReflectorAddIn/ReflectorAddIn/Project/ReflectorAddIn.addin

@ -1,15 +1,16 @@ @@ -1,15 +1,16 @@
<AddIn name = "ReflectorAddIn"
author = "Christian Hornung"
copyright = "prj:///doc/copyright.txt"
description = "Can open Red Gate's .NET Reflector on a selected class or member.">
description = "Can open Red Gate's .NET Reflector on a selected class or member."
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name="ReflectorAddIn" />
<Identity name="ICSharpCode.ReflectorAddIn" />
<Dependency addin="SharpDevelop"/>
</Manifest>
<Runtime>
<Import assembly = "ReflectorAddIn.dll"/>
<Import assembly = ":ICSharpCode.SharpDevelop"/>
</Runtime>
<!-- Text editor context menu -->

3
src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Regular expressions toolkit"
author = "Markus Palme"
copyright = "prj:///doc/copyright.txt"
description = "Testing toolkit for regular expressions">
description = "Testing toolkit for regular expressions"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.RegExpTk"/>

4
src/AddIns/Misc/ResourceToolkit/Project/Hornung.ResourceToolkit.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Hornung.ResourceToolkit"
author = "Christian Hornung"
copyright = "2006-2008 Christian Hornung"
description = "Provides tooltips and code completion for resource entries to simplify working with localizable resources using the standard .NET framework classes or ICSharpCode.Core.">
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">
<Manifest>
<Identity name="Hornung.ResourceToolkit"/>
@ -12,7 +13,6 @@ @@ -12,7 +13,6 @@
<Import assembly = "Hornung.ResourceToolkit.dll">
<ConditionEvaluator name="SolutionContainsProjectOrReference" class="Hornung.ResourceToolkit.Conditions.SolutionContainsProjectOrReferenceConditionEvaluator"/>
</Import>
<Import assembly = ":ICSharpCode.SharpDevelop"/>
</Runtime>
<!-- Code completion -->

3
src/AddIns/Misc/SearchAndReplace/Project/SearchAndReplace.addin

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
<AddIn name = "Search &amp; Replace"
description = "Implements the Search &amp; Replace feature for the text editor">
description = "Implements the Search &amp; Replace feature for the text editor"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name="ICSharpCode.SearchAndReplace"/>

3
src/AddIns/Misc/SharpRefactoring/SharpRefactoring.addin

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
<AddIn name = "SharpRefactoring"
author = "Siegfried Pammer"
description = "Provides refactorings in SharpDevelop">
description = "Provides refactorings in SharpDevelop"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name="ICSharpCode.SharpRefactoring"/>

3
src/AddIns/Misc/SourceAnalysis/SourceAnalysis.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "SourceAnalysis"
author = "Matt Everson"
copyright = "prj:///doc/copyright.txt"
description = "Integrates StyleCop code analysis">
description = "Integrates StyleCop code analysis"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "MattEverson.SourceAnalysis"/>

3
src/AddIns/Misc/StartPage/Project/StartPage.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Start Page"
author = "Georg Brandl"
copyright = "prj:///doc/copyright.txt"
description = "VS like Start Page for #develop">
description = "VS like Start Page for #develop"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.StartPage"/>

3
src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin

@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
<AddIn name = "Subversion AddIn"
author = "Mike Krueger"
copyright = "prj:///doc/copyright.txt"
description = "Adds support for Subversion to the project browser">
description = "Adds support for Subversion to the project browser"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.Svn"/>

4
src/AddIns/Misc/UnitTesting/UnitTesting.addin

@ -1,10 +1,12 @@ @@ -1,10 +1,12 @@
<AddIn name = "Unit Testing Addin"
author = "Matt Ward"
copyright = "prj:///doc/copyright.txt"
description = "Runs NUnit tests inside #Develop">
description = "Runs NUnit tests inside #Develop"
addInManagerHidden = "preinstalled">
<Manifest>
<Identity name = "ICSharpCode.UnitTesting"/>
<Dependency addin="SharpDevelop"/>
</Manifest>
<Runtime>

4
src/Libraries/NRefactory/Project/Src/OperatorPrecedence.cs

@ -73,8 +73,8 @@ namespace ICSharpCode.NRefactory @@ -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);
}

14
src/Main/Base/Project/Src/Commands/ToolsCommands.cs

@ -14,27 +14,31 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -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<IOptionPanelDescriptor>(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<IOptionPanelDescriptor>(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();
}
}
}

13
src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs

@ -72,11 +72,24 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -72,11 +72,24 @@ 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 {
return StringParser.Parse("${res:Dialog.About.License}",

9
src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/DerivedTypesNode.cs

@ -57,18 +57,17 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser @@ -57,18 +57,17 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser
base.Initialize();
Nodes.Clear();
List<IProjectContent> contentList = new List<IProjectContent>(1);
contentList.Add(null);
List<IProjectContent> contentList = new List<IProjectContent>();
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) {

9
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -329,7 +329,14 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -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 {

2
src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs

@ -20,7 +20,7 @@ namespace ICSharpCode.SharpDevelop @@ -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;
}
}
}

16
src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs

@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop
/// This class handles the installed display bindings
/// and provides a simple access point to these bindings.
/// </summary>
internal static class DisplayBindingService
public static class DisplayBindingService
{
const string displayBindingPath = "/SharpDevelop/Workbench/DisplayBindings";
@ -39,6 +39,7 @@ namespace ICSharpCode.SharpDevelop @@ -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 @@ -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 @@ -83,6 +85,7 @@ namespace ICSharpCode.SharpDevelop
/// </summary>
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 @@ -92,6 +95,8 @@ namespace ICSharpCode.SharpDevelop
/// </summary>
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 @@ -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 @@ -128,6 +134,8 @@ namespace ICSharpCode.SharpDevelop
/// </summary>
public static IList<DisplayBindingDescriptor> GetCodonsPerFileName(string filename)
{
WorkbenchSingleton.AssertMainThread();
List<DisplayBindingDescriptor> list = new List<DisplayBindingDescriptor>();
foreach (DisplayBindingDescriptor binding in bindings) {
if (IsPrimaryBindingValidForFileName(binding, filename)) {
@ -154,6 +162,10 @@ namespace ICSharpCode.SharpDevelop @@ -154,6 +162,10 @@ namespace ICSharpCode.SharpDevelop
/// <param name="isReattaching">This is a reattaching pass</param>
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;

2
src/Main/Base/Project/Src/Services/DisplayBinding/ExternalProcessDisplayBinding.cs

@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop
/// Display binding for opening a file in an external process.
/// </summary>
[TypeConverter(typeof(ExternalProcessDisplayBindingConverter))]
sealed class ExternalProcessDisplayBinding : IDisplayBinding
public sealed class ExternalProcessDisplayBinding : IDisplayBinding
{
public string FileExtension { get; set; }
public string CommandLine { get; set; }

2
src/Main/Base/Project/Src/Services/RefactoringService/RefactoringService.cs

@ -159,7 +159,7 @@ namespace ICSharpCode.SharpDevelop.Refactoring @@ -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

2
src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionDataProvider.cs

@ -50,7 +50,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -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)

8
src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs

@ -208,11 +208,15 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -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));

8
src/Main/Core/Project/Src/AddInTree/AddInTree.cs

@ -44,7 +44,12 @@ namespace ICSharpCode.Core @@ -44,7 +44,12 @@ namespace ICSharpCode.Core
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach (AddIn addIn in AddIns) {
if (!FileUtility.IsBaseDirectory(FileUtility.ApplicationRootPath, addIn.FileName)) {
// 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);
@ -54,7 +59,6 @@ namespace ICSharpCode.Core @@ -54,7 +59,6 @@ namespace ICSharpCode.Core
sb.Append(addIn.Action.ToString());
sb.Append("]");
}
}
return sb.ToString();
}

3
src/Setup/Files.wxs

@ -1457,7 +1457,6 @@ @@ -1457,7 +1457,6 @@
<File Source="..\..\AddIns\AddIns\Misc\HtmlHelp2\stdole.dll" Name="stdole.dll" Id="stdole.dll" />
<File Source="..\..\AddIns\AddIns\Misc\HtmlHelp2\HtmlHelp2.addin" Id="HtmlHelp2.addin" Name="HtmlHelp2.addin" />
<File Source="..\..\AddIns\AddIns\Misc\HtmlHelp2\HtmlHelp2.dll" Id="HtmlHelp2.dll" Name="HtmlHelp2.dll" />
<File Source="..\..\AddIns\AddIns\Misc\HtmlHelp2\HtmlHelp2.DynamicHelp.addin" Id="HtmlHelp2.DynamicHelp.addin" Name="HtmlHelp2.DynamicHelp.addin" />
<File Source="..\..\AddIns\AddIns\Misc\HtmlHelp2\HtmlHelp2JScriptGlobals.dll" Id="HtmlHelp2JScriptGlobals.dll" Name="HtmlHelp2JScriptGlobals.dll" />
<File Source="..\..\AddIns\AddIns\Misc\HtmlHelp2\MSHelpControls.dll" Id="MSHelpControls.dll" Name="MSHelpControls.dll" />
<File Source="..\..\AddIns\AddIns\Misc\HtmlHelp2\MSHelpServices.dll" Id="MSHelpServices.dll" Name="MSHelpServices.dll" />
@ -1564,7 +1563,7 @@ @@ -1564,7 +1563,7 @@
</Directory>
</Directory>
</Directory>
<Component Guid="5212F79E-568F-426D-AFD2-FC93914D5CE9" Id="SharpDevelopWebsiteShortcut" DiskId="1">
<Component Guid="542E5AE1-286C-4CE6-8800-F3AFBB24531D" Id="SharpDevelopWebsiteShortcut" DiskId="1">
<!--
The choice here is to either useW the IniFile element to
generate the two website shortcuts or create a

Loading…
Cancel
Save