Browse Source

Use WPF commands for Build and Run main menus

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@4143 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts^2
Sergej Andrejev 17 years ago
parent
commit
0e385eded1
  1. 204
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 516
      data/schemas/AddIn.xsd
  3. 33
      doc/technotes/ConditionList.html
  4. 264
      doc/technotes/DoozerList.html
  5. 2
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs
  6. 7
      src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs
  7. 1
      src/Main/Core/Project/Src/AddInTree/AddIn/AddIn.cs
  8. 16
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/CommandBindingDoozer.cs
  9. 10
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/InputBindingDoozer.cs
  10. 2
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/RoutedUICommandDescriptor.cs
  11. 10
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/RoutedUICommandDoozer.cs
  12. 4
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/MenuItem/MenuItemDoozer.cs
  13. 199
      src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsRegistry.cs
  14. 17
      src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsService.cs
  15. 5
      src/Main/ICSharpCode.Core.Presentation/CommandsService/WpfCommandWrapper.cs
  16. 21
      src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs

204
AddIns/ICSharpCode.SharpDevelop.addin

@ -51,22 +51,87 @@
<Import assembly=":ICSharpCode.TextEditor"/> <Import assembly=":ICSharpCode.TextEditor"/>
</Runtime> </Runtime>
<!-- Commands registry test --> <!-- Commands registry test -->
<Path name="/SharpDevelop/Workbench/RoutedUICommands"> <Path name="/SharpDevelop/Workbench/RoutedUICommands">
<RoutedUICommand id="SharpDevelop.CreateNewFile" text="Create new file" /> <RoutedUICommand name="SharpDevelop.CreateNewFile" text="Create new file" />
<RoutedUICommand name="SDBuildCommands.BuildSolution" text="${res:XML.MainMenu.BuildMenu.BuildSolution}" />
<RoutedUICommand name="SDBuildCommands.RebuildSolution" text="${res:XML.MainMenu.BuildMenu.RebuildSolution}" />
<RoutedUICommand name="SDBuildCommands.CleanSolution" text="${res:XML.MainMenu.BuildMenu.CleanSolution}" />
<RoutedUICommand name="SDBuildCommands.BuildProject" text="${res:XML.MainMenu.BuildMenu.BuildProject}" />
<RoutedUICommand name="SDBuildCommands.RebuildProject" text="${res:XML.MainMenu.BuildMenu.RebuildProject}" />
<RoutedUICommand name="SDBuildCommands.CleanProject" text="${res:XML.MainMenu.BuildMenu.CleanProject}" />
<RoutedUICommand name="SDBuildCommands.AbortBuild" text="${res:XML.MainMenu.BuildMenu.AbortBuild}" />
<RoutedUICommand name="SDBuildCommands.EditConfigurationsCommand" text="${res:XML.MainMenu.BuildMenu.EditConfigurationsPlatforms}" />
<RoutedUICommand name="SDWindowCommands.SplitView" text="TODO: Split view" />
<RoutedUICommand name="SDProjectCommands.AddNewProjectToSolution" text="${res:ProjectComponent.ContextMenu.NewProject}" />
<RoutedUICommand name="SDProjectCommands.AddExitingProjectToSolution" text="${res:ProjectComponent.ContextMenu.ExistingProject}" />
<RoutedUICommand name="SDProjectCommands.AddExistingItemToSolution" text="${res:ProjectComponent.ContextMenu.AddItem}" />
<RoutedUICommand name="SDProjectCommands.AddNewSolutionFolderToSolution" text="${res:ProjectComponent.ContextMenu.NewSolutionFolder}" />
<RoutedUICommand name="SDDebugCommands.Execute" text="${res:XML.MainMenu.RunMenu.Run}" />
<RoutedUICommand name="SDDebugCommands.ExecuteWithoutDebugger" text="${res:XML.MainMenu.DebugMenu.RunWithoutDebug}" />
<RoutedUICommand name="SDDebugCommands.StopDebugging" text="${res:XML.MainMenu.DebugMenu.Stop}" />
<RoutedUICommand name="SDDebugCommands.AttachToProcess" text="${res:XML.MainMenu.DebugMenu.Attach}" />
<RoutedUICommand name="SDDebugCommands.DetachFromProcess" text="${res:XML.MainMenu.DebugMenu.Detach}" />
<RoutedUICommand name="SDDebugCommands.BreakDebugging" text="${res:XML.MainMenu.DebugMenu.Break}" />
<RoutedUICommand name="SDDebugCommands.ContinueDebugging" text="${res:XML.MainMenu.DebugMenu.Continue}" />
<RoutedUICommand name="SDDebugCommands.StepOver" text="${res:XML.MainMenu.DebugMenu.StepOver}" />
<RoutedUICommand name="SDDebugCommands.StepInto" text="${res:XML.MainMenu.DebugMenu.StepInto}" />
<RoutedUICommand name="SDDebugCommands.StepOut" text="${res:XML.MainMenu.DebugMenu.StepOut}" />
<RoutedUICommand name="SDDebugCommands.ToggleBreakpoint" text="${res:XML.MainMenu.DebugMenu.ToggleBreakpoint}" />
</Path> </Path>
<Path name="/SharpDevelop/Workbench/CommandBindings"> <Path name="/SharpDevelop/Workbench/CommandBindings">
<CommandBinding id="CreateNewFile" <CommandBinding command="SharpDevelop.CreateNewFile" class="ICSharpCode.SharpDevelop.Commands.TestCommand" />
command="SharpDevelop.CreateNewFile"
class="ICSharpCode.SharpDevelop.Commands.TestCommand" <CommandBinding command="SDBuildCommands.BuildSolution" class="ICSharpCode.SharpDevelop.Project.Commands.Build" />
lazy="true" /> <CommandBinding command="SDBuildCommands.RebuildSolution" class="ICSharpCode.SharpDevelop.Project.Commands.Rebuild" />
<CommandBinding command="SDBuildCommands.CleanSolution" class="ICSharpCode.SharpDevelop.Project.Commands.Clean" />
<CommandBinding command="SDBuildCommands.BuildProject" class="ICSharpCode.SharpDevelop.Project.Commands.BuildProject" />
<CommandBinding command="SDBuildCommands.RebuildProject" class="ICSharpCode.SharpDevelop.Project.Commands.RebuildProject" />
<CommandBinding command="SDBuildCommands.CleanProject" class="ICSharpCode.SharpDevelop.Project.Commands.CleanProject" />
<CommandBinding command="SDBuildCommands.AbortBuild" class="ICSharpCode.SharpDevelop.Project.Commands.AbortBuild" />
<CommandBinding command="SDBuildCommands.EditConfigurationsCommand" class="ICSharpCode.SharpDevelop.Project.Commands.EditConfigurationsCommand" />
<CommandBinding command="SDProjectCommands.AddNewProjectToSolution" class="ICSharpCode.SharpDevelop.Project.Commands.AddNewProjectToSolution" />
<CommandBinding command="SDProjectCommands.AddExitingProjectToSolution" class="ICSharpCode.SharpDevelop.Project.Commands.AddExitingProjectToSolution" />
<CommandBinding command="SDProjectCommands.AddExistingItemToSolution" class="ICSharpCode.SharpDevelop.Project.Commands.AddExistingItemToSolution" />
<CommandBinding command="SDProjectCommands.AddNewSolutionFolderToSolution" class="ICSharpCode.SharpDevelop.Project.Commands.AddNewSolutionFolderToSolution" />
<CommandBinding command="SDDebugCommands.Execute" class="ICSharpCode.SharpDevelop.Project.Commands.Execute" />
<CommandBinding command="SDDebugCommands.ExecuteWithoutDebugger" class="ICSharpCode.SharpDevelop.Project.Commands.ExecuteWithoutDebugger" />
<CommandBinding command="SDDebugCommands.StopDebugging" class="ICSharpCode.SharpDevelop.Project.Commands.StopDebuggingCommand" />
<CommandBinding command="SDDebugCommands.AttachToProcess" class="ICSharpCode.SharpDevelop.Project.Commands.AttachToProcessCommand" />
<CommandBinding command="SDDebugCommands.DetachFromProcess" class="ICSharpCode.SharpDevelop.Project.Commands.DetachFromProcessCommand" />
<CommandBinding command="SDDebugCommands.BreakDebugging" class="ICSharpCode.SharpDevelop.Project.Commands.BreakDebuggingCommand" />
<CommandBinding command="SDDebugCommands.ContinueDebugging" class="ICSharpCode.SharpDevelop.Project.Commands.ContinueDebuggingCommand" />
<CommandBinding command="SDDebugCommands.StepOver" class="ICSharpCode.SharpDevelop.Project.Commands.StepDebuggingCommand" />
<CommandBinding command="SDDebugCommands.StepInto" class="ICSharpCode.SharpDevelop.Project.Commands.StepIntoDebuggingCommand" />
<CommandBinding command="SDDebugCommands.StepOut" class="ICSharpCode.SharpDevelop.Project.Commands.StepOutDebuggingCommand" />
<CommandBinding command="SDDebugCommands.ToggleBreakpoint" class="ICSharpCode.SharpDevelop.Project.Commands.ToggleBreakpointCommand" />
</Path> </Path>
<Path name="/SharpDevelop/Workbench/InputBindings"> <Path name="/SharpDevelop/Workbench/InputBindings">
<InputBinding id="CreateNewFile1" <InputBinding command="SharpDevelop.CreateNewFile" gesture="Ctrl+M" />
command="SharpDevelop.CreateNewFile"
gesture="Ctrl+M" /> <InputBinding command="SDBuildCommands.BuildSolution" gesture="F8" />
<InputBinding command="SDBuildCommands.RebuildSolution" gesture="Alt+F8" />
<InputBinding command="SDBuildCommands.BuildProject" gesture="F9" />
<InputBinding command="SDBuildCommands.RebuildProject" gesture="Alt+F9" />
<InputBinding command="SDDebugCommands.Execute" gesture="F5" />
<InputBinding command="SDDebugCommands.ExecuteWithoutDebugger" gesture="Control+F5" />
<InputBinding command="SDDebugCommands.BreakDebugging" gesture="Control+Alt+B" />
<InputBinding command="SDDebugCommands.ContinueDebugging" gesture="Control+Alt+B" />
<InputBinding command="SDDebugCommands.StepOver" gesture="F10" />
<InputBinding command="SDDebugCommands.StepInto" gesture="F11" />
<InputBinding command="SDDebugCommands.StepOut" gesture="Shift+F11" />
<InputBinding command="SDDebugCommands.ToggleBreakpoint" gesture="F7" />
</Path> </Path>
<!-- Commands registry test --> <!-- Commands registry test -->
@ -226,33 +291,41 @@
label = "${res:XML.MainMenu.BuildMenu.BuildSolution}" label = "${res:XML.MainMenu.BuildMenu.BuildSolution}"
shortcut = "F8" shortcut = "F8"
icon = "Icons.16x16.BuildCombine" icon = "Icons.16x16.BuildCombine"
class = "ICSharpCode.SharpDevelop.Project.Commands.Build"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Build"
command = "BuildCommands.Build" />
<MenuItem id = "Rebuild" <MenuItem id = "Rebuild"
label = "${res:XML.MainMenu.BuildMenu.RebuildSolution}" label = "${res:XML.MainMenu.BuildMenu.RebuildSolution}"
shortcut = "Alt|F8" shortcut = "Alt|F8"
class = "ICSharpCode.SharpDevelop.Project.Commands.Rebuild"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Rebuild"
command = "BuildCommands.Rebuild" />
<MenuItem id = "Clean" <MenuItem id = "Clean"
label = "${res:XML.MainMenu.BuildMenu.CleanSolution}" label = "${res:XML.MainMenu.BuildMenu.CleanSolution}"
class = "ICSharpCode.SharpDevelop.Project.Commands.Clean"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Clean"
command = "BuildCommands.Clean" />
<MenuItem id = "CombineBuildGroupSeparator" type = "Separator"/> <MenuItem id = "CombineBuildGroupSeparator" type = "Separator"/>
<Condition name="WriteableSolution" action="Disable"> <Condition name="WriteableSolution" action="Disable">
<MenuItem id = "CombineAddMenu" label = "${res:ProjectComponent.ContextMenu.AddMenu}" type = "Menu"> <MenuItem id = "CombineAddMenu" label = "${res:ProjectComponent.ContextMenu.AddMenu}" type = "Menu">
<MenuItem id = "AddNewProjectToSolution" <MenuItem id = "AddNewProjectToSolution"
label = "${res:ProjectComponent.ContextMenu.NewProject}" label = "${res:ProjectComponent.ContextMenu.NewProject}"
icon = "Icons.16x16.NewProjectIcon" icon = "Icons.16x16.NewProjectIcon"
class = "ICSharpCode.SharpDevelop.Project.Commands.AddNewProjectToSolution"/> class = "ICSharpCode.SharpDevelop.Project.Commands.AddNewProjectToSolution"
command = "SDProjectCommands.AddNewProjectToSolution" />
<MenuItem id = "AddExitingProjectToSolution" <MenuItem id = "AddExitingProjectToSolution"
label = "${res:ProjectComponent.ContextMenu.ExistingProject}" label = "${res:ProjectComponent.ContextMenu.ExistingProject}"
class = "ICSharpCode.SharpDevelop.Project.Commands.AddExitingProjectToSolution"/> class = "ICSharpCode.SharpDevelop.Project.Commands.AddExitingProjectToSolution"
command = "SDProjectCommands.AddExitingProjectToSolution" />
<MenuItem id = "Separator1" type = "Separator" /> <MenuItem id = "Separator1" type = "Separator" />
<MenuItem id = "AddItem" <MenuItem id = "AddItem"
label = "${res:ProjectComponent.ContextMenu.AddItem}" label = "${res:ProjectComponent.ContextMenu.AddItem}"
class = "ICSharpCode.SharpDevelop.Project.Commands.AddExistingItemToSolution"/> class = "ICSharpCode.SharpDevelop.Project.Commands.AddExistingItemToSolution"
command = "SDProjectCommands.AddExistingItemToSolution" />
<MenuItem id = "AddNewSolutionFolderToSolution" <MenuItem id = "AddNewSolutionFolderToSolution"
icon = "ProjectBrowser.SolutionFolder.CreateNew" icon = "ProjectBrowser.SolutionFolder.CreateNew"
label = "${res:ProjectComponent.ContextMenu.NewSolutionFolder}" label = "${res:ProjectComponent.ContextMenu.NewSolutionFolder}"
class = "ICSharpCode.SharpDevelop.Project.Commands.AddNewSolutionFolderToSolution"/> class = "ICSharpCode.SharpDevelop.Project.Commands.AddNewSolutionFolderToSolution"
command = "SDProjectCommands.AddNewSolutionFolderToSolution" />
</MenuItem> </MenuItem>
</Condition> </Condition>
@ -261,7 +334,8 @@
label = "${res:XML.MainMenu.EditMenu.Paste}" label = "${res:XML.MainMenu.EditMenu.Paste}"
icon = "Icons.16x16.PasteIcon" icon = "Icons.16x16.PasteIcon"
loadclasslazy = "false" loadclasslazy = "false"
class = "ICSharpCode.SharpDevelop.Project.Commands.PasteProjectBrowserNode"/> class = "ICSharpCode.SharpDevelop.Project.Commands.PasteProjectBrowserNode"
command = "" />
<MenuItem id = "Rename" <MenuItem id = "Rename"
label = "${res:ProjectComponent.ContextMenu.Rename}" label = "${res:ProjectComponent.ContextMenu.Rename}"
shortcut = "F2" shortcut = "F2"
@ -297,13 +371,16 @@
<MenuItem id = "Build project" <MenuItem id = "Build project"
label = "${res:ProjectComponent.ContextMenu.Build}" label = "${res:ProjectComponent.ContextMenu.Build}"
icon = "Icons.16x16.BuildCurrentSelectedProject" icon = "Icons.16x16.BuildCurrentSelectedProject"
class = "ICSharpCode.SharpDevelop.Project.Commands.BuildProject"/> class = "ICSharpCode.SharpDevelop.Project.Commands.BuildProject"
command = "SDBuildCommands.BuildProject" />
<MenuItem id = "Rebuild project" <MenuItem id = "Rebuild project"
label = "${res:ProjectComponent.ContextMenu.Rebuild}" label = "${res:ProjectComponent.ContextMenu.Rebuild}"
class = "ICSharpCode.SharpDevelop.Project.Commands.RebuildProject"/> class = "ICSharpCode.SharpDevelop.Project.Commands.RebuildProject"
command = "SDBuildCommands.RebuildProject" />
<MenuItem id = "Clean project" <MenuItem id = "Clean project"
label = "${res:ProjectComponent.ContextMenu.Clean}" label = "${res:ProjectComponent.ContextMenu.Clean}"
class = "ICSharpCode.SharpDevelop.Project.Commands.CleanProject"/> class = "ICSharpCode.SharpDevelop.Project.Commands.CleanProject"
command = "SDBuildCommands.CleanProject" />
<!--<MenuItem id = "Publish project" <!--<MenuItem id = "Publish project"
label = "${res:XML.MainMenu.BuildMenu.PublishProject}" label = "${res:XML.MainMenu.BuildMenu.PublishProject}"
class = "ICSharpCode.SharpDevelop.Project.Commands.PublishProject"/>--> class = "ICSharpCode.SharpDevelop.Project.Commands.PublishProject"/>-->
@ -496,7 +573,8 @@
type = "Item" type = "Item"
icon = "Icons.16x16.PasteIcon" icon = "Icons.16x16.PasteIcon"
loadclasslazy = "false" loadclasslazy = "false"
class = "ICSharpCode.SharpDevelop.Project.Commands.PasteProjectBrowserNode"/> class = "ICSharpCode.SharpDevelop.Project.Commands.PasteProjectBrowserNode"
/>
<MenuItem id = "Remove" <MenuItem id = "Remove"
label = "${res:Global.RemoveButtonText}" label = "${res:Global.RemoveButtonText}"
type = "Item" type = "Item"
@ -886,7 +964,7 @@
<ToolbarItem id = "Run" <ToolbarItem id = "Run"
icon = "Icons.16x16.RunProgramIcon" icon = "Icons.16x16.RunProgramIcon"
tooltip = "${res:XML.MainMenu.RunMenu.Run.Description}" tooltip = "${res:XML.MainMenu.RunMenu.Run.Description}"
class = "ICSharpCode.SharpDevelop.Project.Commands.Execute"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Execute" />
</Condition> </Condition>
<Condition name="DebuggerSupports" debuggersupports = "StartWithoutDebugging"> <Condition name="DebuggerSupports" debuggersupports = "StartWithoutDebugging">
@ -1269,37 +1347,37 @@
icon = "Icons.16x16.UndoIcon" icon = "Icons.16x16.UndoIcon"
type = "Item" type = "Item"
shortcut = "Control|Z" shortcut = "Control|Z"
command = "Undo"/> command = "ApplicationCommands.Undo"/>
<MenuItem id = "Redo" <MenuItem id = "Redo"
label = "${res:XML.MainMenu.EditMenu.Redo}" label = "${res:XML.MainMenu.EditMenu.Redo}"
icon = "Icons.16x16.RedoIcon" icon = "Icons.16x16.RedoIcon"
type = "Item" type = "Item"
shortcut = "Control|Y" shortcut = "Control|Y"
command = "Redo"/> command = "ApplicationCommands.Redo"/>
<MenuItem id = "Separator1" type = "Separator" /> <MenuItem id = "Separator1" type = "Separator" />
<MenuItem id = "Cut" <MenuItem id = "Cut"
label = "${res:XML.MainMenu.EditMenu.Cut}" label = "${res:XML.MainMenu.EditMenu.Cut}"
icon = "Icons.16x16.CutIcon" icon = "Icons.16x16.CutIcon"
type = "Item" type = "Item"
shortcut = "Control|X" shortcut = "Control|X"
command = "Cut"/> command = "ApplicationCommands.Cut"/>
<MenuItem id = "Copy" <MenuItem id = "Copy"
label = "${res:XML.MainMenu.EditMenu.Copy}" label = "${res:XML.MainMenu.EditMenu.Copy}"
icon = "Icons.16x16.CopyIcon" icon = "Icons.16x16.CopyIcon"
type = "Item" type = "Item"
shortcut = "Control|C" shortcut = "Control|C"
command = "Copy"/> command = "ApplicationCommands.Copy"/>
<MenuItem id = "Paste" <MenuItem id = "Paste"
label = "${res:XML.MainMenu.EditMenu.Paste}" label = "${res:XML.MainMenu.EditMenu.Paste}"
icon = "Icons.16x16.PasteIcon" icon = "Icons.16x16.PasteIcon"
type = "Item" type = "Item"
shortcut = "Control|V" shortcut = "Control|V"
command = "Paste"/> command = "ApplicationCommands.Paste"/>
<MenuItem id = "Delete" <MenuItem id = "Delete"
label = "${res:XML.MainMenu.EditMenu.Delete}" label = "${res:XML.MainMenu.EditMenu.Delete}"
icon = "Icons.16x16.DeleteIcon" icon = "Icons.16x16.DeleteIcon"
type = "Item" type = "Item"
command = "Delete"/> command = "ApplicationCommands.Delete"/>
<MenuItem id = "Separator2" type = "Separator" /> <MenuItem id = "Separator2" type = "Separator" />
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider" action="Disable"> <Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider" action="Disable">
<MenuItem id = "Insert" label = "${res:XML.MainMenu.EditMenu.Insert}" type="Menu"> <MenuItem id = "Insert" label = "${res:XML.MainMenu.EditMenu.Insert}" type="Menu">
@ -1325,7 +1403,7 @@
label = "${res:XML.MainMenu.EditMenu.SelectAll}" label = "${res:XML.MainMenu.EditMenu.SelectAll}"
type = "Item" type = "Item"
shortcut = "Control|A" shortcut = "Control|A"
command = "SelectAll"/> command = "ApplicationCommands.SelectAll"/>
<MenuItem id = "Separator4" type = "Separator" /> <MenuItem id = "Separator4" type = "Separator" />
<ComplexCondition action="Disable"> <ComplexCondition action="Disable">
<Or> <Or>
@ -1405,28 +1483,35 @@
label = "${res:XML.MainMenu.BuildMenu.BuildSolution}" label = "${res:XML.MainMenu.BuildMenu.BuildSolution}"
shortcut = "F8" shortcut = "F8"
icon = "Icons.16x16.BuildCombine" icon = "Icons.16x16.BuildCombine"
class = "ICSharpCode.SharpDevelop.Project.Commands.Build"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Build"
command = "SDBuildCommands.BuildSolution"
/>
<MenuItem id = "Rebuild" <MenuItem id = "Rebuild"
label = "${res:XML.MainMenu.BuildMenu.RebuildSolution}" label = "${res:XML.MainMenu.BuildMenu.RebuildSolution}"
shortcut = "Alt|F8" shortcut = "Alt|F8"
class = "ICSharpCode.SharpDevelop.Project.Commands.Rebuild"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Rebuild"
command = "SDBuildCommands.RebuildSolution" />
<MenuItem id = "Clean" <MenuItem id = "Clean"
label = "${res:XML.MainMenu.BuildMenu.CleanSolution}" label = "${res:XML.MainMenu.BuildMenu.CleanSolution}"
class = "ICSharpCode.SharpDevelop.Project.Commands.Clean"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Clean"
command = "SDBuildCommands.CleanSolution" />
<Condition name = "ProjectActive" activeproject="*"> <Condition name = "ProjectActive" activeproject="*">
<MenuItem id = "Separator1" type = "Separator" /> <MenuItem id = "Separator1" type = "Separator" />
<MenuItem id = "Build project" <MenuItem id = "Build project"
label = "${res:XML.MainMenu.BuildMenu.BuildProject}" label = "${res:XML.MainMenu.BuildMenu.BuildProject}"
shortcut = "F9" shortcut = "F9"
icon = "Icons.16x16.BuildCurrentSelectedProject" icon = "Icons.16x16.BuildCurrentSelectedProject"
class = "ICSharpCode.SharpDevelop.Project.Commands.BuildProject"/> class = "ICSharpCode.SharpDevelop.Project.Commands.BuildProject"
command = "SDBuildCommands.BuildProject" />
<MenuItem id = "Rebuild project" <MenuItem id = "Rebuild project"
label = "${res:XML.MainMenu.BuildMenu.RebuildProject}" label = "${res:XML.MainMenu.BuildMenu.RebuildProject}"
shortcut = "Alt|F9" shortcut = "Alt|F9"
class = "ICSharpCode.SharpDevelop.Project.Commands.RebuildProject"/> class = "ICSharpCode.SharpDevelop.Project.Commands.RebuildProject"
command = "SDBuildCommands.RebuildProject" />
<MenuItem id = "Clean project" <MenuItem id = "Clean project"
label = "${res:XML.MainMenu.BuildMenu.CleanProject}" label = "${res:XML.MainMenu.BuildMenu.CleanProject}"
class = "ICSharpCode.SharpDevelop.Project.Commands.CleanProject"/> class = "ICSharpCode.SharpDevelop.Project.Commands.CleanProject"
command = "SDBuildCommands.CleanProject" />
<!--<MenuItem id = "Publish project" <!--<MenuItem id = "Publish project"
label = "${res:XML.MainMenu.BuildMenu.PublishProject}" label = "${res:XML.MainMenu.BuildMenu.PublishProject}"
class = "ICSharpCode.SharpDevelop.Project.Commands.PublishProject"/>--> class = "ICSharpCode.SharpDevelop.Project.Commands.PublishProject"/>-->
@ -1436,21 +1521,28 @@
label="${res:XML.MainMenu.BuildMenu.AbortBuild}" label="${res:XML.MainMenu.BuildMenu.AbortBuild}"
shortcut="Pause" shortcut="Pause"
class="ICSharpCode.SharpDevelop.Project.Commands.AbortBuild" class="ICSharpCode.SharpDevelop.Project.Commands.AbortBuild"
loadclasslazy="false"/> loadclasslazy="false"
command="SDBuildCommands.AbortBuild" />
<MenuItem id = "Separator3" type = "Separator" /> <MenuItem id = "Separator3" type = "Separator" />
<MenuItem id = "SetConfiguration" <MenuItem id = "SetConfiguration"
label = "${res:XML.MainMenu.BuildMenu.SetConfiguration}" label = "${res:XML.MainMenu.BuildMenu.SetConfiguration}"
type = "Menu"> type = "Menu">
<MenuItem id = "ConfigurationBuilder" type = "Builder" class = "ICSharpCode.SharpDevelop.Project.Commands.SetConfigurationMenuBuilder"/> <MenuItem id = "ConfigurationBuilder"
type = "Builder"
class = "ICSharpCode.SharpDevelop.Project.Commands.SetConfigurationMenuBuilder" />
</MenuItem> </MenuItem>
<MenuItem id = "SetPlatform" <MenuItem id = "SetPlatform"
label = "${res:XML.MainMenu.BuildMenu.SetPlatform}" label = "${res:XML.MainMenu.BuildMenu.SetPlatform}"
type = "Menu"> type = "Menu">
<MenuItem id = "PlatformBuilder" type = "Builder" class = "ICSharpCode.SharpDevelop.Project.Commands.SetPlatformMenuBuilder"/> <MenuItem
id = "PlatformBuilder"
type = "Builder"
class = "ICSharpCode.SharpDevelop.Project.Commands.SetPlatformMenuBuilder" />
</MenuItem> </MenuItem>
<MenuItem id = "EditConfigurations" <MenuItem id = "EditConfigurations"
label = "${res:XML.MainMenu.BuildMenu.EditConfigurationsPlatforms}" label = "${res:XML.MainMenu.BuildMenu.EditConfigurationsPlatforms}"
class = "ICSharpCode.SharpDevelop.Project.Commands.EditConfigurationsCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.EditConfigurationsCommand"
command = "SDBuildCommands.EditConfigurationsCommand" />
</ComplexCondition> </ComplexCondition>
</MenuItem> <!-- end BUILD menu --> </MenuItem> <!-- end BUILD menu -->
@ -1462,7 +1554,9 @@
label = "${res:XML.MainMenu.RunMenu.Run}" label = "${res:XML.MainMenu.RunMenu.Run}"
icon = "Icons.16x16.RunProgramIcon" icon = "Icons.16x16.RunProgramIcon"
shortcut = "F5" shortcut = "F5"
class = "ICSharpCode.SharpDevelop.Project.Commands.Execute"/> class = "ICSharpCode.SharpDevelop.Project.Commands.Execute"
command = "SDDebugCommands.Execute"
/>
</Condition> </Condition>
</Condition> </Condition>
</Condition> </Condition>
@ -1474,7 +1568,8 @@
label = "${res:XML.MainMenu.DebugMenu.RunWithoutDebug}" label = "${res:XML.MainMenu.DebugMenu.RunWithoutDebug}"
icon = "Icons.16x16.Debug.StartWithoutDebugging" icon = "Icons.16x16.Debug.StartWithoutDebugging"
shortcut = "Control|F5" shortcut = "Control|F5"
class = "ICSharpCode.SharpDevelop.Project.Commands.ExecuteWithoutDebugger"/> class = "ICSharpCode.SharpDevelop.Project.Commands.ExecuteWithoutDebugger"
command = "SDDebugCommands.ExecuteWithoutDebugger" />
</Condition> </Condition>
</Condition> </Condition>
</Condition> </Condition>
@ -1484,7 +1579,8 @@
<MenuItem id = "Stop" <MenuItem id = "Stop"
label = "${res:XML.MainMenu.DebugMenu.Stop}" label = "${res:XML.MainMenu.DebugMenu.Stop}"
icon = "Icons.16x16.StopProcess" icon = "Icons.16x16.StopProcess"
class = "ICSharpCode.SharpDevelop.Project.Commands.StopDebuggingCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.StopDebuggingCommand"
command = "SDDebugCommands.StopDebugging" />
</Condition> </Condition>
</Condition> </Condition>
@ -1492,7 +1588,8 @@
<Condition name="IsProcessRunning" isprocessrunning="False" isdebugging="False" action="Disable"> <Condition name="IsProcessRunning" isprocessrunning="False" isdebugging="False" action="Disable">
<MenuItem id = "Attach" <MenuItem id = "Attach"
label = "${res:XML.MainMenu.DebugMenu.Attach}" label = "${res:XML.MainMenu.DebugMenu.Attach}"
class = "ICSharpCode.SharpDevelop.Project.Commands.AttachToProcessCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.AttachToProcessCommand"
command = "SDDebugCommands.AttachToProcess" />
</Condition> </Condition>
</Condition> </Condition>
@ -1500,7 +1597,8 @@
<Condition name="IsProcessRunning" isdebugging="True" action="Disable"> <Condition name="IsProcessRunning" isdebugging="True" action="Disable">
<MenuItem id = "Detach" <MenuItem id = "Detach"
label = "${res:XML.MainMenu.DebugMenu.Detach}" label = "${res:XML.MainMenu.DebugMenu.Detach}"
class = "ICSharpCode.SharpDevelop.Project.Commands.DetachFromProcessCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.DetachFromProcessCommand"
command = "SDDebugCommands.DetachFromProcess" />
</Condition> </Condition>
</Condition> </Condition>
@ -1511,14 +1609,16 @@
label = "${res:XML.MainMenu.DebugMenu.Break}" label = "${res:XML.MainMenu.DebugMenu.Break}"
icon = "Icons.16x16.Debug.Break" icon = "Icons.16x16.Debug.Break"
shortcut = "Control|Alt|B" shortcut = "Control|Alt|B"
class = "ICSharpCode.SharpDevelop.Project.Commands.BreakDebuggingCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.BreakDebuggingCommand"
command = "SDDebugCommands.BreakDebugging" />
</Condition> </Condition>
<Condition name="IsProcessRunning" isprocessrunning = "False" isdebugging = "True" action = "Disable"> <Condition name="IsProcessRunning" isprocessrunning = "False" isdebugging = "True" action = "Disable">
<MenuItem id = "Continue" <MenuItem id = "Continue"
label = "${res:XML.MainMenu.DebugMenu.Continue}" label = "${res:XML.MainMenu.DebugMenu.Continue}"
icon = "Icons.16x16.Debug.Continue" icon = "Icons.16x16.Debug.Continue"
shortcut = "F6" shortcut = "F6"
class = "ICSharpCode.SharpDevelop.Project.Commands.ContinueDebuggingCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.ContinueDebuggingCommand"
command = "SDDebugCommands.ContinueDebugging" />
</Condition> </Condition>
</Condition> </Condition>
@ -1529,17 +1629,20 @@
label = "${res:XML.MainMenu.DebugMenu.StepOver}" label = "${res:XML.MainMenu.DebugMenu.StepOver}"
icon = "Icons.16x16.Debug.StepOver" icon = "Icons.16x16.Debug.StepOver"
shortcut = "F10" shortcut = "F10"
class = "ICSharpCode.SharpDevelop.Project.Commands.StepDebuggingCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.StepDebuggingCommand"
command = "SDDebugCommands.StepOver" />
<MenuItem id = "Step into" <MenuItem id = "Step into"
label = "${res:XML.MainMenu.DebugMenu.StepInto}" label = "${res:XML.MainMenu.DebugMenu.StepInto}"
icon = "Icons.16x16.Debug.StepInto" icon = "Icons.16x16.Debug.StepInto"
shortcut = "F11" shortcut = "F11"
class = "ICSharpCode.SharpDevelop.Project.Commands.StepIntoDebuggingCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.StepDebuggingCommand"
command = "SDDebugCommands.StepInto" />
<MenuItem id = "Step out" <MenuItem id = "Step out"
label = "${res:XML.MainMenu.DebugMenu.StepOut}" label = "${res:XML.MainMenu.DebugMenu.StepOut}"
icon = "Icons.16x16.Debug.StepOut" icon = "Icons.16x16.Debug.StepOut"
shortcut = "Shift|F11" shortcut = "Shift|F11"
class = "ICSharpCode.SharpDevelop.Project.Commands.StepOutDebuggingCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.StepOutDebuggingCommand"
command = "SDDebugCommands.StepOut" />
</Condition> </Condition>
</Condition> </Condition>
@ -1553,7 +1656,8 @@
label = "${res:XML.MainMenu.DebugMenu.ToggleBreakpoint}" label = "${res:XML.MainMenu.DebugMenu.ToggleBreakpoint}"
shortcut = "F7" shortcut = "F7"
icon = "Bookmarks.Breakpoint" icon = "Bookmarks.Breakpoint"
class = "ICSharpCode.SharpDevelop.Project.Commands.ToggleBreakpointCommand"/> class = "ICSharpCode.SharpDevelop.Project.Commands.ToggleBreakpointCommand"
command = "SDDebugCommands.ToggleBreakpoint" />
</ComplexCondition> </ComplexCondition>
</MenuItem> <!-- end DEBUG menu --> </MenuItem> <!-- end DEBUG menu -->
@ -1617,7 +1721,7 @@
<MenuItem id = "SplitView" <MenuItem id = "SplitView"
label = "${res:XML.MainMenu.WindowMenu.Split}" label = "${res:XML.MainMenu.WindowMenu.Split}"
icon = "Icons.16x16.SplitWindow" icon = "Icons.16x16.SplitWindow"
command = "SplitView"/> command = "SDWindowCommands.SplitView"/>
<MenuItem id = "CloseAll" <MenuItem id = "CloseAll"
label = "${res:XML.MainMenu.FileMenu.CloseAll}" label = "${res:XML.MainMenu.FileMenu.CloseAll}"
icon = "Icons.16x16.CloseAllDocuments" icon = "Icons.16x16.CloseAllDocuments"

