Browse Source

Simplify LanguageBindingDoozer (remove LanguageBindingDescriptor) and update DoozerList/ConditionList.

pull/14/head
Daniel Grunwald 15 years ago
parent
commit
7b8e65a2d3
  1. 523
      data/schemas/AddIn.xsd
  2. 39
      doc/technotes/ConditionList.html
  3. 290
      doc/technotes/DoozerList.html
  4. 1
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  5. 62
      src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDescriptor.cs
  6. 27
      src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs
  7. 20
      src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingService.cs
  8. 24
      src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.csproj
  9. 6
      src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.sln
  10. 31
      src/Tools/BuildAddinDocumentation/MainClass.cs

523
data/schemas/AddIn.xsd

@ -117,23 +117,22 @@
<xs:element ref="CustomProperty" /> <xs:element ref="CustomProperty" />
<xs:element ref="CustomTool" /> <xs:element ref="CustomTool" />
<xs:element ref="Debugger" /> <xs:element ref="Debugger" />
<xs:element ref="DialogPanel" />
<xs:element ref="Directory" /> <xs:element ref="Directory" />
<xs:element ref="DisplayBinding" /> <xs:element ref="DisplayBinding" />
<xs:element ref="EditAction" />
<xs:element ref="FileFilter" /> <xs:element ref="FileFilter" />
<xs:element ref="Icon" /> <xs:element ref="Icon" />
<xs:element ref="Include" /> <xs:element ref="Include" />
<xs:element ref="ProjectBinding" />
<xs:element ref="LanguageBinding" /> <xs:element ref="LanguageBinding" />
<xs:element ref="MenuItem" /> <xs:element ref="MenuItem" />
<xs:element ref="OptionPanel" />
<xs:element ref="Pad" /> <xs:element ref="Pad" />
<xs:element ref="Parser" /> <xs:element ref="Parser" />
<xs:element ref="ProjectBinding" />
<xs:element ref="ProjectContentRegistry" /> <xs:element ref="ProjectContentRegistry" />
<xs:element ref="SchemeExtension" /> <xs:element ref="SchemeExtension" />
<xs:element ref="String" /> <xs:element ref="String" />
<xs:element ref="SyntaxMode" />
<xs:element ref="TaskBoundAdditionalLogger" /> <xs:element ref="TaskBoundAdditionalLogger" />
<xs:element ref="TaskBoundLoggerFilter" />
<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" />
@ -188,23 +187,22 @@
<xs:element ref="CustomProperty" /> <xs:element ref="CustomProperty" />
<xs:element ref="CustomTool" /> <xs:element ref="CustomTool" />
<xs:element ref="Debugger" /> <xs:element ref="Debugger" />
<xs:element ref="DialogPanel" />
<xs:element ref="Directory" /> <xs:element ref="Directory" />
<xs:element ref="DisplayBinding" /> <xs:element ref="DisplayBinding" />
<xs:element ref="EditAction" />
<xs:element ref="FileFilter" /> <xs:element ref="FileFilter" />
<xs:element ref="Icon" /> <xs:element ref="Icon" />
<xs:element ref="Include" /> <xs:element ref="Include" />
<xs:element ref="ProjectBinding" />
<xs:element ref="LanguageBinding" /> <xs:element ref="LanguageBinding" />
<xs:element ref="MenuItem" /> <xs:element ref="MenuItem" />
<xs:element ref="OptionPanel" />
<xs:element ref="Pad" /> <xs:element ref="Pad" />
<xs:element ref="Parser" /> <xs:element ref="Parser" />
<xs:element ref="ProjectBinding" />
<xs:element ref="ProjectContentRegistry" /> <xs:element ref="ProjectContentRegistry" />
<xs:element ref="SchemeExtension" /> <xs:element ref="SchemeExtension" />
<xs:element ref="String" /> <xs:element ref="String" />
<xs:element ref="SyntaxMode" />
<xs:element ref="TaskBoundAdditionalLogger" /> <xs:element ref="TaskBoundAdditionalLogger" />
<xs:element ref="TaskBoundLoggerFilter" />
<xs:element ref="ToolbarItem" /> <xs:element ref="ToolbarItem" />
</xs:choice> </xs:choice>
<xs:attribute name="action" use="optional"> <xs:attribute name="action" use="optional">
@ -266,8 +264,8 @@
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The fully qualified type name of the class to create an instace of. The fully qualified type name of the class to create an instace of.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -287,16 +285,16 @@
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the ICodeCompletionBinding class (normally deriving from DefaultCodeCompletionBinding). Name of the ICodeCompletionBinding class (normally deriving from DefaultCodeCompletionBinding).
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="extensions" use="optional" type="xs:string"> <xs:attribute name="extensions" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
List of semicolon-separated entries of the file extensions handled by the binding. List of semicolon-separated entries of the file extensions handled by the binding.
If no extensions attribute is specified, the binding is activated in all files. If no extensions attribute is specified, the binding is activated in all files.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -315,30 +313,30 @@
<xs:attribute name="name" use="required" type="xs:string"> <xs:attribute name="name" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The name of the MSBuild meta data. The name of the MSBuild meta data.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="displayName" use="optional" type="xs:string"> <xs:attribute name="displayName" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The display name of the property. The display name of the property.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="description" use="optional" type="xs:string"> <xs:attribute name="description" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The description text for the property. The description text for the property.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="runCustomTool" use="optional" type="xs:string"> <xs:attribute name="runCustomTool" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Boolean property specifying whether the custom tool should be run when the property value is changed Boolean property specifying whether the custom tool should be run when the property value is changed
by the user. Default: false. by the user. Default: false.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -357,23 +355,23 @@
<xs:attribute name="id" use="required" type="xs:string"> <xs:attribute name="id" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
ID used to identify the custom tool. ID used to identify the custom tool.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the ICustomTool class. Name of the ICustomTool class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="fileNamePattern" use="optional" type="xs:string"> <xs:attribute name="fileNamePattern" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Regular expression that specifies the file names for which the custom tool Regular expression that specifies the file names for which the custom tool
can be used. Example: "\.res(x|ources)$" can be used. Example: "\.res(x|ources)$"
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -392,43 +390,43 @@
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the IDebugger class. Name of the IDebugger class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="supportsStart" use="optional" type="xs:string"> <xs:attribute name="supportsStart" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies if the debugger supports the 'Start' command. Default: true Specifies if the debugger supports the 'Start' command. Default: true
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="supportsStartWithoutDebugger" use="optional" type="xs:string"> <xs:attribute name="supportsStartWithoutDebugger" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies if the debugger supports the 'StartWithoutDebugger' command. Default: true Specifies if the debugger supports the 'StartWithoutDebugger' command. Default: true
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="supportsStop" use="optional" type="xs:string"> <xs:attribute name="supportsStop" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies if the debugger supports the 'Stop' (kill running process) command. Default: true Specifies if the debugger supports the 'Stop' (kill running process) command. Default: true
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="supportsStepping" use="optional" type="xs:string"> <xs:attribute name="supportsStepping" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies if the debugger supports stepping. Default: false Specifies if the debugger supports stepping. Default: false
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="supportsExecutionControl" use="optional" type="xs:string"> <xs:attribute name="supportsExecutionControl" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies if the debugger supports execution control (break, resume). Default: false Specifies if the debugger supports execution control (break, resume). Default: false
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -441,47 +439,14 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="DialogPanel">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="ComplexCondition" />
<xs:element ref="Condition" />
<xs:element ref="DialogPanel" />
<xs:element ref="Include" />
</xs:choice>
<xs:attribute name="class" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the IDialogPanel class. Optional if the page has subpages.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Caption of the dialog panel.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="DialogPanel" type="DialogPanel">
<xs:annotation>
<xs:documentation>
Creates DefaultDialogPanelDescriptor objects that are used in option dialogs.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="Directory"> <xs:complexType name="Directory">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="path" use="required" type="xs:string"> <xs:attribute name="path" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Path relative to the directory which contains the .addin file defining the codon. Path relative to the directory which contains the .addin file defining the codon.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -500,22 +465,22 @@
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the IDisplayBinding or ISecondaryDisplayBinding class. Name of the IDisplayBinding or ISecondaryDisplayBinding class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="title" use="required" type="xs:string"> <xs:attribute name="title" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Title of the display binding to use in the "Open With" dialog. Title of the display binding to use in the "Open With" dialog.
</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:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Type of the display binding (either "Primary" or "Secondary"). Default: "Primary". Type of the display binding (either "Primary" or "Secondary"). Default: "Primary".
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
@ -527,9 +492,9 @@
<xs:attribute name="fileNamePattern" use="optional" type="xs:string"> <xs:attribute name="fileNamePattern" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Regular expression that specifies the file names for which the display binding Regular expression that specifies the file names for which the display binding
will be used. Example: "\.res(x|ources)$" will be used. Example: "\.res(x|ources)$"
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -545,49 +510,21 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="EditAction">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="keys" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Comma-separated list of keyboard shortcuts that activate the edit action.
E.g. "Control|C,Control|Insert"
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the IEditAction class.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="EditAction" type="EditAction">
<xs:annotation>
<xs:documentation>
Creates IEditAction objects for the text editor.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="FileFilter"> <xs:complexType name="FileFilter">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="name" use="required" type="xs:string"> <xs:attribute name="name" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The name of the file filter entry. The name of the file filter entry.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="extensions" use="required" type="xs:string"> <xs:attribute name="extensions" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The extensions associated with this file filter entry. The extensions associated with this file filter entry.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -606,24 +543,24 @@
<xs:attribute name="resource" use="required" type="xs:string"> <xs:attribute name="resource" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The name of a bitmap resource in the resource service. The name of a bitmap resource in the resource service.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="language" use="optional" type="xs:string"> <xs:attribute name="language" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
This attribute is specified when a project icon association should be created. This attribute is specified when a project icon association should be created.
It specifies the language of the project types that use the icon. It specifies the language of the project types that use the icon.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="extensions" use="optional" type="xs:string"> <xs:attribute name="extensions" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
This attribute is specified when a file icon association should be created. 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. It specifies the semicolon-separated list of file types that use the icon.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -643,18 +580,18 @@
<xs:attribute name="item" use="optional" type="xs:string"> <xs:attribute name="item" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
When this attribute is used, the include doozer builds the item that is at the When this attribute is used, the include doozer builds the item that is at the
addin tree location specified by this attribute. addin tree location specified by this attribute.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="path" use="optional" type="xs:string"> <xs:attribute name="path" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
When this attribute is used, the include doozer builds all items inside the When this attribute is used, the include doozer builds all items inside the
path addin tree location specified by this attribute and returns an path addin tree location specified by this attribute and returns an
IBuildItemsModifier which includes all items in the output list. IBuildItemsModifier which includes all items in the output list.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -669,62 +606,21 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="ProjectBinding">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="guid" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Project type GUID of the project used by MsBuild.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="supportedextensions" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo")
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="projectfileextension" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
File extension of project files. (e.g. ".booproj")
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the IProjectBinding class.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="ProjectBinding" type="ProjectBinding">
<xs:annotation>
<xs:documentation>
Creates ProjectBindingDescriptor objects for the project service.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="LanguageBinding"> <xs:complexType name="LanguageBinding">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="extensions" use="required" type="xs:string"> <xs:attribute name="extensions" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Semicolon-separated list of file extensions that are handled by the language binding (e.g. .xaml) Semicolon-separated list of file extensions that are handled by the language binding (e.g. .xaml)
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the ILanguageBinding class. Name of the ILanguageBinding class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -733,7 +629,7 @@
<xs:element name="LanguageBinding" type="LanguageBinding"> <xs:element name="LanguageBinding" type="LanguageBinding">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Creates LanguageBindingDescriptor objects for the language service. Creates LanguageBindingDescriptor objects for the language binding service.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
@ -749,18 +645,18 @@
<xs:attribute name="label" use="required" type="xs:string"> <xs:attribute name="label" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Label of the menu item. Label of the menu 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: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>
</xs:annotation> </xs:annotation>
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
@ -776,39 +672,48 @@
<xs:attribute name="loadclasslazy" use="optional" type="xs:string"> <xs:attribute name="loadclasslazy" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Only for the type "Item"/"Command". Only for the type "Item"/"Command".
When set to false, the command class is loaded 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:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="icon" use="optional" type="xs:string"> <xs:attribute name="icon" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Icon of the menu item. Icon of the menu item.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="class" use="optional" type="xs:string"> <xs:attribute name="class" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Command class that is run when item is clicked. Command class that is run when item is clicked.
</xs:documentation> </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="command" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>
A WPF routed command that is executed when item is clicked.
Currently, this property is supported only for WPF Menus.
Only one of the "class" and "command" attributes can be used on a menu entry.
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="link" use="optional" type="xs:string"> <xs:attribute name="link" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Only for the type "Item"/"Command". Opens a webpage instead of running a command when Only for the type "Item"/"Command". Opens a webpage instead of running a command when
clicking the item. clicking the item.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="shortcut" use="optional" type="xs:string"> <xs:attribute name="shortcut" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Shortcut that activates the command (e.g. "Control|S"). Shortcut that activates the command (e.g. "Control|S").
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -821,49 +726,89 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="OptionPanel">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="ComplexCondition" />
<xs:element ref="Condition" />
<xs:element ref="IOptionPanel" />
<xs:element ref="Include" />
</xs:choice>
<xs:attribute name="class" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the IOptionPanel class. Optional if the page has subpages.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Caption of the dialog panel.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="OptionPanel" type="OptionPanel">
<xs:annotation>
<xs:documentation>
Creates DefaultOptionPanelDescriptor objects that are used in option dialogs.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="Pad"> <xs:complexType name="Pad">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
IPadContent class that is loaded when the pad content is shown for the first time. IPadContent class that is loaded when the pad content is shown for the first time.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="title" use="required" type="xs:string"> <xs:attribute name="title" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Title of the pad that is shown in the user interface. Title of the pad that is shown in the user interface.
Should be a resource string, e.g. "${res:AddIns.HtmlHelp2.Contents}" Should be a resource string, e.g. "${res:AddIns.HtmlHelp2.Contents}"
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="icon" use="optional" type="xs:string"> <xs:attribute name="icon" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies the name of the icon resource used for the pad. Specifies the name of the icon resource used for the pad.
Pad icon resources must be registered with the ResourceService before the Pad icon resources must be registered with the ResourceService before the
workbench is loaded! workbench is loaded!
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="category" use="optional" type="xs:string"> <xs:attribute name="category" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Category of the pad. It is possible to create menu items that automatically Category of the pad. It is possible to create menu items that automatically
contain show commands for all pads in a certain category. contain show commands for all pads in a certain category.
Pads in the category "Main" will show up in the "View" menu, the category Pads in the category "Main" will show up in the "View" menu, the category
"Tools" in the "View -&gt; Tools" menu, the category "Debugger" in the "Tools" in the "View -&gt; Tools" menu, the category "Debugger" in the
"View -&gt; Debugger" menu. "View -&gt; Debugger" menu.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="shortcut" use="optional" type="xs:string"> <xs:attribute name="shortcut" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T"). Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T").
</xs:documentation> </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="defaultPosition" use="optional" type="xs:string">
<xs:annotation>
<xs:documentation>
Default position of the pad, as a ICSharpCode.SharpDevelop.DefaultPadPositions enum value (e.g. "Bottom, Hidden").
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -882,31 +827,65 @@
<xs:attribute name="supportedextensions" use="optional" type="xs:string"> <xs:attribute name="supportedextensions" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Semicolon-separated list of file extensions for which the parser is used. (e.g. ".boo") Semicolon-separated list of file extensions for which the parser is used. (e.g. ".boo")
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="projectfileextension" use="optional" type="xs:string"> <xs:attribute name="class" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
File extension of project files. (e.g. ".booproj") Name of the IParser class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="class" use="optional" type="xs:string"> </xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="Parser" type="Parser">
<xs:annotation>
<xs:documentation>
Creates ParserDescriptor objects for the parsing service.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="ProjectBinding">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="guid" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the IParser class. Project type GUID of the project used by MSBuild.
</xs:documentation> </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="supportedextensions" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo")
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="projectfileextension" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
File extension of project files. (e.g. ".booproj")
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the IProjectBinding class.
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:element name="Parser" type="Parser"> <xs:element name="ProjectBinding" type="ProjectBinding">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Creates ParserDescriptor objects for the parsing service. Creates ProjectBindingDescriptor objects for the project service.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
@ -916,8 +895,8 @@
<xs:attribute name="class" use="optional" type="xs:string"> <xs:attribute name="class" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the ProjectContentRegistry class. Name of the ProjectContentRegistry class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -936,15 +915,15 @@
<xs:attribute name="scheme" use="required" type="xs:string"> <xs:attribute name="scheme" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage') Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage')
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension). Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension).
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -963,8 +942,8 @@
<xs:attribute name="text" use="required" type="xs:string"> <xs:attribute name="text" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The string to return. The string to return.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -977,66 +956,60 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="SyntaxMode"> <xs:complexType name="TaskBoundAdditionalLogger">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="name" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the language for which the syntax mode is used.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="extensions" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Semicolon-separated list of file extensions for which the syntax mode is used. Name of the IMSBuildAdditionalLogger class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="resource" use="required" type="xs:string"> <xs:attribute name="taskname" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Fully qualified name of the resource file. Specifies the name of the MSBuild task that must be running for
</xs:documentation> this logger to be active.
</xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:element name="SyntaxMode" type="SyntaxMode"> <xs:element name="TaskBoundAdditionalLogger" type="TaskBoundAdditionalLogger">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Creates AddInTreeSyntaxMode objects that wrap a .xshd syntax mode stored as resource in the Creates IMSBuildAdditionalLogger objects that are only
addin assembly. activated when a specific MSBuild task is running.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="TaskBoundAdditionalLogger"> <xs:complexType name="TaskBoundLoggerFilter">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="class" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the IMSBuildAdditionalLogger class. Name of the IMSBuildLoggerFilter class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="taskname" use="required" type="xs:string"> <xs:attribute name="taskname" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Specifies the name of the MSBuild task that must be running for Specifies the name of the MSBuild task that must be running for
this logger to be active. this logger to be active.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>
<xs:element name="TaskBoundAdditionalLogger" type="TaskBoundAdditionalLogger"> <xs:element name="TaskBoundLoggerFilter" type="TaskBoundLoggerFilter">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Creates IMSBuildAdditionalLogger objects that are only Creates IMSBuildLoggerFilter objects that are only
activated when a specific MSBuild task is running. activated when a specific MSBuild task is running.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
@ -1053,23 +1026,23 @@
<xs:attribute name="label" use="optional" type="xs:string"> <xs:attribute name="label" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Label 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="icon" use="optional" type="xs:string"> <xs:attribute name="icon" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Icon of the tool bar item. 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: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
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
@ -1084,24 +1057,24 @@
<xs:attribute name="loadclasslazy" use="optional" type="xs:string"> <xs:attribute name="loadclasslazy" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<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:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="tooltip" use="optional" type="xs:string"> <xs:attribute name="tooltip" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Tooltip of the tool bar item. Tooltip of the tool bar item.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="class" use="optional" type="xs:string"> <xs:attribute name="class" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Command class that is run when item is clicked; or class that manages Command class that is run when item is clicked; or class that manages
the ComboBox/DropDownButton. Required for everything except "Separator". the ComboBox/DropDownButton. Required for everything except "Separator".
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>

