Browse Source

When target framework is set to .NET 1.0 or .NET 1.1, show code-completion specific to that .NET versions.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1751 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
4af14f6adf
  1. 19
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 84
      data/schemas/AddIn.xsd
  3. 4
      data/templates/file/CSharp/CSharp.Struct.xft
  4. 18
      doc/AssemblyBaseAddresses.txt
  5. 107
      doc/technotes/ConditionList.html
  6. 98
      doc/technotes/DoozerList.html
  7. 2
      src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.InterpreterAddIn.booproj
  8. 2
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj
  9. 15
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs
  10. 7
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooAdvancedHighlighter.cs
  11. 2
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooResolver.cs
  12. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/ExpressionFinder.cs
  13. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/InferredReturnType.cs
  14. 4
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/ResolveVisitor.cs
  15. 10
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/ConvertProject.cs
  16. 19
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerLoader.cs
  17. 5
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/FormsDesignerBinding.cs
  18. 2
      src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/NRefactoryToBooConverter.csproj
  19. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpCompletionBinding.cs
  20. 3
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs
  21. 3
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/DocumentAccessor.cs
  22. 2
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs
  23. 9
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/Parser.cs
  24. 11
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs
  25. 24
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs
  26. 2
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/ProjectImports.cs
  27. 9
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs
  28. 3
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs
  29. 18
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs
  30. 1
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerLoader/NRefactoryDesignerLoader.cs
  31. 13
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs
  32. 8
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/SecondaryDisplayBinding.cs
  33. 15
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs
  34. 5
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/ToolboxProvider.cs
  35. 4
      src/AddIns/DisplayBindings/IconEditor/IconEditor/IconEditor.csproj
  36. 4
      src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.csproj
  37. 18
      src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs
  38. 2
      src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj
  39. 2
      src/AddIns/Misc/AddInManager/Project/AddInManager.csproj
  40. 4
      src/AddIns/Misc/CodeAnalysis/CodeAnalysis.csproj
  41. 4
      src/AddIns/Misc/CodeAnalysis/Src/FxCopLogger.cs
  42. 3
      src/AddIns/Misc/CodeAnalysis/Src/SuppressMessageCommand.cs
  43. 2
      src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.csproj
  44. 2
      src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.AddIn.csproj
  45. 2
      src/AddIns/Misc/ComponentInspector/ComponentInspector.Core/ComponentInspector.Core.csproj
  46. 2
      src/AddIns/Misc/ComponentInspector/ComponentInspector/ComponentInspector.csproj
  47. 2
      src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj
  48. 2
      src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Debugger.BooInterpreter.csproj
  49. 2
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  50. 2
      src/AddIns/Misc/Debugger/TreeListView/Project/TreeListView.csproj
  51. 2
      src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj
  52. 36
      src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.addin
  53. 13
      src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.csproj
  54. 4
      src/AddIns/Misc/MonoAddIn/Project/Src/AddMonoReferenceCommand.cs
  55. 29
      src/AddIns/Misc/MonoAddIn/Project/Src/IsMonoProjectCondition.cs
  56. 134
      src/AddIns/Misc/MonoAddIn/Project/Src/MonoProjectContentLoader.cs
  57. 32
      src/AddIns/Misc/MonoAddIn/Project/Src/MonoProjectContentRegistry.cs
  58. 21
      src/AddIns/Misc/MonoReflectionLoader/Project/Configuration/AssemblyInfo.cs
  59. 71
      src/AddIns/Misc/MonoReflectionLoader/Project/MonoReflectionLoader.csproj
  60. 73
      src/AddIns/Misc/MonoReflectionLoader/Project/Src/MonoReflectionLoader.cs
  61. 2
      src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj
  62. 2
      src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportAddin.csproj
  63. 2
      src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj
  64. 2
      src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj
  65. 2
      src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj
  66. 3
      src/AddIns/Misc/UnitTesting/Src/TestTreeView.cs
  67. 2
      src/AddIns/Misc/UnitTesting/UnitTesting.csproj
  68. 6
      src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj
  69. 2
      src/Libraries/ICSharpCode.Build.Tasks/Project/ICSharpCode.Build.Tasks.csproj
  70. 2
      src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj
  71. 4
      src/Libraries/NRefactory/Project/NRefactory.csproj
  72. 4
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  73. 4
      src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs
  74. 2
      src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/ProjectNode.cs
  75. 1
      src/Main/Base/Project/Src/Gui/WorkbenchSingleton.cs
  76. 58
      src/Main/Base/Project/Src/Internal/ConditionEvaluators/CompareProjectPropertyConditionEvaluator.cs
  77. 5
      src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectActiveEvaluator.cs
  78. 2
      src/Main/Base/Project/Src/Project/AbstractProject.cs
  79. 66
      src/Main/Base/Project/Src/Project/MSBuildProject.cs
  80. 12
      src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDescriptor.cs
  81. 7
      src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDoozer.cs
  82. 44
      src/Main/Base/Project/Src/Services/ParserService/Doozer/ProjectContentRegistryDescriptor.cs
  83. 50
      src/Main/Base/Project/Src/Services/ParserService/Doozer/ProjectContentRegistryDoozer.cs
  84. 66
      src/Main/Base/Project/Src/Services/ParserService/Net1xProjectContentRegistry.cs
  85. 11
      src/Main/Base/Project/Src/Services/ParserService/ParseInformationEventHandler.cs
  86. 43
      src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs
  87. 158
      src/Main/Base/Project/Src/Services/ParserService/ParserService.cs
  88. 4
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/AttributesDataProvider.cs
  89. 4
      src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs
  90. 2
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/CompareConditionEvaluator.cs
  91. 2
      src/Main/Core/Project/Src/AddInTree/AddIn/ICondition.cs
  92. 4
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/ICSharpCode.SharpDevelop.Dom.csproj
  93. 12
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CecilReader.cs
  94. 8
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SystemTypes.cs
  95. 2
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs
  96. 6
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/TypeVisitor.cs
  97. 1
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/DefaultProjectContent.cs
  98. 315
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ProjectContentRegistry.cs
  99. 70
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ReflectionProjectContent.cs
  100. 83
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ReflectionLayer/DomPersistence.cs
  101. Some files were not shown because too many files have changed in this diff Show More

19
AddIns/ICSharpCode.SharpDevelop.addin

@ -26,12 +26,14 @@
<ConditionEvaluator name="RefactoringProviderSupports" class="ICSharpCode.SharpDevelop.Refactoring.RefactoringProviderSupportsConditionEvaluator"/> <ConditionEvaluator name="RefactoringProviderSupports" class="ICSharpCode.SharpDevelop.Refactoring.RefactoringProviderSupportsConditionEvaluator"/>
<ConditionEvaluator name="CanNavigateBack" class="ICSharpCode.Core.CanNavigateBackConditionEvaluator"/> <ConditionEvaluator name="CanNavigateBack" class="ICSharpCode.Core.CanNavigateBackConditionEvaluator"/>
<ConditionEvaluator name="CanNavigateForward" class="ICSharpCode.Core.CanNavigateForwardConditionEvaluator"/> <ConditionEvaluator name="CanNavigateForward" class="ICSharpCode.Core.CanNavigateForwardConditionEvaluator"/>
<ConditionEvaluator name="CompareProjectProperty" class="ICSharpCode.SharpDevelop.CompareProjectPropertyConditionEvaluator"/>
<Doozer name="DialogPanel" class="ICSharpCode.Core.DialogPanelDoozer"/> <Doozer name="DialogPanel" class="ICSharpCode.Core.DialogPanelDoozer"/>
<Doozer name="DisplayBinding" class="ICSharpCode.Core.DisplayBindingDoozer"/> <Doozer name="DisplayBinding" class="ICSharpCode.Core.DisplayBindingDoozer"/>
<Doozer name="Pad" class="ICSharpCode.Core.PadDoozer"/> <Doozer name="Pad" class="ICSharpCode.Core.PadDoozer"/>
<Doozer name="LanguageBinding" class="ICSharpCode.Core.LanguageBindingDoozer"/> <Doozer name="LanguageBinding" class="ICSharpCode.Core.LanguageBindingDoozer"/>
<Doozer name="Parser" class="ICSharpCode.Core.ParserDoozer"/> <Doozer name="Parser" class="ICSharpCode.SharpDevelop.ParserDoozer"/>
<Doozer name="ProjectContentRegistry" class="ICSharpCode.SharpDevelop.ProjectContentRegistryDoozer"/>
<Doozer name="EditAction" class="ICSharpCode.SharpDevelop.DefaultEditor.Codons.EditActionDoozer"/> <Doozer name="EditAction" class="ICSharpCode.SharpDevelop.DefaultEditor.Codons.EditActionDoozer"/>
<Doozer name="SyntaxMode" class="ICSharpCode.SharpDevelop.DefaultEditor.Codons.SyntaxModeDoozer"/> <Doozer name="SyntaxMode" class="ICSharpCode.SharpDevelop.DefaultEditor.Codons.SyntaxModeDoozer"/>
<Doozer name="BrowserSchemeExtension" class="ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionDoozer"/> <Doozer name="BrowserSchemeExtension" class="ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionDoozer"/>
@ -2190,4 +2192,19 @@
<String id = "System.Windows.Forms" text = "System.Windows.Forms"/> <String id = "System.Windows.Forms" text = "System.Windows.Forms"/>
<String id = "System.Xml" text = "System.Xml"/> <String id = "System.Xml" text = "System.Xml"/>
</Path> </Path>
<Path name = "/Workspace/ProjectContentRegistry">
<ComplexCondition>
<Or>
<Condition name = "ProjectActive" activeproject="C#"/>
<Condition name = "ProjectActive" activeproject="VBNet"/>
</Or>
<Condition name = "CompareProjectProperty" property = "TargetFrameworkVersion" equals = "v1.0">
<ProjectContentRegistry id="Net10" class="ICSharpCode.SharpDevelop.Net10ProjectContentRegistry"/>
</Condition>
<Condition name = "CompareProjectProperty" property = "TargetFrameworkVersion" equals = "v1.1">
<ProjectContentRegistry id="Net11" class="ICSharpCode.SharpDevelop.Net11ProjectContentRegistry"/>
</Condition>
</ComplexCondition>
</Path>
</AddIn> </AddIn>

84
data/schemas/AddIn.xsd

@ -94,9 +94,11 @@
<xs:element ref="MenuItem" /> <xs:element ref="MenuItem" />
<xs:element ref="Pad" /> <xs:element ref="Pad" />
<xs:element ref="Parser" /> <xs:element ref="Parser" />
<xs:element ref="Registry" />
<xs:element ref="SchemeExtension" /> <xs:element ref="SchemeExtension" />
<xs:element ref="String" /> <xs:element ref="String" />
<xs:element ref="SyntaxMode" /> <xs:element ref="SyntaxMode" />
<xs:element ref="TaskBoundAdditionalLogger" />
<xs:element ref="ToolbarItem" /> <xs:element ref="ToolbarItem" />
</xs:choice> </xs:choice>
<xs:attribute name="name" type="xs:string" use="required" /> <xs:attribute name="name" type="xs:string" use="required" />
@ -122,7 +124,9 @@
<xs:attribute name="equals" type="xs:string" use="optional" /> <xs:attribute name="equals" type="xs:string" use="optional" />
<xs:attribute name="openwindow" type="xs:string" use="optional" /> <xs:attribute name="openwindow" type="xs:string" use="optional" />
<xs:attribute name="options" type="xs:string" use="optional" /> <xs:attribute name="options" type="xs:string" use="optional" />
<xs:attribute name="property" type="xs:string" use="optional" />
<xs:attribute name="string" type="xs:string" use="optional" /> <xs:attribute name="string" type="xs:string" use="optional" />
<xs:attribute name="supports" type="xs:string" use="optional" />
<xs:attribute name="textcontent" type="xs:string" use="optional" /> <xs:attribute name="textcontent" type="xs:string" use="optional" />
<xs:attribute name="urlRegex" type="xs:string" use="optional" /> <xs:attribute name="urlRegex" type="xs:string" use="optional" />
</xs:extension> </xs:extension>
@ -163,9 +167,11 @@
<xs:element ref="MenuItem" /> <xs:element ref="MenuItem" />
<xs:element ref="Pad" /> <xs:element ref="Pad" />
<xs:element ref="Parser" /> <xs:element ref="Parser" />
<xs:element ref="Registry" />
<xs:element ref="SchemeExtension" /> <xs:element ref="SchemeExtension" />
<xs:element ref="String" /> <xs:element ref="String" />
<xs:element ref="SyntaxMode" /> <xs:element ref="SyntaxMode" />
<xs:element ref="TaskBoundAdditionalLogger" />
<xs:element ref="ToolbarItem" /> <xs:element ref="ToolbarItem" />
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
@ -610,13 +616,13 @@
<xs:enumeration value="Item" /> <xs:enumeration value="Item" />
<xs:enumeration value="Command" /> <xs:enumeration value="Command" />
<xs:enumeration value="Menu" /> <xs:enumeration value="Menu" />
<xs:enumeration value="Builder"/> <xs:enumeration value="Builder" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
This attribute must be one of these values: This attribute must be one of these values:
Separator, CheckBox, Item (=Command), Menu (=with subitems), Separator, CheckBox, Item=Command, Menu (=with subitems),
Builder (=class implementing ISubmenuBuilder). Builder (=class implementing ISubmenuBuilder).
Default: Command. Default: Command.
</xs:documentation> </xs:documentation>
@ -759,6 +765,26 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="Registry">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="class" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the ProjectContentRegistry class.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="Registry" type="Registry">
<xs:annotation>
<xs:documentation>
Creates RegistryDescriptor objects for the parsing service.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="SchemeExtension"> <xs:complexType name="SchemeExtension">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
@ -841,6 +867,35 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="TaskBoundAdditionalLogger">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="class" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the IMSBuildAdditionalLogger class.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="taskname" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Specifies the name of the MSBuild task that must be running for
this logger to be active.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="TaskBoundAdditionalLogger" type="TaskBoundAdditionalLogger">
<xs:annotation>
<xs:documentation>
Creates IMSBuildAdditionalLogger objects that are only
activated when a specific MSBuild task is running.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="ToolbarItem"> <xs:complexType name="ToolbarItem">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
@ -850,40 +905,34 @@
<xs:element ref="MenuItem" /> <xs:element ref="MenuItem" />
<xs:element ref="Include" /> <xs:element ref="Include" />
</xs:choice> </xs:choice>
<xs:attribute name="icon" use="optional" type="xs:string"> <xs:attribute name="label" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Icon of the tool bar item. Label of the tool bar item.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="disabledIcon" use="optional" type="xs:string"> <xs:attribute name="icon" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Icon for use when the tool bar item is disabled; currently supported only for items of type SplitButton. Icon of the tool bar item.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="type" use="optional"> <xs:attribute name="type" use="optional">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="Separator" /> <xs:enumeration value="Separator" />
<xs:enumeration value="CheckBox" /> <xs:enumeration value="CheckBox" />
<xs:enumeration value="Item" /> <xs:enumeration value="Item" />
<xs:enumeration value="ComboBox" /> <xs:enumeration value="ComboBox" />
<xs:enumeration value="TextBox" />
<xs:enumeration value="Label" />
<xs:enumeration value="DropDownButton" /> <xs:enumeration value="DropDownButton" />
<xs:enumeration value="SplitButton" />
<xs:enumeration value="Builder" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
This attribute must be one of these values: This attribute must be one of these values:
Separator, CheckBox, Item, ComboBox, DropDownButton, Separator, CheckBox, Item, ComboBox, DropDownButton
ComboBox, TextBox, Label, DropDownButton,
SplitButton (=Command with MenuItem subitems)
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
@ -892,13 +941,6 @@
<xs:documentation> <xs:documentation>
Only for the type "Item". When set to false, the command class is loaded Only for the type "Item". When set to false, the command class is loaded
immediately instead of the usual lazy-loading. immediately instead of the usual lazy-loading.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>
Label of the tool bar item.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>

4
data/templates/file/CSharp/CSharp.EmptyStruct.xft → data/templates/file/CSharp/CSharp.Struct.xft

@ -2,13 +2,13 @@
<Template author="Justin Dearing" version="1.1"> <Template author="Justin Dearing" version="1.1">
<Config <Config
name = "${res:Templates.File.EmptyStruct.Name}" name = "${res:Templates.File.Struct.Name}"
icon = "C#.File.NewClass" icon = "C#.File.NewClass"
category = "C#" category = "C#"
defaultname = "Struct${Number}.cs" defaultname = "Struct${Number}.cs"
language = "C#"/> language = "C#"/>
<Description>${res:Templates.File.EmptyStruct.Description}</Description> <Description>${res:Templates.File.Struct.Description}</Description>
<!-- <!--
Special new file templates: Special new file templates:

18
doc/AssemblyBaseAddresses.txt

@ -1,5 +1,6 @@
To be on the safe side and leave enough space for the future, To be on the safe side and leave enough space for the future,
the in-memory size of an assembly used here should be 8 times the disk image size. the in-memory size of an assembly used here should be 8 times the disk image size.
That should allow an assembly to grow to more than twice its old size without having to update this list.
Sysinternals Processexplorer can show relocated assemblies in yellow in the DLL View. Sysinternals Processexplorer can show relocated assemblies in yellow in the DLL View.
@ -12,14 +13,16 @@ def AddModule(kbsize as int):
def AddModules(*names as (string)): def AddModules(*names as (string)):
for name in names: for name in names:
System.Console.Write("${name}:\t") System.Console.Write("${name}:\t")
AddModule(System.IO.FileInfo("d:\\corsavy\\sharpdevelop\\bin\\" + name + ".dll").Length / 1024) AddModule(System.IO.FileInfo("d:\\serralongue\\sharpdevelop\\bin\\" + name + ".dll").Length / 1024)
All addresses are between 0x0500 0000 and 0x0fff ffff
AssemblyName: startaddress - endaddress AssemblyName: startaddress - endaddress
ICSharpCode.Core: 0x5000000 - 0x504e000 ICSharpCode.Core: 0x5000000 - 0x504e000
ICSharpCode.SharpDevelop: 0x5100000 - 0x5472000 ICSharpCode.SharpDevelop: 0x5100000 - 0x5472000
ICSharpCode.NRefactory: 0x5a80000 - 0x5b9a000 ICSharpCode.NRefactory: 0x5a80000 - 0x5b9a000
ICSharpCode.TextEditor: 0x5d80000 - 0x5e67000 ICSharpCode.TextEditor: 0x5d80000 - 0x5e67000
MonoReflectionLoader: 0x6000000 - 0x600c000 ICSharpCode.SharpDevelop.Sda: 0x6000000 - 0x601e000
WeifenLuo.WinFormsUI.Docking: 0x6080000 - 0x6107000 WeifenLuo.WinFormsUI.Docking: 0x6080000 - 0x6107000
ICSharpCode.Build.Tasks: 0x6200000 - 0x621b000 ICSharpCode.Build.Tasks: 0x6200000 - 0x621b000
@ -56,9 +59,10 @@ StartPage: 0x7900000 - 0x791e000
UnitTesting: 0x7980000 - 0x799b000 UnitTesting: 0x7980000 - 0x799b000
Mono.Cecil: 0x7a00000 - 0x7b38000 Mono.Cecil: 0x7a00000 - 0x7b38000
WixBinding: 0x7d80000 - 0x7dc2000 WixBinding: 0x7d80000 - 0x7dc2000
ICSharpCode.SharpDevelop.Dom: 0x7e80000 - 0x7f19000
CodeAnalysis: 0x8000000 - 0x8021000
IconEditor: 0x8080000 - 0x80a1000
IconEditor.AddIn: 0x8100000 - 0x810c000
SharpDbTools: 0x8180000 - 0x819e000
Next free address: 0x7e80000 Next free address: 0x8240000

