Browse Source

Add some documentation about the addin system.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@411 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
7b8bfb211b
  1. 2
      data/templates/file/Misc/EmptyMsBuildFile.xft
  2. BIN
      doc/technotes/AddInBuildingGuide.sxw
  3. BIN
      doc/technotes/AddInTree.sxw
  4. 2
      doc/technotes/sxw-readme.txt
  5. 4
      src/AddIns/Misc/MbUnitPad/Project/Src/MbUnitPad.cs
  6. 5
      src/Main/Core/Project/ICSharpCode.Core.csproj
  7. 9
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ClassDoozer.cs
  8. 12
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/FileFilterDoozer.cs
  9. 19
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Icon/IconDoozer.cs
  10. 15
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs
  11. 1
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/LazyDoozer.cs
  12. 27
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/MenuItem/MenuItemDoozer.cs
  13. 25
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/ToolBarItemDoozer.cs
  14. 5
      src/Main/Core/Project/Src/CoreException.cs
  15. 2
      src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs

2
data/templates/file/Misc/EmptyMsBuildFile.xft

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
defaultname = "Build${Number}.proj"
language = "XML"/>
<Description>${res:Templates.File.Xml.EmptyXmlFile.Description}</Description>
<Description>${res:Templates.File.MsBuild.Description}</Description>
<Files>
<File name="${FullName}" language="XML"><![CDATA[<?xml version="1.0"?>

BIN
doc/technotes/AddInBuildingGuide.sxw

Binary file not shown.

BIN
doc/technotes/AddInTree.sxw

Binary file not shown.

2
doc/technotes/sxw-readme.txt

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
.sxw files can be read and edited with OpenOffice:
http://www.openoffice.org/

4
src/AddIns/Misc/MbUnitPad/Project/Src/MbUnitPad.cs

@ -103,8 +103,8 @@ namespace ICSharpCode.MbUnitPad @@ -103,8 +103,8 @@ namespace ICSharpCode.MbUnitPad
if (include.Substring(include.Length - 4).Equals(".dll", StringComparison.OrdinalIgnoreCase))
include = include.Substring(0, include.Length - 4);
}
if (string.Equals(include, "nunit.framework", StringComparison.InvariantCultureIgnoreCase)
|| string.Equals(include, "mbunit.framework", StringComparison.InvariantCultureIgnoreCase))
if (string.Equals(include, "nunit.framework", StringComparison.OrdinalIgnoreCase)
|| string.Equals(include, "mbunit.framework", StringComparison.OrdinalIgnoreCase))
{
referenceFound = true;
break;

5
src/Main/Core/Project/ICSharpCode.Core.csproj

@ -17,6 +17,9 @@ @@ -17,6 +17,9 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<Optimize>False</Optimize>
<DebugType>Full</DebugType>
<DocumentationFile>..\..\..\..\bin\ICSharpCode.Core.xml</DocumentationFile>
<NoWarn>1591</NoWarn>
<DefineConstants>DEBUG</DefineConstants>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<OutputPath>..\..\..\..\bin\</OutputPath>
@ -138,4 +141,4 @@ @@ -138,4 +141,4 @@
<Folder Include="Src\Services\LoggingService" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project>
</Project>

9
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ClassDoozer.cs

@ -11,8 +11,15 @@ using System.Collections; @@ -11,8 +11,15 @@ using System.Collections;
namespace ICSharpCode.Core
{
/// <summary>
/// Builds an object using Reflection. The class name is specified in the addin tree.
/// Creates object instances by invocing a type's parameterless constructor
/// via System.Reflection.
/// </summary>
/// <attribute name="class">
/// The fully qualified type name of the attribute to create.
/// </attribute>
/// <returns>
/// Any kind of object.
/// </returns>
public class ClassDoozer : IDoozer
{
/// <summary>

12
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/FileFilterDoozer.cs

@ -10,6 +10,18 @@ using System.Collections; @@ -10,6 +10,18 @@ using System.Collections;
namespace ICSharpCode.Core
{
/// <summary>
/// Creates file filter entries for OpenFileDialogs or SaveFileDialogs.
/// </summary>
/// <attribute name="name">
/// The name of the file filter entry.
/// </attribute>
/// <attribute name="extensions">
/// The extensions associated with this file filter entry.
/// </attribute>
/// <returns>
/// String in the format "name|extensions".
/// </returns>
public class FileFilterDoozer : IDoozer
{
/// <summary>

19
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Icon/IconDoozer.cs

@ -12,6 +12,25 @@ using System.Windows.Forms; @@ -12,6 +12,25 @@ using System.Windows.Forms;
namespace ICSharpCode.Core
{
/// <summary>
/// Creates associations between file types or node types in the project browser and
/// icons in the resource service.
/// </summary>
/// <attribute name="resource">
/// This attribute must be specified. It is the name of a bitmap resource
/// in the resource service.
/// </attribute>
/// <attribute name="language">
/// This attribute is specified when a project icon association should be created.
/// It specifies the language of the project types that use the icon.
/// </attribute>
/// <attribute name="extensions">
/// This attribute is specified when a file icon association should be created.
/// It specifies the semicolon-separated list of file types that use the icon.
/// </attribute>
/// <returns>
/// An IconDescriptor object that exposes the attributes.
/// </returns>
public class IconDoozer : IDoozer
{
/// <summary>

15
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/IncludeDoozer.cs

@ -11,8 +11,21 @@ using System.Collections; @@ -11,8 +11,21 @@ using System.Collections;
namespace ICSharpCode.Core
{
/// <summary>
/// Includes the content of one path into another path.
/// Builds one or multiple items from another location in the addin tree.
/// This doozer can use the "item" OR the "path" attribute.
/// </summary>
/// <attribute name="item">
/// When this attribute is used, the include doozer builds the item that is at the
/// addin tree location specified by this attribute.
/// </attribute>
/// <attribute name="path">
/// When this attribute is used, the include doozer builds all items inside the
/// path addin tree location specified by this attribute and returns an
/// <see cref="IBuildItemsModifier"/> which includes all items in the output list.
/// </attribute>
/// <returns>
/// Any object, depending on the included codon(s).
/// </returns>
public class IncludeDoozer : IDoozer
{
/// <summary>

1
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/LazyDoozer.cs

@ -12,6 +12,7 @@ namespace ICSharpCode.Core @@ -12,6 +12,7 @@ namespace ICSharpCode.Core
{
/// <summary>
/// This doozer lazy-loads another doozer when it has to build an item.
/// It is used internally to wrap doozers specified in addins.
/// </summary>
public class LazyLoadDoozer : IDoozer
{

27
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/MenuItem/MenuItemDoozer.cs

@ -11,6 +11,32 @@ using System.Collections; @@ -11,6 +11,32 @@ using System.Collections;
namespace ICSharpCode.Core
{
/// <summary>
/// Creates menu items from a location in the addin tree.
/// </summary>
/// <attribute name="type">
/// This attribute must be specified and one of these values:
/// Separator, CheckBox, Item=Command, Menu (=with subitems),
/// Builder (=class implementing ISubmenuBuilder)
/// </attribute>
/// <attribute name="loadclasslazy">
/// Only for the type "Item"/"Command".
/// When set to false, the command class is loaded
/// immediately instead of the usual lazy-loading.
/// </attribute>
/// <attribute name="icon">
/// Icon of the menu item.
/// </attribute>
/// <attribute name="label">
/// Label of the menu item.
/// </attribute>
/// <attribute name="class">
/// Command class that is run when item is clicked.
/// </attribute>
/// <returns>
/// A ToolStrip* object, depending on the type attribute.
/// </returns>
/// <conditions>MenuMode</conditions>
public class MenuItemDoozer : IDoozer
{
/// <summary>
@ -35,7 +61,6 @@ namespace ICSharpCode.Core @@ -35,7 +61,6 @@ namespace ICSharpCode.Core
case "CheckBox":
return new MenuCheckBox(codon, caller);
case "Item":
return new MenuCommand(codon, caller, createCommand);
case "Command":
return new MenuCommand(codon, caller, createCommand);
case "Menu":

25
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/ToolBarItemDoozer.cs

@ -11,6 +11,31 @@ using System.Collections; @@ -11,6 +11,31 @@ using System.Collections;
namespace ICSharpCode.Core
{
/// <summary>
/// Creates tool bar items from a location in the addin tree.
/// </summary>
/// <attribute name="type">
/// This attribute must be specified and one of these values:
/// Separator, CheckBox, Item, ComboBox, DropDownButton
/// </attribute>
/// <attribute name="loadclasslazy">
/// Only for the type "Item". When set to false, the command class is loaded
/// immediately instead of the usual lazy-loading.
/// </attribute>
/// <attribute name="icon">
/// Icon of the tool bar item.
/// </attribute>
/// <attribute name="tooltip">
/// Tooltip of the tool bar item.
/// </attribute>
/// <attribute name="class">
/// Command class that is run when item is clicked; or class that manages
/// the ComboBox/DropDownButton.
/// </attribute>
/// <returns>
/// A ToolStrip* object, depending on the type attribute.
/// </returns>
/// <conditions>MenuMode</conditions>
public class ToolbarItemDoozer : IDoozer
{
/// <summary>

5
src/Main/Core/Project/Src/CoreException.cs

@ -10,26 +10,21 @@ using System.Runtime.Serialization; @@ -10,26 +10,21 @@ using System.Runtime.Serialization;
namespace ICSharpCode.Core
{
/// <include file='ICSharpCode.Core.doc' path='Documentation/Type[@name="ICSharpCode.Core.CoreException"]/Description/*' />
[Serializable()]
public class CoreException : ApplicationException
{
/// <include file='ICSharpCode.Core.doc' path='Documentation/Type[@name="ICSharpCode.Core.CoreException"]/Member[@name="#ctor()"]/*' />
public CoreException() : base()
{
}
/// <include file='ICSharpCode.Core.doc' path='Documentation/Type[@name="ICSharpCode.Core.CoreException"]/Member[@name="#ctor(String)"]/*' />
public CoreException(string message) : base(message)
{
}
/// <include file='ICSharpCode.Core.doc' path='Documentation/Type[@name="ICSharpCode.Core.CoreException"]/Member[@name="#ctor(String, Exception)"]/*' />
public CoreException(string message, Exception innerException) : base(message, innerException)
{
}
/// <include file='ICSharpCode.Core.doc' path='Documentation/Type[@name="ICSharpCode.Core.CoreException"]/Member[@name="#ctor(SerializationInfo, StreamingContext)"]/*' />
protected CoreException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}

2
src/Main/Core/Project/Src/Services/FileUtility/FileUtility.cs

@ -248,7 +248,7 @@ namespace ICSharpCode.Core @@ -248,7 +248,7 @@ namespace ICSharpCode.Core
/// Finds all files which are valid to the mask <paramref name="filemask"/> in the path
/// <paramref name="directory"/> and all subdirectories
/// (if <paramref name="searchSubdirectories"/> is true).
/// The found files are added to the List<string>
/// The found files are added to the List&lt;string&gt;
/// <paramref name="collection"/>.
/// If <paramref name="ignoreHidden"/> is true, hidden files and folders are ignored.
/// </summary>

Loading…
Cancel
Save