diff --git a/data/schemas/AddIn.xsd b/data/schemas/AddIn.xsd index d2ba801e4d..6b8a513e53 100644 --- a/data/schemas/AddIn.xsd +++ b/data/schemas/AddIn.xsd @@ -117,23 +117,22 @@ - - - + + - + @@ -188,23 +187,22 @@ - - - + + - + @@ -266,8 +264,8 @@ - The fully qualified type name of the class to create an instace of. - + The fully qualified type name of the class to create an instace of. + @@ -287,16 +285,16 @@ - Name of the ICodeCompletionBinding class (normally deriving from DefaultCodeCompletionBinding). - + Name of the ICodeCompletionBinding class (normally deriving from DefaultCodeCompletionBinding). + - List of semicolon-separated entries of the file extensions handled by the binding. - If no extensions attribute is specified, the binding is activated in all files. - + List of semicolon-separated entries of the file extensions handled by the binding. + If no extensions attribute is specified, the binding is activated in all files. + @@ -315,30 +313,30 @@ - The name of the MSBuild meta data. - + The name of the MSBuild meta data. + - The display name of the property. - + The display name of the property. + - The description text for the property. - + The description text for the property. + - Boolean property specifying whether the custom tool should be run when the property value is changed - by the user. Default: false. - + Boolean property specifying whether the custom tool should be run when the property value is changed + by the user. Default: false. + @@ -357,23 +355,23 @@ - ID used to identify the custom tool. - + ID used to identify the custom tool. + - Name of the ICustomTool class. - + Name of the ICustomTool class. + - Regular expression that specifies the file names for which the custom tool - can be used. Example: "\.res(x|ources)$" - + Regular expression that specifies the file names for which the custom tool + can be used. Example: "\.res(x|ources)$" + @@ -392,43 +390,43 @@ - Name of the IDebugger class. - + Name of the IDebugger class. + - Specifies if the debugger supports the 'Start' command. Default: true - + Specifies if the debugger supports the 'Start' command. Default: true + - Specifies if the debugger supports the 'StartWithoutDebugger' command. Default: true - + Specifies if the debugger supports the 'StartWithoutDebugger' command. Default: true + - Specifies if the debugger supports the 'Stop' (kill running process) command. Default: true - + Specifies if the debugger supports the 'Stop' (kill running process) command. Default: true + - Specifies if the debugger supports stepping. Default: false - + Specifies if the debugger supports stepping. Default: false + - Specifies if the debugger supports execution control (break, resume). Default: false - + Specifies if the debugger supports execution control (break, resume). Default: false + @@ -441,47 +439,14 @@ - - - - - - - - - - - - - Name of the IDialogPanel class. Optional if the page has subpages. - - - - - - - Caption of the dialog panel. - - - - - - - - - - Creates DefaultDialogPanelDescriptor objects that are used in option dialogs. - - - - 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. + @@ -500,22 +465,22 @@ - Name of the IDisplayBinding or ISecondaryDisplayBinding class. - + Name of the IDisplayBinding or ISecondaryDisplayBinding class. + - Title of the display binding to use in the "Open With" dialog. - + Title of the display binding to use in the "Open With" dialog. + - Type of the display binding (either "Primary" or "Secondary"). Default: "Primary". - + Type of the display binding (either "Primary" or "Secondary"). Default: "Primary". + @@ -527,9 +492,9 @@ - Regular expression that specifies the file names for which the display binding - will be used. Example: "\.res(x|ources)$" - + Regular expression that specifies the file names for which the display binding + will be used. Example: "\.res(x|ources)$" + @@ -545,49 +510,21 @@ - - - - - - - Comma-separated list of keyboard shortcuts that activate the edit action. - E.g. "Control|C,Control|Insert" - - - - - - - Name of the IEditAction class. - - - - - - - - - - Creates IEditAction objects for the text editor. - - - - The name of the file filter entry. - + The name of the file filter entry. + - The extensions associated with this file filter entry. - + The extensions associated with this file filter entry. + @@ -606,24 +543,24 @@ - The name of a bitmap resource in the resource service. - + The name of a bitmap resource in the resource service. + - This attribute is specified when a project icon association should be created. - It specifies the language of the project types that use the icon. - + This attribute is specified when a project icon association should be created. + It specifies the language of the project types that use the icon. + - This attribute is specified when a file icon association should be created. - It specifies the semicolon-separated list of file types that use the icon. - + This attribute is specified when a file icon association should be created. + It specifies the semicolon-separated list of file types that use the icon. + @@ -643,18 +580,18 @@ - When this attribute is used, the include doozer builds the item that is at the - addin tree location specified by this attribute. - + When this attribute is used, the include doozer builds the item that is at the + addin tree location specified by this attribute. + - When this attribute is used, the include doozer builds all items inside the - path addin tree location specified by this attribute and returns an - IBuildItemsModifier which includes all items in the output list. - + When this attribute is used, the include doozer builds all items inside the + path addin tree location specified by this attribute and returns an + IBuildItemsModifier which includes all items in the output list. + @@ -669,62 +606,21 @@ - - - - - - - Project type GUID of the project used by MsBuild. - - - - - - - Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo") - - - - - - - File extension of project files. (e.g. ".booproj") - - - - - - - Name of the IProjectBinding class. - - - - - - - - - - Creates ProjectBindingDescriptor objects for the project service. - - - - 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) + - Name of the ILanguageBinding class. - + Name of the ILanguageBinding class. + @@ -733,7 +629,7 @@ - Creates LanguageBindingDescriptor objects for the language service. + Creates LanguageBindingDescriptor objects for the language binding service. @@ -749,18 +645,18 @@ - Label of the menu item. - + Label of the menu item. + - This attribute must be one of these values: - Separator, CheckBox, Item=Command, Menu (=with subitems), - Builder (=class implementing ISubmenuBuilder). - Default: Command. - + This attribute must be one of these values: + Separator, CheckBox, Item=Command, Menu (=with subitems), + Builder (=class implementing ISubmenuBuilder). + Default: Command. + @@ -776,39 +672,48 @@ - Only for the type "Item"/"Command". - When set to false, the command class is loaded - immediately instead of the usual lazy-loading. - + Only for the type "Item"/"Command". + When set to false, the command class is loaded + immediately instead of the usual lazy-loading. + - Icon of the menu item. - + Icon of the menu item. + - Command class that is run when item is clicked. - + Command class that is run when item is clicked. + + + + + + + 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. + - Only for the type "Item"/"Command". Opens a webpage instead of running a command when - clicking the item. - + Only for the type "Item"/"Command". Opens a webpage instead of running a command when + clicking the item. + - Shortcut that activates the command (e.g. "Control|S"). - + Shortcut that activates the command (e.g. "Control|S"). + @@ -821,49 +726,89 @@ + + + + + + + + + + + + + Name of the IOptionPanel class. Optional if the page has subpages. + + + + + + + Caption of the dialog panel. + + + + + + + + + + Creates DefaultOptionPanelDescriptor objects that are used in option dialogs. + + + - IPadContent class that is loaded when the pad content is shown for the first time. - + IPadContent class that is loaded when the pad content is shown for the first time. + - Title of the pad that is shown in the user interface. - Should be a resource string, e.g. "${res:AddIns.HtmlHelp2.Contents}" - + Title of the pad that is shown in the user interface. + Should be a resource string, e.g. "${res:AddIns.HtmlHelp2.Contents}" + - Specifies the name of the icon resource used for the pad. - Pad icon resources must be registered with the ResourceService before the - workbench is loaded! - + Specifies the name of the icon resource used for the pad. + Pad icon resources must be registered with the ResourceService before the + workbench is loaded! + - Category of the pad. It is possible to create menu items that automatically - contain show commands for all pads in a certain category. - Pads in the category "Main" will show up in the "View" menu, the category - "Tools" in the "View -> Tools" menu, the category "Debugger" in the - "View -> Debugger" menu. - + Category of the pad. It is possible to create menu items that automatically + contain show commands for all pads in a certain category. + Pads in the category "Main" will show up in the "View" menu, the category + "Tools" in the "View -> Tools" menu, the category "Debugger" in the + "View -> Debugger" menu. + - Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T"). - + Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T"). + + + + + + + Default position of the pad, as a ICSharpCode.SharpDevelop.DefaultPadPositions enum value (e.g. "Bottom, Hidden"). + @@ -882,31 +827,65 @@ - Semicolon-separated list of file extensions for which the parser is used. (e.g. ".boo") - + Semicolon-separated list of file extensions for which the parser is used. (e.g. ".boo") + - + - File extension of project files. (e.g. ".booproj") - + Name of the IParser class. + - + + + + + + + Creates ParserDescriptor objects for the parsing service. + + + + + + + - Name of the IParser class. - + Project type GUID of the project used by MSBuild. + + + + + + + Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo") + + + + + + + File extension of project files. (e.g. ".booproj") + + + + + + + Name of the IProjectBinding class. + - + - Creates ParserDescriptor objects for the parsing service. + Creates ProjectBindingDescriptor objects for the project service. @@ -916,8 +895,8 @@ - Name of the ProjectContentRegistry class. - + Name of the ProjectContentRegistry class. + @@ -936,15 +915,15 @@ - Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage') - + Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage') + - Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension). - + Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension). + @@ -963,8 +942,8 @@ - The string to return. - + The string to return. + @@ -977,66 +956,60 @@ - + - - - - Name of the language for which the syntax mode is used. - - - - + - Semicolon-separated list of file extensions for which the syntax mode is used. - + Name of the IMSBuildAdditionalLogger class. + - + - Fully qualified name of the resource file. - + Specifies the name of the MSBuild task that must be running for + this logger to be active. + - + - Creates AddInTreeSyntaxMode objects that wrap a .xshd syntax mode stored as resource in the - addin assembly. + Creates IMSBuildAdditionalLogger objects that are only + activated when a specific MSBuild task is running. - + - Name of the IMSBuildAdditionalLogger class. - + Name of the IMSBuildLoggerFilter class. + - Specifies the name of the MSBuild task that must be running for - this logger to be active. - + Specifies the name of the MSBuild task that must be running for + this logger to be active. + - + - Creates IMSBuildAdditionalLogger objects that are only + Creates IMSBuildLoggerFilter objects that are only activated when a specific MSBuild task is running. @@ -1053,23 +1026,23 @@ - Label of the tool bar item. - + Label of the tool bar item. + - Icon of the tool bar item. - + Icon of the tool bar item. + - This attribute must be one of these values: - Separator, CheckBox, Item, ComboBox, DropDownButton - + This attribute must be one of these values: + Separator, CheckBox, Item, ComboBox, DropDownButton + @@ -1084,24 +1057,24 @@ - Only for the type "Item". When set to false, the command class is loaded - immediately instead of the usual lazy-loading. - + Only for the type "Item". When set to false, the command class is loaded + immediately instead of the usual lazy-loading. + - Tooltip of the tool bar item. - + Tooltip of the tool bar item. + - Command class that is run when item is clicked; or class that manages - the ComboBox/DropDownButton. Required for everything except "Separator". - + Command class that is run when item is clicked; or class that manages + the ComboBox/DropDownButton. Required for everything except "Separator". + diff --git a/doc/technotes/ConditionList.html b/doc/technotes/ConditionList.html index 7db94b07c3..3b5b99750c 100644 --- a/doc/technotes/ConditionList.html +++ b/doc/technotes/ConditionList.html @@ -5,7 +5,7 @@

Condition List

This file was generated by the tool 'BuildAddinDocumentation'. -It is based on SharpDevelop 3.0.0.3062.

+It is based on SharpDevelop 4.0.0.7014.

ActiveContentExtension

@@ -176,7 +178,7 @@ It is based on SharpDevelop 3.0.0.3062.

comparisonType: The mode of the comparison: a field of the System.StringComparison enumeration. The default is - 'InvariantCultureIgnoreCase'. + 'OrdinalIgnoreCase'. @@ -213,7 +215,7 @@ It is based on SharpDevelop 3.0.0.3062.

comparisonType: The mode of the comparison: a field of the System.StringComparison enumeration. The default is - 'InvariantCultureIgnoreCase'. + 'OrdinalIgnoreCase'. @@ -423,7 +425,7 @@ It is based on SharpDevelop 3.0.0.3062.

+ @@ -459,7 +461,7 @@ It is based on SharpDevelop 3.0.0.3062.

Condition name: - ICSharpCode.SharpDevelop.DefaultEditor.Conditions.TextContentConditionEvaluatorICSharpCode.SharpDevelop.Editor.AvalonEdit.TextContentConditionEvaluator

Attributes:

Example: Test if the current window is a text editor

-            <Condition name="WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider">

+ <Condition name="WindowActive" activewindow="ICSharpCode.SharpDevelop.Editor.ITextEditorProvider">

Example: Test if any window is active

             <Condition name="WindowActive" activewindow="*">

@@ -487,9 +489,34 @@ It is based on SharpDevelop 3.0.0.3062.

Example: Test if a text editor is opened

-            <Condition name="WindowOpen" openwindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider">

+ <Condition name="WindowOpen" openwindow="ICSharpCode.SharpDevelop.Editor.ITextEditorProvider">

Example: Test if any window is open

             <Condition name="WindowOpen" openwindow="*">

+
+

WriteableProject

+

+ Tests if the caller project is writable. If caller is not an IProject it tests + Project.CurrentProject. +

+ + + + +
Condition name: + ICSharpCode.SharpDevelop.WriteableProjectConditionEvaluator
+
+
+

WriteableSolution

+

+ Description of WriteableSolutionEvaluator. +

+ + + + +
Condition name: + ICSharpCode.SharpDevelop.WriteableSolutionConditionEvaluator
+
diff --git a/doc/technotes/DoozerList.html b/doc/technotes/DoozerList.html index e60e8ce1a4..f1e853ddb9 100644 --- a/doc/technotes/DoozerList.html +++ b/doc/technotes/DoozerList.html @@ -5,29 +5,29 @@

Doozer List

This file was generated by the tool 'BuildAddinDocumentation'. -It is based on SharpDevelop 3.0.0.3062.