39
doc/technotes/ConditionList.html

@ -5,7 +5,7 @@
</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 3.0.0.3062.</p> It is based on SharpDevelop 4.0.0.7014.</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>
@ -26,6 +26,8 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<li><a href="#TextContent">TextContent</a> <li><a href="#TextContent">TextContent</a>
<li><a href="#WindowActive">WindowActive</a> <li><a href="#WindowActive">WindowActive</a>
<li><a href="#WindowOpen">WindowOpen</a> <li><a href="#WindowOpen">WindowOpen</a>
<li><a href="#WriteableProject">WriteableProject</a>
<li><a href="#WriteableSolution">WriteableSolution</a>
</ul> </ul>
<div> <div>
<h2><a name="ActiveContentExtension">ActiveContentExtension</a></h2> <h2><a name="ActiveContentExtension">ActiveContentExtension</a></h2>
@ -176,7 +178,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<th colspan=2>comparisonType:</td> <th colspan=2>comparisonType:</td>
<td> <td>
The mode of the comparison: a field of the System.StringComparison enumeration. The default is The mode of the comparison: a field of the System.StringComparison enumeration. The default is
'InvariantCultureIgnoreCase'. 'OrdinalIgnoreCase'.
</td> </td>
</tr> </tr>
</table> </table>
@ -213,7 +215,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<th colspan=2>comparisonType:</td> <th colspan=2>comparisonType:</td>
<td> <td>
The mode of the comparison: a field of the System.StringComparison enumeration. The default is The mode of the comparison: a field of the System.StringComparison enumeration. The default is
'InvariantCultureIgnoreCase'. 'OrdinalIgnoreCase'.
</td> </td>
</tr> </tr>
</table> </table>
@ -423,7 +425,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<table> <table>
<tr> <tr>
<th colspan=2>Condition name:</td> <th colspan=2>Condition name:</td>
<td>ICSharpCode.SharpDevelop.DefaultEditor.Conditions.TextContentConditionEvaluator</td> <td>ICSharpCode.SharpDevelop.Editor.AvalonEdit.TextContentConditionEvaluator</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>
@ -459,7 +461,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</table> </table>
<p><span class="exampleTitle">Example: Test if the current window is a text editor</span> <p><span class="exampleTitle">Example: Test if the current window is a text editor</span>
<br><pre> <br><pre>
&lt;Condition name="WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"&gt;</pre></p> &lt;Condition name="WindowActive" activewindow="ICSharpCode.SharpDevelop.Editor.ITextEditorProvider"&gt;</pre></p>
<p><span class="exampleTitle">Example: Test if any window is active</span> <p><span class="exampleTitle">Example: Test if any window is active</span>
<br><pre> <br><pre>
&lt;Condition name="WindowActive" activewindow="*"&gt;</pre></p> &lt;Condition name="WindowActive" activewindow="*"&gt;</pre></p>
@ -487,9 +489,34 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</table> </table>
<p><span class="exampleTitle">Example: Test if a text editor is opened</span> <p><span class="exampleTitle">Example: Test if a text editor is opened</span>
<br><pre> <br><pre>
&lt;Condition name="WindowOpen" openwindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"&gt;</pre></p> &lt;Condition name="WindowOpen" openwindow="ICSharpCode.SharpDevelop.Editor.ITextEditorProvider"&gt;</pre></p>
<p><span class="exampleTitle">Example: Test if any window is open</span> <p><span class="exampleTitle">Example: Test if any window is open</span>
<br><pre> <br><pre>
&lt;Condition name="WindowOpen" openwindow="*"&gt;</pre></p> &lt;Condition name="WindowOpen" openwindow="*"&gt;</pre></p>
</div> </div>
<div>
<h2><a name="WriteableProject">WriteableProject</a></h2>
<p>
Tests if the caller project is writable. If caller is not an IProject it tests
Project.CurrentProject.
</p>
<table>
<tr>
<th colspan=2>Condition name:</td>
<td>ICSharpCode.SharpDevelop.WriteableProjectConditionEvaluator</td>
</tr>
</table>
</div>
<div>
<h2><a name="WriteableSolution">WriteableSolution</a></h2>
<p>
Description of WriteableSolutionEvaluator.
</p>
<table>
<tr>
<th colspan=2>Condition name:</td>
<td>ICSharpCode.SharpDevelop.WriteableSolutionConditionEvaluator</td>
</tr>
</table>
</div>
</body></html> </body></html>