107
doc/technotes/ConditionList.html

@ -5,18 +5,22 @@
</head><body> </head><body>
<h1>Condition List</h1> <h1>Condition List</h1>
<p class="notice">This file was generated by the tool 'BuildAddinDocumentation'. <p class="notice">This file was generated by the tool 'BuildAddinDocumentation'.
It is based on SharpDevelop 2.0.0.1045.</p> It is based on SharpDevelop 2.1.0.1750.</p>
<ul> <ul>
<li><a href="#ActiveContentExtension">ActiveContentExtension</a> <li><a href="#ActiveContentExtension">ActiveContentExtension</a>
<li><a href="#ActiveViewContentUntitled">ActiveViewContentUntitled</a> <li><a href="#ActiveViewContentUntitled">ActiveViewContentUntitled</a>
<li><a href="#ActiveWindowState">ActiveWindowState</a> <li><a href="#ActiveWindowState">ActiveWindowState</a>
<li><a href="#BrowserLocation">BrowserLocation</a> <li><a href="#BrowserLocation">BrowserLocation</a>
<li><a href="#CanNavigateBack">CanNavigateBack</a>
<li><a href="#CanNavigateForward">CanNavigateForward</a>
<li><a href="#Compare">Compare</a> <li><a href="#Compare">Compare</a>
<li><a href="#CompareProjectProperty">CompareProjectProperty</a>
<li><a href="#DebuggerSupports">DebuggerSupports</a> <li><a href="#DebuggerSupports">DebuggerSupports</a>
<li><a href="#IsProcessRunning">IsProcessRunning</a> <li><a href="#IsProcessRunning">IsProcessRunning</a>
<li><a href="#OpenWindowState">OpenWindowState</a> <li><a href="#OpenWindowState">OpenWindowState</a>
<li><a href="#OwnerState">OwnerState</a> <li><a href="#OwnerState">OwnerState</a>
<li><a href="#ProjectActive">ProjectActive</a> <li><a href="#ProjectActive">ProjectActive</a>
<li><a href="#RefactoringProviderSupports">RefactoringProviderSupports</a>
<li><a href="#SolutionOpen">SolutionOpen</a> <li><a href="#SolutionOpen">SolutionOpen</a>
<li><a href="#TextContent">TextContent</a> <li><a href="#TextContent">TextContent</a>
<li><a href="#WindowActive">WindowActive</a> <li><a href="#WindowActive">WindowActive</a>
@ -108,10 +112,42 @@ It is based on SharpDevelop 2.0.0.1045.</p>
<br><pre> <br><pre>
&lt;Condition name = "BrowserLocation" urlRegex = "^ms-help:\/\/"&gt;</pre></p> &lt;Condition name = "BrowserLocation" urlRegex = "^ms-help:\/\/"&gt;</pre></p>
</div> </div>
<div>
<h2><a name="CanNavigateBack">CanNavigateBack</a></h2>
<p>
Tests the NavigationService for the presence of points
to jump back to.
</p>
<table>
<tr>
<th colspan=2>Condition name:</td>
<td>ICSharpCode.Core.CanNavigateBackConditionEvaluator</td>
</tr>
</table>
<p><span class="exampleTitle">Example: Test if the NavigationService can jump back.</span>
<br><pre>
&lt;Condition name = "CanNavigateBack" &gt;</pre></p>
</div>
<div>
<h2><a name="CanNavigateForward">CanNavigateForward</a></h2>
<p>
Tests the NavigationService for the presence of points
to jump forward to.
</p>
<table>
<tr>
<th colspan=2>Condition name:</td>
<td>ICSharpCode.Core.CanNavigateForwardConditionEvaluator</td>
</tr>
</table>
<p><span class="exampleTitle">Example: Test if the NavigationService can jump forward.</span>
<br><pre>
&lt;Condition name = "CanNavigateForward" &gt;</pre></p>
</div>
<div> <div>
<h2><a name="Compare">Compare</a></h2> <h2><a name="Compare">Compare</a></h2>
<p> <p>
Compares two strings (case sensitive). Compares two strings.
The strings are passed through the StringParser, so it is possible to compare The strings are passed through the StringParser, so it is possible to compare
SharpDevelop properties.<br /> SharpDevelop properties.<br />
Useful if you want to run a command only when a setting is active to prevent Useful if you want to run a command only when a setting is active to prevent
@ -147,6 +183,43 @@ It is based on SharpDevelop 2.0.0.1045.</p>
<br><pre> <br><pre>
&lt;Condition name = "Compare" string = "${property:SharpDevelop.FiletypesRegisterStartup}" equals = "True"&gt;</pre></p> &lt;Condition name = "Compare" string = "${property:SharpDevelop.FiletypesRegisterStartup}" equals = "True"&gt;</pre></p>
</div> </div>
<div>
<h2><a name="CompareProjectProperty">CompareProjectProperty</a></h2>
<p>
Compares a project property with a string.<br />
Uses the conditions' caller as project; or the current project, if the caller is not a project.
The property name and string are passed through the StringParser.
</p>
<table>
<tr>
<th colspan=2>Condition name:</td>
<td>ICSharpCode.SharpDevelop.CompareProjectPropertyConditionEvaluator</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th colspan=2>property:</td>
<td>
The name of the MSBuild property to read the value from.
</td>
</tr>
<tr>
<th colspan=2>equals:</td>
<td>
The second string.
</td>
</tr>
<tr>
<th colspan=2>comparisonType:</td>
<td>
The mode of the comparison: a field of the System.StringComparison enumeration. The default is
'InvariantCultureIgnoreCase'.
</td>
</tr>
</table>
<p><span class="exampleTitle">Example: Check if the project output type in the active configuration is a Windows Application</span>
<br><pre>
&lt;Condition name = "CompareProjectProperty" property = "OutputType" equals = "WinExe"&gt;</pre></p>
</div>
<div> <div>
<h2><a name="DebuggerSupports">DebuggerSupports</a></h2> <h2><a name="DebuggerSupports">DebuggerSupports</a></h2>
<p> <p>
@ -240,6 +313,9 @@ It is based on SharpDevelop 2.0.0.1045.</p>
<h2><a name="ProjectActive">ProjectActive</a></h2> <h2><a name="ProjectActive">ProjectActive</a></h2>
<p> <p>
Tests if any project is active or if a project of a specific language is active. Tests if any project is active or if a project of a specific language is active.
Can also be used to test the type of the project passed as caller to the condition
- when a project is passed as caller, the language of that project is tested; otherwise
the language of the active project is tested.
</p> </p>
<table> <table>
<tr> <tr>
@ -262,6 +338,33 @@ It is based on SharpDevelop 2.0.0.1045.</p>
<br><pre> <br><pre>
&lt;Condition name = "ProjectActive" activeproject="C#"&gt;</pre></p> &lt;Condition name = "ProjectActive" activeproject="C#"&gt;</pre></p>
</div> </div>
<div>
<h2><a name="RefactoringProviderSupports">RefactoringProviderSupports</a></h2>
<p>
Tests if the refactoring provider for the current document
supports the specified option.
</p>
<table>
<tr>
<th colspan=2>Condition name:</td>
<td>ICSharpCode.SharpDevelop.Refactoring.RefactoringProviderSupportsConditionEvaluator</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th colspan=2>supports:</td>
<td>
Same of the action that should be supported.
"*" to test if refactoring is supported at all.
</td>
</tr>
</table>
<p><span class="exampleTitle">Example: Test if refactoring is supported</span>
<br><pre>
&lt;Condition name="RefactoringProviderSupports" supports="*"&gt;</pre></p>
<p><span class="exampleTitle">Example: Test if managing imports is supported</span>
<br><pre>
&lt;Condition name="RefactoringProviderSupports" supports="FindUnusedUsingDeclarations"&gt;</pre></p>
</div>
<div> <div>
<h2><a name="SolutionOpen">SolutionOpen</a></h2> <h2><a name="SolutionOpen">SolutionOpen</a></h2>
<p> <p>

98
doc/technotes/DoozerList.html

@ -5,7 +5,7 @@
</head><body> </head><body>
<h1>Doozer List</h1> <h1>Doozer List</h1>
<p class="notice">This file was generated by the tool 'BuildAddinDocumentation'. <p class="notice">This file was generated by the tool 'BuildAddinDocumentation'.
It is based on SharpDevelop 2.0.0.1045.</p> It is based on SharpDevelop 2.1.0.1750.</p>
<ul> <ul>
<li><a href="#Class">Class</a> <li><a href="#Class">Class</a>
<li><a href="#CodeCompletionBinding">CodeCompletionBinding</a> <li><a href="#CodeCompletionBinding">CodeCompletionBinding</a>
@ -21,9 +21,11 @@ It is based on SharpDevelop 2.0.0.1045.</p>
<li><a href="#MenuItem">MenuItem</a> <li><a href="#MenuItem">MenuItem</a>
<li><a href="#Pad">Pad</a> <li><a href="#Pad">Pad</a>
<li><a href="#Parser">Parser</a> <li><a href="#Parser">Parser</a>
<li><a href="#Registry">Registry</a>
<li><a href="#SchemeExtension">SchemeExtension</a> <li><a href="#SchemeExtension">SchemeExtension</a>
<li><a href="#String">String</a> <li><a href="#String">String</a>
<li><a href="#SyntaxMode">SyntaxMode</a> <li><a href="#SyntaxMode">SyntaxMode</a>
<li><a href="#TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a>
<li><a href="#ToolbarItem">ToolbarItem</a> <li><a href="#ToolbarItem">ToolbarItem</a>
</ul> </ul>
<div> <div>
@ -695,7 +697,7 @@ It is based on SharpDevelop 2.0.0.1045.</p>
<table> <table>
<tr> <tr>
<th colspan=2>Doozer name:</td> <th colspan=2>Doozer name:</td>
<td>ICSharpCode.Core.ParserDoozer</td> <td>ICSharpCode.SharpDevelop.ParserDoozer</td>
</tr> </tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr> <tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr> <tr>
@ -729,6 +731,44 @@ It is based on SharpDevelop 2.0.0.1045.</p>
</tr> </tr>
</table> </table>
</div> </div>
<div>
<h2><a name="Registry">Registry</a></h2>
<p>
Creates RegistryDescriptor objects for the parsing service.
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.RegistryDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th colspan=2>class:</td>
<td>
Name of the ProjectContentRegistry class.
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Usage:</td>
<td>Only in /Workspace/ProjectContentRegistry</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
An RegistryDescriptor object that wraps a ProjectContentRegistry object.
</td>
</tr>
<tr>
<th colspan=2>Conditions:</td>
<td>Conditions are handled by the item, the condition "caller" will be the project to which
the references requiring the registry belong to.
You should always use the &lt;ProjectActive&gt; condition to restrict the project type
your registry is used for.
</td>
</tr>
</table>
</div>
<div> <div>
<h2><a name="SchemeExtension">SchemeExtension</a></h2> <h2><a name="SchemeExtension">SchemeExtension</a></h2>
<p> <p>
@ -841,6 +881,53 @@ It is based on SharpDevelop 2.0.0.1045.</p>
</tr> </tr>
</table> </table>
</div> </div>
<div>
<h2><a name="TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a></h2>
<p>
Creates IMSBuildAdditionalLogger objects that are only
activated when a specific MSBuild task is running.
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.Project.TaskBoundAdditionalLoggerDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th>class:</td>
<td class="userequired">required</td>
<td>
Name of the IMSBuildAdditionalLogger class.
</td>
</tr>
<tr>
<th>taskname:</td>
<td class="userequired">required</td>
<td>
Specifies the name of the MSBuild task that must be running for
this logger to be active.
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Usage:</td>
<td>Only in /SharpDevelop/MSBuildEngine/AdditionalLoggers</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
A IMSBuildAdditionalLogger object that lazy-loads the specified
IMSBuildAdditionalLogger when the specified task is running.
</td>
</tr>
</table>
<p><span class="exampleTitle">Example: </span>
<br><pre>
&lt;TaskBoundAdditionalLogger
id = "FxCopLogger"
taskname = "FxCop"
class = "ICSharpCode.CodeAnalysis.FxCopLogger"/&gt;</pre></p>
</div>
<div> <div>
<h2><a name="ToolbarItem">ToolbarItem</a></h2> <h2><a name="ToolbarItem">ToolbarItem</a></h2>
<p> <p>
@ -852,6 +939,13 @@ It is based on SharpDevelop 2.0.0.1045.</p>
<td>ICSharpCode.Core.ToolbarItemDoozer</td> <td>ICSharpCode.Core.ToolbarItemDoozer</td>
</tr> </tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr> <tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th>label:</td>
<td class="userequired">optional</td>
<td>
Label of the tool bar item.
</td>
</tr>
<tr> <tr>
<th>icon:</td> <th>icon:</td>
<td class="userequired">optional</td> <td class="userequired">optional</td>

2
src/AddIns/BackendBindings/Boo/Boo.InterpreterAddIn/Project/Boo.InterpreterAddIn.booproj

@ -10,7 +10,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
</PropertyGroup> </PropertyGroup>

2
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj

@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

15
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/BooProject.cs

@ -8,10 +8,12 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.IO; using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Internal.Templates; using ICSharpCode.SharpDevelop.Internal.Templates;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.Core;
namespace Grunwald.BooBinding namespace Grunwald.BooBinding
{ {
@ -24,6 +26,8 @@ namespace Grunwald.BooBinding
{ {
Language = "Boo"; Language = "Boo";
LanguageProperties = BooLanguageProperties.Instance; LanguageProperties = BooLanguageProperties.Instance;
reparseSensitiveProperties.Add("Ducky");
if (!initialized) { if (!initialized) {
initialized = true; initialized = true;
MSBuildEngine.MSBuildProperties.Add("BooBinPath", BooBinPath); MSBuildEngine.MSBuildProperties.Add("BooBinPath", BooBinPath);
@ -108,14 +112,5 @@ namespace Grunwald.BooBinding
return GetProperty("Ducky", false); return GetProperty("Ducky", false);
} }
} }
public override void SetProperty<T>(string configurationName, string platform, string property, T value, PropertyStorageLocations location)
{
bool oldDucky = Ducky;
base.SetProperty(configurationName, platform, property, value, location);
if (Ducky != oldDucky) {
ParserService.Reparse(this);
}
}
} }
} }

7
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooAdvancedHighlighter.cs

