Browse Source

Removed unused code.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5035 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 16 years ago
parent
commit
5d390ee9e1
  1. 4
      src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin
  2. 2
      src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj
  3. 41
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IProcessRunner.cs
  4. 16
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonProcessRunner.cs
  5. 21
      src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInFileTestFixture.cs
  6. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj
  7. 132
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProcessRunner.cs

4
src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.addin

@ -12,9 +12,7 @@ @@ -12,9 +12,7 @@
<Runtime>
<Import assembly=":ICSharpCode.SharpDevelop"/>
<Import assembly="$ICSharpCode.FormsDesigner/FormsDesigner.dll"/>
<Import assembly="PythonBinding.dll">
<ConditionEvaluator name="IsPythonRunning" class="ICSharpCode.PythonBinding.IsPythonRunningCondition"/>
</Import>
<Import assembly="PythonBinding.dll"/>
</Runtime>
<Path name="/SharpDevelop/ViewContent/DefaultTextEditor/SyntaxModes">

2
src/AddIns/BackendBindings/Python/PythonBinding/Project/PythonBinding.csproj

@ -76,7 +76,6 @@ @@ -76,7 +76,6 @@
<Compile Include="Src\IComponentCreator.cs" />
<Compile Include="Src\IMemberProvider.cs" />
<Compile Include="Src\IPadDescriptor.cs" />
<Compile Include="Src\IProcessRunner.cs" />
<Compile Include="Src\ITextEditor.cs" />
<Compile Include="Src\NRefactoryToPythonConverter.cs" />
<Compile Include="Src\PythonAstWalker.cs" />
@ -106,7 +105,6 @@ @@ -106,7 +105,6 @@
<Compile Include="Src\PythonOutputStream.cs" />
<Compile Include="Src\PythonOutputWindowPadDescriptor.cs" />
<Compile Include="Src\PythonParser.cs" />
<Compile Include="Src\PythonProcessRunner.cs" />
<Compile Include="Src\PythonProject.cs" />
<Compile Include="Src\PythonPropertyValueAssignment.cs" />
<Compile Include="Src\PythonResolver.cs" />

41
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IProcessRunner.cs

@ -1,41 +0,0 @@ @@ -1,41 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.SharpDevelop.Util;
namespace ICSharpCode.PythonBinding
{
/// <summary>
/// Process runner interface.
/// </summary>
public interface IProcessRunner
{
/// <summary>
/// Triggered when a line of text is read from the standard output.
/// </summary>
event LineReceivedEventHandler OutputLineReceived;
/// <summary>
/// Triggered when the process has exited.
/// </summary>
event EventHandler ProcessExited;
/// <summary>
/// Starts the process.
/// </summary>
/// <param name="command">The process filename.</param>
/// <param name="arguments">The command line arguments to
/// pass to the command.</param>
void Start(string command, string arguments);
/// <summary>
/// Kills the running process.
/// </summary>
void Kill();
}
}

16
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonProcessRunner.cs

@ -1,16 +0,0 @@ @@ -1,16 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using ICSharpCode.SharpDevelop.Util;
namespace ICSharpCode.PythonBinding
{
public class PythonProcessRunner : ProcessRunner, IProcessRunner
{
}
}

21
src/AddIns/BackendBindings/Python/PythonBinding/Test/AddInFileTestFixture.cs