290
doc/technotes/DoozerList.html

@ -5,29 +5,29 @@
</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 3.0.0.3062.</p> It is based on SharpDevelop 4.0.0.7014.</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>
<li><a href="#CustomProperty">CustomProperty</a> <li><a href="#CustomProperty">CustomProperty</a>
<li><a href="#CustomTool">CustomTool</a> <li><a href="#CustomTool">CustomTool</a>
<li><a href="#Debugger">Debugger</a> <li><a href="#Debugger">Debugger</a>
<li><a href="#DialogPanel">DialogPanel</a>
<li><a href="#Directory">Directory</a> <li><a href="#Directory">Directory</a>
<li><a href="#DisplayBinding">DisplayBinding</a> <li><a href="#DisplayBinding">DisplayBinding</a>
<li><a href="#EditAction">EditAction</a>
<li><a href="#FileFilter">FileFilter</a> <li><a href="#FileFilter">FileFilter</a>
<li><a href="#Icon">Icon</a> <li><a href="#Icon">Icon</a>
<li><a href="#Include">Include</a> <li><a href="#Include">Include</a>
<li><a href="#LanguageBinding">LanguageBinding</a> <li><a href="#LanguageBinding">LanguageBinding</a>
<li><a href="#MenuItem">MenuItem</a> <li><a href="#MenuItem">MenuItem</a>
<li><a href="#OptionPanel">OptionPanel</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="#ProjectBinding">ProjectBinding</a>
<li><a href="#ProjectContentRegistry">ProjectContentRegistry</a> <li><a href="#ProjectContentRegistry">ProjectContentRegistry</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="#TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a> <li><a href="#TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a>
<li><a href="#TaskBoundLoggerFilter">TaskBoundLoggerFilter</a>
<li><a href="#ToolbarItem">ToolbarItem</a> <li><a href="#ToolbarItem">ToolbarItem</a>
</ul> </ul>
<div> <div>
@ -70,7 +70,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<table> <table>
<tr> <tr>
<th colspan=2>Doozer name:</td> <th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.CodeCompletionBindingDoozer</td> <td>ICSharpCode.SharpDevelop.Editor.CodeCompletion.CodeCompletionBindingDoozer</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>
@ -275,50 +275,6 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</tr> </tr>
</table> </table>
</div> </div>
<div>
<h2><a name="DialogPanel">DialogPanel</a></h2>
<p>
Creates DefaultDialogPanelDescriptor objects that are used in option dialogs.
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.DialogPanelDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th colspan=2>class:</td>
<td>
Name of the IDialogPanel class. Optional if the page has subpages.
</td>
</tr>
<tr>
<th>label:</td>
<td class="userequired">required</td>
<td>
Caption of the dialog panel.
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Children:</td>
<td>
In the SharpDevelop options, option pages can have subpages by specifying them
as children in the AddInTree.
</td>
</tr>
<tr>
<th colspan=2>Usage:</td>
<td>In /SharpDevelop/BackendBindings/ProjectOptions/ and /SharpDevelop/Dialogs/OptionsDialog</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
A DefaultDialogPanelDescriptor object.
</td>
</tr>
</table>
</div>
<div> <div>
<h2><a name="Directory">Directory</a></h2> <h2><a name="Directory">Directory</a></h2>
<p> <p>
@ -426,45 +382,6 @@ It is based on SharpDevelop 3.0.0.3062.</p>
fileNamePattern = "\.(cs|vb)$" /&gt; fileNamePattern = "\.(cs|vb)$" /&gt;
&lt;/Path&gt;</pre></p> &lt;/Path&gt;</pre></p>
</div> </div>
<div>
<h2><a name="EditAction">EditAction</a></h2>
<p>
Creates IEditAction objects for the text editor.
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.DefaultEditor.Codons.EditActionDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th>keys:</td>
<td class="userequired">required</td>
<td>
Comma-separated list of keyboard shortcuts that activate the edit action.
E.g. "Control|C,Control|Insert"
</td>
</tr>
<tr>
<th>class:</td>
<td class="userequired">required</td>
<td>
Name of the IEditAction class.
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Usage:</td>
<td>Only in /AddIns/DefaultTextEditor/EditActions</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
An IEditAction object.
</td>
</tr>
</table>
</div>
<div> <div>
<h2><a name="FileFilter">FileFilter</a></h2> <h2><a name="FileFilter">FileFilter</a></h2>
<p> <p>
@ -497,8 +414,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</tr> </tr>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>FileFilterDescriptor in the format "name|extensions".
String in the format "name|extensions".
</td> </td>
</tr> </tr>
</table> </table>
@ -593,7 +509,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<div> <div>
<h2><a name="LanguageBinding">LanguageBinding</a></h2> <h2><a name="LanguageBinding">LanguageBinding</a></h2>
<p> <p>
Creates LanguageBindingDescriptor objects for the project service. Creates LanguageBindingDescriptor objects for the language binding service.
</p> </p>
<table> <table>
<tr> <tr>
@ -602,24 +518,10 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</tr> </tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr> <tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr> <tr>
<th>guid:</td> <th>extensions:</td>
<td class="userequired">required</td>
<td>
Project type GUID of the project used by MsBuild.
</td>
</tr>
<tr>
<th>supportedextensions:</td>
<td class="userequired">required</td>
<td>
Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo")
</td>
</tr>
<tr>
<th>projectfileextension:</td>
<td class="userequired">required</td> <td class="userequired">required</td>
<td> <td>
File extension of project files. (e.g. ".booproj") Semicolon-separated list of file extensions that are handled by the language binding (e.g. .xaml)
</td> </td>
</tr> </tr>
<tr> <tr>
@ -637,7 +539,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>
An LanguageBindingDescriptor object that wraps the ILanguageBinding object. The ILanguageBinding object.
</td> </td>
</tr> </tr>
</table> </table>
@ -693,6 +595,15 @@ It is based on SharpDevelop 3.0.0.3062.</p>
Command class that is run when item is clicked. Command class that is run when item is clicked.
</td> </td>
</tr> </tr>
<tr>
<th>command:</td>
<td class="userequired">optional</td>
<td>
A WPF routed command that is executed when item is clicked.
Currently, this property is supported only for WPF Menus.
Only one of the "class" and "command" attributes can be used on a menu entry.
</td>
</tr>
<tr> <tr>
<th>link:</td> <th>link:</td>
<td class="userequired">optional</td> <td class="userequired">optional</td>
@ -722,7 +633,7 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>
Any ToolStrip* object, depending on the type attribute. A MenuItemDescriptor object.
</td> </td>
</tr> </tr>
<tr> <tr>
@ -731,6 +642,50 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</tr> </tr>
</table> </table>
</div> </div>
<div>
<h2><a name="OptionPanel">OptionPanel</a></h2>
<p>
Creates DefaultOptionPanelDescriptor objects that are used in option dialogs.
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.OptionPanelDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th colspan=2>class:</td>
<td>
Name of the IOptionPanel class. Optional if the page has subpages.
</td>
</tr>
<tr>
<th>label:</td>
<td class="userequired">required</td>
<td>
Caption of the dialog panel.
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Children:</td>
<td>
In the SharpDevelop options, option pages can have subpages by specifying them
as children in the AddInTree.
</td>
</tr>
<tr>
<th colspan=2>Usage:</td>
<td>In /SharpDevelop/BackendBindings/ProjectOptions/ and /SharpDevelop/Dialogs/OptionsDialog</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
A DefaultOptionPanelDescriptor object.
</td>
</tr>
</table>
</div>
<div> <div>
<h2><a name="Pad">Pad</a></h2> <h2><a name="Pad">Pad</a></h2>
<p> <p>
@ -784,6 +739,13 @@ It is based on SharpDevelop 3.0.0.3062.</p>
Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T"). Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T").
</td> </td>
</tr> </tr>
<tr>
<th>defaultPosition:</td>
<td class="userequired">optional</td>
<td>
Default position of the pad, as a ICSharpCode.SharpDevelop.DefaultPadPositions enum value (e.g. "Bottom, Hidden").
</td>
</tr>
<tr><td colspan=3><hr></td></tr> <tr><td colspan=3><hr></td></tr>
<tr> <tr>
<th colspan=2>Usage:</td> <th colspan=2>Usage:</td>
@ -815,26 +777,72 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<th colspan=2>projectfileextension:</td> <th colspan=2>class:</td>
<td>
Name of the IParser class.
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Usage:</td>
<td>Only in /Workspace/Parser</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
An ParserDescriptor object that wraps the IParser object.
</td>
</tr>
</table>
</div>
<div>
<h2><a name="ProjectBinding">ProjectBinding</a></h2>
<p>
Creates ProjectBindingDescriptor objects for the project service.
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.ProjectBindingDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th>guid:</td>
<td class="userequired">required</td>
<td>
Project type GUID of the project used by MSBuild.
</td>
</tr>
<tr>
<th>supportedextensions:</td>
<td class="userequired">required</td>
<td>
Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo")
</td>
</tr>
<tr>
<th>projectfileextension:</td>
<td class="userequired">required</td>
<td> <td>
File extension of project files. (e.g. ".booproj") File extension of project files. (e.g. ".booproj")
</td> </td>
</tr> </tr>
<tr> <tr>
<th colspan=2>class:</td> <th>class:</td>
<td class="userequired">required</td>
<td> <td>
Name of the IParser class. Name of the IProjectBinding class.
</td> </td>
</tr> </tr>
<tr><td colspan=3><hr></td></tr> <tr><td colspan=3><hr></td></tr>
<tr> <tr>
<th colspan=2>Usage:</td> <th colspan=2>Usage:</td>
<td>Only in /Workspace/Parser</td> <td>Only in /SharpDevelop/Workbench/ProjectBinding</td>
</tr> </tr>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>
An ParserDescriptor object that wraps the IParser object. A ProjectBindingDescriptor object that wraps the IProjectBinding object.
</td> </td>
</tr> </tr>
</table> </table>
@ -943,69 +951,69 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</table> </table>
</div> </div>
<div> <div>
<h2><a name="SyntaxMode">SyntaxMode</a></h2> <h2><a name="TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a></h2>
<p> <p>
Creates AddInTreeSyntaxMode objects that wrap a .xshd syntax mode stored as resource in the Creates IMSBuildAdditionalLogger objects that are only
addin assembly. activated when a specific MSBuild task is running.
</p> </p>
<table> <table>
<tr> <tr>
<th colspan=2>Doozer name:</td> <th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.DefaultEditor.Codons.SyntaxModeDoozer</td> <td>ICSharpCode.SharpDevelop.Project.TaskBoundAdditionalLoggerDoozer</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>
<th>name:</td> <th>class:</td>
<td class="userequired">required</td>
<td>
Name of the language for which the syntax mode is used.
</td>
</tr>
<tr>
<th>extensions:</td>
<td class="userequired">required</td> <td class="userequired">required</td>
<td> <td>
Semicolon-separated list of file extensions for which the syntax mode is used. Name of the IMSBuildAdditionalLogger class.
</td> </td>
</tr> </tr>
<tr> <tr>
<th>resource:</td> <th>taskname:</td>
<td class="userequired">required</td> <td class="userequired">required</td>
<td> <td>
Fully qualified name of the resource file. Specifies the name of the MSBuild task that must be running for
this logger to be active.
</td> </td>
</tr> </tr>
<tr><td colspan=3><hr></td></tr> <tr><td colspan=3><hr></td></tr>
<tr> <tr>
<th colspan=2>Usage:</td> <th colspan=2>Usage:</td>
<td>Only in /SharpDevelop/ViewContent/DefaultTextEditor/SyntaxModes</td> <td>Only in /SharpDevelop/MSBuildEngine/AdditionalLoggers</td>
</tr> </tr>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>
An AddInTreeSyntaxMode object that loads the resource from the addin assembly when A IMSBuildAdditionalLogger object that lazy-loads the specified
its CreateTextReader method is called. IMSBuildAdditionalLogger when the specified task is running.
</td> </td>
</tr> </tr>
</table> </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> <div>
<h2><a name="TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a></h2> <h2><a name="TaskBoundLoggerFilter">TaskBoundLoggerFilter</a></h2>
<p> <p>
Creates IMSBuildAdditionalLogger objects that are only Creates IMSBuildLoggerFilter objects that are only
activated when a specific MSBuild task is running. activated when a specific MSBuild task is running.
</p> </p>
<table> <table>
<tr> <tr>
<th colspan=2>Doozer name:</td> <th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.Project.TaskBoundAdditionalLoggerDoozer</td> <td>ICSharpCode.SharpDevelop.Project.TaskBoundLoggerFilterDoozer</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>
<th>class:</td> <th>class:</td>
<td class="userequired">required</td> <td class="userequired">required</td>
<td> <td>
Name of the IMSBuildAdditionalLogger class. Name of the IMSBuildLoggerFilter class.
</td> </td>
</tr> </tr>
<tr> <tr>
@ -1019,22 +1027,22 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<tr><td colspan=3><hr></td></tr> <tr><td colspan=3><hr></td></tr>
<tr> <tr>
<th colspan=2>Usage:</td> <th colspan=2>Usage:</td>
<td>Only in /SharpDevelop/MSBuildEngine/AdditionalLoggers</td> <td>Only in /SharpDevelop/MSBuildEngine/LoggerFilters</td>
</tr> </tr>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>
A IMSBuildAdditionalLogger object that lazy-loads the specified A IMSBuildLoggerFilter object that lazy-loads the specified
IMSBuildAdditionalLogger when the specified task is running. IMSBuildLoggerFilter when the specified task is running.
</td> </td>
</tr> </tr>
</table> </table>
<p><span class="exampleTitle">Example: </span> <p><span class="exampleTitle">Example: </span>
<br><pre> <br><pre>
&lt;TaskBoundAdditionalLogger &lt;TaskBoundLoggerFilter
id = "FxCopLogger" id = "FxCopLogger"
taskname = "FxCop" taskname = "FxCop"
class = "ICSharpCode.CodeAnalysis.FxCopLogger"/&gt;</pre></p> class = "ICSharpCode.CodeAnalysis.FxCopLoggerFilter"/&gt;</pre></p>
</div> </div>
<div> <div>
<h2><a name="ToolbarItem">ToolbarItem</a></h2> <h2><a name="ToolbarItem">ToolbarItem</a></h2>

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

