Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5835 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61pull/1/head
4 changed files with 60 additions and 23 deletions
@ -0,0 +1,48 @@ |
|||||||
|
using System; |
||||||
|
using System.Collections.Generic; |
||||||
|
using MSHelpSystem.Core; |
||||||
|
using ICSharpCode.Core; |
||||||
|
using ICSharpCode.SharpDevelop; |
||||||
|
using ICSharpCode.SharpDevelop.Gui; |
||||||
|
|
||||||
|
namespace MSHelpSystem.Commands |
||||||
|
{ |
||||||
|
// <owner name="Siegfried Pammer" email="sie_pam@gmx.at"/>
|
||||||
|
// <version>$Revision: 3555 $</version>
|
||||||
|
public class ShowErrorHelpCommand : AbstractMenuCommand |
||||||
|
{ |
||||||
|
public override void Run() |
||||||
|
{ |
||||||
|
ICSharpCode.SharpDevelop.Gui.TaskView view = (TaskView)Owner; |
||||||
|
|
||||||
|
foreach (Task t in new List<Task>(view.SelectedTasks)) { |
||||||
|
if (t.BuildError == null) |
||||||
|
continue; |
||||||
|
|
||||||
|
string code = t.BuildError.ErrorCode; |
||||||
|
if (string.IsNullOrEmpty(code)) |
||||||
|
return; |
||||||
|
|
||||||
|
if (Help3Environment.IsHelp3ProtocolRegistered) { |
||||||
|
LoggingService.Debug(string.Format("Help 3.0: Getting description of \"{0}\"", code)); |
||||||
|
if (Help3Environment.IsLocalHelp) |
||||||
|
DisplayHelp.Keywords(code); |
||||||
|
else |
||||||
|
DisplayHelp.ContextualHelp(code); |
||||||
|
} |
||||||
|
else { |
||||||
|
LoggingService.Error("Help 3.0: Help system ist not initialized"); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public class DisplayCatalogCommand : AbstractMenuCommand |
||||||
|
{ |
||||||
|
public override void Run() |
||||||
|
{ |
||||||
|
LoggingService.Info("Help 3.0: Calling menu command \"DisplayHelp.Catalog()\""); |
||||||
|
DisplayHelp.Catalog(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -1,15 +0,0 @@ |
|||||||
using System; |
|
||||||
using MSHelpSystem.Core; |
|
||||||
using ICSharpCode.Core; |
|
||||||
|
|
||||||
namespace MSHelpSystem.SharpDevelopMenu |
|
||||||
{ |
|
||||||
public class DisplayCatalogCommand : AbstractMenuCommand |
|
||||||
{ |
|
||||||
public override void Run() |
|
||||||
{ |
|
||||||
LoggingService.Info("Help 3.0: Calling menu command \"DisplayHelp.Catalog()\""); |
|
||||||
DisplayHelp.Catalog(); |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue