Browse Source

Improved lazy-loading.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@321 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 21 years ago
parent
commit
465e919934
  1. 105
      AddIns/ICSharpCode.SharpDevelop.addin
  2. 13
      src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin
  3. 7
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpCompletionBinding.cs
  4. 10
      src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetCompletionBinding.cs
  5. 3
      src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin
  6. 38
      src/AddIns/DisplayBindings/FormDesigner/Project/FormDesigner.addin
  7. 104
      src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin
  8. 2
      src/AddIns/DisplayBindings/XmlEditor/Project/XmlSchemaAssociation.cs
  9. 16
      src/AddIns/Misc/AddinScout/Project/AddInScout.addin
  10. 12
      src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin
  11. 7
      src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin
  12. 2
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/SyntaxModes.xml
  13. 2
      src/Libraries/ICSharpCode.TextEditor/Project/Resources/XML-Mode.xshd
  14. 6
      src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/BrowserDisplayBinding.cs
  15. 36
      src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingDescriptor.cs
  16. 4
      src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs
  17. 8
      src/Main/Base/Project/Src/Services/File/FileService.cs
  18. 52
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/CodeCompletionBinding.cs
  19. 12
      src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/Gui/ToolBarCommand.cs
  20. 1
      src/Main/StartUp/Project/SharpDevelopMain.cs

105
AddIns/ICSharpCode.SharpDevelop.addin