@ -324,7 +324,6 @@
<Compile Include="Src\Services\LanguageBinding\AggregatedLanguageBinding.cs" /> <Compile Include="Src\Services\LanguageBinding\AggregatedLanguageBinding.cs" />
<Compile Include="Src\Services\LanguageBinding\DefaultLanguageBinding.cs" /> <Compile Include="Src\Services\LanguageBinding\DefaultLanguageBinding.cs" />
<Compile Include="Src\Services\LanguageBinding\ILanguageBinding.cs" /> <Compile Include="Src\Services\LanguageBinding\ILanguageBinding.cs" />
<Compile Include="Src\Services\LanguageBinding\LanguageBindingDescriptor.cs" />
<Compile Include="Src\Services\LanguageBinding\LanguageBindingDoozer.cs" /> <Compile Include="Src\Services\LanguageBinding\LanguageBindingDoozer.cs" />
<Compile Include="Src\Services\LanguageBinding\LanguageBindingService.cs" /> <Compile Include="Src\Services\LanguageBinding\LanguageBindingService.cs" />
<Compile Include="Src\Services\Language\LanguageService.cs" /> <Compile Include="Src\Services\Language\LanguageService.cs" />

62
src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDescriptor.cs

@ -1,62 +0,0 @@
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Editor;
namespace ICSharpCode.SharpDevelop
{
public class LanguageBindingDescriptor
{
Codon codon;
string[] extensions;
public LanguageBindingDescriptor(Codon codon)
{
this.codon = codon;
}
internal ILanguageBinding CreateBinding(ITextEditor editor) {
return (ILanguageBinding)codon.AddIn.CreateObject(codon.Properties["class"]);
}
internal bool CanAttach(ITextEditor editor)
{
if (!string.IsNullOrEmpty(editor.FileName)) {
string extension = Path.GetExtension(editor.FileName).ToLowerInvariant();
foreach (var ext in Extensions) {
if (extension == ext)
return true;
}
}
return false;
}
public string Language {
get {
return codon.Id;
}
}
public Codon Codon {
get {
return codon;
}
}
public string[] Extensions {
get {
if (extensions == null) {
if (codon.Properties["extensions"].Length == 0)
extensions = new string[0];
else
extensions = codon.Properties["extensions"].ToLowerInvariant().Split(';');
}
return extensions;
}
}
}
}