@ -38,7 +38,6 @@ namespace PythonBinding.Tests @@ -38,7 +38,6 @@ namespace PythonBinding.Tests
Codon languageBindingCodon;
Codon projectFileFilterCodon;
Codon codeCompletionBindingCodon;
LazyConditionEvaluator isPythonRunningConditionEvaluator;
Codon applicationSettingsOptionsCodon;
Codon buildEventsCodon;
Codon compilingOptionsCodon;
@ -89,13 +88,7 @@ namespace PythonBinding.Tests @@ -89,13 +88,7 @@ namespace PythonBinding.Tests
// Get the PythonBinding runtime.
foreach (Runtime runtime in addin.Runtimes) {
if (runtime.Assembly == "PythonBinding.dll") {
pythonBindingRuntime = runtime;
foreach (LazyConditionEvaluator conditionEvaluator in runtime.DefinedConditionEvaluators) {
if (conditionEvaluator.Name == "IsPythonRunning") {
isPythonRunningConditionEvaluator = conditionEvaluator;
}
}
pythonBindingRuntime = runtime;
} else if (runtime.Assembly == "$ICSharpCode.FormsDesigner/FormsDesigner.dll") {
formsDesignerRuntime = runtime;
}
@ -141,18 +134,6 @@ namespace PythonBinding.Tests @@ -141,18 +134,6 @@ namespace PythonBinding.Tests
Assert.IsNotNull(pythonBindingRuntime);
}
[Test]
public void IsPythonRunningConditionExists()
{
Assert.IsNotNull(isPythonRunningConditionEvaluator);
}
[Test]
public void IsPythonRunningConditionClassName()
{
Assert.AreEqual("ICSharpCode.PythonBinding.IsPythonRunningCondition", isPythonRunningConditionEvaluator.ClassName);
}
[Test]
public void FileFilterExists()
{

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/PythonBinding.Tests.csproj

@ -362,7 +362,6 @@ @@ -362,7 +362,6 @@
<Compile Include="Utils\MockMethod.cs" />
<Compile Include="Utils\MockOpenedFile.cs" />
<Compile Include="Utils\MockPadDescriptor.cs" />
<Compile Include="Utils\MockProcessRunner.cs" />
<Compile Include="Utils\MockProject.cs" />
<Compile Include="Utils\MockProjectContent.cs" />
<Compile Include="Utils\MockPropertyDescriptor.cs" />

132
src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockProcessRunner.cs

@ -1,132 +0,0 @@ @@ -1,132 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Matthew Ward" email="mrward@users.sourceforge.net"/>
// <version>$Revision$</version>
// </file>
using System;
using System.IO;
using ICSharpCode.PythonBinding;
using ICSharpCode.SharpDevelop.Util;
namespace PythonBinding.Tests.Utils
{
/// <summary>
/// Dummy IProcessRunner class.
/// </summary>
public class MockProcessRunner : IProcessRunner
{
string commandLine = String.Empty;
string outputText;
bool killCalled;
/// <summary>
/// Triggered when a line of text is read from the standard output.
/// </summary>
public event LineReceivedEventHandler OutputLineReceived;
/// <summary>
/// Triggered when the process has exited.
/// </summary>
public event EventHandler ProcessExited;
public MockProcessRunner()
{
}
/// <summary>
/// Starts the process.
/// </summary>
/// <param name="command">The process filename.</param>
/// <param name="arguments">The command line arguments to
/// pass to the command.</param>
public void Start(string command, string arguments)
{
commandLine = String.Concat(command, " ", arguments);
if (outputText != null) {
OnOutputLineReceived();
}
}
/// <summary>
/// Kills the running process.
/// </summary>
public void Kill()
{
killCalled = true;
}
/// <summary>
/// Gets the full command line used with the process runner.
/// </summary>
public string CommandLine {
get {
return commandLine;
}
}
/// <summary>
/// The string will be sent to any OutputLineReceived event
/// handler when the Start method is called.
/// </summary>
public string OutputText {
set {
outputText = value;
}
}
/// <summary>
/// Raises the ProcessExited event.
/// </summary>
public void RaiseExitEvent()
{
OnProcessExited(new EventArgs());
}
/// <summary>
/// Indicates whether the Kill method was called.
/// </summary>
public bool KillCalled {
get {
return killCalled;
}
}
/// <summary>
/// Raises the ProcessExited event.
/// </summary>
void OnProcessExited(EventArgs e)
{
if (ProcessExited != null) {
ProcessExited(this, e);
}
}
/// <summary>
/// Raises the OutputLineReceived event.
/// </summary>
void OnOutputLineReceived(LineReceivedEventArgs e)
{
if (OutputLineReceived != null) {
OutputLineReceived(this, e);
}
}
/// <summary>
/// Raises an event for each line in the output text.
/// </summary>
void OnOutputLineReceived()
{
using (StringReader reader = new StringReader(outputText)) {
string line;
do {
line = reader.ReadLine();
if (line != null) {
OnOutputLineReceived(new LineReceivedEventArgs(line));
}
} while (line != null);
}
}
}
}
Loading…
Cancel
Save