@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
version = "1.0.0">
<Runtime>
<Import assembly="../bin/ICSharpCode.SharpDevelop.dll"/>
<Import assembly="../bin/ICSharpCode.TextEditor.dll"/>
<Import assembly="/ICSharpCode.SharpDevelop"/>
<Import assembly="/ICSharpCode.TextEditor"/>
</Runtime>
<Path name = "/SharpDevelop/Workbench/Ambiences">
@ -281,7 +281,7 @@ @@ -281,7 +281,7 @@
label = "Clea&amp;n"
class = "ICSharpCode.SharpDevelop.Project.Commands.CleanProject"/>
<MenuItem id = "Publish project"
label = "Publis ${CurrentProjectName}h"
label = "Publish ${CurrentProjectName}"
class = "ICSharpCode.SharpDevelop.Project.Commands.PublishProject"/>
<MenuItem id = "CombineBuildGroupSeparator" type = "Separator"/>
@ -703,8 +703,7 @@ @@ -703,8 +703,7 @@
<And>
<Or>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.CSharpDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.VBNetDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.FormDesigner.FormDesignerViewContent"/>
</Or>
<Condition name = "ActiveViewContentUntitled" activewindowuntitled="False"/>
</And>
@ -1125,7 +1124,7 @@ @@ -1125,7 +1124,7 @@
class = "ICSharpCode.SharpDevelop.Commands.ToggleFullscreenCommand" />
</MenuItem> <!-- end VIEW menu -->
<Condition name = "CombineOpen" iscombineopen="True">
<Condition name = "ProjectActive" activeproject="*">
<MenuItem id = "Project" label = "${res:XML.MainMenu.ProjectMenu}" type="Menu">
<MenuItem id = "AddReference"
label = "${res:ProjectComponent.ContextMenu.AddReference}"
@ -1133,7 +1132,9 @@ @@ -1133,7 +1132,9 @@
<MenuItem id = "SetAsStartupProject"
label = "${res:ProjectComponent.ContextMenu.SetAsStartupProject}"
class = "ICSharpCode.SharpDevelop.Project.Commands.SetAsStartupProject"/>
<MenuItem id = "ExportToHtml"
label = "${res:ProjectComponent.ContextMenu.HtmlExport}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ExportProjectToHtml"/>
<MenuItem id = "Separator2" type = "Separator" />
<MenuItem id = "Options"
label = "${res:XML.MainMenu.ProjectMenu.Options}"
@ -1147,8 +1148,7 @@ @@ -1147,8 +1148,7 @@
<And>
<Or>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.CSharpDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.VBNetDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.FormDesigner.FormDesignerViewContent"/>
</Or>
<Condition name = "ActiveViewContentUntitled" activewindowuntitled="False"/>
</And>
@ -1193,8 +1193,7 @@ @@ -1193,8 +1193,7 @@
<And>
<Or>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.CSharpDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.VBNetDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.FormDesigner.FormDesignerViewContent"/>
</Or>
<Condition name = "ActiveViewContentUntitled" activewindowuntitled="False"/>
</And>
@ -1274,13 +1273,12 @@ @@ -1274,13 +1273,12 @@
<MenuItem id = "Tools" label = "${res:XML.MainMenu.ToolMenu}" type="Menu">
<MenuItem id = "ToolBuilder" type="Builder" class = "ICSharpCode.SharpDevelop.Commands.ToolMenuBuilder" />
<MenuItem id = "Separator1" type = "Separator" />
<MenuItem id = "Separator2" type = "Separator" />
<MenuItem id = "Separator4" type = "Separator" />
<ComplexCondition action = "Disable">
<Or>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.FormDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.FormDesigner.CSharpDesignerDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.TextEditorDisplayBindingWrapper"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.FormDesigner.FormDesignerViewContent"/>
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider"/>
</Or>
<Condition name="ActiveContentExtension" activeextension=".cs" action = "Disable">
<MenuItem id = "ConvertBuffer"
@ -1293,7 +1291,30 @@ @@ -1293,7 +1291,30 @@
class = "ICSharpCode.SharpDevelop.Commands.CSharpConvertBuffer"/>
</Condition>
</ComplexCondition>
<MenuItem id = "Separator5" type = "Separator" />
<MenuItem id = "Separator3" type = "Separator" />
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider" action="Disable">
<MenuItem id = "InsertColor"
label = "${res:XML.MainMenu.ToolMenu.InsColor}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ShowColorDialog"/>
<MenuItem id = "InsertGuid"
shortcut = "Control|Shift|G"
label = "${res:XML.MainMenu.ToolMenu.InsGUID}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.InsertGuidCommand"/>
<MenuItem id = "Separator4" type = "Separator" />
<MenuItem id = "GenerateCodeAction"
label = "${res:XML.MainMenu.ToolMenu.GenerateCode}"
shortcut = "Alt|Insert"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.GenerateCodeAction"/>
<MenuItem id = "ShowQuickHelp"
label = "${res:XML.MainMenu.ToolMenu.QuickXmlDoc}"
shortcut = "Control|Q"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.QuickDocumentation"/>
</Condition>
<MenuItem id = "LastSeparator" type = "Separator" />
<MenuItem id = "Options"
label = "${res:XML.MainMenu.ToolMenu.Options}"
@ -1331,7 +1352,7 @@ @@ -1331,7 +1352,7 @@
<MenuItem id = "Help"
label = "${res:XML.MainMenu.HelpMenu.Topics}"
shortcut = "Alt|F1"
class = "ICSharpCode.SharpDevelop.Commands.ShowHelp"/>
link = "browser://ms-help://corsavy/"/>
<MenuItem id = "TipOfTheDay"
label = "${res:XML.MainMenu.HelpMenu.Tips}"
icon = "Icons.16x16.TipOfTheDay"
@ -1394,32 +1415,10 @@ @@ -1394,32 +1415,10 @@
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.CodeTemplatePanel"/>
</Path>
<Path name = "/SharpDevelop/Views/ProjectBrowser/ContextMenu">
<!-- AddIn to the Project Add Menu -->
<Condition name = "Ownerstate" ownerstate="ProjectSelected">
<MenuItem id = "ExportToHtml"
insertafter = "GenerateDocumentation"
insertbefore = "Separator5"
label = "${res:ProjectComponent.ContextMenu.HtmlExport}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ExportProjectToHtml"/>
</Condition>
</Path>
<Path name = "/AddIns/DefaultTextEditor/Formatter/XML">
<Class id ="XmlFormatter" class = "ICSharpCode.SharpDevelop.DefaultEditor.XmlFormattingStrategy"/>
</Path>
<Path name = "/SharpDevelop/Workbench/MainMenu/Project">
<!-- AddIn to the Project Add Menu -->
<Condition name = "ProjectActive" activeproject="*">
<MenuItem id = "ExportToHtml"
insertafter = "GenerateDocumentation"
insertbefore = "Separator2"
label = "${res:ProjectComponent.ContextMenu.HtmlExport}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ExportProjectToHtml"/>
</Condition>
</Path>
<Path name = "/SharpDevelop/Views/ProjectBrowser/ContextMenu/ProjectBrowserNode">
<!-- AddIn to the project browser context menu -->
<Condition name = "ProjectActive" activeproject="*">
@ -1751,34 +1750,6 @@ @@ -1751,34 +1750,6 @@
</DialogPanel>
</Path>
<Path name = "/SharpDevelop/Workbench/MainMenu/Tools">
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextEditorControlProvider" action="Disable">
<MenuItem id = "InsertColor"
insertafter = "Separator1" insertbefore = "InsertGuid"
label = "${res:XML.MainMenu.ToolMenu.InsColor}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.ShowColorDialog"/>
<MenuItem id = "InsertGuid"
insertafter = "InsertColor"
insertbefore = "Separator2"
shortcut = "Control|Shift|G"
label = "${res:XML.MainMenu.ToolMenu.InsGUID}"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.InsertGuidCommand"/>
<MenuItem id = "Separator2" type = "Separator" />
<MenuItem id = "GenerateCodeAction"
insertafter = "Separator2"
label = "${res:XML.MainMenu.ToolMenu.GenerateCode}"
shortcut = "Alt|Insert"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.GenerateCodeAction"/>
<MenuItem id = "ShowQuickHelp"
insertafter = "GenerateCodeAction"
insertbefore = "Separator5"
label = "${res:XML.MainMenu.ToolMenu.QuickXmlDoc}"
shortcut = "Control|Q"
class = "ICSharpCode.SharpDevelop.DefaultEditor.Commands.QuickDocumentation"/>
</Condition>
</Path>
<Path name = "/SharpDevelop/DefaultEditor/SearchAndReplace/WildcardHelpPath">
<MenuItem id = "*Char"
label = "* Zero or more of any character" />