27
src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs

@ -2,7 +2,9 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System; using System;
using System.IO;
using ICSharpCode.Core; using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Editor;
namespace ICSharpCode.SharpDevelop namespace ICSharpCode.SharpDevelop
{ {
@ -17,7 +19,7 @@ namespace ICSharpCode.SharpDevelop
/// </attribute> /// </attribute>
/// <usage>Only in /SharpDevelop/Workbench/LanguageBindings</usage> /// <usage>Only in /SharpDevelop/Workbench/LanguageBindings</usage>
/// <returns> /// <returns>
/// A LanguageBindingDescriptor object that wraps the ILanguageBinding object. /// The ILanguageBinding object.
/// </returns> /// </returns>
public class LanguageBindingDoozer : IDoozer public class LanguageBindingDoozer : IDoozer
{ {
@ -29,7 +31,28 @@ namespace ICSharpCode.SharpDevelop
public object BuildItem(object caller, Codon codon, System.Collections.ArrayList subItems) public object BuildItem(object caller, Codon codon, System.Collections.ArrayList subItems)
{ {
return new LanguageBindingDescriptor(codon); ITextEditor editor = (ITextEditor)caller;
string[] extensions = codon.Properties["extensions"].Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
if (CanAttach(extensions, editor.FileName)) {
return codon.AddIn.CreateObject(codon.Properties["class"]);
} else {
return null;
}
}
static bool CanAttach(string[] extensions, string fileName)
{
// always attach when no extensions were given
if (extensions.Length == 0)
return true;
if (string.IsNullOrEmpty(fileName))
return false;
string fileExtension = Path.GetExtension(fileName);
foreach (string ext in extensions) {
if (string.Equals(ext, fileExtension, StringComparison.OrdinalIgnoreCase))
return true;
}
return false;
} }
} }
} }