516
data/schemas/AddIn.xsd

@ -114,24 +114,27 @@
<!-- !!! INSERT DOOZER LIST !!! --> <!-- !!! INSERT DOOZER LIST !!! -->
<xs:element ref="Class" /> <xs:element ref="Class" />
<xs:element ref="CodeCompletionBinding" /> <xs:element ref="CodeCompletionBinding" />
<xs:element ref="CommandBinding" />
<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="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="InputBinding" />
<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="ProjectContentRegistry" /> <xs:element ref="ProjectContentRegistry" />
<xs:element ref="RoutedUICommand" />
<xs:element ref="SchemeExtension" /> <xs:element ref="SchemeExtension" />
<xs:element ref="String" />
<xs:element ref="SyntaxMode" /> <xs:element ref="SyntaxMode" />
<xs:element ref="String" />
<xs:element ref="TaskBoundAdditionalLogger" /> <xs:element ref="TaskBoundAdditionalLogger" />
<xs:element ref="ToolbarItem" /> <xs:element ref="ToolbarItem" />
</xs:choice> </xs:choice>
@ -184,24 +187,27 @@
<!-- !!! INSERT DOOZER LIST !!! --> <!-- !!! INSERT DOOZER LIST !!! -->
<xs:element ref="Class" /> <xs:element ref="Class" />
<xs:element ref="CodeCompletionBinding" /> <xs:element ref="CodeCompletionBinding" />
<xs:element ref="CommandBinding" />
<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="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="InputBinding" />
<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="ProjectContentRegistry" /> <xs:element ref="ProjectContentRegistry" />
<xs:element ref="RoutedUICommand" />
<xs:element ref="SchemeExtension" /> <xs:element ref="SchemeExtension" />
<xs:element ref="String" />
<xs:element ref="SyntaxMode" /> <xs:element ref="SyntaxMode" />
<xs:element ref="String" />
<xs:element ref="TaskBoundAdditionalLogger" /> <xs:element ref="TaskBoundAdditionalLogger" />
<xs:element ref="ToolbarItem" /> <xs:element ref="ToolbarItem" />
</xs:choice> </xs:choice>
@ -264,8 +270,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>
@ -285,16 +291,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>
@ -307,36 +313,81 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="CommandBinding">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="command" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of routed UI command which triggers this binding
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Class implementing System.Window.Input.ICommand or
ICSharpCode.Core class. CanExecute and Executed methods
are used to handle raised event
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="lazy" use="optional">
<xs:annotation>
<xs:documentation>
Use lazy loading. If addin containing binded command is
not loaded yet load asseblies referenced in add-in
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="1" />
<xs:enumeration value="0" />
<xs:enumeration value="true" />
<xs:enumeration value="false" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="CommandBinding" type="CommandBinding">
<xs:annotation>
<xs:documentation>
Creates descriptor containing information about command binding
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="CustomProperty"> <xs:complexType name="CustomProperty">
<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 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>
@ -355,23 +406,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>
@ -390,43 +441,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>
@ -439,47 +490,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>
@ -498,22 +516,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">
@ -525,9 +543,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>
@ -549,16 +567,16 @@
<xs:attribute name="keys" use="required" type="xs:string"> <xs:attribute name="keys" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Comma-separated list of keyboard shortcuts that activate the edit action. Comma-separated list of keyboard shortcuts that activate the edit action.
E.g. "Control|C,Control|Insert" E.g. "Control|C,Control|Insert"
</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 IEditAction class. Name of the IEditAction class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -577,15 +595,15 @@
<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>
@ -604,24 +622,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>
@ -641,18 +659,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>
@ -667,35 +685,62 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="InputBinding">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="command" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of routed UI command which is triggered by this binding
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="gesture" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Gesture which triggers this binding
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="InputBinding" type="InputBinding">
<xs:annotation>
<xs:documentation>
Creates descriptor containing information about input binding
</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="guid" use="required" type="xs:string"> <xs:attribute name="guid" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Project type GUID of the project used by MsBuild. Project type GUID of the project used by MsBuild.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="supportedextensions" use="required" type="xs:string"> <xs:attribute name="supportedextensions" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo") Semicolon-separated list of file extensions that are compilable files in the project. (e.g. ".boo")
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="projectfileextension" use="required" type="xs:string"> <xs:attribute name="projectfileextension" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
File extension of project files. (e.g. ".booproj") File extension of project files. (e.g. ".booproj")
</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>
@ -720,18 +765,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">
@ -747,39 +792,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>
@ -792,49 +846,82 @@
</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:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -853,22 +940,22 @@
<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="projectfileextension" use="optional" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
File extension of project files. (e.g. ".booproj") File extension of project files. (e.g. ".booproj")
</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>
Name of the IParser class. Name of the IParser class.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -887,8 +974,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>
@ -901,50 +988,57 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="SchemeExtension"> <xs:complexType name="RoutedUICommand">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="scheme" use="required" type="xs:string"> <xs:attribute name="name" 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') Routed UI command name
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<xs:attribute name="class" use="required" type="xs:string"> <xs:attribute name="text" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension). Routed UI command displayed name
</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="SchemeExtension" type="SchemeExtension"> <xs:element name="RoutedUICommand" type="RoutedUICommand">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Creates browser scheme extensions that can intercept calls on one protocol. Creates descriptor containing information about routed UI command
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="String"> <xs:complexType name="SchemeExtension">
<xs:complexContent> <xs:complexContent>
<xs:extension base="AbstractCodon"> <xs:extension base="AbstractCodon">
<xs:attribute name="text" use="required" type="xs:string"> <xs:attribute name="scheme" use="required" type="xs:string">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
The string to return. Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage')
</xs:documentation> </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="class" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension).
</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="String" type="String"> <xs:element name="SchemeExtension" type="SchemeExtension">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
Creates a string. Creates browser scheme extensions that can intercept calls on one protocol.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
@ -954,22 +1048,22 @@
<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>
Name of the language for which the syntax mode is used. Name of the language for which the syntax mode is used.
</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>
Semicolon-separated list of file extensions for which the syntax mode is used. Semicolon-separated list of file extensions for which the syntax mode is used.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
<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>
Fully qualified name of the resource file. Fully qualified name of the resource file.
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:attribute> </xs:attribute>
</xs:extension> </xs:extension>
@ -983,22 +1077,42 @@
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:element> </xs:element>
<xs:complexType name="String">
<xs:complexContent>
<xs:extension base="AbstractCodon">
<xs:attribute name="text" use="required" type="xs:string">
<xs:annotation>
<xs:documentation>
The string to return.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="String" type="String">
<xs:annotation>
<xs:documentation>
Creates a string.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="TaskBoundAdditionalLogger"> <xs:complexType name="TaskBoundAdditionalLogger">
<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 IMSBuildAdditionalLogger 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>
@ -1024,23 +1138,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">
@ -1055,24 +1169,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>

