Browse Source

Remove menu items for code converter (which no longer exists in SD5)

pull/326/merge
Daniel Grunwald 12 years ago
parent
commit
7f031933d8
  1. 20
      src/Main/Base/Project/ICSharpCode.SharpDevelop.addin
  2. 3
      src/Main/Core/Project/Src/Util/CommandWrapper.cs

20
src/Main/Base/Project/ICSharpCode.SharpDevelop.addin

@ -427,11 +427,6 @@
<MenuItem id = "SetAsStartupProject" <MenuItem id = "SetAsStartupProject"
label = "${res:ProjectComponent.ContextMenu.SetAsStartupProject}" label = "${res:ProjectComponent.ContextMenu.SetAsStartupProject}"
class = "ICSharpCode.SharpDevelop.Project.Commands.SetAsStartupProject"/> class = "ICSharpCode.SharpDevelop.Project.Commands.SetAsStartupProject"/>
<MenuItem id = "Convert"
label = "${res:ICSharpCode.SharpDevelop.Commands.Convert}"
type = "Menu">
<!-- elements are added by backend bindings -->
</MenuItem>
<MenuItem id = "GenerateDocumentation" <MenuItem id = "GenerateDocumentation"
label = "${res:ProjectComponent.ContextMenu.GenerateDocumentation}" label = "${res:ProjectComponent.ContextMenu.GenerateDocumentation}"
class = "ICSharpCode.SharpDevelop.Project.Commands.GenerateProjectDocumentation"/> class = "ICSharpCode.SharpDevelop.Project.Commands.GenerateProjectDocumentation"/>
@ -1915,21 +1910,6 @@
<Include id = "ToolList" path = "/SharpDevelop/Workbench/Tools" /> <Include id = "ToolList" path = "/SharpDevelop/Workbench/Tools" />
<MenuItem id = "Separator2" type = "Separator" /> <MenuItem id = "Separator2" type = "Separator" />
<Condition name = "WindowActive" activewindow="ICSharpCode.SharpDevelop.Editor.ITextEditor">
<MenuItem id = "ConvertCode" label = "${res:XML.MainMenu.ToolMenu.ConvertCodeTo}" type="Menu">
<Condition name="ActiveContentExtension" activeextension=".vb" action = "Disable">
<MenuItem id = "CSharp"
label = "C#"
class = "ICSharpCode.SharpDevelop.Commands.CSharpConvertBuffer"/>
</Condition>
<Condition name="ActiveContentExtension" activeextension=".cs" action = "Disable">
<MenuItem id = "VB"
label = "Visual Basic"
class = "ICSharpCode.SharpDevelop.Commands.VBConvertBuffer"/>
</Condition>
</MenuItem>
</Condition>
<Condition name = "SolutionOpen" action="Disable"> <Condition name = "SolutionOpen" action="Disable">
<MenuItem id = "Upgrade" <MenuItem id = "Upgrade"
label = "${res:ICSharpCode.SharpDevelop.Project.UpgradeView.Title}" label = "${res:ICSharpCode.SharpDevelop.Project.UpgradeView.Title}"

3
src/Main/Core/Project/Src/Util/CommandWrapper.cs

@ -146,7 +146,8 @@ namespace ICSharpCode.Core
canExecuteChangedHandlersToRegisterOnCommand = null; canExecuteChangedHandlersToRegisterOnCommand = null;
foreach (var handler in handlers) { foreach (var handler in handlers) {
addInCommand.CanExecuteChanged += handler; if (addInCommand != null)
addInCommand.CanExecuteChanged += handler;
// Creating the command potentially changes the CanExecute state, so we should raise the event handlers once: // Creating the command potentially changes the CanExecute state, so we should raise the event handlers once:
handler(this, EventArgs.Empty); handler(this, EventArgs.Empty);
} }

Loading…
Cancel
Save