20
src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingService.cs

@ -11,30 +11,14 @@ namespace ICSharpCode.SharpDevelop
public static class LanguageBindingService public static class LanguageBindingService
{ {
const string languageBindingPath = "/SharpDevelop/Workbench/LanguageBindings"; const string languageBindingPath = "/SharpDevelop/Workbench/LanguageBindings";
static readonly List<LanguageBindingDescriptor> bindings;
static LanguageBindingService()
{
bindings = AddInTree.BuildItems<LanguageBindingDescriptor>(languageBindingPath, null, false);
}
/// <summary> /// <summary>
/// Creates the binding for the specified text editor. This method never returns null. /// Creates the binding for the specified text editor. This method never returns null.
/// </summary> /// </summary>
public static ILanguageBinding CreateBinding(ITextEditor editor) public static ILanguageBinding CreateBinding(ITextEditor editor)
{ {
return new AggregatedLanguageBinding(FindMatchingBindings(editor)); var bindings = AddInTree.BuildItems<ILanguageBinding>(languageBindingPath, editor, false);
} return new AggregatedLanguageBinding(bindings);
static ILanguageBinding[] FindMatchingBindings(ITextEditor editor)
{
List<ILanguageBinding> matches = new List<ILanguageBinding>();
foreach (var binding in bindings) {
if (binding.CanAttach(editor))
matches.Add(binding.CreateBinding(editor));
}
return matches.ToArray();
} }
} }
} }

24
src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.csproj

@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<RootNamespace>BuildAddinDocumentation</RootNamespace> <RootNamespace>BuildAddinDocumentation</RootNamespace>
@ -6,12 +7,18 @@
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{211887B2-E9E4-45A4-BE16-6CEA4A7E00F2}</ProjectGuid> <ProjectGuid>{211887B2-E9E4-45A4-BE16-6CEA4A7E00F2}</ProjectGuid>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<Optimize>False</Optimize> <Optimize>False</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType> <DebugType>Full</DebugType>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
</PropertyGroup> </PropertyGroup>
@ -23,9 +30,22 @@
<DebugType>None</DebugType> <DebugType>None</DebugType>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<PlatformTarget>x86</PlatformTarget>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="MainClass.cs" /> <Compile Include="MainClass.cs" />

6
src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.sln

@ -1,5 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 9.00 
# SharpDevelop 2.0.0.783 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
# SharpDevelop 4.0.0.7002
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildAddinDocumentation", "BuildAddinDocumentation.csproj", "{211887B2-E9E4-45A4-BE16-6CEA4A7E00F2}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildAddinDocumentation", "BuildAddinDocumentation.csproj", "{211887B2-E9E4-45A4-BE16-6CEA4A7E00F2}"
EndProject EndProject
Global Global