33
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.4126.</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>
@ -492,4 +494,29 @@ It is based on SharpDevelop 3.0.0.3062.</p>
<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>

264
doc/technotes/DoozerList.html

@ -5,28 +5,31 @@
</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.4126.</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="#CommandBinding">CommandBinding</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="#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="#InputBinding">InputBinding</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="#ProjectContentRegistry">ProjectContentRegistry</a> <li><a href="#ProjectContentRegistry">ProjectContentRegistry</a>
<li><a href="#RoutedUICommand">RoutedUICommand</a>
<li><a href="#SchemeExtension">SchemeExtension</a> <li><a href="#SchemeExtension">SchemeExtension</a>
<li><a href="#String">String</a>
<li><a href="#SyntaxMode">SyntaxMode</a> <li><a href="#SyntaxMode">SyntaxMode</a>
<li><a href="#String">String</a>
<li><a href="#TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a> <li><a href="#TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a>
<li><a href="#ToolbarItem">ToolbarItem</a> <li><a href="#ToolbarItem">ToolbarItem</a>
</ul> </ul>
@ -70,7 +73,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.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>
@ -103,6 +106,54 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</tr> </tr>
</table> </table>
</div> </div>
<div>
<h2><a name="CommandBinding">CommandBinding</a></h2>
<p>
Creates descriptor containing information about command binding
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.Core.CommandBindingDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th>command:</td>
<td class="userequired">required</td>
<td>
Name of routed UI command which triggers this binding
</td>
</tr>
<tr>
<th>class:</td>
<td class="userequired">required</td>
<td>
Class implementing System.Window.Input.ICommand or
ICSharpCode.Core class. CanExecute and Executed methods
are used to handle raised event
</td>
</tr>
<tr>
<th>lazy:</td>
<td class="userequired">optional</td>
<td>
Use lazy loading. If addin containing binded command is
not loaded yet load asseblies referenced in add-in
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Usage:</td>
<td>Only in /SharpDevelop/Workbench/CommandBindings</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
CommandBindingDescriptor object
</td>
</tr>
</table>
</div>
<div> <div>
<h2><a name="CustomProperty">CustomProperty</a></h2> <h2><a name="CustomProperty">CustomProperty</a></h2>
<p> <p>
@ -275,50 +326,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>
@ -590,6 +597,44 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</tr> </tr>
</table> </table>
</div> </div>
<div>
<h2><a name="InputBinding">InputBinding</a></h2>
<p>
Creates descriptor containing information about input binding
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.Core.InputBindingDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th>command:</td>
<td class="userequired">required</td>
<td>
Name of routed UI command which is triggered by this binding
</td>
</tr>
<tr>
<th>gesture:</td>
<td class="userequired">required</td>
<td>
Gesture which triggers this binding
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Usage:</td>
<td>Only in /SharpDevelop/Workbench/InputBindings</td>
</tr>
<tr>
<th colspan=2>Returns:</td>
<td>
InputBindingDescriptor object
</td>
</tr>
</table>
</div>
<div> <div>
<h2><a name="LanguageBinding">LanguageBinding</a></h2> <h2><a name="LanguageBinding">LanguageBinding</a></h2>
<p> <p>
@ -693,6 +738,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 +776,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 +785,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>
@ -878,66 +976,77 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</table> </table>
</div> </div>
<div> <div>
<h2><a name="SchemeExtension">SchemeExtension</a></h2> <h2><a name="RoutedUICommand">RoutedUICommand</a></h2>
<p> <p>
Creates browser scheme extensions that can intercept calls on one protocol. Creates descriptor containing information about routed UI command
</p> </p>
<table> <table>
<tr> <tr>
<th colspan=2>Doozer name:</td> <th colspan=2>Doozer name:</td>
<td>ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionDoozer</td> <td>ICSharpCode.Core.RoutedUICommandDoozer</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>scheme:</td> <th>name:</td>
<td class="userequired">required</td> <td class="userequired">required</td>
<td> <td>
Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage') Routed UI command name
</td> </td>
</tr> </tr>
<tr> <tr>
<th>class:</td> <th>text:</td>
<td class="userequired">required</td> <td class="userequired">required</td>
<td> <td>
Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension). Routed UI command displayed name
</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/Views/Browser/SchemeExtensions</td> <td>Only in /SharpDevelop/Workbench/CommandBindings</td>
</tr> </tr>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>
An SchemeExtensionDescriptor object that exposes the protocol name and ISchemeExtension object (lazy-loading). RoutedUICommandDescriptor object
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<div> <div>
<h2><a name="String">String</a></h2> <h2><a name="SchemeExtension">SchemeExtension</a></h2>
<p> <p>
Creates a string. Creates browser scheme extensions that can intercept calls on one protocol.
</p> </p>
<table> <table>
<tr> <tr>
<th colspan=2>Doozer name:</td> <th colspan=2>Doozer name:</td>
<td>ICSharpCode.Core.StringDoozer</td> <td>ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionDoozer</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>text:</td> <th>scheme:</td>
<td class="userequired">required</td> <td class="userequired">required</td>
<td> <td>
The string to return. Specifies the name of the protocol the extension handles. (e.g. 'ms-help' or 'startpage')
</td>
</tr>
<tr>
<th>class:</td>
<td class="userequired">required</td>
<td>
Name of the ISchemeExtension class (normally deriving from DefaultSchemeExtension).
</td> </td>
</tr> </tr>
<tr><td colspan=3><hr></td></tr> <tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Usage:</td>
<td>Only in /SharpDevelop/Views/Browser/SchemeExtensions</td>
</tr>
<tr> <tr>
<th colspan=2>Returns:</td> <th colspan=2>Returns:</td>
<td> <td>
The string specified by 'text', passed through the StringParser. An SchemeExtensionDescriptor object that exposes the protocol name and ISchemeExtension object (lazy-loading).
</td> </td>
</tr> </tr>
</table> </table>
@ -989,6 +1098,33 @@ It is based on SharpDevelop 3.0.0.3062.</p>
</tr> </tr>
</table> </table>
</div> </div>
<div>
<h2><a name="String">String</a></h2>
<p>
Creates a string.
</p>
<table>
<tr>
<th colspan=2>Doozer name:</td>
<td>ICSharpCode.Core.StringDoozer</td>
</tr>
<tr><td colspan=3><hr><h3>Attributes:</h3></td></tr>
<tr>
<th>text:</td>
<td class="userequired">required</td>
<td>
The string to return.
</td>
</tr>
<tr><td colspan=3><hr></td></tr>
<tr>
<th colspan=2>Returns:</td>
<td>
The string specified by 'text', passed through the StringParser.
</td>
</tr>
</table>
</div>
<div> <div>
<h2><a name="TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a></h2> <h2><a name="TaskBoundAdditionalLogger">TaskBoundAdditionalLogger</a></h2>
<p> <p>