13
src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.addin

@ -23,15 +23,14 @@ @@ -23,15 +23,14 @@
</Path>
<Path name = "/Workspace/Parser">
<Parser id = "C#"
supportedextensions = ".cs"
projectfileextension = ".csproj"
class = "CSharpBinding.Parser.TParser"/>
<Parser id = "C#"
supportedextensions = ".cs"
projectfileextension = ".csproj"
class = "CSharpBinding.Parser.TParser"/>
</Path>
<Path name = "/AddIns/DefaultTextEditor/CodeCompletion">
<Class id = "CSharpCompletionBinding"
class = "CSharpBinding.CSharpCompletionBinding"/>
<CodeCompletionBinding id = "CSharp" extensions = ".cs" class = "CSharpBinding.CSharpCompletionBinding"/>
</Path>
<Path path = "/SharpDevelop/BackendBindings/ProjectOptions/C#">
@ -67,7 +66,7 @@ @@ -67,7 +66,7 @@
<Icon id = "C#Prj"
language = "C#"
resource = "C#.ProjectIcon"/>
<Icon id = "C#File"
extensions = ".cs"
resource = "C#.FileIcon"/>

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

@ -20,15 +20,8 @@ namespace CSharpBinding @@ -20,15 +20,8 @@ namespace CSharpBinding
{
public class CSharpCompletionBinding : DefaultCodeCompletionBinding
{
public CSharpCompletionBinding() : base(".cs")
{
this.EnableXmlCommentCompletion = true;
}
public override bool HandleKeyPress(SharpDevelopTextAreaControl editor, char ch)
{
if (!CheckExtension(editor))
return false;
Parser.ExpressionFinder ef = new Parser.ExpressionFinder(editor.FileName);
int cursor = editor.ActiveTextAreaControl.Caret.Offset;
ExpressionContext context = null;

10
src/AddIns/BackendBindings/VBNetBinding/Project/Src/VBNetCompletionBinding.cs

@ -21,18 +21,8 @@ namespace VBNetBinding @@ -21,18 +21,8 @@ namespace VBNetBinding
{
public class VBNetCompletionBinding : DefaultCodeCompletionBinding
{
public VBNetCompletionBinding() : base(".vb")
{
this.EnableXmlCommentCompletion = true;
}
public override bool HandleKeyPress(SharpDevelopTextAreaControl editor, char ch)
{
if (!CheckExtension(editor))
{
return false;
}
VBNetBinding.Parser.ExpressionFinder ef = new VBNetBinding.Parser.ExpressionFinder();
int cursor = editor.ActiveTextAreaControl.Caret.Offset;
ExpressionContext context = null;

3
src/AddIns/BackendBindings/VBNetBinding/Project/VBNetBinding.addin

@ -54,8 +54,7 @@ @@ -54,8 +54,7 @@
</Path>
<Path name = "/AddIns/DefaultTextEditor/CodeCompletion">
<Class id = "VBNetCompletionBinding"
class = "VBNetBinding.VBNetCompletionBinding"/>
<CodeCompletionBinding id = "VBNet" extensions = ".vb" class = "VBNetBinding.VBNetCompletionBinding"/>
</Path>
<Path name = "/AddIns/DefaultTextEditor/Formatter/VBNET">

38
src/AddIns/DisplayBindings/FormDesigner/Project/FormDesigner.addin

@ -4,19 +4,18 @@ @@ -4,19 +4,18 @@
url = "http://www.icsharpcode.net"
description = "SharpDevelop Form Designer"
version = "1.0.0">
<Runtime>
<Import assembly="FormDesigner.dll"/>
</Runtime>
<Path name = "/SharpDevelop/Workbench/DisplayBindings">
<DisplayBinding id = "FormDesigner"
type = "Secondary"
insertbefore = "Browser,Text"
supportedformats = "Forms/UserControls"
class = "ICSharpCode.FormDesigner.FormDesignerSecondaryDisplayBinding" />
</Path>
<Path name = "/SharpDevelop/FormsDesigner/ContextMenus/SelectionMenu">
<MenuItem id = "ViewCode"
label = "${res:SharpDevelop.FormsDesigner.ContextMenus.ViewCodeCommand}"
@ -32,7 +31,7 @@ @@ -32,7 +31,7 @@
icon = "Icons.16x16.FormsDesigner.SendToBack"
class = "ICSharpCode.FormDesigner.Commands.SendToBack"/>
<MenuItem id = "OrderSeparator" type = "Separator"/>
<MenuItem id = "AlignToGrid"
label = "${res:SharpDevelop.FormsDesigner.ContextMenus.SelectionMenu.AlignToGrid}"
icon = "Icons.16x16.FormsDesigner.AlignToGrid"
@ -69,7 +68,7 @@ @@ -69,7 +68,7 @@
icon = "Icons.16x16.Property"
class = "ICSharpCode.FormDesigner.Commands.ShowProperties"/>
</Path>
<Path name = "/SharpDevelop/FormsDesigner/ContextMenus/ContainerMenu">
<MenuItem id = "ViewCode"
label = "${res:SharpDevelop.FormsDesigner.ContextMenus.ViewCodeCommand}"
@ -94,7 +93,7 @@ @@ -94,7 +93,7 @@
icon = "Icons.16x16.Property"
class = "ICSharpCode.FormDesigner.Commands.ShowProperties"/>
</Path>
<Path name = "/SharpDevelop/FormsDesigner/ContextMenus/TraySelectionMenu">
<MenuItem id = "ViewCode"
label = "${res:SharpDevelop.FormsDesigner.ContextMenus.ViewCodeCommand}"
@ -124,7 +123,7 @@ @@ -124,7 +123,7 @@
icon = "Icons.16x16.Property"
class = "ICSharpCode.FormDesigner.Commands.ShowProperties"/>
</Path>
<Path name = "/SharpDevelop/FormsDesigner/ContextMenus/ComponentTrayMenu">
<MenuItem id = "ViewCode"
label = "${res:SharpDevelop.FormsDesigner.ContextMenus.ViewCodeCommand}"
@ -148,12 +147,9 @@ @@ -148,12 +147,9 @@
label = "${res:XML.MainMenu.FormatMenu.ShowLargeIcons}"
class = "ICSharpCode.FormDesigner.Commands.ShowLargeIcons"/>
</Path>
<Path name = "/SharpDevelop/Workbench/MainMenu">
<ComplexCondition>
<Or>
<Condition name = "WindowActive" activewindow="ICSharpCode.FormDesigner.FormDesignerViewContent"/>
</Or>
<Condition name = "WindowActive" activewindow="ICSharpCode.FormDesigner.FormDesignerViewContent">
<MenuItem id = "Format"
label = "${res:XML.MainMenu.FormatMenu}"
insertafter = "Debug"
@ -212,7 +208,7 @@ @@ -212,7 +208,7 @@
class = "ICSharpCode.FormDesigner.Commands.SizeToControl"/>
</MenuItem>
<MenuItem id = "FormatSeparator" type = "Separator"/>
<MenuItem id = "HorizontalSpacingMenu" label = "${res:XML.MainMenu.FormatMenu.HorizontalSpacingMenu}" type = "Menu">
<MenuItem id = "HorizSpaceMakeEqual"
label = "${res:XML.MainMenu.FormatMenu.HorizontalSpacingMenu.HorizSpaceMakeEqual}"
@ -250,7 +246,7 @@ @@ -250,7 +246,7 @@
class = "ICSharpCode.FormDesigner.Commands.VertSpaceConcatenate"/>
</MenuItem>
<MenuItem id = "SpacingSeparator" type = "Separator"/>
<MenuItem id = "CenterMenu" label = "${res:XML.MainMenu.FormatMenu.CenterMenu}" type = "Menu">
<MenuItem id = "CenterHorizontally"
label = "${res:XML.MainMenu.FormatMenu.CenterMenu.CenterHorizontally}"
@ -262,7 +258,7 @@ @@ -262,7 +258,7 @@
class = "ICSharpCode.FormDesigner.Commands.CenterVertically"/>
</MenuItem>
<MenuItem id = "CenterSeparator" type = "Separator"/>
<MenuItem id = "OrderMenu" label = "${res:XML.MainMenu.FormatMenu.OrderMenu}" type = "Menu">
<MenuItem id = "BringToFront"
label = "${res:XML.MainMenu.FormatMenu.OrderMenu.BringToFront}"
@ -282,9 +278,9 @@ @@ -282,9 +278,9 @@
icon = "Icons.16x16.FormsDesigner.LockControls"
class = "ICSharpCode.FormDesigner.Commands.LockControls"/>
</MenuItem>
</ComplexCondition>
</Condition>
</Path>
<Path name = "/SharpDevelop/Workbench/SharpDevelopSideBar/ContextMenu">
<MenuItem id = "CustomizeSideBarSeparator"
insertafter = "MoveTabDown"
@ -294,16 +290,16 @@ @@ -294,16 +290,16 @@
icon = "Icons.16x16.Options"
class = "ICSharpCode.FormDesigner.CustomizeSideBar"/>
</Path>
<Path name = "/SharpDevelop/Dialogs/OptionsDialog">
<DialogPanel id = "FormsDesignerOptions"
insertafter = "ToolsOptions"
label = "${res:ICSharpCode.SharpDevelop.FormDesigner.Gui.OptionPanels.PanelName}">
<DialogPanel id = "GridOptions"
label = "${res:ICSharpCode.SharpDevelop.FormDesigner.Gui.OptionPanels.GridOptionsPanel.PanelName}"
class = "ICSharpCode.FormDesigner.Gui.OptionPanels.GridOptionsPanel"/>
</DialogPanel>
</Path>
</AddIn>

104
src/AddIns/DisplayBindings/ResourceEditor/Project/ResourceEditor.addin

@ -4,67 +4,69 @@ @@ -4,67 +4,69 @@
url = "http://www.icsharpcode.net"
description = "A Display binding for *.resources and *.resx files."
version = "1.0.0">
<Runtime>
<Import assembly="ResourceEditor.dll"/>
</Runtime>
<Path name = "/SharpDevelop/Workbench/DisplayBindings">
<DisplayBinding id = "ResourceEditor"
insertbefore = "Text"
class = "ResourceEditor.ResourceEditorDisplayBinding" />
<DisplayBinding id = "ResourceEditor"
class = "ResourceEditor.ResourceEditorDisplayBinding"
insertbefore = "Text"
fileNamePattern = "\.res(x|ources)$"
languagePattern = "^ResourceFiles$"/>
</Path>
<Path name="/SharpDevelop/ResourceEdtior/ResourceList/ContextMenu">
<MenuItem id="AddStringEntry"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.AddStringEntry}"
class="ResourceEditor.AddStringCommand"
shortcut = "Ins" />
<MenuItem id="AddFile"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.AddFiles}"
class="ResourceEditor.AddNewFileCommand" />
<MenuItem id="AddStringEntry"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.AddStringEntry}"
class="ResourceEditor.AddStringCommand"
shortcut = "Ins" />
<MenuItem id="AddFile"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.AddFiles}"
class="ResourceEditor.AddNewFileCommand" />
<MenuItem id="Separator1"
type = "Separator" />
<Condition name = "Ownerstate" ownerstate="ItemsSelected" action="Disable">
<MenuItem id="SaveAs"
label="${res:XML.MainMenu.FileMenu.SaveAs}"
class="ResourceEditor.SaveEntryAsCommand" />
<MenuItem id="Rename"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.Rename}"
class="ResourceEditor.RenameEntryCommand"
shortcut="F2" />
<MenuItem id="CopyResourceName"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.CopyResourceName}"
class="ResourceEditor.CopyResourceNameCommand" />
<MenuItem id="Delete"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.Delete}"
class="ResourceEditor.DeleteEntryCommand"
shortcut="Del" />
<MenuItem id="Separator1"
<MenuItem id="Separator2"
type = "Separator" />
<Condition name = "Ownerstate" ownerstate="ItemsSelected" action="Disable">
<MenuItem id="SaveAs"
label="${res:XML.MainMenu.FileMenu.SaveAs}"
class="ResourceEditor.SaveEntryAsCommand" />
<MenuItem id="Rename"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.Rename}"
class="ResourceEditor.RenameEntryCommand"
shortcut="F2" />
<MenuItem id="CopyResourceName"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.CopyResourceName}"
class="ResourceEditor.CopyResourceNameCommand" />
<MenuItem id="Delete"
label="${res:ResourceEditor.ResourceEdit.ContextMenu.Delete}"
class="ResourceEditor.DeleteEntryCommand"
shortcut="Del" />
<MenuItem id="Separator2"
type = "Separator" />
<MenuItem id="Cut"
label="${res:XML.MainMenu.EditMenu.Cut}"
class="ICSharpCode.SharpDevelop.Commands.Cut" />
<MenuItem id="Copy"
label="${res:XML.MainMenu.EditMenu.Copy}"
class="ICSharpCode.SharpDevelop.Commands.Copy" />
</Condition>
<MenuItem id="Paste"
label="${res:XML.MainMenu.EditMenu.Paste}"
class="ICSharpCode.SharpDevelop.Commands.Paste" />
<MenuItem id="Separator3"
type = "Separator" />
<MenuItem id="Cut"
label="${res:XML.MainMenu.EditMenu.Cut}"
class="ICSharpCode.SharpDevelop.Commands.Cut" />
<MenuItem id="SelectAll"
label="${res:XML.MainMenu.EditMenu.SelectAll}"
class="ICSharpCode.SharpDevelop.Commands.SelectAll"
shortcut="Ctrl|A" />
<MenuItem id="Copy"
label="${res:XML.MainMenu.EditMenu.Copy}"
class="ICSharpCode.SharpDevelop.Commands.Copy" />
</Condition>
<MenuItem id="Paste"
label="${res:XML.MainMenu.EditMenu.Paste}"
class="ICSharpCode.SharpDevelop.Commands.Paste" />
<MenuItem id="Separator3"
type = "Separator" />
<MenuItem id="SelectAll"
label="${res:XML.MainMenu.EditMenu.SelectAll}"
class="ICSharpCode.SharpDevelop.Commands.SelectAll"
shortcut="Ctrl|A" />
</Path>
</AddIn>