31
src/Tools/BuildAddinDocumentation/MainClass.cs

@ -24,14 +24,13 @@ namespace BuildAddinDocumentation
List<XmlElement> doozers = new List<XmlElement>(); List<XmlElement> doozers = new List<XmlElement>();
List<XmlElement> conditions = new List<XmlElement>(); List<XmlElement> conditions = new List<XmlElement>();
if (!ReadXmlDocu(srcDir + "Main\\Core\\Project", doozers, conditions)) if (!ReadXmlDocu(srcDir + "Main\\Base\\Project\\ICSharpCode.SharpDevelop.csproj", doozers, conditions))
return;
if (!ReadXmlDocu(srcDir + "Main\\Base\\Project", doozers, conditions))
return; return;
// build normal SharpDevelop: // build normal SharpDevelop:
ProcessStartInfo info = new ProcessStartInfo("cmd", "/c debugbuild.bat"); ProcessStartInfo info = new ProcessStartInfo("cmd", "/c debugbuild.bat");
info.WorkingDirectory = srcDir; info.WorkingDirectory = Path.GetFullPath(Path.Combine(srcDir, ".."));
Debug.WriteLine(info.WorkingDirectory + ">" + info.FileName + " " + info.Arguments);
Process p = Process.Start(info); Process p = Process.Start(info);
if (!p.WaitForExit(60000)) { if (!p.WaitForExit(60000)) {
Debug.WriteLine("msbuild did not exit"); Debug.WriteLine("msbuild did not exit");
@ -44,7 +43,10 @@ namespace BuildAddinDocumentation
sdVersion = FileVersionInfo.GetVersionInfo(Path.GetFullPath(Path.Combine(srcDir, "..\\bin\\SharpDevelop.exe"))); sdVersion = FileVersionInfo.GetVersionInfo(Path.GetFullPath(Path.Combine(srcDir, "..\\bin\\SharpDevelop.exe")));
//sdVersion = FileVersionInfo.GetVersionInfo(Path.GetFullPath(Path.Combine(srcDir, "..\\bin\\ICSharpCode.Core.dll"))); XmlDocument coreDoc = new XmlDocument();
coreDoc.Load(srcDir + "..\\bin\\ICSharpCode.Core.xml");
ReadXmlDocu(coreDoc, doozers, conditions);
Comparison<XmlElement> comparison = delegate(XmlElement a, XmlElement b) { Comparison<XmlElement> comparison = delegate(XmlElement a, XmlElement b) {
string shortNameA = a.GetAttribute("name").Substring(a.GetAttribute("name").LastIndexOf('.') + 1); string shortNameA = a.GetAttribute("name").Substring(a.GetAttribute("name").LastIndexOf('.') + 1);
string shortNameB = b.GetAttribute("name").Substring(b.GetAttribute("name").LastIndexOf('.') + 1); string shortNameB = b.GetAttribute("name").Substring(b.GetAttribute("name").LastIndexOf('.') + 1);
@ -314,9 +316,14 @@ namespace BuildAddinDocumentation
html.WriteLine("</body></html>"); html.WriteLine("</body></html>");
} }
static bool ReadXmlDocu(string projectFolder, List<XmlElement> doozers, List<XmlElement> conditions) static bool ReadXmlDocu(string projectFileName, List<XmlElement> doozers, List<XmlElement> conditions)
{
XmlDocument doc = GetXmlDocu(Path.GetFullPath(projectFileName));
return ReadXmlDocu(doc, doozers, conditions);
}
static bool ReadXmlDocu(XmlDocument doc, List<XmlElement> doozers, List<XmlElement> conditions)
{ {
XmlDocument doc = GetXmlDocu(Path.GetFullPath(projectFolder));
if (doc == null) return false; if (doc == null) return false;
foreach (XmlNode node in doc.DocumentElement["members"]) { foreach (XmlNode node in doc.DocumentElement["members"]) {
XmlElement member = node as XmlElement; XmlElement member = node as XmlElement;
@ -332,16 +339,16 @@ namespace BuildAddinDocumentation
return true; return true;
} }
static XmlDocument GetXmlDocu(string projectFolder) static XmlDocument GetXmlDocu(string projectFileName)
{ {
string docFile = Path.GetFullPath("doc.xml"); string docFile = Path.GetFullPath("doc.xml");
if (File.Exists(docFile)) if (File.Exists(docFile))
File.Delete(docFile); File.Delete(docFile);
string args = "\"/p:DocumentationFile=" + docFile + "\" \"/p:NoWarn=1591 1573 1574 1572 419\""; string args = Path.GetFileName(projectFileName) + " \"/p:DocumentationFile=" + docFile + "\" \"/p:NoWarn=1591 1573 1574 1572 419\"";
string msbuild = Path.Combine(Path.GetDirectoryName(typeof(object).Assembly.Location), "..\\v3.5\\msbuild.exe"); string msbuild = Path.Combine(Path.GetDirectoryName(typeof(object).Assembly.Location), "msbuild.exe");
ProcessStartInfo info = new ProcessStartInfo(msbuild, args); ProcessStartInfo info = new ProcessStartInfo(msbuild, args);
Debug.WriteLine(projectFolder + ">" + msbuild + " " + args); info.WorkingDirectory = Path.GetDirectoryName(projectFileName);
info.WorkingDirectory = projectFolder; Debug.WriteLine(info.WorkingDirectory + ">" + info.FileName + " " + info.Arguments);
Process p = Process.Start(info); Process p = Process.Start(info);
if (!p.WaitForExit(60000)) { if (!p.WaitForExit(60000)) {
Debug.WriteLine("msbuild did not exit"); Debug.WriteLine("msbuild did not exit");

Loading…
Cancel
Save