2
src/Main/Base/Project/Src/Gui/Workbench/Layouts/AvalonWorkbenchWindow.cs

@ -97,6 +97,8 @@ namespace ICSharpCode.SharpDevelop.Gui
CommandsRegistry.LoadContext(contextName, (UIElement)Content); CommandsRegistry.LoadContext(contextName, (UIElement)Content);
CommandsRegistry.LoadContext(contextName, (UIElement)Content);
CommandsRegistry.RegisterCommandBindingsUpdateHandler( CommandsRegistry.RegisterCommandBindingsUpdateHandler(
contextName, contextName,
delegate { delegate {

7
src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs

@ -82,6 +82,8 @@ namespace ICSharpCode.SharpDevelop.Gui
CommandsRegistry.DefaultContext = this.GetType().Name; CommandsRegistry.DefaultContext = this.GetType().Name;
CommandsService.RegisterBuiltInRoutedUICommands();
// Load all commands and and key bindings from addin tree // Load all commands and and key bindings from addin tree
CommandsService.RegisterRoutedUICommands(this, "/SharpDevelop/Workbench/RoutedUICommands"); CommandsService.RegisterRoutedUICommands(this, "/SharpDevelop/Workbench/RoutedUICommands");
CommandsService.RegisterCommandBindings(this, "/SharpDevelop/Workbench/CommandBindings"); CommandsService.RegisterCommandBindings(this, "/SharpDevelop/Workbench/CommandBindings");
@ -91,16 +93,17 @@ namespace ICSharpCode.SharpDevelop.Gui
CommandsRegistry.LoadAddinCommands(AddInTree.AddIns.FirstOrDefault(a => a.Name == "SharpDevelop")); CommandsRegistry.LoadAddinCommands(AddInTree.AddIns.FirstOrDefault(a => a.Name == "SharpDevelop"));
CommandsRegistry.RegisterCommandBindingsUpdateHandler(CommandsRegistry.DefaultContext, delegate { CommandsRegistry.RegisterCommandBindingsUpdateHandler(CommandsRegistry.DefaultContext, delegate {
var bindings = CommandsRegistry.GetCommandBindings(CommandsRegistry.DefaultContext); var bindings = CommandsRegistry.GetCommandBindings(CommandsRegistry.DefaultContext, null, null);
CommandsRegistry.RemoveManagedCommandBindings(CommandBindings); CommandsRegistry.RemoveManagedCommandBindings(CommandBindings);
CommandBindings.AddRange(bindings); CommandBindings.AddRange(bindings);
}); });
CommandsRegistry.RegisterInputBindingUpdateHandler(CommandsRegistry.DefaultContext, delegate { CommandsRegistry.RegisterInputBindingUpdateHandler(CommandsRegistry.DefaultContext, delegate {
var bindings = CommandsRegistry.GetInputBindings(CommandsRegistry.DefaultContext); var bindings = CommandsRegistry.GetInputBindings(CommandsRegistry.DefaultContext, null, null);
CommandsRegistry.RemoveManagedInputBindings(InputBindings); CommandsRegistry.RemoveManagedInputBindings(InputBindings);
InputBindings.AddRange(bindings); InputBindings.AddRange(bindings);
}); });
CommandsRegistry.InvokeCommandBindingUpdateHandlers(CommandsRegistry.DefaultContext); CommandsRegistry.InvokeCommandBindingUpdateHandlers(CommandsRegistry.DefaultContext);
CommandsRegistry.InvokeInputBindingUpdateHandlers(CommandsRegistry.DefaultContext); CommandsRegistry.InvokeInputBindingUpdateHandlers(CommandsRegistry.DefaultContext);

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

@ -236,6 +236,7 @@ namespace ICSharpCode.Core
throw new AddInLoadException("Import node requires ONE attribute."); throw new AddInLoadException("Import node requires ONE attribute.");
} }
string pathName = reader.GetAttribute(0); string pathName = reader.GetAttribute(0);
ExtensionPath extensionPath = addIn.GetExtensionPath(pathName); ExtensionPath extensionPath = addIn.GetExtensionPath(pathName);
if (!reader.IsEmptyElement) { if (!reader.IsEmptyElement) {
ExtensionPath.SetUp(extensionPath, reader, "Path"); ExtensionPath.SetUp(extensionPath, reader, "Path");

16
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/CommandBindingDoozer.cs

@ -2,6 +2,22 @@ using System;
namespace ICSharpCode.Core namespace ICSharpCode.Core
{ {
/// <attribute name="command" use="required">
/// Name of routed UI command which triggers this binding
/// </attribute>
/// <attribute name="class" use="required">
/// Class implementing System.Window.Input.ICommand or
/// ICSharpCode.Core class. CanExecute and Executed methods
/// are used to handle raised event
/// </attribute>
/// <attribute name="lazy" use="optional" enum="1;0;true;false">
/// Use lazy loading. If addin containing binded command is
/// not loaded yet load asseblies referenced in add-in
/// </attribute>
/// <usage>Only in /SharpDevelop/Workbench/CommandBindings</usage>
/// <returns>
/// CommandBindingDescriptor object
/// </returns>
/// <summary> /// <summary>
/// Creates descriptor containing information about command binding /// Creates descriptor containing information about command binding
/// </summary> /// </summary>

10
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/InputBindingDoozer.cs

@ -2,6 +2,16 @@ using System;
namespace ICSharpCode.Core namespace ICSharpCode.Core
{ {
/// <attribute name="command" use="required">
/// Name of routed UI command which is triggered by this binding
/// </attribute>
/// <attribute name="gesture" use="required">
/// Gesture which triggers this binding
/// </attribute>
/// <usage>Only in /SharpDevelop/Workbench/InputBindings</usage>
/// <returns>
/// InputBindingDescriptor object
/// </returns>
/// <summary> /// <summary>
/// Creates descriptor containing information about input binding /// Creates descriptor containing information about input binding
/// </summary> /// </summary>

2
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/RoutedUICommandDescriptor.cs

@ -23,7 +23,7 @@ namespace ICSharpCode.Core
/// </summary> /// </summary>
public string Name { public string Name {
get { get {
return codon.Properties["id"]; return codon.Properties["name"];
} }
} }

10
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/Command/RoutedUICommandDoozer.cs

@ -2,6 +2,16 @@ using System;
namespace ICSharpCode.Core namespace ICSharpCode.Core
{ {
/// <attribute name="name" use="required">
/// Routed UI command name
/// </attribute>
/// <attribute name="text" use="required">
/// Routed UI command displayed name
/// </attribute>
/// <usage>Only in /SharpDevelop/Workbench/CommandBindings</usage>
/// <returns>
/// RoutedUICommandDescriptor object
/// </returns>
/// <summary> /// <summary>
/// Creates descriptor containing information about routed UI command /// Creates descriptor containing information about routed UI command
/// </summary> /// </summary>

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

@ -67,6 +67,10 @@ namespace ICSharpCode.Core
public object BuildItem(object caller, Codon codon, ArrayList subItems) public object BuildItem(object caller, Codon codon, ArrayList subItems)
{ {
if(codon.Properties["command"] == "BuildCommands.Rebuild")
{
}
return new MenuItemDescriptor(caller, codon, subItems); return new MenuItemDescriptor(caller, codon, subItems);
} }
} }

199
src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsRegistry.cs

@ -30,8 +30,8 @@ namespace ICSharpCode.Core.Presentation
internal static Dictionary<string, System.Windows.Input.ICommand> commands = new Dictionary<string, System.Windows.Input.ICommand>(); internal static Dictionary<string, System.Windows.Input.ICommand> commands = new Dictionary<string, System.Windows.Input.ICommand>();
internal static Dictionary<string, UIElement> contexts = new Dictionary<string, UIElement>(); internal static Dictionary<string, UIElement> contexts = new Dictionary<string, UIElement>();
private static Dictionary<string, List<BindingsUpdatedHandler>> commandBindingsUpdateHandlers = new Dictionary<string, List<BindingsUpdatedHandler>>(); private static Dictionary<string, List<WeakReference>> commandBindingsUpdateHandlers = new Dictionary<string, List<WeakReference>>();
private static Dictionary<string, List<BindingsUpdatedHandler>> inputBindingsUpdateHandlers = new Dictionary<string, List<BindingsUpdatedHandler>>(); private static Dictionary<string, List<WeakReference>> inputBindingsUpdateHandlers = new Dictionary<string, List<WeakReference>>();
/// <summary> /// <summary>
/// Get reference to routed UI command by name /// Get reference to routed UI command by name
@ -39,10 +39,11 @@ namespace ICSharpCode.Core.Presentation
/// <param name="routedCommandName">Routed command name</param> /// <param name="routedCommandName">Routed command name</param>
/// <returns>Routed command instance</returns> /// <returns>Routed command instance</returns>
public static RoutedUICommand GetRoutedUICommand(string routedCommandName) { public static RoutedUICommand GetRoutedUICommand(string routedCommandName) {
RoutedUICommand routedUICommand; if(routedCommands.ContainsKey(routedCommandName)) {
routedCommands.TryGetValue(routedCommandName, out routedUICommand); return routedCommands[routedCommandName];
} else {
return routedUICommand; throw new IndexOutOfRangeException("Routed UI command with name " + routedCommandName + " was not found");
}
} }
/// <summary> /// <summary>
@ -59,7 +60,7 @@ namespace ICSharpCode.Core.Presentation
if(!routedCommands.ContainsKey(routedCommandName)) { if(!routedCommands.ContainsKey(routedCommandName)) {
routedCommands.Add(routedCommandName, routedCommand); routedCommands.Add(routedCommandName, routedCommand);
} else { } else {
throw new IndexOutOfRangeException("Routed command with name " + routedCommandName + " is already registered"); throw new IndexOutOfRangeException("Routed UI command with name " + routedCommandName + " is already registered");
} }
} }
@ -89,15 +90,15 @@ namespace ICSharpCode.Core.Presentation
} }
/// <summary> /// <summary>
/// Remove input binding from global registry /// Remove input bindings which satisfy provided arguments
/// ///
/// Null attributes are ignored and oly bindings which satisfy not null arguments are removed /// Null arguments are ignored
/// </summary> /// </summary>
/// <param name="contextName">Context class full name</param> /// <param name="contextName">Context class full name</param>
/// <param name="routedCommandName">Routed UI command name</param> /// <param name="routedCommandName">Routed UI command name</param>
/// <param name="gesture">Gesture</param> /// <param name="gesture">Gesture</param>
public static void UnregisterInputBindings(string contextName, string routedCommandName, KeyGesture gesture) { public static void UnregisterInputBindings(string contextName, string routedCommandName, KeyGesture gesture) {
for(var i = inputBidnings.Count - 1; i >= 0; i--) { for(int i = inputBidnings.Count - 1; i >= 0; i--) {
if((contextName == null || inputBidnings[i].ContextName == contextName) if((contextName == null || inputBidnings[i].ContextName == contextName)
&& (routedCommandName == null || inputBidnings[i].RoutedCommandName == routedCommandName) && (routedCommandName == null || inputBidnings[i].RoutedCommandName == routedCommandName)
&& (gesture == null || inputBidnings[i].Gesture == gesture)) { && (gesture == null || inputBidnings[i].Gesture == gesture)) {
@ -113,12 +114,28 @@ namespace ICSharpCode.Core.Presentation
/// <param name="handler">Update handler delegate</param> /// <param name="handler">Update handler delegate</param>
public static void RegisterInputBindingUpdateHandler(string contextName, BindingsUpdatedHandler handler) { public static void RegisterInputBindingUpdateHandler(string contextName, BindingsUpdatedHandler handler) {
if(!inputBindingsUpdateHandlers.ContainsKey(contextName)) { if(!inputBindingsUpdateHandlers.ContainsKey(contextName)) {
inputBindingsUpdateHandlers.Add(contextName, new List<BindingsUpdatedHandler>()); inputBindingsUpdateHandlers.Add(contextName, new List<WeakReference>());
} }
inputBindingsUpdateHandlers[contextName].Add(handler); inputBindingsUpdateHandlers[contextName].Add(new WeakReference(handler));
} }
/// <summary>
/// Remove input bindings update handler
/// </summary>
/// <param name="contextName">Context class full name</param>
/// <param name="handler">Update handler delegate</param>
public static void UnregisterInputBindingUpdateHandler(string contextName, BindingsUpdatedHandler handler) {
if(!inputBindingsUpdateHandlers.ContainsKey(contextName)) {
for(int i = inputBindingsUpdateHandlers[contextName].Count - 1; i >= 0; i++) {
if(inputBindingsUpdateHandlers[contextName][i].Target == handler) {
inputBindingsUpdateHandlers[contextName].RemoveAt(i);
}
}
}
}
/// <summary> /// <summary>
/// Invoke registered input bindings update handlers registered in specified context /// Invoke registered input bindings update handlers registered in specified context
/// </summary> /// </summary>
@ -127,13 +144,17 @@ namespace ICSharpCode.Core.Presentation
if(contextName != null) { if(contextName != null) {
if(inputBindingsUpdateHandlers.ContainsKey(contextName)) { if(inputBindingsUpdateHandlers.ContainsKey(contextName)) {
foreach(var handler in inputBindingsUpdateHandlers[contextName]) { foreach(var handler in inputBindingsUpdateHandlers[contextName]) {
handler.Invoke(); if(handler != null && handler.Target != null) {
((BindingsUpdatedHandler)handler.Target).Invoke();
}
} }
} }
} else { } else {
foreach(var contextHandlers in inputBindingsUpdateHandlers) { foreach(var contextHandlers in inputBindingsUpdateHandlers) {
foreach(var handler in contextHandlers.Value) { foreach(var handler in contextHandlers.Value) {
handler.Invoke(); if(handler != null && handler.Target != null) {
((BindingsUpdatedHandler)handler.Target).Invoke();
}
} }
} }
} }
@ -144,7 +165,7 @@ namespace ICSharpCode.Core.Presentation
/// </summary> /// </summary>
/// <param name="inputBindingCollection"></param> /// <param name="inputBindingCollection"></param>
public static void RemoveManagedInputBindings(InputBindingCollection inputBindingCollection) { public static void RemoveManagedInputBindings(InputBindingCollection inputBindingCollection) {
for(var i = inputBindingCollection.Count - 1; i >= 0; i--) { for(int i = inputBindingCollection.Count - 1; i >= 0; i--) {
if(inputBindingCollection[i] is ManagedInputBinding) { if(inputBindingCollection[i] is ManagedInputBinding) {
inputBindingCollection.RemoveAt(i); inputBindingCollection.RemoveAt(i);
} }
@ -168,13 +189,15 @@ namespace ICSharpCode.Core.Presentation
} }
/// <summary> /// <summary>
/// Remove registered command bindnig from global registry /// Remove all command bindings which satisfy provided parameters
///
/// Null arguments are ignored
/// </summary> /// </summary>
/// <param name="contextName"></param> /// <param name="contextName">Context class full name</param>
/// <param name="routedCommandName"></param> /// <param name="routedCommandName">Routed UI command name</param>
/// <param name="className"></param> /// <param name="className">Command full name to which invokation event is routed</param>
public static void UnregisterCommandBindings(string contextName, string routedCommandName, string className) { public static void UnregisterCommandBindings(string contextName, string routedCommandName, string className) {
for(var i = commandBindings.Count - 1; i >= 0; i--) { for(int i = commandBindings.Count - 1; i >= 0; i--) {
if((contextName == null || commandBindings[i].ContextName == contextName) if((contextName == null || commandBindings[i].ContextName == contextName)
&& (routedCommandName == null || commandBindings[i].RoutedCommandName == routedCommandName) && (routedCommandName == null || commandBindings[i].RoutedCommandName == routedCommandName)
&& (className == null || commandBindings[i].ClassName == className)) { && (className == null || commandBindings[i].ClassName == className)) {
@ -190,10 +213,25 @@ namespace ICSharpCode.Core.Presentation
/// <param name="handler">Update handler delegate</param> /// <param name="handler">Update handler delegate</param>
public static void RegisterCommandBindingsUpdateHandler(string contextName, BindingsUpdatedHandler handler) { public static void RegisterCommandBindingsUpdateHandler(string contextName, BindingsUpdatedHandler handler) {
if(!commandBindingsUpdateHandlers.ContainsKey(contextName)) { if(!commandBindingsUpdateHandlers.ContainsKey(contextName)) {
commandBindingsUpdateHandlers.Add(contextName, new List<BindingsUpdatedHandler>()); commandBindingsUpdateHandlers.Add(contextName, new List<WeakReference>());
} }
commandBindingsUpdateHandlers[contextName].Add(handler); commandBindingsUpdateHandlers[contextName].Add(new WeakReference(handler));
}
/// <summary>
/// Remove handler command bindings update handler
/// </summary>
/// <param name="contextName">Context class full name</param>
/// <param name="handler">Update handler delegate</param>
public static void UnregisterCommandBindingsUpdateHandler(string contextName, BindingsUpdatedHandler handler) {
if(commandBindingsUpdateHandlers.ContainsKey(contextName)) {
for(int i = commandBindingsUpdateHandlers[contextName].Count - 1; i >= 0; i--) {
if(commandBindingsUpdateHandlers[contextName][i].Target == handler) {
commandBindingsUpdateHandlers[contextName].RemoveAt(i);
}
}
}
} }
/// <summary> /// <summary>
@ -204,13 +242,17 @@ namespace ICSharpCode.Core.Presentation
if(contextName != null) { if(contextName != null) {
if(commandBindingsUpdateHandlers.ContainsKey(contextName)) { if(commandBindingsUpdateHandlers.ContainsKey(contextName)) {
foreach(var handler in commandBindingsUpdateHandlers[contextName]) { foreach(var handler in commandBindingsUpdateHandlers[contextName]) {
handler.Invoke(); if(handler != null && handler.Target != null) {
((BindingsUpdatedHandler)handler.Target).Invoke();
}
} }
} }
} else { } else {
foreach(var contextHandlers in commandBindingsUpdateHandlers) { foreach(var contextHandlers in commandBindingsUpdateHandlers) {
foreach(var handler in contextHandlers.Value) { foreach(var handler in contextHandlers.Value) {
handler.Invoke(); if(handler != null && handler.Target != null) {
((BindingsUpdatedHandler)handler.Target).Invoke();
}
} }
} }
} }
@ -221,7 +263,7 @@ namespace ICSharpCode.Core.Presentation
/// </summary> /// </summary>
/// <param name="commandBindingsCollection"></param> /// <param name="commandBindingsCollection"></param>
public static void RemoveManagedCommandBindings(CommandBindingCollection commandBindingsCollection) { public static void RemoveManagedCommandBindings(CommandBindingCollection commandBindingsCollection) {
for(var i = commandBindingsCollection.Count - 1; i >= 0; i--) { for(int i = commandBindingsCollection.Count - 1; i >= 0; i--) {
if(commandBindingsCollection[i] is ManagedCommandBinding) { if(commandBindingsCollection[i] is ManagedCommandBinding) {
commandBindingsCollection.RemoveAt(i); commandBindingsCollection.RemoveAt(i);
} }
@ -265,62 +307,105 @@ namespace ICSharpCode.Core.Presentation
/// <summary> /// <summary>
/// Get all commands bindings registered in provided context /// Get list of all command bindings which satisfy provided parameters
///
/// Null arguments are ignored
/// </summary> /// </summary>
/// <param name="contextName">Context class full name</param> /// <param name="contextName">Context class full name</param>
/// <param name="routedCommandName">Context class full name</param>
/// <param name="className">Context class full name</param>
/// <returns>Collection of managed command bindings</returns> /// <returns>Collection of managed command bindings</returns>
public static CommandBindingCollection GetCommandBindings(string contextName) { public static CommandBindingCollection GetCommandBindings(string contextName, string routedCommandName, string className) {
var bindings = new CommandBindingCollection(); var bindings = new CommandBindingCollection();
foreach(var binding in commandBindings) { foreach(var binding in commandBindings) {
if(binding.ContextName != contextName) continue; if((contextName == null || binding.ContextName == contextName)
&& (routedCommandName == null || binding.RoutedCommandName == routedCommandName)
&& (className == null || binding.ClassName == className)) {
var managedCommandBinding = new ManagedCommandBinding(binding.RoutedCommand); var handlers = new CommandBindingHandlersContainer(binding);
managedCommandBinding.CanExecute += delegate(Object sender, CanExecuteRoutedEventArgs e) { var managedCommandBinding = new ManagedCommandBinding(binding.RoutedCommand);
if(binding.IsLazy && binding.Class == null) { managedCommandBinding.CanExecute += handlers.CanExecuteHandler;
e.CanExecute = true; managedCommandBinding.Executed += handlers.ExecutedHanler;
} else if(binding.Class == null) {
e.CanExecute = false;
} else {
e.CanExecute = binding.Class.CanExecute(e.Parameter);
}
};
managedCommandBinding.Executed += delegate(Object sender, ExecutedRoutedEventArgs e) {
if(binding.IsLazy && binding.Class == null) {
binding.AddIn.LoadRuntimeAssemblies();
var command = (ICommand)binding.AddIn.CreateObject(binding.ClassName);
CommandsRegistry.LoadCommand(binding.ClassName, command);
}
if(binding.Class != null) { bindings.Add(managedCommandBinding);
binding.Class.Execute(e.Parameter); }
}
};
bindings.Add(managedCommandBinding);
} }
return bindings; return bindings;
} }
/// <summary> /// <summary>
/// Get list of all input bindings registered in provided context /// Get list of all input bindings which satisfy provided parameters
///
/// Null arguments are ignored
/// </summary> /// </summary>
/// <param name="contextName">Context class full name</param> /// <param name="contextName">Context class full name</param>
/// <returns>Collection of managed command bindings</returns> /// <param name="routedCommandName">Routed UI command name</param>
public static InputBindingCollection GetInputBindings(string contextName) { /// <param name="gesture">Gesture</param>
public static InputBindingCollection GetInputBindings(string contextName, string routedCommandName, KeyGesture gesture) {
var bindings = new InputBindingCollection(); var bindings = new InputBindingCollection();
foreach(var binding in inputBidnings) { foreach(var binding in inputBidnings) {
if(binding.ContextName != contextName) continue; if((contextName == null || binding.ContextName == contextName)
&& (routedCommandName == null || binding.RoutedCommandName == routedCommandName)
&& (gesture == null || binding.Gesture == gesture)) {
bindings.Add(new ManagedInputBinding(binding.RoutedCommand, binding.Gesture)); bindings.Add(new ManagedInputBinding(binding.RoutedCommand, binding.Gesture));
}
} }
return bindings; return bindings;
} }
/// <summary>
/// Stores Executed and CanExecute event handlers used in command bindings
/// </summary>
class CommandBindingHandlersContainer
{
private CommandBindingInfo binding;
/// <summary>
/// Constructor
/// </summary>
/// <param name="binding">Reference to object holding command bining details</param>
public CommandBindingHandlersContainer(CommandBindingInfo binding) {
this.binding = binding;
}
/// <summary>
/// CanExecute event handler
/// </summary>
/// <param name="sender">Object which raised this event</param>
/// <param name="e">Event arguments</param>
public void CanExecuteHandler(Object sender, CanExecuteRoutedEventArgs e) {
if(binding.IsLazy && binding.Class == null) {
e.CanExecute = true;
} else if(binding.Class == null) {
e.CanExecute = false;
} else {
e.CanExecute = binding.Class.CanExecute(e.Parameter);
}
}
/// <summary>
/// Executed event handler
/// </summary>
/// <param name="sender">Object which raised this event</param>
/// <param name="e">Event arguments</param>
public void ExecutedHanler(Object sender, ExecutedRoutedEventArgs e) {
if(binding.IsLazy && binding.Class == null) {
binding.AddIn.LoadRuntimeAssemblies();
var command = (ICommand)binding.AddIn.CreateObject(binding.ClassName);
CommandsRegistry.LoadCommand(binding.ClassName, command);
}
if(binding.Class != null) {
binding.Class.Execute(e.Parameter);
}
}
}
} }
} }

17
src/Main/ICSharpCode.Core.Presentation/CommandsService/CommandsService.cs

@ -1,6 +1,7 @@
using System; using System;
using System.Reflection; using System.Reflection;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Documents;
using ICSharpCode.Core; using ICSharpCode.Core;
namespace ICSharpCode.Core.Presentation namespace ICSharpCode.Core.Presentation
@ -10,6 +11,22 @@ namespace ICSharpCode.Core.Presentation
/// </summary> /// </summary>
public static class CommandsService public static class CommandsService
{ {
private static void RegisterRoutedCommands(Type type) {
var typeProperties = type.GetProperties(BindingFlags.Static | BindingFlags.Public);
foreach(var property in typeProperties) {
var command = (RoutedUICommand)property.GetValue(null, null);
CommandsRegistry.RegisterRoutedUICommand(type.Name + "." + command.Name, command.Text);
}
}
public static void RegisterBuiltInRoutedUICommands() {
RegisterRoutedCommands(typeof(ApplicationCommands));
RegisterRoutedCommands(typeof(ComponentCommands));
RegisterRoutedCommands(typeof(MediaCommands));
RegisterRoutedCommands(typeof(NavigationCommands));
RegisterRoutedCommands(typeof(EditingCommands));
}
public static void RegisterRoutedUICommands(object caller, string path) public static void RegisterRoutedUICommands(object caller, string path)
{ {
var descriptors = AddInTree.BuildItems<RoutedUICommandDescriptor>(path, caller, false); var descriptors = AddInTree.BuildItems<RoutedUICommandDescriptor>(path, caller, false);

5
src/Main/ICSharpCode.Core.Presentation/CommandsService/WpfCommandWrapper.cs

@ -24,7 +24,10 @@ namespace ICSharpCode.Core.Presentation
/// Not used because SharpDevelop's native command implementation /// Not used because SharpDevelop's native command implementation
/// doesn't support it /// doesn't support it
/// </see> /// </see>
public event EventHandler CanExecuteChanged; public event EventHandler CanExecuteChanged {
add { }
remove { }
}
/// <see cref="System.Windows.Input.ICommand.Execute(object)" /> /// <see cref="System.Windows.Input.ICommand.Execute(object)" />
public void Execute(object parameter) public void Execute(object parameter)

21
src/Main/ICSharpCode.Core.Presentation/Menu/MenuCommand.cs

@ -118,17 +118,20 @@ namespace ICSharpCode.Core.Presentation
{ {
public MenuCommand(UIElement inputBindingOwner, Codon codon, object caller, bool createCommand) : base(codon, caller) public MenuCommand(UIElement inputBindingOwner, Codon codon, object caller, bool createCommand) : base(codon, caller)
{ {
//if(!string.IsNullOrEmpty(codon.Properties["command"])) { if(!string.IsNullOrEmpty(codon.Properties["command"])) {
// this.Command = CommandsRegistry.GetRoutedUICommand(codon.Properties["command"]); this.Command = CommandsRegistry.GetRoutedUICommand(codon.Properties["command"]);
//}
this.Command = CommandWrapper.GetCommand(codon, caller, createCommand); var bindings = CommandsRegistry.GetInputBindings(null, codon.Properties["command"], null);
if (!string.IsNullOrEmpty(codon.Properties["shortcut"])) { this.InputGestureText = "M: " + (bindings.Count > 0 ? ((KeyGesture)bindings[0].Gesture).GetDisplayStringForCulture(Thread.CurrentThread.CurrentUICulture) : "-");
KeyGesture kg = MenuService.ParseShortcut(codon.Properties["shortcut"]); } else {
if (inputBindingOwner != null) { this.Command = CommandWrapper.GetCommand(codon, caller, createCommand);
inputBindingOwner.InputBindings.Add(new InputBinding(this.Command, kg)); if (!string.IsNullOrEmpty(codon.Properties["shortcut"])) {
KeyGesture kg = MenuService.ParseShortcut(codon.Properties["shortcut"]);
if (inputBindingOwner != null) {
inputBindingOwner.InputBindings.Add(new InputBinding(this.Command, kg));
}
this.InputGestureText = kg.GetDisplayStringForCulture(Thread.CurrentThread.CurrentUICulture);
} }
this.InputGestureText = kg.GetDisplayStringForCulture(Thread.CurrentThread.CurrentUICulture);
} }
} }
} }

Loading…
Cancel
Save