+It is based on SharpDevelop 4.0.0.7014.

@@ -70,7 +70,7 @@ It is based on SharpDevelop 3.0.0.3062.

+ @@ -275,50 +275,6 @@ It is based on SharpDevelop 3.0.0.3062.

Doozer name: - ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.CodeCompletionBindingDoozerICSharpCode.SharpDevelop.Editor.CodeCompletion.CodeCompletionBindingDoozer

Attributes:

-
-

DialogPanel

-

- Creates DefaultDialogPanelDescriptor objects that are used in option dialogs. -

- - - - - - - - - - - - - - - - - - - - - - -
Doozer name: - ICSharpCode.SharpDevelop.DialogPanelDoozer

Attributes:

class: - - Name of the IDialogPanel class. Optional if the page has subpages. -
label: - required - Caption of the dialog panel. -

Children: - - In the SharpDevelop options, option pages can have subpages by specifying them - as children in the AddInTree. -
Usage: - In /SharpDevelop/BackendBindings/ProjectOptions/ and /SharpDevelop/Dialogs/OptionsDialog
Returns: - - A DefaultDialogPanelDescriptor object. -
-

Directory

@@ -426,45 +382,6 @@ It is based on SharpDevelop 3.0.0.3062.

fileNamePattern = "\.(cs|vb)$" /> </Path>

-
-

EditAction

-

- Creates IEditAction objects for the text editor. -

- - - - - - - - - - - - - - - - - - - - -
Doozer name: - ICSharpCode.SharpDevelop.DefaultEditor.Codons.EditActionDoozer

Attributes:

keys: - required - Comma-separated list of keyboard shortcuts that activate the edit action. - E.g. "Control|C,Control|Insert" -
class: - required - Name of the IEditAction class. -

Usage: - Only in /AddIns/DefaultTextEditor/EditActions
Returns: - - An IEditAction object. -
-

FileFilter

@@ -497,8 +414,7 @@ It is based on SharpDevelop 3.0.0.3062.

Returns: - - String in the format "name|extensions". + FileFilterDescriptor in the format "name|extensions". @@ -593,7 +509,7 @@ It is based on SharpDevelop 3.0.0.3062.

LanguageBinding

- Creates LanguageBindingDescriptor objects for the project service. + Creates LanguageBindingDescriptor objects for the language binding service.

@@ -602,24 +518,10 @@ It is based on SharpDevelop 3.0.0.3062.

- - - - - - - - - @@ -637,7 +539,7 @@ It is based on SharpDevelop 3.0.0.3062.


