Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1738 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
7 changed files with 124 additions and 87 deletions
@ -1,85 +0,0 @@
@@ -1,85 +0,0 @@
|
||||
//// <file>
|
||||
//// <copyright see="prj:///doc/copyright.txt"/>
|
||||
//// <license see="prj:///doc/license.txt"/>
|
||||
//// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
//// <version value="$version"/>
|
||||
//// </file>
|
||||
//
|
||||
//using System;
|
||||
//using System.IO;
|
||||
//using System.Diagnostics;
|
||||
//using System.Collections;
|
||||
//using System.Reflection;
|
||||
//using System.Resources;
|
||||
//using System.Windows.Forms;
|
||||
//using System.Xml;
|
||||
//using System.CodeDom.Compiler;
|
||||
//using System.Threading;
|
||||
//
|
||||
//using ICSharpCode.SharpDevelop.Project;
|
||||
//using ICSharpCode.SharpDevelop.Gui;
|
||||
//using ICSharpCode.Core;
|
||||
//
|
||||
//namespace CSharpBinding
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// This class describes the main functionalaty of a language codon
|
||||
// /// </summary>
|
||||
// public class CSharpBindingExecutionManager
|
||||
// {
|
||||
// public void Execute(string filename, bool debug)
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public void Execute(IProject project, bool debug)
|
||||
// {
|
||||
// CSharpCompilerParameters parameters = (CSharpCompilerParameters)project.ActiveConfiguration;
|
||||
//
|
||||
//
|
||||
// string directory = FileUtility.GetDirectoryNameWithSeparator(((CSharpCompilerParameters)project.ActiveConfiguration).OutputDirectory);
|
||||
// string exe = ((CSharpCompilerParameters)project.ActiveConfiguration).OutputAssembly + ".exe";
|
||||
// string args = ((CSharpCompilerParameters)project.ActiveConfiguration).CommandLineParameters;
|
||||
//
|
||||
//
|
||||
// bool customStartup = false;
|
||||
// ProcessStartInfo psi;
|
||||
// if (parameters.ExecuteScript != null && parameters.ExecuteScript.Length > 0) {
|
||||
// customStartup = true;
|
||||
// psi = new ProcessStartInfo("\"" + parameters.ExecuteScript + "\"", args);
|
||||
// } else {
|
||||
// if (parameters.CompileTarget == CompileTarget.Library) {
|
||||
//
|
||||
// MessageService.ShowError("${res:BackendBindings.ExecutionManager.CantExecuteDLLError}");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// string runtimeStarter = String.Empty;
|
||||
//
|
||||
// switch (parameters.NetRuntime) {
|
||||
// case NetRuntime.Mono:
|
||||
// runtimeStarter = "mono ";
|
||||
// break;
|
||||
// case NetRuntime.MonoInterpreter:
|
||||
// runtimeStarter = "mint ";
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// if (parameters.CompileTarget != CompileTarget.WinExe && parameters.PauseConsoleOutput) {
|
||||
// psi = new ProcessStartInfo(Environment.GetEnvironmentVariable("ComSpec"), "/c " + runtimeStarter + "\"" + directory + exe + "\" " + args + " & pause");
|
||||
// } else {
|
||||
// psi = new ProcessStartInfo(runtimeStarter + "\"" + directory + exe + "\"");
|
||||
// psi.Arguments = args;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// psi.WorkingDirectory = Path.GetDirectoryName(directory);
|
||||
// psi.UseShellExecute = false;
|
||||
// DebuggerService DebuggerService = (DebuggerService)ServiceManager.Services.GetService(typeof(DebuggerService));
|
||||
// if (debug && !customStartup) {
|
||||
// DebuggerService.Start(Path.Combine(directory, exe), directory, args);
|
||||
// } else {
|
||||
// DebuggerService.StartWithoutDebugging(psi);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -0,0 +1,96 @@
@@ -0,0 +1,96 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.IO; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
using Microsoft.Build.Framework; |
||||
using ICSharpCode.SharpDevelop.Dom; |
||||
|
||||
namespace VBNetBinding |
||||
{ |
||||
/* |
||||
public class VbcEncodingFixingLogger : IMSBuildAdditionalLogger |
||||
{ |
||||
public ILogger CreateLogger(MSBuildEngine engine) |
||||
{ |
||||
return new VbcLoggerImpl(engine); |
||||
} |
||||
|
||||
private class VbcLoggerImpl : ILogger |
||||
{ |
||||
MSBuildEngine engine; |
||||
|
||||
public VbcLoggerImpl(MSBuildEngine engine) |
||||
{ |
||||
this.engine = engine; |
||||
} |
||||
|
||||
public LoggerVerbosity Verbosity { |
||||
get { |
||||
throw new NotImplementedException(); |
||||
} |
||||
set { |
||||
throw new NotImplementedException(); |
||||
} |
||||
} |
||||
|
||||
public string Parameters { |
||||
get { |
||||
throw new NotImplementedException(); |
||||
} |
||||
set { |
||||
throw new NotImplementedException(); |
||||
} |
||||
} |
||||
|
||||
IEventSource eventSource; |
||||
|
||||
public void Initialize(IEventSource eventSource) |
||||
{ |
||||
this.eventSource = eventSource; |
||||
engine.MessageView.AppendText("Running FxCop on " + Path.GetFileNameWithoutExtension(engine.CurrentProjectFile) + "\r\n"); |
||||
eventSource.ErrorRaised += OnError; |
||||
eventSource.WarningRaised += OnWarning; |
||||
} |
||||
|
||||
public void Shutdown() |
||||
{ |
||||
if (eventSource != null) { |
||||
eventSource.ErrorRaised -= OnError; |
||||
eventSource.WarningRaised -= OnWarning; |
||||
eventSource = null; |
||||
} |
||||
} |
||||
|
||||
void OnError(object sender, BuildErrorEventArgs e) |
||||
{ |
||||
FixMessage(); |
||||
} |
||||
|
||||
void OnWarning(object sender, BuildWarningEventArgs e) |
||||
{ |
||||
FixMessage(); |
||||
} |
||||
|
||||
void FixMessage() |
||||
{ |
||||
engine.CurrentErrorOrWarning.ErrorText = FixEncoding(engine.CurrentErrorOrWarning.ErrorText); |
||||
//engine.CurrentErrorOrWarning.FileName = FixEncoding(engine.CurrentErrorOrWarning.FileName);
|
||||
} |
||||
|
||||
TODO: Fix SD2-995 |
||||
|
||||
static string FixEncoding(string encoding) |
||||
{ |
||||
return encoding; |
||||
} |
||||
} |
||||
} |
||||
*/ |
||||
} |
Loading…
Reference in new issue