2
src/AddIns/DisplayBindings/XmlEditor/Project/XmlSchemaAssociation.cs

@ -20,8 +20,6 @@ namespace ICSharpCode.XmlEditor @@ -20,8 +20,6 @@ namespace ICSharpCode.XmlEditor
string extension = String.Empty;
string namespacePrefix = String.Empty;
static readonly string schemaAssociationElementName = "SchemaAssociation";
public XmlSchemaAssociation(string extension)
: this(extension, String.Empty, String.Empty)
{

16
src/AddIns/Misc/AddinScout/Project/AddInScout.addin

@ -4,18 +4,18 @@ @@ -4,18 +4,18 @@
url = "http://home.mchsi.com/~ssatguru"
description = "Display AddIn Information"
version = "0.1.0">
<Runtime>
<Import assembly="AddInScout.dll"/>
</Runtime>
<Path name = "/SharpDevelop/Workbench/MainMenu/Tools">
<MenuItem id = "ShowAddInScout"
insertafter = "Separator3" insertbefore = "Separator4"
label = "AddIn Scout"
class = "AddInScout.AddInScoutCommand"/>
insertafter = "Separator1" insertbefore = "Separator2"
label = "AddIn Scout"
class = "AddInScout.AddInScoutCommand"/>
</Path>
</AddIn>

12
src/AddIns/Misc/RegExpTk/Project/RegExpTk.addin

@ -4,16 +4,16 @@ @@ -4,16 +4,16 @@
url = "unknown"
description = "Testing toolkit for regular expressions"
version = "1.0.0">
<Runtime>
<Import assembly="RegExpTk.dll" />
</Runtime>
<Path name = "/SharpDevelop/Workbench/MainMenu/Tools">
<MenuItem id = "RegExpTk"
insertafter = "ShowObjectBrowser" insertbefore = "Separator4"
label = "${res:XML.MainMenu.ToolsMenu.RegularExpressionToolkit}"
class = "Plugins.RegExpTk.RegExpTkCommand"
<MenuItem id = "RegExpTk"
insertafter = "Separator1" insertbefore = "Separator2"
label = "${res:XML.MainMenu.ToolsMenu.RegularExpressionToolkit}"
class = "Plugins.RegExpTk.RegExpTkCommand"
/>
</Path>
</AddIn>

7
src/AddIns/Misc/SubversionAddIn/Project/ICSharpCode.Svn.addin

@ -10,8 +10,7 @@ @@ -10,8 +10,7 @@
</Runtime>
<Path name = "/Workspace/Autostart">
<Class id = "ICSharpCode.Svn.Commands.RegisterEventsCommand"
insertbefore = "StartWorkbenchCommand"
<Class id = "ICSharpCode.Svn.Commands.RegisterEventsCommand"
class = "ICSharpCode.Svn.Commands.RegisterEventsCommand"/>
</Path>
@ -61,7 +60,7 @@ @@ -61,7 +60,7 @@
label = "Subversion Options"
class = "ICSharpCode.Svn.Gui.SubversionOptionsPanel"/>
</DialogPanel>
</Path>
<Path name = "/SharpDevelop/Workbench/MainMenu/Tools">
@ -74,5 +73,5 @@ @@ -74,5 +73,5 @@
icon = "Svn.Checkout"
class = "ICSharpCode.Svn.Commands.CheckoutCommand"/>
</Path>
</AddIn>

2
src/Libraries/ICSharpCode.TextEditor/Project/Resources/SyntaxModes.xml

@ -45,5 +45,5 @@ @@ -45,5 +45,5 @@
<Mode file = "XML-Mode.xshd"
name = "XML"
extensions = ".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs"/>
extensions = ".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.build;.xfrm"/>
</SyntaxModes>

2
src/Libraries/ICSharpCode.TextEditor/Project/Resources/XML-Mode.xshd

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<!-- syntaxdefinition for XML 2000 by Mike Krueger -->
<SyntaxDefinition name="XML" extensions=".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs">
<SyntaxDefinition name="XML" extensions=".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.build;.xfrm">
<Digits name="Digits" bold="false" italic="false" color="DarkBlue" />
<RuleSets>

6
src/Main/Base/Project/Src/Gui/BrowserDisplayBinding/BrowserDisplayBinding.cs

@ -24,7 +24,7 @@ namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding @@ -24,7 +24,7 @@ namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding
return fileName.StartsWith("http:")
|| fileName.StartsWith("https:")
|| fileName.StartsWith("ftp:")
|| fileName.StartsWith("browser:");
|| fileName.StartsWith("browser://");
}
public bool CanCreateContentForLanguage(string language)
@ -35,8 +35,8 @@ namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding @@ -35,8 +35,8 @@ namespace ICSharpCode.SharpDevelop.BrowserDisplayBinding
public IViewContent CreateContentForFile(string fileName)
{
BrowserPane browserPane = new BrowserPane();
if (fileName.StartsWith("browser:")) {
browserPane.Load(fileName.Substring("browser:".Length));
if (fileName.StartsWith("browser://")) {
browserPane.Load(fileName.Substring("browser://".Length));
} else {
browserPane.Load(fileName);
}

36
src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingDescriptor.cs

@ -11,12 +11,13 @@ using System.IO; @@ -11,12 +11,13 @@ using System.IO;
using System.Collections;
using System.Reflection;
using System.CodeDom.Compiler;
using System.Text.RegularExpressions;
using ICSharpCode.SharpDevelop.Project;
namespace ICSharpCode.Core
{
public class DisplayBindingDescriptor
public class DisplayBindingDescriptor
{
object binding = null;
Codon codon;
@ -56,5 +57,38 @@ namespace ICSharpCode.Core @@ -56,5 +57,38 @@ namespace ICSharpCode.Core
this.codon = codon;
}
/// <summary>
/// Gets if the display binding can possibly attach to the file.
/// If this method returns false, it cannot attach to it; if the method returns
/// true, it *might* attach to it.
/// </summary>
/// <remarks>
/// This method is used to skip loading addins like the ResourceEditor which cannot
/// attach to a certain file name for sure.
/// </remarks>
public bool CanAttachToFile(string fileName)
{
string fileNameRegex = codon.Properties["fileNamePattern"];
if (fileNameRegex == null || fileNameRegex.Length == 0) // no regex specified
return true;
return Regex.IsMatch(fileName, fileNameRegex, RegexOptions.IgnoreCase);
}
/// <summary>
/// Gets if the display binding can possibly attach to the language.
/// If this method returns false, it cannot attach to it; if the method returns
/// true, it *might* attach to it.
/// </summary>
/// <remarks>
/// This method is used to skip loading addins like the ResourceEditor which cannot
/// attach to a most languages.
/// </remarks>
public bool CanAttachToLanguage(string language)
{
string languageRegex = codon.Properties["languagePattern"];
if (languageRegex == null || languageRegex.Length == 0) // no regex specified
return true;
return Regex.IsMatch(language, languageRegex, RegexOptions.IgnoreCase);
}
}
}

4
src/Main/Base/Project/Src/Services/DisplayBinding/DisplayBindingService.cs

@ -43,7 +43,7 @@ namespace ICSharpCode.Core @@ -43,7 +43,7 @@ namespace ICSharpCode.Core
static DisplayBindingDescriptor GetCodonPerFileName(string filename)
{
foreach (DisplayBindingDescriptor binding in bindings) {
if (!binding.IsSecondary && binding.Binding.CanCreateContentForFile(filename)) {
if (!binding.IsSecondary && binding.CanAttachToFile(filename) && binding.Binding.CanCreateContentForFile(filename)) {
return binding;
}
}
@ -53,7 +53,7 @@ namespace ICSharpCode.Core @@ -53,7 +53,7 @@ namespace ICSharpCode.Core
static DisplayBindingDescriptor GetCodonPerLanguageName(string languagename)
{
foreach (DisplayBindingDescriptor binding in bindings) {
if (binding.Binding != null && binding.Binding.CanCreateContentForLanguage(languagename)) {
if (binding.Binding != null && binding.CanAttachToLanguage(languagename) && binding.Binding.CanCreateContentForLanguage(languagename)) {
return binding;
}
}

8
src/Main/Base/Project/Src/Services/File/FileService.cs

@ -84,7 +84,8 @@ namespace ICSharpCode.Core @@ -84,7 +84,8 @@ namespace ICSharpCode.Core
public static IWorkbenchWindow OpenFile(string fileName)
{
// test, if file fileName exists
if (!fileName.StartsWith("http://")) {
bool isURL = fileName.IndexOf("://") > 0;
if (!isURL) {
System.Diagnostics.Debug.Assert(FileUtility.IsValidFileName(fileName));
// test, if an untitled file should be opened
@ -103,7 +104,7 @@ namespace ICSharpCode.Core @@ -103,7 +104,7 @@ namespace ICSharpCode.Core
foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
if (content.FileName != null) {
try {
if (fileName.StartsWith("http://") ? content.FileName == fileName : FileUtility.IsEqualFileName(content.FileName, fileName)) {
if (isURL ? content.FileName == fileName : FileUtility.IsEqualFileName(content.FileName, fileName)) {
content.WorkbenchWindow.SelectWindow();
return content.WorkbenchWindow;
}
@ -117,8 +118,7 @@ namespace ICSharpCode.Core @@ -117,8 +118,7 @@ namespace ICSharpCode.Core
IViewContent viewContent = subViewContent as IViewContent;
if (viewContent != null && viewContent.FileName != null) {
try {
if (fileName.StartsWith("http://") ? viewContent.FileName == fileName :
Path.GetFullPath(viewContent.FileName.ToUpper()) == Path.GetFullPath(fileName.ToUpper())) {
if (isURL ? viewContent.FileName == fileName : FileUtility.IsEqualFileName(viewContent.FileName, fileName)) {
viewContent.WorkbenchWindow.SelectWindow();
return content.WorkbenchWindow;
}

52
src/Main/Base/Project/Src/TextEditor/Gui/Editor/CodeCompletionBinding.cs

@ -6,7 +6,9 @@ @@ -6,7 +6,9 @@
// </file>
using System;
using System.Collections;
using System.IO;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
@ -20,24 +22,56 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -20,24 +22,56 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
bool HandleKeyPress(SharpDevelopTextAreaControl editor, char ch);
}
public class DefaultCodeCompletionBinding : ICodeCompletionBinding
public class CodeCompletionBindingDoozer : IDoozer
{
string extension;
public bool HandleConditions {
get {
return false;
}
}
public DefaultCodeCompletionBinding(string extension)
public object BuildItem(object caller, Codon codon, ArrayList subItems)
{
this.extension = extension;
string ext = codon.Properties["extensions"];
if (ext != null && ext.Length > 0)
return new LazyCodeCompletionBinding(codon, ext.Split(';'));
else
return codon.AddIn.CreateObject(codon.Properties["class"]);
}
}
public sealed class LazyCodeCompletionBinding : ICodeCompletionBinding
{
Codon codon;
string[] extensions;
ICodeCompletionBinding binding;
public bool CheckExtension(SharpDevelopTextAreaControl editor)
public LazyCodeCompletionBinding(Codon codon, string[] extensions)
{
string ext = Path.GetExtension(editor.FileName);
return string.Compare(ext, extension, true) == 0;
this.codon = codon;
this.extensions = extensions;
}
public bool HandleKeyPress(SharpDevelopTextAreaControl editor, char ch)
{
string ext = Path.GetExtension(editor.FileName);
foreach (string extension in extensions) {
if (ext.Equals(extension, StringComparison.InvariantCultureIgnoreCase)) {
if (binding == null) {
binding = (ICodeCompletionBinding)codon.AddIn.CreateObject(codon.Properties["class"]);
}
return binding.HandleKeyPress(editor, ch);
}
}
return false;
}
}
public class DefaultCodeCompletionBinding : ICodeCompletionBinding
{
bool enableMethodInsight = true;
bool enableIndexerInsight = true;
bool enableXmlCommentCompletion = false;
bool enableXmlCommentCompletion = true;
bool enableDotCompletion = true;
public bool EnableMethodInsight {
@ -78,8 +112,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -78,8 +112,6 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
public virtual bool HandleKeyPress(SharpDevelopTextAreaControl editor, char ch)
{
if (!CheckExtension(editor))
return false;
switch (ch) {
case '(':
if (enableMethodInsight && CodeCompletionOptions.InsightEnabled) {

12
src/Main/Core/Project/Src/AddInTree/AddIn/DefaultDoozers/ToolBarItem/Gui/ToolBarCommand.cs

@ -11,7 +11,7 @@ using System.Diagnostics; @@ -11,7 +11,7 @@ using System.Diagnostics;
using System.Drawing.Text;
using System.Drawing.Imaging;
using System.Windows.Forms;
namespace ICSharpCode.Core
{
public class ToolBarCommand : ToolStripMenuItem, IStatusUpdate
@ -21,7 +21,7 @@ namespace ICSharpCode.Core @@ -21,7 +21,7 @@ namespace ICSharpCode.Core
string description = String.Empty;
string localizedText = String.Empty;
ICommand menuCommand = null;
public string Description {
get {
return description;
@ -45,17 +45,17 @@ namespace ICSharpCode.Core @@ -45,17 +45,17 @@ namespace ICSharpCode.Core
Image = ResourceService.GetBitmap(codon.Properties["icon"]);
}
menuCommand = (ICommand)codon.AddIn.CreateObject(codon.Properties["class"]);
if (menuCommand != null)
menuCommand.Owner = caller;
UpdateStatus();
}
protected override void OnClick(System.EventArgs e)
{
base.OnClick(e);
if (menuCommand == null) {
menuCommand = (ICommand)codon.AddIn.CreateObject(codon.Properties["class"]);
}
if (menuCommand != null) {
menuCommand.Owner = caller;
menuCommand.Run();
}
}

1
src/Main/StartUp/Project/SharpDevelopMain.cs

@ -167,6 +167,7 @@ namespace ICSharpCode.SharpDevelop @@ -167,6 +167,7 @@ namespace ICSharpCode.SharpDevelop
AddInTree.Doozers.Add("EditAction", new ICSharpCode.SharpDevelop.DefaultEditor.Codons.EditActionDoozer());
AddInTree.Doozers.Add("SyntaxMode", new ICSharpCode.SharpDevelop.DefaultEditor.Codons.SyntaxModeDoozer());
AddInTree.Doozers.Add("BrowserSchemeExtension", new ICSharpCode.SharpDevelop.BrowserDisplayBinding.SchemeExtensionDoozer());
AddInTree.Doozers.Add("CodeCompletionBinding", new ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.CodeCompletionBindingDoozer());
MenuCommand.LinkCommandCreator = delegate(string link) { return new LinkCommand(link); };

Loading…
Cancel
Save