Attributes:

guid: - required - Project type GUID of the project used by MsBuild. -
supportedextensions: - required - Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo") -
projectfileextension: + extensions: required - File extension of project files. (e.g. ".booproj") + Semicolon-separated list of file extensions that are handled by the language binding (e.g. .xaml)
Returns: - An LanguageBindingDescriptor object that wraps the ILanguageBinding object. + The ILanguageBinding object.
@@ -693,6 +595,15 @@ It is based on SharpDevelop 3.0.0.3062.

Command class that is run when item is clicked. + + command: + optional + + 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. + + link: optional @@ -722,7 +633,7 @@ It is based on SharpDevelop 3.0.0.3062.

Returns: - Any ToolStrip* object, depending on the type attribute. + A MenuItemDescriptor object. @@ -731,6 +642,50 @@ It is based on SharpDevelop 3.0.0.3062.

+
+

OptionPanel

+

+ Creates DefaultOptionPanelDescriptor objects that are used in option dialogs. +

+ + + + + + + + + + + + + + + + + + + + + + +
Doozer name: + ICSharpCode.SharpDevelop.OptionPanelDoozer

Attributes:

class: + + Name of the IOptionPanel class. Optional if the page has subpages. +
label: + required + Caption of the dialog panel. +

Children: + + In the SharpDevelop options, option pages can have subpages by specifying them + as children in the AddInTree. +
Usage: + In /SharpDevelop/BackendBindings/ProjectOptions/ and /SharpDevelop/Dialogs/OptionsDialog
Returns: + + A DefaultOptionPanelDescriptor object. +
+

Pad

@@ -784,6 +739,13 @@ It is based on SharpDevelop 3.0.0.3062.

Shortcut that activates the 'Show pad' command (e.g. "Control|Alt|T"). + + defaultPosition: + optional + + Default position of the pad, as a ICSharpCode.SharpDevelop.DefaultPadPositions enum value (e.g. "Bottom, Hidden"). + +
Usage: @@ -815,26 +777,72 @@ It is based on SharpDevelop 3.0.0.3062.

- projectfileextension: + class: + + Name of the IParser class. + + +
+ + Usage: + Only in /Workspace/Parser + + + Returns: + + An ParserDescriptor object that wraps the IParser object. + + + +
+
+

ProjectBinding

+

+ Creates ProjectBindingDescriptor objects for the project service. +

+ + + + + + + + + + + + + + + - +
Doozer name: + ICSharpCode.SharpDevelop.ProjectBindingDoozer

Attributes:

guid: + required + Project type GUID of the project used by MSBuild. +
supportedextensions: + required + Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo") +
projectfileextension: + required File extension of project files. (e.g. ".booproj")
class: + class: + required - Name of the IParser class. + Name of the IProjectBinding class.

Usage: - Only in /Workspace/ParserOnly in /SharpDevelop/Workbench/ProjectBinding
Returns: - An ParserDescriptor object that wraps the IParser object. + A ProjectBindingDescriptor object that wraps the IProjectBinding object.
@@ -943,69 +951,69 @@ It is based on SharpDevelop 3.0.0.3062.

-

SyntaxMode

+

TaskBoundAdditionalLogger

- Creates AddInTreeSyntaxMode objects that wrap a .xshd syntax mode stored as resource in the - addin assembly. + Creates IMSBuildAdditionalLogger objects that are only + activated when a specific MSBuild task is running.

+ - - - - - - +
Doozer name: - ICSharpCode.SharpDevelop.DefaultEditor.Codons.SyntaxModeDoozerICSharpCode.SharpDevelop.Project.TaskBoundAdditionalLoggerDoozer

Attributes:

name: - required - Name of the language for which the syntax mode is used. -
extensions: + class: required - Semicolon-separated list of file extensions for which the syntax mode is used. + Name of the IMSBuildAdditionalLogger class.
resource: + taskname: required - Fully qualified name of the resource file. + Specifies the name of the MSBuild task that must be running for + this logger to be active.

Usage: - Only in /SharpDevelop/ViewContent/DefaultTextEditor/SyntaxModesOnly in /SharpDevelop/MSBuildEngine/AdditionalLoggers
Returns: - An AddInTreeSyntaxMode object that loads the resource from the addin assembly when - its CreateTextReader method is called. + A IMSBuildAdditionalLogger object that lazy-loads the specified + IMSBuildAdditionalLogger when the specified task is running.
+

Example: +

+            <TaskBoundAdditionalLogger
+            	id = "FxCopLogger"
+            	taskname = "FxCop"
+            	class = "ICSharpCode.CodeAnalysis.FxCopLogger"/>

-

TaskBoundAdditionalLogger

+

TaskBoundLoggerFilter

- Creates IMSBuildAdditionalLogger objects that are only + Creates IMSBuildLoggerFilter objects that are only activated when a specific MSBuild task is running.

+ @@ -1019,22 +1027,22 @@ It is based on SharpDevelop 3.0.0.3062.

+
Doozer name: - ICSharpCode.SharpDevelop.Project.TaskBoundAdditionalLoggerDoozerICSharpCode.SharpDevelop.Project.TaskBoundLoggerFilterDoozer

Attributes:

class: required - Name of the IMSBuildAdditionalLogger class. + Name of the IMSBuildLoggerFilter class.

Usage: - Only in /SharpDevelop/MSBuildEngine/AdditionalLoggersOnly in /SharpDevelop/MSBuildEngine/LoggerFilters
Returns: - A IMSBuildAdditionalLogger object that lazy-loads the specified - IMSBuildAdditionalLogger when the specified task is running. + A IMSBuildLoggerFilter object that lazy-loads the specified + IMSBuildLoggerFilter when the specified task is running.

Example:

-            <TaskBoundAdditionalLogger
+            <TaskBoundLoggerFilter
             	id = "FxCopLogger"
             	taskname = "FxCop"
-            	class = "ICSharpCode.CodeAnalysis.FxCopLogger"/>

+ class = "ICSharpCode.CodeAnalysis.FxCopLoggerFilter"/>

ToolbarItem