@ -10,11 +10,12 @@ using System.Collections.Generic;
using Boo.Lang.Compiler.Ast; using Boo.Lang.Compiler.Ast;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.TextEditor; using ICSharpCode.SharpDevelop;
using ICSharpCode.TextEditor.Document; using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;
namespace Grunwald.BooBinding.CodeCompletion namespace Grunwald.BooBinding.CodeCompletion
{ {

2
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/BooResolver.cs

@ -8,7 +8,9 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using AST = Boo.Lang.Compiler.Ast; using AST = Boo.Lang.Compiler.Ast;
using NRResolver = ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver; using NRResolver = ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver;

1
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/ExpressionFinder.cs

@ -9,6 +9,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
namespace Grunwald.BooBinding.CodeCompletion namespace Grunwald.BooBinding.CodeCompletion

1
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/InferredReturnType.cs

@ -7,6 +7,7 @@
using System; using System;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using Boo.Lang.Compiler.Ast; using Boo.Lang.Compiler.Ast;

4
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/CodeCompletion/ResolveVisitor.cs

@ -547,8 +547,8 @@ namespace Grunwald.BooBinding.CodeCompletion
node.Expression.Accept(this); node.Expression.Accept(this);
if (resolveResult != null) { if (resolveResult != null) {
IClass enumerable = ProjectContentRegistry.Mscorlib.GetClass("System.Collections.Generic.IEnumerable", 1); IReturnType enumerable = new GetClassReturnType(projectContent, "System.Collections.Generic.IEnumerable", 1);
MakeResult(new ConstructedReturnType(enumerable.DefaultReturnType, new IReturnType[] { resolveResult.ResolvedType })); MakeResult(new ConstructedReturnType(enumerable, new IReturnType[] { resolveResult.ResolvedType }));
} else { } else {
MakeResult(new GetClassReturnType(projectContent, "System.Collections.IEnumerable", 0)); MakeResult(new GetClassReturnType(projectContent, "System.Collections.IEnumerable", 0));
} }

10
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/ConvertProject.cs

@ -8,15 +8,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Project.Converter;
using ICSharpCode.SharpDevelop.Internal.Templates;
using ICSharpCode.NRefactory.PrettyPrinter;
using ICSharpCode.NRefactory.Parser;
using Boo.Lang.Compiler; using Boo.Lang.Compiler;
using Boo.Lang.Compiler.Ast; using Boo.Lang.Compiler.Ast;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Internal.Templates;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Project.Converter;
using NRefactoryToBooConverter; using NRefactoryToBooConverter;
namespace Grunwald.BooBinding namespace Grunwald.BooBinding

19
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/BooDesignerLoader.cs

@ -6,26 +6,21 @@
// </file> // </file>
using System; using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.ComponentModel.Design;
using System.CodeDom; using System.CodeDom;
using System.CodeDom.Compiler; using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization; using System.ComponentModel.Design.Serialization;
using System.IO;
using System.Text; using System.Text;
using System.Windows.Forms;
using System.Windows.Forms.Design;
using Boo.Lang.Compiler.Ast;
using Boo.Lang.Parser;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.FormsDesigner;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.TextEditor; using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;
using ICSharpCode.FormsDesigner;
using ICSharpCode.FormsDesigner.Services;
using Boo.Lang.Parser;
using Boo.Lang.Compiler.Ast;
namespace Grunwald.BooBinding.Designer namespace Grunwald.BooBinding.Designer
{ {

5
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/FormsDesignerBinding.cs

@ -9,10 +9,11 @@ using System;
using System.IO; using System.IO;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.FormsDesigner;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.FormsDesigner; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.TextEditor; using ICSharpCode.TextEditor;
namespace Grunwald.BooBinding.Designer namespace Grunwald.BooBinding.Designer

2
src/AddIns/BackendBindings/Boo/NRefactoryToBooConverter/Project/NRefactoryToBooConverter.csproj

@ -20,7 +20,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpCompletionBinding.cs

@ -65,7 +65,7 @@ namespace CSharpBinding
if (TextUtilities.FindPrevWordStart(editor.Document, cursor) <= line.Offset) { if (TextUtilities.FindPrevWordStart(editor.Document, cursor) <= line.Offset) {
// [ is first character on the line // [ is first character on the line
// -> Attribute completion // -> Attribute completion
editor.ShowCompletionWindow(new AttributesDataProvider(), ch); editor.ShowCompletionWindow(new AttributesDataProvider(ParserService.CurrentProjectContent), ch);
return true; return true;
} }
} else if (ch == ',' && CodeCompletionOptions.InsightRefreshOnComma && CodeCompletionOptions.InsightEnabled) { } else if (ch == ',' && CodeCompletionOptions.InsightRefreshOnComma && CodeCompletionOptions.InsightEnabled) {

3
src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingStrategy.cs

@ -6,17 +6,16 @@
// </file> // </file>
using System; using System;
using System.IO;
using System.Collections; using System.Collections;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Text; using System.Text;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.TextEditor; using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Actions; using ICSharpCode.TextEditor.Actions;
using ICSharpCode.TextEditor.Document; using ICSharpCode.TextEditor.Document;
using ICSharpCode.Core;
namespace CSharpBinding.FormattingStrategy namespace CSharpBinding.FormattingStrategy
{ {

3
src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/DocumentAccessor.cs

@ -11,6 +11,7 @@ using System.IO;
using ICSharpCode.TextEditor; using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document; using ICSharpCode.TextEditor.Document;
using ICSharpCode.SharpDevelop;
namespace CSharpBinding.FormattingStrategy namespace CSharpBinding.FormattingStrategy
{ {
@ -137,7 +138,7 @@ namespace CSharpBinding.FormattingStrategy
{ {
this.filename = filename; this.filename = filename;
f = new FileStream(filename, FileMode.Open, FileAccess.Read); f = new FileStream(filename, FileMode.Open, FileAccess.Read);
r = ICSharpCode.TextEditor.Util.FileReader.OpenStream(f, ICSharpCode.Core.ParserService.DefaultFileEncoding, ICSharpCode.Core.ParserService.DefaultFileEncoding); r = ICSharpCode.TextEditor.Util.FileReader.OpenStream(f, ParserService.DefaultFileEncoding, ParserService.DefaultFileEncoding);
} }
int num = 0; int num = 0;

2
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/ExpressionFinder.cs

@ -7,7 +7,7 @@
using System; using System;
using System.Text; using System.Text;
using ICSharpCode.Core; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
namespace CSharpBinding.Parser namespace CSharpBinding.Parser

9
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Parser/Parser.cs

@ -6,15 +6,10 @@
// </file> // </file>
using System; using System;
using System.Text;
using System.IO; using System.IO;
using System.Drawing; using ICSharpCode.SharpDevelop;
using System.Collections;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver; using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver;
//using ICSharpCode.NRefactory.Parser;
namespace CSharpBinding.Parser namespace CSharpBinding.Parser
{ {
@ -118,7 +113,7 @@ namespace CSharpBinding.Parser
public IResolver CreateResolver() public IResolver CreateResolver()
{ {
return new ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver(ParserService.CurrentProjectContent); return new NRefactoryResolver(ParserService.CurrentProjectContent);
} }
///////// IParser Interface END ///////// IParser Interface END
} }

11
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Project/CSharpProject.cs

@ -28,17 +28,24 @@ namespace CSharpBinding
} }
} }
void Init()
{
Language = "C#";
reparseSensitiveProperties.Add("TargetFrameworkVersion");
reparseSensitiveProperties.Add("DefineConstants");
}
public CSharpProject(string fileName, string projectName) public CSharpProject(string fileName, string projectName)
{ {
this.Name = projectName; this.Name = projectName;
Language = "C#"; Init();
SetupProject(fileName); SetupProject(fileName);
IdGuid = BaseConfiguration["ProjectGuid"]; IdGuid = BaseConfiguration["ProjectGuid"];
} }
public CSharpProject(ProjectCreateInformation info) public CSharpProject(ProjectCreateInformation info)
{ {
Language = "C#"; Init();
Create(info); Create(info);
} }

24
src/AddIns/BackendBindings/VBNetBinding/Project/Src/FormattingStrategy/VBNetFormattingStrategy.cs

@ -6,19 +6,17 @@
// </file> // </file>
using System; using System;
using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
using ICSharpCode.TextEditor.Document;
using ICSharpCode.TextEditor.Actions;
using ICSharpCode.TextEditor;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Actions;
using ICSharpCode.TextEditor.Document;
namespace VBNetBinding.FormattingStrategy namespace VBNetBinding.FormattingStrategy
{ {
@ -548,6 +546,11 @@ namespace VBNetBinding.FormattingStrategy
} else if (Regex.IsMatch(lineText, interfaceStatement.EndRegex, RegexOptions.IgnoreCase)){ } else if (Regex.IsMatch(lineText, interfaceStatement.EndRegex, RegexOptions.IgnoreCase)){
inInterface = false; inInterface = false;
} }
if (i == lineNr && inInterface) {
// set IndentPlus to 0
statement = new VBStatement(statement.StartRegex, statement.EndRegex, statement.EndStatement, 0);
}
} }
//Omits comments and contents of interfaces //Omits comments and contents of interfaces
@ -561,10 +564,7 @@ namespace VBNetBinding.FormattingStrategy
count--; count--;
} }
} }
if (inInterface) {
// set IndentPlus to 0
statement = new VBStatement(statement.StartRegex, statement.EndRegex, statement.EndStatement, 0);
}
return count > 0; return count > 0;
} }

2
src/AddIns/BackendBindings/VBNetBinding/Project/Src/OptionPanels/ProjectImports.cs

@ -9,7 +9,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui.OptionPanels; using ICSharpCode.SharpDevelop.Gui.OptionPanels;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;

9
src/AddIns/BackendBindings/VBNetBinding/Project/Src/Parser/Parser.cs

@ -6,15 +6,10 @@
// </file> // </file>
using System; using System;
using System.Text;
using System.IO; using System.IO;
using System.Drawing; using ICSharpCode.SharpDevelop;
using System.Collections;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver; using ICSharpCode.SharpDevelop.Dom.NRefactoryResolver;
//using ICSharpCode.NRefactory.Parser;
namespace VBNetBinding.Parser namespace VBNetBinding.Parser
{ {
@ -139,7 +134,7 @@ namespace VBNetBinding.Parser
public IResolver CreateResolver() public IResolver CreateResolver()
{ {
return new ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver(ParserService.CurrentProjectContent); return new NRefactoryResolver(ParserService.CurrentProjectContent);
} }
///////// IParser Interface END ///////// IParser Interface END
} }

3
src/AddIns/BackendBindings/VBNetBinding/Project/Src/Project/VBNetProject.cs

@ -10,6 +10,7 @@ using System.ComponentModel;
using System.IO; using System.IO;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Internal.Templates; using ICSharpCode.SharpDevelop.Internal.Templates;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
@ -75,6 +76,8 @@ namespace VBNetBinding
Language = "VBNet"; Language = "VBNet";
LanguageProperties = ICSharpCode.SharpDevelop.Dom.LanguageProperties.VBNet; LanguageProperties = ICSharpCode.SharpDevelop.Dom.LanguageProperties.VBNet;
BuildConstantSeparator = ','; BuildConstantSeparator = ',';
reparseSensitiveProperties.Add("TargetFrameworkVersion");
reparseSensitiveProperties.Add("DefineConstants");
} }
public override bool CanCompile(string fileName) public override bool CanCompile(string fileName)

18
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs

@ -6,22 +6,20 @@
// </file> // </file>
using System; using System;
using System.IO; using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.IO;
using System.Reflection; using System.Reflection;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.CodeDom;
using System.CodeDom.Compiler;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.TextEditor.Document; using ICSharpCode.TextEditor.Document;
namespace ICSharpCode.FormsDesigner namespace ICSharpCode.FormsDesigner

1
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerLoader/NRefactoryDesignerLoader.cs

@ -19,6 +19,7 @@ using ICSharpCode.Core;
using ICSharpCode.NRefactory; using ICSharpCode.NRefactory;
using ICSharpCode.NRefactory.Ast; using ICSharpCode.NRefactory.Ast;
using ICSharpCode.NRefactory.Visitors; using ICSharpCode.NRefactory.Visitors;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.TextEditor; using ICSharpCode.TextEditor;

13
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs

@ -6,20 +6,17 @@
// </file> // </file>
using System; using System;
using System.IO;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Design;
using System.Reflection;
using System.ComponentModel; using System.ComponentModel;
using System.ComponentModel.Design; using System.ComponentModel.Design;
using System.Drawing.Design;
using System.Reflection;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.FormsDesigner.Services;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.FormsDesigner.Services;
namespace ICSharpCode.FormsDesigner.Gui namespace ICSharpCode.FormsDesigner.Gui
{ {

8
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/SecondaryDisplayBinding.cs

@ -7,14 +7,12 @@
using System; using System;
using System.IO; using System.IO;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.NRefactory;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.NRefactory; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.FormsDesigner.Services;
using System.ComponentModel.Design;
namespace ICSharpCode.FormsDesigner namespace ICSharpCode.FormsDesigner
{ {

15
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/TypeResolutionService.cs

@ -6,17 +6,16 @@
// </file> // </file>
using System; using System;
using System.IO;
using System.Reflection;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing;
using System.ComponentModel;
using System.ComponentModel.Design; using System.ComponentModel.Design;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.Core;
using System.Diagnostics; using System.Diagnostics;
using System.IO;
using System.Reflection;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using Microsoft.Win32; using Microsoft.Win32;
namespace ICSharpCode.FormsDesigner.Services namespace ICSharpCode.FormsDesigner.Services

5
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/ToolboxProvider.cs

@ -13,6 +13,7 @@ using System.Reflection;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.FormsDesigner.Gui; using ICSharpCode.FormsDesigner.Gui;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
@ -21,8 +22,8 @@ namespace ICSharpCode.FormsDesigner
{ {
public class ToolboxProvider public class ToolboxProvider
{ {
static ICSharpCode.FormsDesigner.Services.ToolboxService toolboxService = null; static ICSharpCode.FormsDesigner.Services.ToolboxService toolboxService = null;
public static ArrayList SideTabs = new ArrayList(); public static ArrayList SideTabs = new ArrayList();
static ComponentLibraryLoader componentLibraryLoader = new ComponentLibraryLoader(); static ComponentLibraryLoader componentLibraryLoader = new ComponentLibraryLoader();

4
src/AddIns/DisplayBindings/IconEditor/IconEditor/IconEditor.csproj

@ -10,7 +10,7 @@
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop> <RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress> <BaseAddress>134742016</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -23,7 +23,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> <BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

4
src/AddIns/DisplayBindings/IconEditor/IconEditorAddIn/IconEditorAddIn.csproj

@ -11,7 +11,7 @@
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop> <RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress> <BaseAddress>135266304</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -21,7 +21,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> <BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

18
src/AddIns/DisplayBindings/XmlEditor/Project/Src/XmlView.cs

@ -5,17 +5,11 @@
// <version>$Revision$</version> // <version>$Revision$</version>
// </file> // </file>
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;
using System; using System;
using System.Drawing;
using System.Drawing.Printing;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Drawing;
using System.Drawing.Printing;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
@ -24,6 +18,14 @@ using System.Xml.Schema;
using System.Xml.XPath; using System.Xml.XPath;
using System.Xml.Xsl; using System.Xml.Xsl;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;
namespace ICSharpCode.XmlEditor namespace ICSharpCode.XmlEditor
{ {
/// <summary> /// <summary>

2
src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj

@ -38,7 +38,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>None</DebugType> <DebugType>None</DebugType>

2
src/AddIns/Misc/AddInManager/Project/AddInManager.csproj

@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\AddInManager\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\AddInManager\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

4
src/AddIns/Misc/CodeAnalysis/CodeAnalysis.csproj

@ -11,7 +11,7 @@
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop> <RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress> <BaseAddress>134217728</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -21,7 +21,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> <BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

4
src/AddIns/Misc/CodeAnalysis/Src/FxCopLogger.cs

@ -7,10 +7,10 @@
using System; using System;
using System.IO; using System.IO;
using ICSharpCode.Core; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.CodeAnalysis namespace ICSharpCode.CodeAnalysis
{ {

3
src/AddIns/Misc/CodeAnalysis/Src/SuppressMessageCommand.cs

@ -10,10 +10,11 @@ using System.Collections.Generic;
using System.Text; using System.Text;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor; using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Dom.Refactoring; using ICSharpCode.SharpDevelop.Dom.Refactoring;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Refactoring; using ICSharpCode.SharpDevelop.Refactoring;
using Ast = ICSharpCode.NRefactory.Ast; using Ast = ICSharpCode.NRefactory.Ast;

2
src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.csproj

@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\CodeCoverage\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\CodeCoverage\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/ComponentInspector/ComponentInspector.AddIn/ComponentInspector.AddIn.csproj

@ -21,7 +21,7 @@
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\ComponentInspector\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\ComponentInspector\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>

2
src/AddIns/Misc/ComponentInspector/ComponentInspector.Core/ComponentInspector.Core.csproj

@ -22,7 +22,7 @@
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\ComponentInspector\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\ComponentInspector\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>

2
src/AddIns/Misc/ComponentInspector/ComponentInspector/ComponentInspector.csproj

@ -21,7 +21,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\bin\Tools\ComponentInspector\</OutputPath> <OutputPath>..\..\..\..\..\bin\Tools\ComponentInspector\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/Debugger/Debugger.AddIn/Project/Debugger.AddIn.csproj

@ -25,7 +25,7 @@
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath> <OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>

2
src/AddIns/Misc/Debugger/Debugger.BooInterpreter/Project/Debugger.BooInterpreter.csproj

@ -21,7 +21,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
</PropertyGroup> </PropertyGroup>

2
src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj

@ -24,7 +24,7 @@
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<NoWarn>108</NoWarn> <NoWarn>108</NoWarn>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath> <OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Optimize>False</Optimize> <Optimize>False</Optimize>
</PropertyGroup> </PropertyGroup>

2
src/AddIns/Misc/Debugger/TreeListView/Project/TreeListView.csproj

@ -23,7 +23,7 @@
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath> <OutputPath>..\..\..\..\..\..\AddIns\AddIns\Misc\Debugger\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

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

@ -24,7 +24,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\HtmlHelp2\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\HtmlHelp2\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<Optimize>False</Optimize> <Optimize>False</Optimize>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

36
src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.addin

@ -17,20 +17,20 @@
<Path path="/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectNode"> <Path path="/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ProjectNode">
<Condition name="IsMonoInstalled" action="Exclude"> <Condition name="IsMonoInstalled" action="Exclude">
<MenuItem id="AddMonoReference" <MenuItem id="AddMonoReference"
label="Add Mono Reference" label="Add Mono Reference"
insertafter="AddReference" insertafter="AddReference"
insertbefore="AddWebReference" insertbefore="AddWebReference"
class="ICSharpCode.MonoAddIn.AddMonoReferenceCommand"/> class="ICSharpCode.MonoAddIn.AddMonoReferenceCommand"/>
</Condition> </Condition>
</Path> </Path>
<Path name="/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ReferenceFolderNode"> <Path name="/SharpDevelop/Pads/ProjectBrowser/ContextMenu/ReferenceFolderNode">
<Condition name="IsMonoInstalled" action="Exclude"> <Condition name="IsMonoInstalled" action="Exclude">
<MenuItem id="AddMonoReference" <MenuItem id="AddMonoReference"
label="Add Mono Reference" label="Add Mono Reference"
insertafter="AddReference" insertafter="AddReference"
insertbefore="AddWebReference" insertbefore="AddWebReference"
class="ICSharpCode.MonoAddIn.AddMonoReferenceCommand"/> class="ICSharpCode.MonoAddIn.AddMonoReferenceCommand"/>
</Condition> </Condition>
</Path> </Path>
@ -38,11 +38,27 @@
<Condition name="IsMonoInstalled" action="Exclude"> <Condition name="IsMonoInstalled" action="Exclude">
<Condition name = "ProjectActive" activeproject="*"> <Condition name = "ProjectActive" activeproject="*">
<MenuItem id="AddMonoReference" <MenuItem id="AddMonoReference"
label="Add Mono Reference" label="Add Mono Reference"
insertafter="AddReference" insertafter="AddReference"
insertbefore="AddWebReference" insertbefore="AddWebReference"
class="ICSharpCode.MonoAddIn.AddMonoReferenceCommand"/> class="ICSharpCode.MonoAddIn.AddMonoReferenceCommand"/>
</Condition> </Condition>
</Condition> </Condition>
</Path> </Path>
<Path name = "/Workspace/ProjectContentRegistry">
<ComplexCondition>
<And>
<Or>
<Condition name = "CompareProjectProperty" property = "TargetFrameworkVersion" equals = "Mono v1.1"/>
<Condition name = "CompareProjectProperty" property = "TargetFrameworkVersion" equals = "Mono v2.0"/>
</Or>
<Or>
<Condition name = "ProjectActive" activeproject="C#"/>
<Condition name = "ProjectActive" activeproject="VBNet"/>
</Or>
</And>
<ProjectContentRegistry id="MonoGac" class="ICSharpCode.MonoAddIn.MonoProjectContentRegistry"/>
</ComplexCondition>
</Path>
</AddIn> </AddIn>

13
src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.csproj

@ -1,7 +1,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<RootNamespace>MonoAddIn</RootNamespace> <RootNamespace>ICSharpCode.MonoAddIn</RootNamespace>
<AssemblyName>MonoAddIn</AssemblyName> <AssemblyName>MonoAddIn</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -19,7 +19,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\MonoAddIn\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\MonoAddIn\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
@ -48,19 +48,12 @@
<Compile Include="Src\IsMonoInstalledCondition.cs" /> <Compile Include="Src\IsMonoInstalledCondition.cs" />
<Compile Include="Src\SelectMonoReferenceDialog.cs" /> <Compile Include="Src\SelectMonoReferenceDialog.cs" />
<Compile Include="Src\MonoGacReferencePanel.cs" /> <Compile Include="Src\MonoGacReferencePanel.cs" />
<Compile Include="Src\MonoProjectContentLoader.cs" />
<Compile Include="Src\IsMonoProjectCondition.cs" />
<Compile Include="..\..\..\..\Main\GlobalAssemblyInfo.cs"> <Compile Include="..\..\..\..\Main\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link> <Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile> </Compile>
<Compile Include="Src\MonoProjectContentRegistry.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\MonoReflectionLoader\Project\MonoReflectionLoader.csproj">
<Project>{8C52FFA5-35AF-4E28-8498-2DC2F168A241}</Project>
<Name>MonoReflectionLoader</Name>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj"> <ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project> <Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name> <Name>ICSharpCode.SharpDevelop</Name>

4
src/AddIns/Misc/MonoAddIn/Project/Src/AddMonoReferenceCommand.cs

@ -31,11 +31,11 @@ namespace ICSharpCode.MonoAddIn
using (SelectMonoReferenceDialog selDialog = new SelectMonoReferenceDialog(project)) { using (SelectMonoReferenceDialog selDialog = new SelectMonoReferenceDialog(project)) {
if (selDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) { if (selDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
MonoProjectContentLoader.CreateMonoProjectContent(project); /*MonoProjectContentLoader.CreateMonoProjectContent(project);
foreach (ReferenceProjectItem gacReference in selDialog.GacReferences) { foreach (ReferenceProjectItem gacReference in selDialog.GacReferences) {
MonoProjectContentLoader.AddGacReference(gacReference.Include); MonoProjectContentLoader.AddGacReference(gacReference.Include);
} }*/
foreach (ReferenceProjectItem reference in selDialog.ReferenceInformations) { foreach (ReferenceProjectItem reference in selDialog.ReferenceInformations) {
ProjectService.AddProjectItem(project, reference); ProjectService.AddProjectItem(project, reference);

29
src/AddIns/Misc/MonoAddIn/Project/Src/IsMonoProjectCondition.cs

@ -1,29 +0,0 @@
// <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 ICSharpCode.Build.Tasks;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using System;
namespace ICSharpCode.MonoAddIn
{
/// <summary>
/// Determines whether the selected project is set to target the Mono framework.
/// </summary>
public class IsMonoProjectCondition : IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
IProject project = ProjectService.CurrentProject;
if (project == null) {
return false;
}
return MonoProjectContentLoader.IsMonoProject(project as MSBuildProject);
}
}
}

134
src/AddIns/Misc/MonoAddIn/Project/Src/MonoProjectContentLoader.cs

@ -1,134 +0,0 @@
// <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 ICSharpCode.Core;
using ICSharpCode.Build.Tasks;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using System;
using System.IO;
using System.Reflection;
namespace ICSharpCode.MonoAddIn
{
/// <summary>
/// Adds Mono specific GAC assembly references to the project content registry.
/// </summary>
public class MonoProjectContentLoader
{
string fileName = String.Empty;
string include = String.Empty;
MonoProjectContentLoader(string fileName, string include)
{
this.fileName = fileName;
this.include = include;
}
public static bool IsMonoProject(MSBuildProject project)
{
if (project != null) {
PropertyStorageLocations location;
foreach (string configuration in project.GetConfigurationNames()) {
foreach (string platform in project.GetPlatformNames()) {
string propertyValue = project.GetProperty(configuration, platform, "TargetFrameworkVersion", String.Empty, out location);
if (propertyValue != null && propertyValue.StartsWith("Mono", StringComparison.InvariantCultureIgnoreCase)) {
return true;
}
}
}
}
return false;
}
/// <summary>
/// Adds the Mono Gac reference to the Dom Cache.
/// </summary>
/// <param name="name">The full name of the Gac assembly.</param>
public static void AddGacReference(string name)
{
try {
MonoAssemblyName assemblyName = MonoGlobalAssemblyCache.FindAssemblyName(name);
if (assemblyName != null) {
CreateMonoProjectContent(assemblyName.FileName, name);
}
} catch (Exception ex) {
LoggingService.Debug(ex.ToString());
}
}
/// <summary>
/// Creates any missing Dom cache items for the project.
/// </summary>
public static void CreateMonoProjectContent(IProject project)
{
foreach (ProjectItem item in project.Items) {
ReferenceProjectItem referenceItem = item as ReferenceProjectItem;
if (item.ItemType == ItemType.Reference) {
CreateMonoProjectContent(item.FileName, item.Include);
}
}
}
static void CreateMonoProjectContent(string fileName, string include)
{
MonoProjectContentLoader loader = new MonoProjectContentLoader(fileName, include);
ProjectContentRegistry.RunLocked(loader.CreateMonoProjectContent);
}
static bool IsProjectContentAdded(string fileName, string include)
{
AssemblyName assemblyName = new AssemblyName(include);
if (assemblyName == null) {
return true;
}
if (ProjectContentRegistry.GetExistingProjectContent(assemblyName) != null) {
return true;
}
ReflectionProjectContent pc = DomPersistence.LoadProjectContentByAssemblyName(fileName);
if (pc != null) {
return true;
}
pc = DomPersistence.LoadProjectContentByAssemblyName(include);
if (pc != null) {
return true;
}
return false;
}
void CreateMonoProjectContent()
{
if (IsProjectContentAdded(fileName, include)) {
return;
}
AppDomainSetup setup = new AppDomainSetup();
setup.DisallowCodeDownload = true;
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
AppDomain domain = AppDomain.CreateDomain("MonoAssemblyLoadingDomain", AppDomain.CurrentDomain.Evidence, setup);
try {
object o = domain.CreateInstanceAndUnwrap(typeof(MonoReflectionLoader).Assembly.FullName, typeof(MonoReflectionLoader).FullName);
MonoReflectionLoader loader = (MonoReflectionLoader)o;
string database = loader.LoadAndCreateDatabase(fileName, include);
if (database != null) {
ReflectionProjectContent content = DomPersistence.LoadProjectContent(database);
if (content != null) {
DomPersistence.SaveProjectContent(content);
}
}
} catch (Exception ex) {
LoggingService.Debug("Error loading " + include + " from " + fileName + ": " + ex.ToString());
} finally {
AppDomain.Unload(domain);
}
}
}
}

32
src/AddIns/Misc/MonoAddIn/Project/Src/MonoProjectContentRegistry.cs

@ -0,0 +1,32 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.IO;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.Build.Tasks;
namespace ICSharpCode.MonoAddIn
{
public class MonoProjectContentRegistry : ProjectContentRegistry
{
protected override IProjectContent LoadProjectContent(string itemInclude, string itemFileName)
{
if (File.Exists(itemFileName)) {
return ParserService.DefaultProjectContentRegistry.GetProjectContentForReference(itemInclude, itemFileName);
}
MonoAssemblyName assemblyName = MonoGlobalAssemblyCache.FindAssemblyName(itemInclude);
if (assemblyName != null && assemblyName.FileName != null) {
return CecilReader.LoadAssembly(assemblyName.FileName, this);
} else {
HostCallback.ShowAssemblyLoadError(itemFileName, itemInclude, "");
return null;
}
}
}
}

21
src/AddIns/Misc/MonoReflectionLoader/Project/Configuration/AssemblyInfo.cs

@ -1,21 +0,0 @@
// <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.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("MonoReflectionLoader")]
[assembly: AssemblyDescription("MonoReflectionLoader for SharpDevelop")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

71
src/AddIns/Misc/MonoReflectionLoader/Project/MonoReflectionLoader.csproj

@ -1,71 +0,0 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>MonoReflectionLoader</RootNamespace>
<AssemblyName>MonoReflectionLoader</AssemblyName>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8C52FFA5-35AF-4E28-8498-2DC2F168A241}</ProjectGuid>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>100663296</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>..\..\..\..\..\bin\</OutputPath>
<Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>..\..\..\..\..\bin\</OutputPath>
<Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Src\MonoReflectionLoader.cs" />
<Compile Include="Configuration\AssemblyInfo.cs" />
<Compile Include="..\..\..\..\Main\GlobalAssemblyInfo.cs">
<Link>Configuration\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj">
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project>
<Name>ICSharpCode.SharpDevelop</Name>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj">
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project>
<Name>ICSharpCode.Core</Name>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Libraries\ICSharpCode.Build.Tasks\Project\ICSharpCode.Build.Tasks.csproj">
<Project>{4139CCF6-FB49-4A9D-B2CF-331E9EA3198D}</Project>
<Name>ICSharpCode.Build.Tasks</Name>
<Private>False</Private>
<SpecificVersion>False</SpecificVersion>
</ProjectReference>
<ProjectReference Include="..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj">
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project>
<Name>ICSharpCode.SharpDevelop.Dom</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
</Project>

73
src/AddIns/Misc/MonoReflectionLoader/Project/Src/MonoReflectionLoader.cs

@ -1,73 +0,0 @@
// <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 ICSharpCode.Build.Tasks;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
using System;
using System.IO;
using System.Reflection;
namespace ICSharpCode.MonoAddIn
{
public sealed class MonoReflectionLoader : MarshalByRefObject
{
public MonoReflectionLoader()
{
}
public string LoadAndCreateDatabase(string fileName, string include)
{
try {
LoggingService.Debug("MonoReflectionLoader: Load: " + include);
ReflectionProjectContent content = LoadProjectContent(fileName, include);
if (content == null)
return null;
return DomPersistence.SaveProjectContent(content);
} catch (Exception ex) {
LoggingService.Error(ex);
return null;
}
}
ReflectionProjectContent LoadProjectContent(string fileName, string include)
{
fileName = Path.GetFullPath(fileName);
Assembly assembly;
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += AssemblyResolve;
try {
if (File.Exists(fileName)) {
assembly = Assembly.ReflectionOnlyLoadFrom(fileName);
return new ReflectionProjectContent(assembly, fileName);
}
assembly = LoadMonoGacAssembly(include);
if (assembly != null)
return new ReflectionProjectContent(assembly);
else
return null;
} catch (BadImageFormatException) {
return null;
} finally {
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve -= AssemblyResolve;
}
}
Assembly AssemblyResolve(object sender, ResolveEventArgs e)
{
return LoadMonoGacAssembly(e.Name);
}
Assembly LoadMonoGacAssembly(string name)
{
MonoAssemblyName assemblyName = MonoGlobalAssemblyCache.FindAssemblyName(name);
if (assemblyName != null && assemblyName.FileName != null) {
return Assembly.ReflectionOnlyLoadFrom(assemblyName.FileName);
}
return null;
}
}
}

2
src/AddIns/Misc/SharpReport/SharpReport/SharpReport.csproj

@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/SharpReport/SharpReportAddin/SharpReportAddin.csproj

@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/SharpReport/SharpReportCore/SharpReportCore.csproj

@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/SharpReport/SharpReportWizard/ReportGenerator.csproj

@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

2
src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj

@ -14,7 +14,7 @@
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SubversionAddin\</OutputPath> <OutputPath>..\..\..\..\..\AddIns\AddIns\Misc\SubversionAddin\</OutputPath>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

3
src/AddIns/Misc/UnitTesting/Src/TestTreeView.cs

@ -11,9 +11,10 @@ using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project;
using NUnit.Core; using NUnit.Core;
using NUnit.UiKit; using NUnit.UiKit;

2
src/AddIns/Misc/UnitTesting/UnitTesting.csproj

@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

6
src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj

@ -24,7 +24,7 @@
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<BaseAddress>101187584</BaseAddress> <BaseAddress>101187584</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<DefineConstants>TRACE;DEBUG;FRAMEWORK_VER_2x</DefineConstants> <DefineConstants>TRACE%3bDEBUG%3bFRAMEWORK_VER_2x</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib> <NoStdLib>false</NoStdLib>
@ -33,7 +33,7 @@
<RemoveIntegerChecks>false</RemoveIntegerChecks> <RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Maintainability#CA1502;-Microsoft.Maintainability#CA1501;-Microsoft.Maintainability#CA1500;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules> <CodeAnalysisRules>-Microsoft.Design#CA1012%3b-Microsoft.Design#CA2210%3b-Microsoft.Design#CA1040%3b-Microsoft.Design#CA1005%3b-Microsoft.Design#CA1020%3b-Microsoft.Design#CA1021%3b-Microsoft.Design#CA1010%3b-Microsoft.Design#CA1011%3b-Microsoft.Design#CA1009%3b-Microsoft.Design#CA1050%3b-Microsoft.Design#CA1026%3b-Microsoft.Design#CA1019%3b-Microsoft.Design#CA1031%3b-Microsoft.Design#CA1047%3b-Microsoft.Design#CA1000%3b-Microsoft.Design#CA1048%3b-Microsoft.Design#CA1051%3b-Microsoft.Design#CA1002%3b-Microsoft.Design#CA1061%3b-Microsoft.Design#CA1006%3b-Microsoft.Design#CA1046%3b-Microsoft.Design#CA1045%3b-Microsoft.Design#CA1038%3b-Microsoft.Design#CA1008%3b-Microsoft.Design#CA1028%3b-Microsoft.Design#CA1004%3b-Microsoft.Design#CA1035%3b-Microsoft.Design#CA1063%3b-Microsoft.Design#CA1032%3b-Microsoft.Design#CA1023%3b-Microsoft.Design#CA1033%3b-Microsoft.Design#CA1039%3b-Microsoft.Design#CA1016%3b-Microsoft.Design#CA1014%3b-Microsoft.Design#CA1017%3b-Microsoft.Design#CA1018%3b-Microsoft.Design#CA1027%3b-Microsoft.Design#CA1059%3b-Microsoft.Design#CA1060%3b-Microsoft.Design#CA1034%3b-Microsoft.Design#CA1013%3b-Microsoft.Design#CA1036%3b-Microsoft.Design#CA1044%3b-Microsoft.Design#CA1041%3b-Microsoft.Design#CA1025%3b-Microsoft.Design#CA1052%3b-Microsoft.Design#CA1053%3b-Microsoft.Design#CA1057%3b-Microsoft.Design#CA1058%3b-Microsoft.Design#CA1001%3b-Microsoft.Design#CA1049%3b-Microsoft.Design#CA1054%3b-Microsoft.Design#CA1056%3b-Microsoft.Design#CA1055%3b-Microsoft.Design#CA1030%3b-Microsoft.Design#CA1003%3b-Microsoft.Design#CA1007%3b-Microsoft.Design#CA1043%3b-Microsoft.Design#CA1024%3b-Microsoft.Design#CA1062%3b-Microsoft.Globalization#CA1301%3b-Microsoft.Globalization#CA1302%3b-Microsoft.Globalization#CA1303%3b-Microsoft.Globalization#CA1306%3b-Microsoft.Globalization#CA1304%3b-Microsoft.Globalization#CA1305%3b-Microsoft.Globalization#CA1300%3b-Microsoft.Maintainability#CA1502%3b-Microsoft.Maintainability#CA1501%3b-Microsoft.Maintainability#CA1500%3b-Microsoft.Naming#CA1718%3b-Microsoft.Naming#CA1720%3b-Microsoft.Naming#CA1700%3b-Microsoft.Naming#CA1712%3b-Microsoft.Naming#CA1713%3b-Microsoft.Naming#CA1709%3b-Microsoft.Naming#CA1708%3b-Microsoft.Naming#CA1715%3b-Microsoft.Naming#CA1710%3b-Microsoft.Naming#CA1707%3b-Microsoft.Naming#CA1722%3b-Microsoft.Naming#CA1711%3b-Microsoft.Naming#CA1716%3b-Microsoft.Naming#CA1705%3b-Microsoft.Naming#CA1725%3b-Microsoft.Naming#CA1719%3b-Microsoft.Naming#CA1721%3b-Microsoft.Naming#CA1706%3b-Microsoft.Naming#CA1724%3b-Microsoft.Naming#CA1726%3b-Microsoft.Performance#CA1809%3b-Microsoft.Performance#CA1811%3b-Microsoft.Performance#CA1812%3b-Microsoft.Performance#CA1807%3b-Microsoft.Performance#CA1813%3b-Microsoft.Performance#CA1823%3b-Microsoft.Performance#CA1816%3b-Microsoft.Performance#CA1817%3b-Microsoft.Performance#CA1800%3b-Microsoft.Performance#CA1818%3b-Microsoft.Performance#CA1805%3b-Microsoft.Performance#CA1810%3b-Microsoft.Performance#CA1822%3b-Microsoft.Performance#CA1815%3b-Microsoft.Performance#CA1814%3b-Microsoft.Performance#CA1819%3b-Microsoft.Performance#CA1804%3b-Microsoft.Performance#CA1820%3b-Microsoft.Performance#CA1802%3b-Microsoft.Security#CA2116%3b-Microsoft.Security#CA2117%3b-Microsoft.Security#CA2105%3b-Microsoft.Security#CA2115%3b-Microsoft.Security#CA2104%3b-Microsoft.Security#CA2122%3b-Microsoft.Security#CA2114%3b-Microsoft.Security#CA2123%3b-Microsoft.Security#CA2111%3b-Microsoft.Security#CA2108%3b-Microsoft.Security#CA2107%3b-Microsoft.Security#CA2103%3b-Microsoft.Security#CA2100%3b-Microsoft.Security#CA2118%3b-Microsoft.Security#CA2109%3b-Microsoft.Security#CA2119%3b-Microsoft.Security#CA2106%3b-Microsoft.Security#CA2112%3b-Microsoft.Security#CA2110%3b-Microsoft.Security#CA2120%3b-Microsoft.Security#CA2101%3b-Microsoft.Security#CA2121%3b-Microsoft.Security#CA2126%3b-Microsoft.Security#CA2124%3b-Microsoft.Usage#CA2209%3b-Microsoft.Usage#CA2236%3b-Microsoft.Usage#CA2227%3b-Microsoft.Usage#CA2213%3b-Microsoft.Usage#CA2216%3b-Microsoft.Usage#CA2215%3b-Microsoft.Usage#CA2214%3b-Microsoft.Usage#CA2222%3b-Microsoft.Usage#CA2202%3b-Microsoft.Usage#CA1806%3b-Microsoft.Usage#CA2217%3b-Microsoft.Usage#CA2212%3b-Microsoft.Usage#CA2219%3b-Microsoft.Usage#CA2201%3b-Microsoft.Usage#CA2228%3b-Microsoft.Usage#CA2221%3b-Microsoft.Usage#CA2220%3b-Microsoft.Usage#CA2240%3b-Microsoft.Usage#CA2229%3b-Microsoft.Usage#CA2238%3b-Microsoft.Usage#CA2207%3b-Microsoft.Usage#CA2208%3b-Microsoft.Usage#CA2235%3b-Microsoft.Usage#CA2237%3b-Microsoft.Usage#CA2232%3b-Microsoft.Usage#CA2223%3b-Microsoft.Usage#CA2211%3b-Microsoft.Usage#CA2233%3b-Microsoft.Usage#CA2225%3b-Microsoft.Usage#CA2226%3b-Microsoft.Usage#CA2231%3b-Microsoft.Usage#CA2224%3b-Microsoft.Usage#CA2218%3b-Microsoft.Usage#CA2234%3b-Microsoft.Usage#CA2241%3b-Microsoft.Usage#CA2239%3b-Microsoft.Usage#CA2200%3b-Microsoft.Usage#CA1801%3b-Microsoft.Usage#CA2205%3b-Microsoft.Usage#CA2230</CodeAnalysisRules>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
@ -42,7 +42,7 @@
<AllowUnsafeBlocks>false</AllowUnsafeBlocks> <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>101187584</BaseAddress> <BaseAddress>101187584</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<DefineConstants>TRACE;FRAMEWORK_VER_2x</DefineConstants> <DefineConstants>TRACE%3bFRAMEWORK_VER_2x</DefineConstants>
<DebugSymbols>false</DebugSymbols> <DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib> <NoStdLib>false</NoStdLib>

2
src/Libraries/ICSharpCode.Build.Tasks/Project/ICSharpCode.Build.Tasks.csproj

@ -19,7 +19,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>..\..\..\..\bin\</OutputPath> <OutputPath>..\..\..\..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<Optimize>False</Optimize> <Optimize>False</Optimize>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

2
src/Libraries/ICSharpCode.TextEditor/Project/ICSharpCode.TextEditor.csproj

@ -29,7 +29,7 @@
<OutputPath>..\..\..\..\bin\</OutputPath> <OutputPath>..\..\..\..\bin\</OutputPath>
<DefineConstants>DEBUG</DefineConstants> <DefineConstants>DEBUG</DefineConstants>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230</CodeAnalysisRules> <CodeAnalysisRules>-Microsoft.Design#CA1012%3b-Microsoft.Design#CA2210%3b-Microsoft.Design#CA1040%3b-Microsoft.Design#CA1005%3b-Microsoft.Design#CA1020%3b-Microsoft.Design#CA1021%3b-Microsoft.Design#CA1010%3b-Microsoft.Design#CA1011%3b-Microsoft.Design#CA1009%3b-Microsoft.Design#CA1050%3b-Microsoft.Design#CA1026%3b-Microsoft.Design#CA1019%3b-Microsoft.Design#CA1031%3b-Microsoft.Design#CA1047%3b-Microsoft.Design#CA1000%3b-Microsoft.Design#CA1048%3b-Microsoft.Design#CA1051%3b-Microsoft.Design#CA1002%3b-Microsoft.Design#CA1061%3b-Microsoft.Design#CA1006%3b-Microsoft.Design#CA1046%3b-Microsoft.Design#CA1045%3b-Microsoft.Design#CA1038%3b-Microsoft.Design#CA1008%3b-Microsoft.Design#CA1028%3b-Microsoft.Design#CA1004%3b-Microsoft.Design#CA1035%3b-Microsoft.Design#CA1063%3b-Microsoft.Design#CA1032%3b-Microsoft.Design#CA1023%3b-Microsoft.Design#CA1033%3b-Microsoft.Design#CA1039%3b-Microsoft.Design#CA1016%3b-Microsoft.Design#CA1014%3b-Microsoft.Design#CA1017%3b-Microsoft.Design#CA1018%3b-Microsoft.Design#CA1027%3b-Microsoft.Design#CA1059%3b-Microsoft.Design#CA1060%3b-Microsoft.Design#CA1034%3b-Microsoft.Design#CA1013%3b-Microsoft.Design#CA1036%3b-Microsoft.Design#CA1044%3b-Microsoft.Design#CA1041%3b-Microsoft.Design#CA1025%3b-Microsoft.Design#CA1052%3b-Microsoft.Design#CA1053%3b-Microsoft.Design#CA1057%3b-Microsoft.Design#CA1058%3b-Microsoft.Design#CA1001%3b-Microsoft.Design#CA1049%3b-Microsoft.Design#CA1054%3b-Microsoft.Design#CA1056%3b-Microsoft.Design#CA1055%3b-Microsoft.Design#CA1030%3b-Microsoft.Design#CA1003%3b-Microsoft.Design#CA1007%3b-Microsoft.Design#CA1043%3b-Microsoft.Design#CA1024%3b-Microsoft.Design#CA1062%3b-Microsoft.Globalization#CA1301%3b-Microsoft.Globalization#CA1302%3b-Microsoft.Globalization#CA1303%3b-Microsoft.Globalization#CA1306%3b-Microsoft.Globalization#CA1304%3b-Microsoft.Globalization#CA1305%3b-Microsoft.Globalization#CA1300%3b-Microsoft.Mobility#CA1600%3b-Microsoft.Mobility#CA1601%3b-Microsoft.Naming#CA1718%3b-Microsoft.Naming#CA1720%3b-Microsoft.Naming#CA1700%3b-Microsoft.Naming#CA1712%3b-Microsoft.Naming#CA1713%3b-Microsoft.Naming#CA1709%3b-Microsoft.Naming#CA1708%3b-Microsoft.Naming#CA1715%3b-Microsoft.Naming#CA1710%3b-Microsoft.Naming#CA1707%3b-Microsoft.Naming#CA1722%3b-Microsoft.Naming#CA1711%3b-Microsoft.Naming#CA1716%3b-Microsoft.Naming#CA1705%3b-Microsoft.Naming#CA1725%3b-Microsoft.Naming#CA1719%3b-Microsoft.Naming#CA1721%3b-Microsoft.Naming#CA1706%3b-Microsoft.Naming#CA1724%3b-Microsoft.Naming#CA1726%3b-Microsoft.Performance#CA1809%3b-Microsoft.Performance#CA1811%3b-Microsoft.Performance#CA1812%3b-Microsoft.Performance#CA1807%3b-Microsoft.Performance#CA1813%3b-Microsoft.Performance#CA1823%3b-Microsoft.Performance#CA1816%3b-Microsoft.Performance#CA1817%3b-Microsoft.Performance#CA1800%3b-Microsoft.Performance#CA1818%3b-Microsoft.Performance#CA1805%3b-Microsoft.Performance#CA1810%3b-Microsoft.Performance#CA1822%3b-Microsoft.Performance#CA1815%3b-Microsoft.Performance#CA1814%3b-Microsoft.Performance#CA1819%3b-Microsoft.Performance#CA1804%3b-Microsoft.Performance#CA1820%3b-Microsoft.Performance#CA1802%3b-Microsoft.Security#CA2116%3b-Microsoft.Security#CA2117%3b-Microsoft.Security#CA2105%3b-Microsoft.Security#CA2115%3b-Microsoft.Security#CA2104%3b-Microsoft.Security#CA2122%3b-Microsoft.Security#CA2114%3b-Microsoft.Security#CA2123%3b-Microsoft.Security#CA2111%3b-Microsoft.Security#CA2108%3b-Microsoft.Security#CA2107%3b-Microsoft.Security#CA2103%3b-Microsoft.Security#CA2100%3b-Microsoft.Security#CA2118%3b-Microsoft.Security#CA2109%3b-Microsoft.Security#CA2119%3b-Microsoft.Security#CA2106%3b-Microsoft.Security#CA2112%3b-Microsoft.Security#CA2110%3b-Microsoft.Security#CA2120%3b-Microsoft.Security#CA2101%3b-Microsoft.Security#CA2121%3b-Microsoft.Security#CA2126%3b-Microsoft.Security#CA2124%3b-Microsoft.Usage#CA2209%3b-Microsoft.Usage#CA2236%3b-Microsoft.Usage#CA2227%3b-Microsoft.Usage#CA2213%3b-Microsoft.Usage#CA2216%3b-Microsoft.Usage#CA2215%3b-Microsoft.Usage#CA2214%3b-Microsoft.Usage#CA2222%3b-Microsoft.Usage#CA2202%3b-Microsoft.Usage#CA1806%3b-Microsoft.Usage#CA2217%3b-Microsoft.Usage#CA2212%3b-Microsoft.Usage#CA2219%3b-Microsoft.Usage#CA2201%3b-Microsoft.Usage#CA2228%3b-Microsoft.Usage#CA2221%3b-Microsoft.Usage#CA2220%3b-Microsoft.Usage#CA2240%3b-Microsoft.Usage#CA2229%3b-Microsoft.Usage#CA2238%3b-Microsoft.Usage#CA2207%3b-Microsoft.Usage#CA2208%3b-Microsoft.Usage#CA2235%3b-Microsoft.Usage#CA2237%3b-Microsoft.Usage#CA2232%3b-Microsoft.Usage#CA2223%3b-Microsoft.Usage#CA2211%3b-Microsoft.Usage#CA2233%3b-Microsoft.Usage#CA2225%3b-Microsoft.Usage#CA2226%3b-Microsoft.Usage#CA2231%3b-Microsoft.Usage#CA2224%3b-Microsoft.Usage#CA2218%3b-Microsoft.Usage#CA2234%3b-Microsoft.Usage#CA2241%3b-Microsoft.Usage#CA2239%3b-Microsoft.Usage#CA2200%3b-Microsoft.Usage#CA1801%3b-Microsoft.Usage#CA2205%3b-Microsoft.Usage#CA2230</CodeAnalysisRules>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>True</Optimize> <Optimize>True</Optimize>

4
src/Libraries/NRefactory/Project/NRefactory.csproj

@ -23,12 +23,12 @@
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<PreBuildEvent>..\src\Tools\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe</PreBuildEvent> <PreBuildEvent>..\src\Tools\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe</PreBuildEvent>
<RunCodeAnalysis>False</RunCodeAnalysis> <RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Design#CA1002;-Microsoft.Design#CA1020;-Microsoft.Design#CA1051;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1305;-Microsoft.Naming#CA1704;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1805;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2227</CodeAnalysisRules> <CodeAnalysisRules>-Microsoft.Design#CA1002%3b-Microsoft.Design#CA1020%3b-Microsoft.Design#CA1051%3b-Microsoft.Design#CA1062%3b-Microsoft.Globalization#CA1303%3b-Microsoft.Globalization#CA1305%3b-Microsoft.Naming#CA1704%3b-Microsoft.Performance#CA1800%3b-Microsoft.Performance#CA1805%3b-Microsoft.Usage#CA2211%3b-Microsoft.Usage#CA2227</CodeAnalysisRules>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<Optimize>False</Optimize> <Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>TEST; DEBUG</DefineConstants> <DefineConstants>TEST%3b DEBUG</DefineConstants>
<OutputPath>..\..\..\..\bin\</OutputPath> <OutputPath>..\..\..\..\bin\</OutputPath>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>

4
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -699,6 +699,10 @@
<Compile Include="Src\Services\ParserService\CodeCompletionOptions.cs" /> <Compile Include="Src\Services\ParserService\CodeCompletionOptions.cs" />
<Compile Include="Src\Services\RefactoringService\TextEditorDocument.cs" /> <Compile Include="Src\Services\RefactoringService\TextEditorDocument.cs" />
<Compile Include="Src\Services\ParserService\DomHostCallback.cs" /> <Compile Include="Src\Services\ParserService\DomHostCallback.cs" />
<Compile Include="Src\Services\ParserService\Doozer\ProjectContentRegistryDescriptor.cs" />
<Compile Include="Src\Services\ParserService\Doozer\ProjectContentRegistryDoozer.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\CompareProjectPropertyConditionEvaluator.cs" />
<Compile Include="Src\Services\ParserService\Net1xProjectContentRegistry.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj"> <ProjectReference Include="..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj">

4
src/Main/Base/Project/Src/Gui/Dialogs/ReferenceDialog/SelectReferenceDialog.cs

@ -104,9 +104,7 @@ namespace ICSharpCode.SharpDevelop.Gui
newItem.Tag = new ProjectReferenceProjectItem(configureProject, (IProject)tag); newItem.Tag = new ProjectReferenceProjectItem(configureProject, (IProject)tag);
break; break;
case ReferenceType.Gac: case ReferenceType.Gac:
ReferenceProjectItem gacReference = new ReferenceProjectItem(configureProject); newItem.Tag = new ReferenceProjectItem(configureProject, referenceLocation);
gacReference.Include = referenceLocation;
newItem.Tag = gacReference;
break; break;
case ReferenceType.Assembly: case ReferenceType.Assembly:
ReferenceProjectItem assemblyReference = new ReferenceProjectItem(configureProject); ReferenceProjectItem assemblyReference = new ReferenceProjectItem(configureProject);

2
src/Main/Base/Project/Src/Gui/Pads/ClassBrowser/Nodes/ProjectNode.cs

@ -98,7 +98,7 @@ namespace ICSharpCode.SharpDevelop.Gui.ClassBrowser
Nodes.Clear(); Nodes.Clear();
ReferenceFolderNode referencesNode = new ReferenceFolderNode(Project); ReferenceFolderNode referencesNode = new ReferenceFolderNode(Project);
referencesNode.AddTo(this); referencesNode.AddTo(this);
projectContent.ReferencedContentsChanged += delegate { referencesNode.UpdateReferenceNodes(); }; projectContent.ReferencedContentsChanged += delegate { WorkbenchSingleton.SafeThreadAsyncCall(referencesNode.UpdateReferenceNodes); };
foreach (ProjectItem item in Project.Items) { foreach (ProjectItem item in Project.Items) {
switch (item.ItemType) { switch (item.ItemType) {
case ItemType.Reference: case ItemType.Reference:

1
src/Main/Base/Project/Src/Gui/WorkbenchSingleton.cs

@ -76,6 +76,7 @@ namespace ICSharpCode.SharpDevelop.Gui
LayoutConfiguration.LoadLayoutConfiguration(); LayoutConfiguration.LoadLayoutConfiguration();
StatusBarService.Initialize(); StatusBarService.Initialize();
DomHostCallback.Register(); // must be called after StatusBarService.Initialize() DomHostCallback.Register(); // must be called after StatusBarService.Initialize()
ParserService.InitializeParserService();
workbench = new DefaultWorkbench(); workbench = new DefaultWorkbench();
MessageService.MainForm = workbench; MessageService.MainForm = workbench;

58
src/Main/Base/Project/Src/Internal/ConditionEvaluators/CompareProjectPropertyConditionEvaluator.cs

@ -0,0 +1,58 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.SharpDevelop
{
/// <summary>
/// Compares a project property with a string.<br/>
/// Uses the conditions' caller as project; or the current project, if the caller is not a project.
/// The property name and string are passed through the StringParser.
/// </summary>
/// <attribute name="property">
/// The name of the MSBuild property to read the value from.
/// </attribute>
/// <attribute name="equals">
/// The second string.
/// </attribute>
/// <attribute name="comparisonType">
/// The mode of the comparison: a field of the System.StringComparison enumeration. The default is
/// 'InvariantCultureIgnoreCase'.
/// </attribute>
/// <example title="Check if the project output type in the active configuration is a Windows Application">
/// &lt;Condition name = "CompareProjectProperty" property = "OutputType" equals = "WinExe"&gt;
/// </example>
public class CompareProjectPropertyConditionEvaluator: IConditionEvaluator
{
public bool IsValid(object caller, Condition condition)
{
AbstractProject project;
if (caller is IProject) {
project = caller as AbstractProject;
} else {
project = ProjectService.CurrentProject as AbstractProject;
}
if (project == null) {
return false;
}
string comparisonTypeText = condition.Properties["comparisonType"];
StringComparison comparisonType;
if (string.IsNullOrEmpty(comparisonTypeText))
comparisonType = StringComparison.InvariantCultureIgnoreCase;
else
comparisonType = (StringComparison)Enum.Parse(typeof(StringComparison), comparisonTypeText);
return string.Equals(project.GetProperty(StringParser.Parse(condition.Properties["property"])),
StringParser.Parse(condition.Properties["equals"]),
comparisonType);
}
}
}

5
src/Main/Base/Project/Src/Internal/ConditionEvaluators/ProjectActiveEvaluator.cs

@ -18,6 +18,9 @@ namespace ICSharpCode.Core
{ {
/// <summary> /// <summary>
/// Tests if any project is active or if a project of a specific language is active. /// Tests if any project is active or if a project of a specific language is active.
/// Can also be used to test the type of the project passed as caller to the condition
/// - when a project is passed as caller, the language of that project is tested; otherwise
/// the language of the active project is tested.
/// </summary> /// </summary>
/// <attribute name="activeproject"> /// <attribute name="activeproject">
/// The language name the project should have. /// The language name the project should have.
@ -35,7 +38,7 @@ namespace ICSharpCode.Core
{ {
string activeproject = condition.Properties["activeproject"]; string activeproject = condition.Properties["activeproject"];
IProject project = ProjectService.CurrentProject; IProject project = (caller as IProject) ?? ProjectService.CurrentProject;
if (activeproject == "*") { if (activeproject == "*") {
return project != null; return project != null;
} }

2
src/Main/Base/Project/Src/Project/AbstractProject.cs

@ -240,7 +240,7 @@ namespace ICSharpCode.SharpDevelop.Project
[ReadOnly(true)] [ReadOnly(true)]
[LocalizedProperty("${res:Dialog.ProjectOptions.Platform}")] [LocalizedProperty("${res:Dialog.ProjectOptions.Platform}")]
public string Platform { public virtual string Platform {
get { get {
return activePlatform; return activePlatform;
} }

66
src/Main/Base/Project/Src/Project/MSBuildProject.cs

@ -495,5 +495,71 @@ namespace ICSharpCode.SharpDevelop.Project
Name, Name,
Items.Count); Items.Count);
} }
/// <summary>
/// A list of project properties whose change causes reparsing of references and
/// files.
/// </summary>
protected readonly List<string> reparseSensitiveProperties = new List<string>();
[ReadOnly(true)]
[LocalizedProperty("${res:Dialog.ProjectOptions.Platform}")]
public override string Platform {
get {
return base.Platform;
}
set {
if (base.Platform != value) {
SetPlatformOrConfiguration(true, value);
}
}
}
[ReadOnly(true)]
[LocalizedProperty("${res:Dialog.ProjectOptions.Configuration}")]
public override string Configuration {
get {
return base.Configuration;
}
set {
if (base.Configuration != value) {
SetPlatformOrConfiguration(false, value);
}
}
}
void SetPlatformOrConfiguration(bool platform, string newValue)
{
Dictionary<string, string> reparseSensitiveValues = new Dictionary<string, string>();
foreach (string p in reparseSensitiveProperties) {
reparseSensitiveValues[p] = GetProperty(p);
}
if (platform)
base.Platform = newValue;
else
base.Configuration = newValue;
foreach (string p in reparseSensitiveProperties) {
if (reparseSensitiveValues[p] != GetProperty(p)) {
ParserService.Reparse(this, true, true);
break;
}
}
}
public override void SetProperty<T>(string configurationName, string platform, string property, T value, PropertyStorageLocations location)
{
if (reparseSensitiveProperties.Contains(property)) {
string oldValue = GetProperty(property);
base.SetProperty(configurationName, platform, property, value, location);
if (oldValue != GetProperty(property)) {
// change had an effect on current configuration
ParserService.Reparse(this, true, true);
}
} else {
base.SetProperty(configurationName, platform, property, value, location);
}
}
} }
} }

12
src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDescriptor.cs

@ -1,22 +1,18 @@
// <file> // <file>
// <copyright see="prj:///doc/copyright.txt"/> // <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/> // <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/> // <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version> // <version>$Revision$</version>
// </file> // </file>
using System; using System;
using System.Xml;
using System.IO; using System.IO;
using System.Collections; using ICSharpCode.Core;
using System.Reflection;
using System.CodeDom.Compiler;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core namespace ICSharpCode.SharpDevelop
{ {
public class ParserDescriptor public sealed class ParserDescriptor
{ {
IParser parser = null; IParser parser = null;
string[] supportedExtensions = null; string[] supportedExtensions = null;

7
src/Main/Base/Project/Src/Services/ParserService/Doozer/ParserDoozer.cs

@ -7,12 +7,9 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Diagnostics;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core namespace ICSharpCode.SharpDevelop
{ {
/// <summary> /// <summary>
/// Creates ParserDescriptor objects for the parsing service. /// Creates ParserDescriptor objects for the parsing service.
@ -30,7 +27,7 @@ namespace ICSharpCode.Core
/// <returns> /// <returns>
/// An ParserDescriptor object that wraps the IParser object. /// An ParserDescriptor object that wraps the IParser object.
/// </returns> /// </returns>
public class ParserDoozer : IDoozer public sealed class ParserDoozer : IDoozer
{ {
/// <summary> /// <summary>
/// Gets if the doozer handles codon conditions on its own. /// Gets if the doozer handles codon conditions on its own.

44
src/Main/Base/Project/Src/Services/ParserService/Doozer/ProjectContentRegistryDescriptor.cs

@ -0,0 +1,44 @@
/*
* Created by SharpDevelop.
* User: DG
* Date: 02.09.2006
* Time: 16:53
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.SharpDevelop
{
/// <summary>
/// Describes a ProjectContentRegistry in the AddInTree.
/// </summary>
public sealed class ProjectContentRegistryDescriptor
{
Codon codon;
ProjectContentRegistry registry;
public ProjectContentRegistry Registry {
get {
return registry ?? (registry = (ProjectContentRegistry)codon.AddIn.CreateObject(codon.Properties["class"]));
}
}
public bool UseRegistryForProject(IProject project)
{
return codon.GetFailedAction(project) == ConditionFailedAction.Nothing;
}
public ProjectContentRegistryDescriptor(Codon codon)
{
if (codon == null)
throw new ArgumentNullException("codon");
this.codon = codon;
}
}
}

50
src/Main/Base/Project/Src/Services/ParserService/Doozer/ProjectContentRegistryDoozer.cs

@ -0,0 +1,50 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop
{
/// <summary>
/// Creates ProjectContentRegistryDescriptor objects for the parsing service.
/// </summary>
/// <attribute name="class">
/// Name of the ProjectContentRegistry class.
/// </attribute>
/// <usage>Only in /Workspace/ProjectContentRegistry</usage>
/// <returns>
/// An RegistryDescriptor object that wraps a ProjectContentRegistry object.
/// </returns>
/// <conditions>Conditions are handled by the item, the condition "caller" will be the project to which
/// the references requiring the registry belong to.
/// You should always use the &lt;ProjectActive&gt; condition to restrict the project type
/// your registry is used for.
/// </conditions>
public sealed class ProjectContentRegistryDoozer : IDoozer
{
/// <summary>
/// Gets if the doozer handles codon conditions on its own.
/// If this property return false, the item is excluded when the condition is not met.
/// </summary>
public bool HandleConditions {
get {
return true;
}
}
/// <summary>
/// Creates an item with the specified sub items. And the current
/// Condition status for this item.
/// </summary>
public object BuildItem(object caller, Codon codon, ArrayList subItems)
{
return new ProjectContentRegistryDescriptor(codon);
}
}
}

66
src/Main/Base/Project/Src/Services/ParserService/Net1xProjectContentRegistry.cs

@ -0,0 +1,66 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.SharpDevelop
{
/// <summary>
/// Project content registry for .NET 1.0 and .NET 1.1 assemblies.
/// </summary>
public abstract class Net1xProjectContentRegistry : ProjectContentRegistry
{
protected abstract string DotnetVersion { get; }
public override IProjectContent Mscorlib {
get {
return GetProjectContentForReference("mscorlib", "mscorlib");
}
}
protected override IProjectContent LoadProjectContent(string itemInclude, string itemFileName)
{
if (File.Exists(itemFileName)) {
return ParserService.DefaultProjectContentRegistry.GetProjectContentForReference(itemInclude, itemFileName);
}
string netPath = Path.Combine(FileUtility.NETFrameworkInstallRoot, DotnetVersion);
if (File.Exists(Path.Combine(netPath, "mscorlib.dll"))) {
string shortName = itemInclude;
int pos = shortName.IndexOf(',');
if (pos > 0)
shortName = shortName.Substring(0, pos);
if (File.Exists(Path.Combine(netPath, shortName + ".dll"))) {
return CecilReader.LoadAssembly(Path.Combine(netPath, shortName + ".dll"), this);
}
} else {
string message = "Warning: Target .NET Framework version " + DotnetVersion + " is not installed." + Environment.NewLine;
if (!TaskService.BuildMessageViewCategory.Text.Contains(message)) {
TaskService.BuildMessageViewCategory.AppendText(message);
}
}
return ParserService.DefaultProjectContentRegistry.GetProjectContentForReference(itemInclude, itemFileName);
}
}
public class Net10ProjectContentRegistry : Net1xProjectContentRegistry
{
protected override string DotnetVersion {
get { return "v1.0.3705"; }
}
}
public class Net11ProjectContentRegistry : Net1xProjectContentRegistry
{
protected override string DotnetVersion {
get { return "v1.1.4322"; }
}
}
}

11
src/Main/Base/Project/Src/Services/ParserService/ParseInformationEventHandler.cs

@ -6,18 +6,9 @@
// </file> // </file>
using System; using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Gui;
namespace ICSharpCode.Core namespace ICSharpCode.SharpDevelop
{ {
public delegate void ParseInformationEventHandler(object sender, ParseInformationEventArgs e); public delegate void ParseInformationEventHandler(object sender, ParseInformationEventArgs e);

43
src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs

@ -7,14 +7,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Project;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core namespace ICSharpCode.SharpDevelop
{ {
public class ParseProjectContent : DefaultProjectContent public class ParseProjectContent : DefaultProjectContent
{ {
@ -23,16 +20,11 @@ namespace ICSharpCode.Core
ParseProjectContent newProjectContent = new ParseProjectContent(); ParseProjectContent newProjectContent = new ParseProjectContent();
newProjectContent.project = project; newProjectContent.project = project;
newProjectContent.Language = project.LanguageProperties; newProjectContent.Language = project.LanguageProperties;
newProjectContent.ReferencedContents.Add(ProjectContentRegistry.Mscorlib);
newProjectContent.initializing = true; newProjectContent.initializing = true;
return newProjectContent; IProjectContent mscorlib = ParserService.GetRegistryForReference(new ReferenceProjectItem(project, "mscorlib")).Mscorlib;
} if (mscorlib != null) {
newProjectContent.ReferencedContents.Add(mscorlib);
public static ParseProjectContent Create(IProject project) }
{
ParseProjectContent newProjectContent = CreateUninitalized(project);
newProjectContent.Initialize1();
newProjectContent.Initialize2();
return newProjectContent; return newProjectContent;
} }
@ -68,8 +60,24 @@ namespace ICSharpCode.Core
} }
} }
UpdateReferenceInterDependencies(); UpdateReferenceInterDependencies();
WorkbenchSingleton.SafeThreadAsyncCall(new Action<EventArgs>(OnReferencedContentsChanged), OnReferencedContentsChanged(EventArgs.Empty);
EventArgs.Empty); }
internal void ReInitialize1()
{
lock (ReferencedContents) {
ReferencedContents.Clear();
IProjectContent mscorlib = ParserService.GetRegistryForReference(new ReferenceProjectItem(project, "mscorlib")).Mscorlib;
if (mscorlib != null) {
ReferencedContents.Add(mscorlib);
}
}
// prevent adding event handler twice
ProjectService.ProjectItemAdded -= OnProjectItemAdded;
ProjectService.ProjectItemRemoved -= OnProjectItemRemoved;
initializing = true;
Initialize1();
initializing = false;
} }
void UpdateReferenceInterDependencies() void UpdateReferenceInterDependencies()
@ -99,8 +107,7 @@ namespace ICSharpCode.Core
if (updateInterDependencies) { if (updateInterDependencies) {
UpdateReferenceInterDependencies(); UpdateReferenceInterDependencies();
} }
WorkbenchSingleton.SafeThreadAsyncCall(new Action<EventArgs>(OnReferencedContentsChanged), OnReferencedContentsChanged(EventArgs.Empty);
EventArgs.Empty);
} catch (Exception e) { } catch (Exception e) {
MessageService.ShowError(e); MessageService.ShowError(e);
} }

158
src/Main/Base/Project/Src/Services/ParserService/ParserService.cs

@ -1,7 +1,7 @@
// <file> // <file>
// <copyright see="prj:///doc/copyright.txt"/> // <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/> // <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/> // <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version> // <version>$Revision$</version>
// </file> // </file>
@ -13,18 +13,55 @@ using System.IO;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom; using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Gui; using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.SharpDevelop.Project; using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core namespace ICSharpCode.SharpDevelop
{ {
public static class ParserService public static class ParserService
{ {
static ParserDescriptor[] parser; static IList<ParserDescriptor> parser;
static IList<ProjectContentRegistryDescriptor> registries;
static Dictionary<IProject, IProjectContent> projectContents = new Dictionary<IProject, IProjectContent>(); static Dictionary<IProject, IProjectContent> projectContents = new Dictionary<IProject, IProjectContent>();
static Dictionary<string, ParseInformation> parsings = new Dictionary<string, ParseInformation>(); static Dictionary<string, ParseInformation> parsings = new Dictionary<string, ParseInformation>();
static ProjectContentRegistry defaultProjectContentRegistry = new ProjectContentRegistry();
static string domPersistencePath;
internal static void InitializeParserService()
{
if (parser == null) {
parser = AddInTree.BuildItems<ParserDescriptor>("/Workspace/Parser", null, false);
registries = AddInTree.BuildItems<ProjectContentRegistryDescriptor>("/Workspace/ProjectContentRegistry", null, false);
domPersistencePath = Path.Combine(Path.GetTempPath(), "SharpDevelop" + RevisionClass.MainVersion);
#if DEBUG
domPersistencePath = Path.Combine(domPersistencePath, "Debug");
#endif
Directory.CreateDirectory(domPersistencePath);
defaultProjectContentRegistry.ActivatePersistence(domPersistencePath);
ProjectService.SolutionClosed += ProjectServiceSolutionClosed;
}
}
/// <summary>
/// Gets the cache directory used for DOM persistence.
/// </summary>
public static string DomPersistencePath {
get {
return domPersistencePath;
}
}
public static ProjectContentRegistry DefaultProjectContentRegistry {
get {
return defaultProjectContentRegistry;
}
}
public static IProjectContent CurrentProjectContent { public static IProjectContent CurrentProjectContent {
[DebuggerStepThrough] [DebuggerStepThrough]
@ -53,22 +90,20 @@ namespace ICSharpCode.Core
foreach (IProjectContent pc in AllProjectContents) { foreach (IProjectContent pc in AllProjectContents) {
yield return pc; yield return pc;
} }
foreach (IProjectContent pc in ProjectContentRegistry.GetLoadedProjectContents()) { foreach (IProjectContent pc in defaultProjectContentRegistry.GetLoadedProjectContents()) {
yield return pc; yield return pc;
} }
} }
} }
static ParserService()
{
parser = (ParserDescriptor[])AddInTree.BuildItems("/Workspace/Parser", null, false).ToArray(typeof(ParserDescriptor));
ProjectService.SolutionClosed += ProjectServiceSolutionClosed;
}
static void ProjectServiceSolutionClosed(object sender, EventArgs e) static void ProjectServiceSolutionClosed(object sender, EventArgs e)
{ {
abortLoadSolutionProjectsThread = true; abortLoadSolutionProjectsThread = true;
lock (reParse1) { // clear queue of reparse thread
reParse1.Clear();
reParse2.Clear();
}
lock (projectContents) { lock (projectContents) {
foreach (IProjectContent content in projectContents.Values) { foreach (IProjectContent content in projectContents.Values) {
content.Dispose(); content.Dispose();
@ -90,7 +125,8 @@ namespace ICSharpCode.Core
throw new InvalidOperationException("Cannot open new combine without closing old combine!"); throw new InvalidOperationException("Cannot open new combine without closing old combine!");
if (!loadSolutionProjectsThread.Join(50)) { if (!loadSolutionProjectsThread.Join(50)) {
// loadSolutionProjects might be waiting for main thread, so give it // loadSolutionProjects might be waiting for main thread, so give it
// a chance to complete asynchronous calls // a chance to complete safethread calls by putting this method at
// the end of the invoking queue
WorkbenchSingleton.SafeThreadAsyncCall(OnSolutionLoaded); WorkbenchSingleton.SafeThreadAsyncCall(OnSolutionLoaded);
return; return;
} }
@ -167,21 +203,77 @@ namespace ICSharpCode.Core
StatusBarService.ProgressMonitor.Done(); StatusBarService.ProgressMonitor.Done();
} }
static void ReparseProject(object state) #region Reparse projects
static Queue<ParseProjectContent> reParse1 = new Queue<ParseProjectContent>();
static Queue<ParseProjectContent> reParse2 = new Queue<ParseProjectContent>();
static Thread reParseThread;
static void ReparseProjects()
{ {
ParseProjectContent newContent = (ParseProjectContent)state; Thread.Sleep(100); // enable main thread to fill the queues completely
StatusBarService.ProgressMonitor.BeginTask("${res:ICSharpCode.SharpDevelop.Internal.ParserService.Parsing}...", newContent.GetInitializationWorkAmount()); bool parsing = false;
newContent.ReInitialize2(); ParseProjectContent job;
StatusBarService.ProgressMonitor.Done();
while (true) {
// get next job
lock (reParse1) {
if (reParse1.Count > 0) {
if (parsing) {
StatusBarService.ProgressMonitor.Done();
}
parsing = false;
job = reParse1.Dequeue();
} else if (reParse2.Count > 0) {
if (!parsing) {
int workAmount = 0;
foreach (ParseProjectContent ppc in reParse2) {
workAmount += ppc.GetInitializationWorkAmount();
}
StatusBarService.ProgressMonitor.BeginTask("${res:ICSharpCode.SharpDevelop.Internal.ParserService.Parsing}...", workAmount);
}
parsing = true;
job = reParse2.Dequeue();
} else {
// all jobs done
reParseThread = null;
if (parsing) {
StatusBarService.ProgressMonitor.Done();
}
return;
}
}
// execute job
if (parsing) {
job.ReInitialize2();
} else {
job.ReInitialize1();
}
}
} }
public static void Reparse(IProject project) public static void Reparse(IProject project, bool initReferences, bool parseCode)
{ {
ParseProjectContent pc = GetProjectContent(project) as ParseProjectContent; ParseProjectContent pc = GetProjectContent(project) as ParseProjectContent;
if (pc != null) { if (pc != null) {
ThreadPool.QueueUserWorkItem(ReparseProject, pc); lock (reParse1) {
if (initReferences && !reParse1.Contains(pc)) {
reParse1.Enqueue(pc);
}
if (parseCode && !reParse2.Contains(pc)) {
reParse2.Enqueue(pc);
}
if (reParseThread == null) {
reParseThread = new Thread(new ThreadStart(ReparseProjects));
reParseThread.Name = "reParse";
reParseThread.Priority = ThreadPriority.BelowNormal;
reParseThread.IsBackground = true;
reParseThread.Start();
}
}
} }
} }
#endregion
internal static IProjectContent CreateProjectContentForAddedProject(IProject project) internal static IProjectContent CreateProjectContentForAddedProject(IProject project)
{ {
@ -252,8 +344,8 @@ namespace ICSharpCode.Core
static void ParserUpdateThread() static void ParserUpdateThread()
{ {
LoggingService.Info("ParserUpdateThread started"); LoggingService.Info("ParserUpdateThread started");
// preload mscorlib, we're going to need it anyway // preload mscorlib, we're going to need it probably
IProjectContent dummyVar = ProjectContentRegistry.Mscorlib; IProjectContent dummyVar = defaultProjectContentRegistry.Mscorlib;
while (!abortParserUpdateThread) { while (!abortParserUpdateThread) {
try { try {
@ -407,7 +499,7 @@ namespace ICSharpCode.Core
LoggingService.Info("Creating default project content"); LoggingService.Info("Creating default project content");
//LoggingService.Debug("Stacktrace is:\n" + Environment.StackTrace); //LoggingService.Debug("Stacktrace is:\n" + Environment.StackTrace);
defaultProjectContent = new DefaultProjectContent(); defaultProjectContent = new DefaultProjectContent();
defaultProjectContent.ReferencedContents.Add(ProjectContentRegistry.Mscorlib); defaultProjectContent.ReferencedContents.Add(defaultProjectContentRegistry.Mscorlib);
Thread t = new Thread(new ThreadStart(CreateDefaultProjectContentReferences)); Thread t = new Thread(new ThreadStart(CreateDefaultProjectContentReferences));
t.IsBackground = true; t.IsBackground = true;
t.Priority = ThreadPriority.BelowNormal; t.Priority = ThreadPriority.BelowNormal;
@ -660,6 +752,24 @@ namespace ICSharpCode.Core
public static event ParseInformationEventHandler ParseInformationUpdated; public static event ParseInformationEventHandler ParseInformationUpdated;
public static event EventHandler LoadSolutionProjectsThreadEnded; public static event EventHandler LoadSolutionProjectsThreadEnded;
public static ProjectContentRegistry GetRegistryForReference(ReferenceProjectItem item)
{
if (item is ProjectReferenceProjectItem || item.Project == null) {
return defaultProjectContentRegistry;
}
foreach (ProjectContentRegistryDescriptor registry in registries) {
if (registry.UseRegistryForProject(item.Project)) {
ProjectContentRegistry r = registry.Registry;
if (r != null) {
return r;
} else {
return defaultProjectContentRegistry; // fallback when class not found
}
}
}
return defaultProjectContentRegistry;
}
public static IProjectContent GetExistingProjectContentForReference(ReferenceProjectItem item) public static IProjectContent GetExistingProjectContentForReference(ReferenceProjectItem item)
{ {
if (item is ProjectReferenceProjectItem) { if (item is ProjectReferenceProjectItem) {
@ -669,7 +779,7 @@ namespace ICSharpCode.Core
} }
return ParserService.GetProjectContent(((ProjectReferenceProjectItem)item).ReferencedProject); return ParserService.GetProjectContent(((ProjectReferenceProjectItem)item).ReferencedProject);
} }
return ProjectContentRegistry.GetExistingProjectContentForReference(item.Include, item.FileName); return GetRegistryForReference(item).GetExistingProjectContent(item.Include, item.FileName);
} }
public static IProjectContent GetProjectContentForReference(ReferenceProjectItem item) public static IProjectContent GetProjectContentForReference(ReferenceProjectItem item)
@ -681,7 +791,7 @@ namespace ICSharpCode.Core
} }
return ParserService.GetProjectContent(((ProjectReferenceProjectItem)item).ReferencedProject); return ParserService.GetProjectContent(((ProjectReferenceProjectItem)item).ReferencedProject);
} }
return ProjectContentRegistry.GetProjectContentForReference(item.Include, item.FileName); return GetRegistryForReference(item).GetProjectContentForReference(item.Include, item.FileName);
} }
} }
} }

4
src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/AttributesDataProvider.cs

@ -23,8 +23,8 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
/// </summary> /// </summary>
public class AttributesDataProvider : CtrlSpaceCompletionDataProvider public class AttributesDataProvider : CtrlSpaceCompletionDataProvider
{ {
public AttributesDataProvider() public AttributesDataProvider(IProjectContent pc)
: this(ExpressionContext.TypeDerivingFrom(ProjectContentRegistry.Mscorlib.GetClass("System.Attribute"), true)) : this(ExpressionContext.TypeDerivingFrom(pc.GetClass("System.Attribute"), true))
{ {
} }

4
src/Main/Core/Project/Src/AddInTree/AddIn/Condition.cs

@ -11,9 +11,7 @@ using System.Xml;
namespace ICSharpCode.Core namespace ICSharpCode.Core
{ {
/// <summary>
/// Description of Codon.
/// </summary>
public class Condition : ICondition public class Condition : ICondition
{ {
string name; string name;

2
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultConditionEvaluators/CompareConditionEvaluator.cs

@ -11,7 +11,7 @@ using System.Collections;
namespace ICSharpCode.Core namespace ICSharpCode.Core
{ {
/// <summary> /// <summary>
/// Compares two strings (case sensitive). /// Compares two strings.
/// The strings are passed through the StringParser, so it is possible to compare /// The strings are passed through the StringParser, so it is possible to compare
/// SharpDevelop properties.<br/> /// SharpDevelop properties.<br/>
/// Useful if you want to run a command only when a setting is active to prevent /// Useful if you want to run a command only when a setting is active to prevent

2
src/Main/Core/Project/Src/AddInTree/AddIn/ICondition.cs

@ -19,7 +19,7 @@ namespace ICSharpCode.Core
} }
/// <summary> /// <summary>
/// Description of ICondition. /// Interface for single condition or complex condition.
/// </summary> /// </summary>
public interface ICondition public interface ICondition
{ {

4
src/Main/ICSharpCode.SharpDevelop.Dom/Project/ICSharpCode.SharpDevelop.Dom.csproj

@ -15,7 +15,7 @@
<NoStdLib>False</NoStdLib> <NoStdLib>False</NoStdLib>
<RegisterForComInterop>False</RegisterForComInterop> <RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress> <BaseAddress>132644864</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
@ -25,7 +25,7 @@
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath> <BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<IntermediateOutputPath>obj\Debug\</IntermediateOutputPath> <IntermediateOutputPath>obj\Debug\</IntermediateOutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG%3bTRACE</DefineConstants>
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>

12
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/CecilReader.cs

@ -15,8 +15,12 @@ namespace ICSharpCode.SharpDevelop.Dom
{ {
public static class CecilReader public static class CecilReader
{ {
public static ReflectionProjectContent LoadAssembly(string fileName) public static ReflectionProjectContent LoadAssembly(string fileName, ProjectContentRegistry registry)
{ {
if (fileName == null)
throw new ArgumentNullException("fileName");
if (registry == null)
throw new ArgumentNullException("registry");
LoggingService.Info("Cecil: Load from " + fileName); LoggingService.Info("Cecil: Load from " + fileName);
using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) { using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) {
AssemblyDefinition asm = AssemblyFactory.GetAssembly(fs); AssemblyDefinition asm = AssemblyFactory.GetAssembly(fs);
@ -24,7 +28,7 @@ namespace ICSharpCode.SharpDevelop.Dom
foreach (AssemblyNameReference anr in asm.MainModule.AssemblyReferences) { foreach (AssemblyNameReference anr in asm.MainModule.AssemblyReferences) {
referencedAssemblies.Add(new AssemblyName(anr.FullName)); referencedAssemblies.Add(new AssemblyName(anr.FullName));
} }
return new CecilProjectContent(asm.Name.FullName, fileName, referencedAssemblies.ToArray(), asm.MainModule.Types); return new CecilProjectContent(asm.Name.FullName, fileName, referencedAssemblies.ToArray(), asm.MainModule.Types, registry);
} }
} }
@ -119,8 +123,8 @@ namespace ICSharpCode.SharpDevelop.Dom
private sealed class CecilProjectContent : ReflectionProjectContent private sealed class CecilProjectContent : ReflectionProjectContent
{ {
public CecilProjectContent(string fullName, string fileName, AssemblyName[] referencedAssemblies, public CecilProjectContent(string fullName, string fileName, AssemblyName[] referencedAssemblies,
TypeDefinitionCollection types) TypeDefinitionCollection types, ProjectContentRegistry registry)
: base(fullName, fileName, referencedAssemblies) : base(fullName, fileName, referencedAssemblies, registry)
{ {
foreach (TypeDefinition td in types) { foreach (TypeDefinition td in types) {
if ((td.Attributes & TypeAttributes.Public) == TypeAttributes.Public) { if ((td.Attributes & TypeAttributes.Public) == TypeAttributes.Public) {

8
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/SystemTypes.cs

@ -74,12 +74,12 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
} }
internal class VoidClass : DefaultClass internal sealed class VoidClass : DefaultClass
{ {
internal static readonly string VoidName = typeof(void).FullName; internal static readonly string VoidName = typeof(void).FullName;
public static readonly VoidClass Instance = new VoidClass(); public static readonly VoidClass Instance = new VoidClass();
public VoidClass() private VoidClass()
: base(DefaultCompilationUnit.DummyCompilationUnit, VoidName) : base(DefaultCompilationUnit.DummyCompilationUnit, VoidName)
{ {
} }
@ -90,11 +90,11 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
} }
public class VoidReturnType : AbstractReturnType public sealed class VoidReturnType : AbstractReturnType
{ {
public static readonly VoidReturnType Instance = new VoidReturnType(); public static readonly VoidReturnType Instance = new VoidReturnType();
public VoidReturnType() private VoidReturnType()
{ {
FullyQualifiedName = VoidClass.VoidName; FullyQualifiedName = VoidClass.VoidName;
} }

2
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryResolver.cs

@ -991,7 +991,7 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
IClass GetPrimitiveClass(string systemType, string newName) IClass GetPrimitiveClass(string systemType, string newName)
{ {
IClass c = ProjectContentRegistry.Mscorlib.GetClass(systemType); IClass c = projectContent.GetClass(systemType);
DefaultClass c2 = new DefaultClass(c.CompilationUnit, newName); DefaultClass c2 = new DefaultClass(c.CompilationUnit, newName);
c2.ClassType = c.ClassType; c2.ClassType = c.ClassType;
c2.Modifiers = c.Modifiers; c2.Modifiers = c.Modifiers;

6
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/TypeVisitor.cs

@ -493,7 +493,11 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
if (t == null) { if (t == null) {
if (reference.Type != reference.SystemType) { if (reference.Type != reference.SystemType) {
// keyword-type like void, int, string etc. // keyword-type like void, int, string etc.
t = ProjectContentRegistry.Mscorlib.GetClass(reference.SystemType).DefaultReturnType; IClass c = projectContent.GetClass(reference.SystemType);
if (c != null)
t = c.DefaultReturnType;
else
t = new GetClassReturnType(projectContent, reference.SystemType, 0);
} else { } else {
int typeParameterCount = reference.GenericTypes.Count; int typeParameterCount = reference.GenericTypes.Count;
if (useLazyReturnType) { if (useLazyReturnType) {

1
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/DefaultProjectContent.cs

@ -898,7 +898,6 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
#endregion #endregion
[Obsolete("This event now does not call of the main thread!")]
public event EventHandler ReferencedContentsChanged; public event EventHandler ReferencedContentsChanged;
protected virtual void OnReferencedContentsChanged(EventArgs e) protected virtual void OnReferencedContentsChanged(EventArgs e)

315
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ProjectContentRegistry.cs

@ -18,19 +18,123 @@ using ICSharpCode.SharpDevelop.Dom.ReflectionLayer;
namespace ICSharpCode.SharpDevelop.Dom namespace ICSharpCode.SharpDevelop.Dom
{ {
public static class ProjectContentRegistry /// <summary>
/// Contains project contents read from external assemblies.
/// Caches loaded assemblies in memory and optionally also to disk.
/// </summary>
public class ProjectContentRegistry : IDisposable
{ {
static Dictionary<string, IProjectContent> contents = new Dictionary<string, IProjectContent>(StringComparer.InvariantCultureIgnoreCase); internal DomPersistence persistence;
static ReflectionProjectContent mscorlibContent; internal Dictionary<string, IProjectContent> contents = new Dictionary<string, IProjectContent>(StringComparer.InvariantCultureIgnoreCase);
public static void RunLocked(ThreadStart method) /// <summary>
/// Disposes all project contents stored in this registry.
/// </summary>
public virtual void Dispose()
{
List<IProjectContent> list;
lock (contents) {
list = new List<IProjectContent>(contents.Values);
contents.Clear();
}
// dispose outside the lock
foreach (IProjectContent pc in list) {
pc.Dispose();
}
}
/// <summary>
/// Activate caching assemblies to disk.
/// Cache files will be saved in the specified directory.
/// </summary>
public DomPersistence ActivatePersistence(string cacheDirectory)
{
if (cacheDirectory == null) {
throw new ArgumentNullException("cacheDirectory");
} else if (persistence != null && cacheDirectory == persistence.CacheDirectory) {
return persistence;
} else {
persistence = new DomPersistence(cacheDirectory, this);
return persistence;
}
}
/// <summary>
/// Load a project content using Reflection in a separate AppDomain.
/// This method first tries to load the assembly from the disk cache, if it exists there.
/// If it does not exist in disk cache, it creates a new AppDomain, instanciates a ReflectionLoader in it
/// and loads the assembly <paramref name="filename"/>.
/// If the file does not exist, <paramref name="include"/> is loaded from GAC.
/// </summary>
public ReflectionProjectContent ReflectionLoadProjectContent(string filename, string include)
{
DomPersistence persistence;
bool tempPersistence;
if (this.persistence == null) {
tempPersistence = true;
persistence = new DomPersistence(Path.GetTempPath(), this);
} else {
// non-temp persistence
tempPersistence = false;
persistence = this.persistence;
ReflectionProjectContent pc = persistence.LoadProjectContentByAssemblyName(filename);
if (pc != null) {
return pc;
}
pc = persistence.LoadProjectContentByAssemblyName(include);
if (pc != null) {
return pc;
}
}
AppDomainSetup setup = new AppDomainSetup();
setup.DisallowCodeDownload = true;
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
AppDomain domain = AppDomain.CreateDomain("AssemblyLoadingDomain", AppDomain.CurrentDomain.Evidence, setup);
string database;
try {
object o = domain.CreateInstanceAndUnwrap(typeof(ReflectionLoader).Assembly.FullName, typeof(ReflectionLoader).FullName);
ReflectionLoader loader = (ReflectionLoader)o;
database = loader.LoadAndCreateDatabase(filename, include, persistence.CacheDirectory);
} catch (FileLoadException e) {
database = null;
HostCallback.ShowAssemblyLoadErrorInternal(filename, include, e.Message);
} catch (Exception e) {
database = null;
HostCallback.ShowError("Error loading code-completion information for " + include + " from " + filename, e);
} finally {
AppDomain.Unload(domain);
}
if (database == null) {
LoggingService.Debug("AppDomain finished but returned null...");
return null;
} else {
LoggingService.Debug("AppDomain finished, loading cache...");
try {
return persistence.LoadProjectContent(database);
} finally {
if (tempPersistence) {
try {
File.Delete(database);
} catch {}
}
}
}
}
ReflectionProjectContent mscorlibContent;
public void RunLocked(ThreadStart method)
{ {
lock (contents) { lock (contents) {
method(); method();
} }
} }
public static IProjectContent Mscorlib { public virtual IProjectContent Mscorlib {
get { get {
if (mscorlibContent != null) return mscorlibContent; if (mscorlibContent != null) return mscorlibContent;
lock (contents) { lock (contents) {
@ -40,47 +144,49 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
int time = LoggingService.IsDebugEnabled ? Environment.TickCount : 0; int time = LoggingService.IsDebugEnabled ? Environment.TickCount : 0;
LoggingService.Debug("Loading PC for mscorlib..."); LoggingService.Debug("Loading PC for mscorlib...");
mscorlibContent = DomPersistence.LoadProjectContentByAssemblyName(MscorlibAssembly.FullName); if (persistence != null) {
mscorlibContent = persistence.LoadProjectContentByAssemblyName(MscorlibAssembly.FullName);
if (mscorlibContent != null) {
if (time != 0) {
LoggingService.Debug("Loaded mscorlib from cache in " + (Environment.TickCount - time) + " ms");
}
}
}
if (mscorlibContent == null) { if (mscorlibContent == null) {
mscorlibContent = new ReflectionProjectContent(MscorlibAssembly); // TODO: switch back to reflection for mscorlib
//mscorlibContent = CecilReader.LoadAssembly(MscorlibAssembly.Location); // We're using Cecil now for everything to find bugs in CecilReader faster
mscorlibContent = CecilReader.LoadAssembly(MscorlibAssembly.Location, this);
//mscorlibContent = new ReflectionProjectContent(MscorlibAssembly);
if (time != 0) { if (time != 0) {
LoggingService.Debug("Loaded mscorlib with Reflection in " + (Environment.TickCount - time) + " ms"); LoggingService.Debug("Loaded mscorlib with Cecil in " + (Environment.TickCount - time) + " ms");
//LoggingService.Debug("Loaded mscorlib with Reflection in " + (Environment.TickCount - time) + " ms");
} }
DomPersistence.SaveProjectContent(mscorlibContent); if (persistence != null) {
LoggingService.Debug("Saved mscorlib to cache"); persistence.SaveProjectContent(mscorlibContent);
} else { LoggingService.Debug("Saved mscorlib to cache");
if (time != 0) {
LoggingService.Debug("Loaded mscorlib from cache in " + (Environment.TickCount - time) + " ms");
} }
} }
contents["mscorlib"] = mscorlibContent; contents["mscorlib"] = mscorlibContent;
contents[mscorlibContent.AssemblyFullName] = mscorlibContent;
contents[mscorlibContent.AssemblyLocation] = mscorlibContent;
return mscorlibContent; return mscorlibContent;
} }
} }
} }
public static ICollection<IProjectContent> GetLoadedProjectContents() public virtual ICollection<IProjectContent> GetLoadedProjectContents()
{ {
lock (contents) { // we need to return a copy because we have to lock lock (contents) { // we need to return a copy because we have to lock
return new List<IProjectContent>(contents.Values); return new List<IProjectContent>(contents.Values);
} }
} }
public static IProjectContent GetExistingProjectContent(AssemblyName assembly) public IProjectContent GetExistingProjectContent(AssemblyName assembly)
{ {
lock (contents) { return GetExistingProjectContent(assembly.FullName, assembly.FullName);
if (contents.ContainsKey(assembly.FullName)) {
return contents[assembly.FullName];
}
if (contents.ContainsKey(assembly.Name)) {
return contents[assembly.Name];
}
return null;
}
} }
public static IProjectContent GetExistingProjectContentForReference(string itemInclude, string itemFileName) public virtual IProjectContent GetExistingProjectContent(string itemInclude, string itemFileName)
{ {
lock (contents) { lock (contents) {
if (contents.ContainsKey(itemFileName)) { if (contents.ContainsKey(itemFileName)) {
@ -93,7 +199,7 @@ namespace ICSharpCode.SharpDevelop.Dom
return null; return null;
} }
public static IProjectContent GetProjectContentForReference(string itemInclude, string itemFileName) public virtual IProjectContent GetProjectContentForReference(string itemInclude, string itemFileName)
{ {
lock (contents) { lock (contents) {
if (contents.ContainsKey(itemFileName)) { if (contents.ContainsKey(itemFileName)) {
@ -103,7 +209,6 @@ namespace ICSharpCode.SharpDevelop.Dom
return contents[itemInclude]; return contents[itemInclude];
} }
LoggingService.Debug("Loading PC for " + itemInclude); LoggingService.Debug("Loading PC for " + itemInclude);
string shortName = itemInclude; string shortName = itemInclude;
@ -115,56 +220,67 @@ namespace ICSharpCode.SharpDevelop.Dom
#if DEBUG #if DEBUG
int time = Environment.TickCount; int time = Environment.TickCount;
#endif #endif
try {
Assembly assembly = GetDefaultAssembly(shortName);
ReflectionProjectContent pc;
if (assembly != null) {
pc = DomPersistence.LoadProjectContentByAssemblyName(assembly.FullName);
if (pc == null) {
pc = new ReflectionProjectContent(assembly);
DomPersistence.SaveProjectContent(pc);
}
} else {
//pc = LoadProjectContent(itemFileName, itemInclude);
// find real file name for cecil: IProjectContent pc = null;
if (File.Exists(itemFileName)) { try {
pc = CecilReader.LoadAssembly(itemFileName); pc = LoadProjectContent(itemInclude, itemFileName);
} else {
pc = null;
AssemblyName asmName = GacInterop.FindBestMatchingAssemblyName(itemInclude);
if (asmName != null) {
string subPath = Path.Combine(asmName.Name, GetVersion__Token(asmName));
subPath = Path.Combine(subPath, asmName.Name + ".dll");
foreach (string dir in Directory.GetDirectories(GacInterop.GacRootPath, "GAC*")) {
itemFileName = Path.Combine(dir, subPath);
if (File.Exists(itemFileName)) {
pc = CecilReader.LoadAssembly(itemFileName);
break;
}
}
}
if (pc == null) {
HostCallback.ShowAssemblyLoadErrorInternal("?", itemInclude, "Could not find assembly file.");
}
}
}
if (pc != null) {
contents[itemInclude] = pc;
contents[shortName] = pc;
contents[pc.AssemblyFullName] = pc;
}
return pc;
} catch (Exception ex) { } catch (Exception ex) {
HostCallback.ShowAssemblyLoadErrorInternal(itemFileName, itemInclude, "Error loading assembly:\n" + ex.ToString()); HostCallback.ShowAssemblyLoadErrorInternal(itemFileName, itemInclude, "Error loading assembly:\n" + ex.ToString());
return null;
} finally { } finally {
#if DEBUG #if DEBUG
LoggingService.Debug(string.Format("Loaded {0} in {1}ms", itemInclude, Environment.TickCount - time)); LoggingService.Debug(string.Format("Loaded {0} in {1}ms", itemInclude, Environment.TickCount - time));
#endif #endif
HostCallback.FinishAssemblyLoad(); HostCallback.FinishAssemblyLoad();
} }
if (pc != null) {
contents[itemInclude] = pc;
contents[itemFileName] = pc;
}
return pc;
}
}
protected virtual IProjectContent LoadProjectContent(string itemInclude, string itemFileName)
{
string shortName = itemInclude;
int pos = shortName.IndexOf(',');
if (pos > 0)
shortName = shortName.Substring(0, pos);
Assembly assembly = GetDefaultAssembly(shortName);
ReflectionProjectContent pc = null;
if (assembly != null) {
if (persistence != null) {
pc = persistence.LoadProjectContentByAssemblyName(assembly.FullName);
}
if (pc == null) {
pc = new ReflectionProjectContent(assembly, this);
persistence.SaveProjectContent(pc);
}
} else {
// find real file name for cecil:
if (File.Exists(itemFileName)) {
pc = CecilReader.LoadAssembly(itemFileName, this);
} else {
AssemblyName asmName = GacInterop.FindBestMatchingAssemblyName(itemInclude);
if (asmName != null) {
string subPath = Path.Combine(asmName.Name, GetVersion__Token(asmName));
subPath = Path.Combine(subPath, asmName.Name + ".dll");
foreach (string dir in Directory.GetDirectories(GacInterop.GacRootPath, "GAC*")) {
itemFileName = Path.Combine(dir, subPath);
if (File.Exists(itemFileName)) {
pc = CecilReader.LoadAssembly(itemFileName, this);
break;
}
}
}
if (pc == null) {
HostCallback.ShowAssemblyLoadErrorInternal("?", itemInclude, "Could not find assembly file.");
}
}
} }
return pc;
} }
static string GetVersion__Token(AssemblyName asmName) static string GetVersion__Token(AssemblyName asmName)
@ -177,46 +293,6 @@ namespace ICSharpCode.SharpDevelop.Dom
return b.ToString(); return b.ToString();
} }
/// <summary>
/// Load a project content using Reflection in a separate AppDomain.
/// </summary>
static ReflectionProjectContent LoadProjectContent(string filename, string include)
{
ReflectionProjectContent pc = DomPersistence.LoadProjectContentByAssemblyName(filename);
if (pc != null) {
return pc;
}
pc = DomPersistence.LoadProjectContentByAssemblyName(include);
if (pc != null) {
return pc;
}
AppDomainSetup setup = new AppDomainSetup();
setup.DisallowCodeDownload = true;
setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
AppDomain domain = AppDomain.CreateDomain("AssemblyLoadingDomain", AppDomain.CurrentDomain.Evidence, setup);
string database;
try {
object o = domain.CreateInstanceAndUnwrap(typeof(ReflectionLoader).Assembly.FullName, typeof(ReflectionLoader).FullName);
ReflectionLoader loader = (ReflectionLoader)o;
database = loader.LoadAndCreateDatabase(filename, include);
} catch (FileLoadException e) {
database = null;
HostCallback.ShowAssemblyLoadErrorInternal(filename, include, e.Message);
} catch (Exception e) {
database = null;
HostCallback.ShowError("Error loading code-completion information for " + include + " from " + filename, e);
} finally {
AppDomain.Unload(domain);
}
if (database == null) {
LoggingService.Debug("AppDomain finished but returned null...");
return null;
} else {
LoggingService.Debug("AppDomain finished, loading cache...");
return DomPersistence.LoadProjectContent(database);
}
}
public static Assembly MscorlibAssembly { public static Assembly MscorlibAssembly {
get { get {
return typeof(object).Assembly; return typeof(object).Assembly;
@ -231,19 +307,19 @@ namespace ICSharpCode.SharpDevelop.Dom
static Assembly GetDefaultAssembly(string shortName) static Assembly GetDefaultAssembly(string shortName)
{ {
return null; // TODO: remove this line when CecilReader was tested enough and we can use Reflection again for the BCL
// These assemblies are already loaded by SharpDevelop, so we don't need to load // These assemblies are already loaded by SharpDevelop, so we don't need to load
// them in a separate AppDomain. // them in a separate AppDomain.
switch (shortName) { switch (shortName) {
case "System": // System != mscorlib !!! case "System": // System != mscorlib !!!
return SystemAssembly; return SystemAssembly;
/*case "System.Data": case "System.Data":
case "System.Design": case "System.Design":
case "System.Drawing": case "System.Drawing":
case "System.Web.Services": case "System.Web.Services":
case "System.Windows.Forms": case "System.Windows.Forms":
case "Microsoft.Build.Engine": return Assembly.Load(shortName);
case "Microsoft.Build.Framework":
return Assembly.Load(shortName);*/
case "System.Xml": case "System.Xml":
case "System.XML": case "System.XML":
return typeof(XmlReader).Assembly; return typeof(XmlReader).Assembly;
@ -251,20 +327,5 @@ namespace ICSharpCode.SharpDevelop.Dom
return null; return null;
} }
} }
public static Assembly LoadGacAssembly(string partialName, bool reflectionOnly)
{
if (reflectionOnly) {
AssemblyName name = GacInterop.FindBestMatchingAssemblyName(partialName);
if (name == null)
return null;
return Assembly.ReflectionOnlyLoad(name.FullName);
} else {
#pragma warning disable 618
return Assembly.LoadWithPartialName(partialName);
#pragma warning restore 618
}
}
} }
} }

70
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ReflectionProjectContent.cs

@ -23,6 +23,7 @@ namespace ICSharpCode.SharpDevelop.Dom
AssemblyName[] referencedAssemblies; AssemblyName[] referencedAssemblies;
ICompilationUnit assemblyCompilationUnit; ICompilationUnit assemblyCompilationUnit;
string assemblyLocation; string assemblyLocation;
ProjectContentRegistry registry;
public string AssemblyLocation { public string AssemblyLocation {
get { get {
@ -30,21 +31,6 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
} }
/*
public bool IsGacAssembly {
get {
return assemblyLocation == typeof(object).Assembly.Location
|| FileUtility.IsBaseDirectory(GacRootPath, assemblyLocation);
}
}
public static string GacRootPath {
get {
return MSjogren.GacTool.FusionNative.Fusion.GacRootPath;
}
}
*/
public string AssemblyFullName { public string AssemblyFullName {
get { get {
return assemblyFullName; return assemblyFullName;
@ -63,13 +49,13 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
} }
public ReflectionProjectContent(Assembly assembly) public ReflectionProjectContent(Assembly assembly, ProjectContentRegistry registry)
: this(assembly, assembly.Location) : this(assembly, assembly.Location, registry)
{ {
} }
public ReflectionProjectContent(Assembly assembly, string assemblyLocation) public ReflectionProjectContent(Assembly assembly, string assemblyLocation, ProjectContentRegistry registry)
: this(assembly.FullName, assemblyLocation, assembly.GetReferencedAssemblies()) : this(assembly.FullName, assemblyLocation, assembly.GetReferencedAssemblies(), registry)
{ {
foreach (Type type in assembly.GetExportedTypes()) { foreach (Type type in assembly.GetExportedTypes()) {
string name = type.FullName; string name = type.FullName;
@ -80,8 +66,16 @@ namespace ICSharpCode.SharpDevelop.Dom
InitializeSpecialClasses(); InitializeSpecialClasses();
} }
public ReflectionProjectContent(string assemblyFullName, string assemblyLocation, AssemblyName[] referencedAssemblies) public ReflectionProjectContent(string assemblyFullName, string assemblyLocation, AssemblyName[] referencedAssemblies, ProjectContentRegistry registry)
{ {
if (assemblyFullName == null)
throw new ArgumentNullException("assemblyFullName");
if (assemblyLocation == null)
throw new ArgumentNullException("assemblyLocation");
if (registry == null)
throw new ArgumentNullException("registry");
this.registry = registry;
this.assemblyFullName = assemblyFullName; this.assemblyFullName = assemblyFullName;
this.referencedAssemblies = referencedAssemblies; this.referencedAssemblies = referencedAssemblies;
this.assemblyLocation = assemblyLocation; this.assemblyLocation = assemblyLocation;
@ -94,8 +88,8 @@ namespace ICSharpCode.SharpDevelop.Dom
fileName = LookupLocalizedXmlDoc(Path.Combine(runtimeDirectory, Path.GetFileName(assemblyLocation))); fileName = LookupLocalizedXmlDoc(Path.Combine(runtimeDirectory, Path.GetFileName(assemblyLocation)));
} }
if (fileName != null) { if (fileName != null && registry.persistence != null) {
this.XmlDoc = XmlDoc.Load(fileName); this.XmlDoc = XmlDoc.Load(fileName, Path.Combine(registry.persistence.CacheDirectory, "XmlDoc"));
} }
} }
@ -107,7 +101,7 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
bool initialized = false; bool initialized = false;
ArrayList missingNames; List<AssemblyName> missingNames;
public void InitializeReferences() public void InitializeReferences()
{ {
@ -115,7 +109,7 @@ namespace ICSharpCode.SharpDevelop.Dom
if (initialized) { if (initialized) {
if (missingNames != null) { if (missingNames != null) {
for (int i = 0; i < missingNames.Count; i++) { for (int i = 0; i < missingNames.Count; i++) {
IProjectContent content = ProjectContentRegistry.GetExistingProjectContent((AssemblyName)missingNames[i]); IProjectContent content = registry.GetExistingProjectContent(missingNames[i]);
if (content != null) { if (content != null) {
changed = true; changed = true;
lock (ReferencedContents) { lock (ReferencedContents) {
@ -128,22 +122,20 @@ namespace ICSharpCode.SharpDevelop.Dom
missingNames = null; missingNames = null;
} }
} }
if (changed) } else {
OnReferencedContentsChanged(EventArgs.Empty); initialized = true;
return; foreach (AssemblyName name in referencedAssemblies) {
} IProjectContent content = registry.GetExistingProjectContent(name);
initialized = true; if (content != null) {
foreach (AssemblyName name in referencedAssemblies) { changed = true;
IProjectContent content = ProjectContentRegistry.GetExistingProjectContent(name); lock (ReferencedContents) {
if (content != null) { ReferencedContents.Add(content);
changed = true; }
lock (ReferencedContents) { } else {
ReferencedContents.Add(content); if (missingNames == null)
missingNames = new List<AssemblyName>();
missingNames.Add(name);
} }
} else {
if (missingNames == null)
missingNames = new ArrayList();
missingNames.Add(name);
} }
} }
if (changed) if (changed)

83
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ReflectionLayer/DomPersistence.cs

@ -16,32 +16,35 @@ namespace ICSharpCode.SharpDevelop.Dom
/// <summary> /// <summary>
/// This class can write Dom entity into a binary file for fast loading. /// This class can write Dom entity into a binary file for fast loading.
/// </summary> /// </summary>
public static class DomPersistence public sealed class DomPersistence
{ {
public const long FileMagic = 0x11635233ED2F428C; public const long FileMagic = 0x11635233ED2F428C;
public const long IndexFileMagic = 0x11635233ED2F427D; public const long IndexFileMagic = 0x11635233ED2F427D;
public const short FileVersion = 6; public const short FileVersion = 7;
#region Cache management ProjectContentRegistry registry;
#if DEBUG string cacheDirectory;
const string tempPathName = "SharpDevelop/DomCacheDebug";
#else internal string CacheDirectory {
const string tempPathName = "SharpDevelop/DomCache"; get {
#endif return cacheDirectory;
}
}
static string MakeTempPath() internal DomPersistence(string cacheDirectory, ProjectContentRegistry registry)
{ {
string tempPath = Path.Combine(Path.GetTempPath(), tempPathName); this.cacheDirectory = cacheDirectory;
if (!Directory.Exists(tempPath)) this.registry = registry;
Directory.CreateDirectory(tempPath);
return tempPath; cacheIndex = LoadCacheIndex();
} }
public static string SaveProjectContent(ReflectionProjectContent pc) #region Cache management
public string SaveProjectContent(ReflectionProjectContent pc)
{ {
string assemblyFullName = pc.AssemblyFullName; string assemblyFullName = pc.AssemblyFullName;
int pos = assemblyFullName.IndexOf(','); int pos = assemblyFullName.IndexOf(',');
string fileName = Path.Combine(MakeTempPath(), string fileName = Path.Combine(cacheDirectory,
assemblyFullName.Substring(0, pos) assemblyFullName.Substring(0, pos)
+ "." + assemblyFullName.GetHashCode().ToString("x", CultureInfo.InvariantCulture) + "." + assemblyFullName.GetHashCode().ToString("x", CultureInfo.InvariantCulture)
+ "." + pc.AssemblyLocation.GetHashCode().ToString("x", CultureInfo.InvariantCulture) + "." + pc.AssemblyLocation.GetHashCode().ToString("x", CultureInfo.InvariantCulture)
@ -53,11 +56,11 @@ namespace ICSharpCode.SharpDevelop.Dom
return fileName; return fileName;
} }
public static ReflectionProjectContent LoadProjectContentByAssemblyName(string assemblyName) public ReflectionProjectContent LoadProjectContentByAssemblyName(string assemblyName)
{ {
string cacheFileName; string cacheFileName;
if (CacheIndex.TryGetValue(assemblyName, out cacheFileName)) { if (CacheIndex.TryGetValue(assemblyName, out cacheFileName)) {
cacheFileName = Path.Combine(MakeTempPath(), cacheFileName); cacheFileName = Path.Combine(cacheDirectory, cacheFileName);
if (File.Exists(cacheFileName)) { if (File.Exists(cacheFileName)) {
return LoadProjectContent(cacheFileName); return LoadProjectContent(cacheFileName);
} }
@ -65,7 +68,7 @@ namespace ICSharpCode.SharpDevelop.Dom
return null; return null;
} }
public static ReflectionProjectContent LoadProjectContent(string cacheFileName) public ReflectionProjectContent LoadProjectContent(string cacheFileName)
{ {
using (FileStream fs = new FileStream(cacheFileName, FileMode.Open, FileAccess.Read)) { using (FileStream fs = new FileStream(cacheFileName, FileMode.Open, FileAccess.Read)) {
return LoadProjectContent(fs); return LoadProjectContent(fs);
@ -74,20 +77,17 @@ namespace ICSharpCode.SharpDevelop.Dom
#endregion #endregion
#region Cache index #region Cache index
static string GetIndexFileName() { return Path.Combine(MakeTempPath(), "index.dat"); } string GetIndexFileName() { return Path.Combine(cacheDirectory, "index.dat"); }
static Dictionary<string, string> cacheIndex; Dictionary<string, string> cacheIndex;
static Dictionary<string, string> CacheIndex { Dictionary<string, string> CacheIndex {
get { get {
if (cacheIndex == null) {
cacheIndex = LoadCacheIndex();
}
return cacheIndex; return cacheIndex;
} }
} }
static Dictionary<string, string> LoadCacheIndex() Dictionary<string, string> LoadCacheIndex()
{ {
string indexFile = GetIndexFileName(); string indexFile = GetIndexFileName();
Dictionary<string, string> list = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase); Dictionary<string, string> list = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
@ -117,7 +117,7 @@ namespace ICSharpCode.SharpDevelop.Dom
return list; return list;
} }
static void SaveCacheIndex(Dictionary<string, string> cacheIndex) void SaveCacheIndex(Dictionary<string, string> cacheIndex)
{ {
string indexFile = GetIndexFileName(); string indexFile = GetIndexFileName();
using (FileStream fs = new FileStream(indexFile, FileMode.Create, FileAccess.Write)) { using (FileStream fs = new FileStream(indexFile, FileMode.Create, FileAccess.Write)) {
@ -133,7 +133,7 @@ namespace ICSharpCode.SharpDevelop.Dom
} }
} }
static void AddFileNameToCacheIndex(string cacheFile, ReflectionProjectContent pc) void AddFileNameToCacheIndex(string cacheFile, ReflectionProjectContent pc)
{ {
Dictionary<string, string> l = LoadCacheIndex(); Dictionary<string, string> l = LoadCacheIndex();
l[pc.AssemblyLocation] = cacheFile; l[pc.AssemblyLocation] = cacheFile;
@ -166,20 +166,25 @@ namespace ICSharpCode.SharpDevelop.Dom
/// <summary> /// <summary>
/// Load a project content from a stream. /// Load a project content from a stream.
/// </summary> /// </summary>
public static ReflectionProjectContent LoadProjectContent(Stream stream) public ReflectionProjectContent LoadProjectContent(Stream stream)
{
return LoadProjectContent(stream, registry);
}
internal static ReflectionProjectContent LoadProjectContent(Stream stream, ProjectContentRegistry registry)
{ {
ReflectionProjectContent pc; ReflectionProjectContent pc;
BinaryReader reader = new BinaryReader(stream); BinaryReader reader = new BinaryReader(stream);
try { try {
pc = new ReadWriteHelper(reader).ReadProjectContent(); pc = new ReadWriteHelper(reader).ReadProjectContent(registry);
if (pc != null) { if (pc != null) {
pc.InitializeSpecialClasses(); pc.InitializeSpecialClasses();
}
return pc;
} catch (EndOfStreamException) {
LoggingService.Warn("Read dom: EndOfStreamException");
return null;
} }
return pc;
} catch (EndOfStreamException) {
LoggingService.Warn("Read dom: EndOfStreamException");
return null;
}
// do not close the stream // do not close the stream
} }
#endregion #endregion
@ -254,7 +259,7 @@ namespace ICSharpCode.SharpDevelop.Dom
this.reader = reader; this.reader = reader;
} }
public ReflectionProjectContent ReadProjectContent() public ReflectionProjectContent ReadProjectContent(ProjectContentRegistry registry)
{ {
if (reader.ReadInt64() != FileMagic) { if (reader.ReadInt64() != FileMagic) {
LoggingService.Warn("Read dom: wrong magic"); LoggingService.Warn("Read dom: wrong magic");
@ -278,7 +283,7 @@ namespace ICSharpCode.SharpDevelop.Dom
for (int i = 0; i < referencedAssemblies.Length; i++) { for (int i = 0; i < referencedAssemblies.Length; i++) {
referencedAssemblies[i] = new AssemblyName(reader.ReadString()); referencedAssemblies[i] = new AssemblyName(reader.ReadString());
} }
this.pc = new ReflectionProjectContent(assemblyName, assemblyLocation, referencedAssemblies); this.pc = new ReflectionProjectContent(assemblyName, assemblyLocation, referencedAssemblies, registry);
if (ReadClasses()) { if (ReadClasses()) {
return pc; return pc;
} else { } else {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save