diff --git a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj index 06ec4ab085..15768dfd9b 100644 --- a/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj +++ b/src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj @@ -324,7 +324,6 @@ - diff --git a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDescriptor.cs b/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDescriptor.cs deleted file mode 100644 index 5371c06fca..0000000000 --- a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDescriptor.cs +++ /dev/null @@ -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; - } - } - } -} diff --git a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs b/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs index 7dae478f4a..dfa600f5b1 100644 --- a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingDoozer.cs +++ b/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) using System; +using System.IO; using ICSharpCode.Core; +using ICSharpCode.SharpDevelop.Editor; namespace ICSharpCode.SharpDevelop { @@ -17,7 +19,7 @@ namespace ICSharpCode.SharpDevelop /// /// Only in /SharpDevelop/Workbench/LanguageBindings /// - /// A LanguageBindingDescriptor object that wraps the ILanguageBinding object. + /// The ILanguageBinding object. /// public class LanguageBindingDoozer : IDoozer { @@ -29,7 +31,28 @@ namespace ICSharpCode.SharpDevelop 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; } } } diff --git a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingService.cs b/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingService.cs index 4c78cc9c58..77b0a73b94 100644 --- a/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingService.cs +++ b/src/Main/Base/Project/Src/Services/LanguageBinding/LanguageBindingService.cs @@ -11,30 +11,14 @@ namespace ICSharpCode.SharpDevelop public static class LanguageBindingService { const string languageBindingPath = "/SharpDevelop/Workbench/LanguageBindings"; - static readonly List bindings; - - static LanguageBindingService() - { - bindings = AddInTree.BuildItems(languageBindingPath, null, false); - } /// /// Creates the binding for the specified text editor. This method never returns null. /// public static ILanguageBinding CreateBinding(ITextEditor editor) { - return new AggregatedLanguageBinding(FindMatchingBindings(editor)); - } - - static ILanguageBinding[] FindMatchingBindings(ITextEditor editor) - { - List matches = new List(); - foreach (var binding in bindings) { - if (binding.CanAttach(editor)) - matches.Add(binding.CreateBinding(editor)); - } - - return matches.ToArray(); + var bindings = AddInTree.BuildItems(languageBindingPath, editor, false); + return new AggregatedLanguageBinding(bindings); } } } diff --git a/src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.csproj b/src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.csproj index 65582bc743..8bc975b43d 100644 --- a/src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.csproj +++ b/src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.csproj @@ -1,4 +1,5 @@ - + + Exe BuildAddinDocumentation @@ -6,12 +7,18 @@ Debug AnyCPU {211887B2-E9E4-45A4-BE16-6CEA4A7E00F2} + Client + v4.0 + False + False + 4 + false bin\Debug\ False DEBUG;TRACE - True + true Full True @@ -23,9 +30,22 @@ None False + + False + Auto + 4194304 + x86 + 4096 + + + 3.5 + + + 3.5 + diff --git a/src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.sln b/src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.sln index 6a2fb885a3..4f79ddb0f5 100644 --- a/src/Tools/BuildAddinDocumentation/BuildAddinDocumentation.sln +++ b/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}" EndProject Global diff --git a/src/Tools/BuildAddinDocumentation/MainClass.cs b/src/Tools/BuildAddinDocumentation/MainClass.cs index 733654e498..2d5b123e31 100644 --- a/src/Tools/BuildAddinDocumentation/MainClass.cs +++ b/src/Tools/BuildAddinDocumentation/MainClass.cs @@ -24,14 +24,13 @@ namespace BuildAddinDocumentation List doozers = new List(); List conditions = new List(); - if (!ReadXmlDocu(srcDir + "Main\\Core\\Project", doozers, conditions)) - return; - if (!ReadXmlDocu(srcDir + "Main\\Base\\Project", doozers, conditions)) + if (!ReadXmlDocu(srcDir + "Main\\Base\\Project\\ICSharpCode.SharpDevelop.csproj", doozers, conditions)) return; // build normal SharpDevelop: 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); if (!p.WaitForExit(60000)) { 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\\ICSharpCode.Core.dll"))); + XmlDocument coreDoc = new XmlDocument(); + coreDoc.Load(srcDir + "..\\bin\\ICSharpCode.Core.xml"); + ReadXmlDocu(coreDoc, doozers, conditions); + Comparison comparison = delegate(XmlElement a, XmlElement b) { string shortNameA = a.GetAttribute("name").Substring(a.GetAttribute("name").LastIndexOf('.') + 1); string shortNameB = b.GetAttribute("name").Substring(b.GetAttribute("name").LastIndexOf('.') + 1); @@ -314,9 +316,14 @@ namespace BuildAddinDocumentation html.WriteLine(""); } - static bool ReadXmlDocu(string projectFolder, List doozers, List conditions) + static bool ReadXmlDocu(string projectFileName, List doozers, List conditions) + { + XmlDocument doc = GetXmlDocu(Path.GetFullPath(projectFileName)); + return ReadXmlDocu(doc, doozers, conditions); + } + + static bool ReadXmlDocu(XmlDocument doc, List doozers, List conditions) { - XmlDocument doc = GetXmlDocu(Path.GetFullPath(projectFolder)); if (doc == null) return false; foreach (XmlNode node in doc.DocumentElement["members"]) { XmlElement member = node as XmlElement; @@ -332,16 +339,16 @@ namespace BuildAddinDocumentation return true; } - static XmlDocument GetXmlDocu(string projectFolder) + static XmlDocument GetXmlDocu(string projectFileName) { string docFile = Path.GetFullPath("doc.xml"); if (File.Exists(docFile)) File.Delete(docFile); - string args = "\"/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 args = Path.GetFileName(projectFileName) + " \"/p:DocumentationFile=" + docFile + "\" \"/p:NoWarn=1591 1573 1574 1572 419\""; + string msbuild = Path.Combine(Path.GetDirectoryName(typeof(object).Assembly.Location), "msbuild.exe"); ProcessStartInfo info = new ProcessStartInfo(msbuild, args); - Debug.WriteLine(projectFolder + ">" + msbuild + " " + args); - info.WorkingDirectory = projectFolder; + info.WorkingDirectory = Path.GetDirectoryName(projectFileName); + Debug.WriteLine(info.WorkingDirectory + ">" + info.FileName + " " + info.Arguments); Process p = Process.Start(info); if (!p.WaitForExit(60000)) { Debug.WriteLine("msbuild did not exit");