Browse Source

replaced array list with generic lists; cleanup

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1951 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 19 years ago
parent
commit
58a4e84c3b
  1. 3
      src/AddIns/BackendBindings/CPPNetBinding/Doc/TODO.txt
  2. 91
      src/AddIns/BackendBindings/CPPNetBinding/Project/Resources/CPPNetBinding.addin
  3. 32
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/AssemblyInfo.cs
  4. 565
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/CPPNetBindingCompilerManager.cs
  5. 74
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/CPPNetBindingExecutionManager.cs
  6. 95
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/CPPNetLanguageBinding.cs
  7. 218
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Dependences.cs
  8. 343
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/FormattingStrategy/CPPNetFormattingStrategy.cs
  9. 152
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Gui/CPPCodeGenerationPanel.cs
  10. 123
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/IncludeParser.cs
  11. 2257
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Project/CPPNetCompilerParameters.cs
  12. 61
      src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Project/CPPNetProject.cs
  13. 22
      src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/CPP.Empty.xft
  14. 22
      src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/CPP.Header.xft
  15. 84
      src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/ConsoleProject.xpt
  16. 18
      src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/EmptyProject.xpt
  17. 107
      src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/FormsProject.xpt
  18. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/DocumentAccessor.cs
  19. 4
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/ToolboxProvider.cs
  20. 3
      src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs
  21. 13
      src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs
  22. 22
      src/AddIns/Misc/PInvokeAddIn/Project/Src/PInvokeRepository.cs
  23. 4
      src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs
  24. 37
      src/AddIns/Misc/RegExpTk/RegExpTkPad.cs.old
  25. 17
      src/AddIns/Misc/StartPage/Project/Src/ICSharpCodePage.cs
  26. 8
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Undo/UndoQueue.cs
  27. 8
      src/Libraries/ICSharpCode.TextEditor/Project/Src/Undo/UndoStack.cs
  28. 41
      src/Main/Base/Project/Src/Gui/Components/SideBar/AxSideBar.cs
  29. 39
      src/Main/Base/Project/Src/Gui/Components/SideBar/AxSideTab.cs
  30. 4
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs
  31. 20
      src/Main/Base/Project/Src/Internal/ExternalTool/ToolLoader.cs
  32. 18
      src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs
  33. 9
      src/Main/Base/Project/Src/Internal/Templates/TextTemplate.cs
  34. 6
      src/Main/Base/Project/Src/Internal/Undo/UndoQueue.cs
  35. 8
      src/Main/Base/Project/Src/Internal/Undo/UndoStack.cs
  36. 6
      src/Main/Base/Project/Src/Services/AmbienceService/AbstractAmbience.cs
  37. 41
      src/Main/Base/Project/Src/Services/AmbienceService/AmbienceReflectionDecorator.cs
  38. 10
      src/Main/Base/Project/Src/Services/AmbienceService/IAmbience.cs
  39. 17
      src/Main/Base/Project/Src/Services/AmbienceService/NetAmbience.cs
  40. 4
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryASTConvertVisitor.cs
  41. 8
      src/SharpDevelop.sln

3
src/AddIns/BackendBindings/CPPNetBinding/Doc/TODO.txt

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
- dependencies should be maintained during editing
- folding
- autocomplete

91
src/AddIns/BackendBindings/CPPNetBinding/Project/Resources/CPPNetBinding.addin

@ -1,91 +0,0 @@ @@ -1,91 +0,0 @@
<AddIn name = "C++.NET Binding"
author = ""
copyright = "GPL"
url = "http://www.icsharpcode.net"
description = ""
version = "1.0.0">
<Runtime>
<Import assembly = "CPPNetBinding.dll"/>
</Runtime>
<Path name = "/SharpDevelop/Workbench/FileFilter">
<FileFilter id = "C++"
insertafter="VBNET"
insertbefore="AllFiles"
name = "${res:SharpDevelop.FileFilter.CPPFiles}"
extensions = "*.cpp,*.c,*.hpp,*.h"/>
</Path>
<Path name = "/SharpDevelop/Workbench/ProjectOptions/ConfigurationProperties">
<Condition activeproject="C++.NET">
<DialogPanel id = "CPPCodeGenerationPanel"
label = "Code Generation"
class = "CPPBinding.CPPCodeGenerationPanel"/>
<!-- C++ compiler Options -->
<DialogPanel id = "GeneralCPPOptionsPanel"
label = "General C++ Compiler Options"
class = "CPPBinding.GeneralCPPOptionsPanel"/>
<DialogPanel id = "OptimizeCPPOptionsPanel"
label = "Optimize C++ Compiler Options"
class = "CPPBinding.OptimizeCPPOptionsPanel"/>
<DialogPanel id = "PreProcessorCPPOptionsPanel"
label = "PreProcessor C++ Compiler Options"
class = "CPPBinding.PreProcessorCPPOptionsPanel"/>
<DialogPanel id = "CodeGenerationCPPOptionsPanel"
label = "Code Generation C++ Compiler Options"
class = "CPPBinding.CodeGenerationCPPOptionsPanel"/>
<DialogPanel id = "LanguageCPPOptionsPanel"
label = "Language C++ Compiler Options"
class = "CPPBinding.LanguageCPPOptionsPanel"/>
<DialogPanel id = "PreCompiledHeaderCPPOptionsPanel"
label = "PreCompiledHeaders C++ Compiler Options"
class = "CPPBinding.PreCompiledHeaderCPPOptionsPanel"/>
<DialogPanel id = "OutputFileCPPOptionsPanel"
label = "Output C++ Compiler Options"
class = "CPPBinding.OutputFileCPPOptionsPanel"/>
<DialogPanel id = "InformationSearchCPPOptionsPanel"
label = "InformationSearch C++ Compiler Options"
class = "CPPBinding.InformationSearchCPPOptionsPanel"/>
<DialogPanel id = "ExtendedCPPOptionsPanel"
label = "Extended C++ Compiler Options"
class = "CPPBinding.ExtendedCPPOptionsPanel"/>
<!-- C++ linker Options -->
<DialogPanel id = "GeneralLinkerOptionsPanel"
label = "General C++ Linker Options"
class = "CPPBinding.GeneralLinkerOptionsPanel"/>
<DialogPanel id = "InputLinkerOptionsPanel"
label = "Input C++ Linker Options"
class = "CPPBinding.InputLinkerOptionsPanel"/>
<DialogPanel id = "DebugLinkerOptionsPanel"
label = "Debug C++ Linker Options"
class = "CPPBinding.DebugLinkerOptionsPanel"/>
<DialogPanel id = "SystemLinkerOptionsPanel"
label = "System C++ Linker Options"
class = "CPPBinding.SystemLinkerOptionsPanel"/>
</Condition>
</Path>
<Path name = "/AddIns/DefaultTextEditor/Formater">
<Condition textcontent = "C++.NET">
<Class id ="CPPFormatter" insertbefore="DefaultFormatter" class = "CSharpBinding.FormattingStrategy.CSharpFormattingStrategy"/>
</Condition>
</Path>
<Path name = "/Workspace/Icons">
<!-- C++ -->
<Icon id = "C++Project"
language = "C++.NET"
resource = "C++.ProjectIcon"/>
<Icon id = "C++File"
extensions = ".cpp"
resource = "C++.FileIcon"/>
</Path>
<Path name = "/SharpDevelop/Workbench/LanguageBindings">
<LanguageBinding id = "C++"
supportedextensions = ".cpp"
class = "CPPBinding.CPPLanguageBinding" />
</Path>
</AddIn>

32
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/AssemblyInfo.cs

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("CPPNetBinding")]
[assembly: AssemblyDescription("C++.NET language binding for #develop")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("www.icsharpcode.net")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("(c) 2004 Mike Krueger")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("2.0.0.1")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]

565
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/CPPNetBindingCompilerManager.cs

@ -1,565 +0,0 @@ @@ -1,565 +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.Collections;
using System.IO;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.CodeDom.Compiler;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.SharpDevelop.Gui;
using System.Windows.Forms;
namespace CPPBinding
{
/// <summary>
/// This class controls the compilation of C Sharp files and C Sharp projects
/// </summary>
public class CPPBindingCompilerManager
{
private FileUtilityService _fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
private StringBuilder _inputFiles = new StringBuilder();
private StringBuilder _buildProcess = new StringBuilder();
private StringBuilder _results = new StringBuilder();
private bool _treatWarningsAsErrors;
// we have 2 formats for the error output the csc gives :
// d:\vc\include\xstring(1466) : warning C4701: local variable '_Ptr' may be used without hav
readonly static Regex normalError = new Regex(@"(?<file>.*)\((?<line>\d+)\)\s+\:\s+(?<error>.+?)\s+(?<number>[\d\w]+):\s+(?<message>.*)", RegexOptions.Compiled);
// cl : Command line error D2016 : '/clr' and '/ML' command-line options are incompatible
readonly static Regex generalError = new Regex(@"(?<error>.+)\s+(?<number>[\d\w]+)\s*:\s+(?<message>.*)", RegexOptions.Compiled);
public string GetCompiledOutputName(string fileName)
{
return Path.ChangeExtension(fileName, ".exe");
}
public string GetCompiledOutputName(IProject project)
{
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)project.ActiveConfiguration;
return compilerparameters.OutputFile;
}
public bool CanCompile(string fileName)
{
return Path.GetExtension(fileName) == ".cpp" || Path.GetExtension(fileName) == ".c" || Path.GetExtension(fileName) == ".cxx";
}
public ICompilerResult CompileFile(string filename, CPPCompilerParameters compilerparameters)
{
if (!CanCompile(filename))
{
MessageBox.Show("File " + filename + " is not a source file.", "Compilation Error", MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
return new DefaultCompilerResult(new CompilerResults(new TempFileCollection()), "");
}
string output = "";
string error = "";
string exe = Path.ChangeExtension(filename, ".exe");
if (compilerparameters.OutputAssembly != null && compilerparameters.OutputAssembly.Length > 0) {
exe = compilerparameters.OutputAssembly;
}
_treatWarningsAsErrors = compilerparameters.TreatWarningsAsErrors;
string responseFileName = Path.GetTempFileName();
StreamWriter writer = new StreamWriter(responseFileName);
writer.WriteLine("/nologo");
if (compilerparameters.UseManagedExtensions)
{
writer.WriteLine("/clr");
}
writer.WriteLine("/Fe\"" + exe + "\"");
writer.WriteLine('"' + filename + '"');
TempFileCollection tf = new TempFileCollection();
writer.Close();
string compilerName = GetCompilerName();
string outstr = compilerName + " \"@" + responseFileName + "\"";
string currDir = Directory.GetCurrentDirectory();
string intDir = compilerparameters.IntermediateDirectory;
if (intDir == null || intDir.Length == 0) {
intDir = compilerparameters.OutputDirectory;
}
Directory.SetCurrentDirectory(intDir);
ICompilerResult result;
try {
Executor.ExecWaitWithCapture(outstr, currDir, tf, ref output, ref error);
result = ParseOutput(tf, output, error);
}
catch (System.Runtime.InteropServices.ExternalException e) {
ShowErrorBox(e);
result = CreateErrorCompilerResult(tf, e);
}
finally {
File.Delete(responseFileName);
File.Delete(output);
File.Delete(error);
Directory.SetCurrentDirectory(currDir);
}
return result;
}
private void ShowErrorBox(System.Runtime.InteropServices.ExternalException e)
{
MessageBox.Show("It seems cl.exe is not installed or not found.\n\nInstall compiler and set PATH environment variable.\n\nException: " + e, "Compile Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
}
public ICompilerResult CompileProject(IProject project, bool force)
{
_inputFiles = new StringBuilder();
_buildProcess = new StringBuilder();
_results = new StringBuilder();
CPPProject p = (CPPProject)project;
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)p.ActiveConfiguration;
_treatWarningsAsErrors = compilerparameters.TreatWarningsAsErrors;
CheckDirectory(Path.GetDirectoryName(compilerparameters.OutputFile));
CheckDirectory(Path.GetDirectoryName(compilerparameters.IntermediateDirectory));
StringBuilder output = new StringBuilder();
ICompilerResult result;
if (compilerparameters.PreCompileHeader) {
result = InternalCompileProject(p, true, force);
if (result != null) {
output.Append(result.CompilerOutput);
if (HasErrors(result)) {
goto exit;
}
}
}
result = InternalCompileProject(p, false, force);
if (result != null) {
output.Append(result.CompilerOutput);
if (HasErrors(result)) {
goto exit;
}
}
if (result != null || !File.Exists(Path.GetFullPath(compilerparameters.OutputFile))) {
result = LinkProject(p);
output.Append(result.CompilerOutput);
}
exit:
WriteResultFile(p);
CompilerResults cr = result != null ? result.CompilerResults : new CompilerResults(new TempFileCollection());
return new DefaultCompilerResult(cr, output.ToString());
}
private bool HasErrors(ICompilerResult compilerResult)
{
bool result = false;
if (compilerResult.CompilerResults.Errors.Count > 0)
{
if (_treatWarningsAsErrors)
{
result = true;
}
else {
foreach (CompilerError error in compilerResult.CompilerResults.Errors)
{
if (!error.IsWarning)
{
result = true;
break;
}
}
}
}
return result;
}
private void CheckDirectory(string directory)
{
if (!Directory.Exists(directory)) {
Directory.CreateDirectory(directory);
}
}
private void WriteResultFile(CPPProject p)
{
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)p.ActiveConfiguration;
string directory = Path.GetDirectoryName(compilerparameters.OutputFile);
string resultFile = Path.Combine(directory, "BuildLog.html");
_results.Append("writing result file to : " + resultFile);
StreamWriter writer = new StreamWriter(resultFile);
writer.Write("<HTML><HEAD></HEAD><BODY>");
writer.Write("<TABLE WIDTH=100% BGCOLOR=LightBlue><TR><TD><FONT FACE=ARIAL SIZE=+3><B>Build Log from</B>: " + p.Name + "(" + compilerparameters.Name + ")</FONT></TABLE>");
writer.Write("Build started.");
writer.Write("<TABLE WIDTH=100% BGCOLOR=LightBlue><TR><TD><FONT FACE=ARIAL SIZE=+2>Command Line</FONT></TD></TR></TABLE>");
writer.WriteLine(_inputFiles.ToString());
writer.Write("<TABLE WIDTH=100% BGCOLOR=LightBlue><TR><TD><FONT FACE=ARIAL SIZE=+2>Output</FONT></TD></TR></TABLE>");
writer.Write("<PRE>");
writer.WriteLine(_buildProcess.ToString());
writer.Write("</PRE>");
writer.Write("<TABLE WIDTH=100% BGCOLOR=LightBlue><TR><TD><FONT FACE=ARIAL SIZE=+2>Results</FONT></TD></TR></TABLE>");
writer.Write("<PRE>");
writer.WriteLine(_results.ToString());
writer.Write("</PRE>");
writer.Write("Build finished.");
writer.Write("</BODY></HTML>");
writer.Close();
}
#region COMPILER
private string GetCompilerName()
{
return @"cl.exe";
}
private string WriteCompilerParameters(CPPProject p, bool preCompiledHeader, bool force)
{
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)p.ActiveConfiguration;
StringBuilder sb = new StringBuilder();
sb.Append("/c\n");
if (compilerparameters.UseManagedExtensions) {
sb.Append("/clr\n");
}
string directory = Path.GetDirectoryName(compilerparameters.OutputFile);
sb.Append("/Fo\"");
sb.Append(directory);
sb.Append("/\"\n");
IProjectService projectService = (IProjectService)ICSharpCode.Core.ServiceManager.Services.GetService(typeof(IProjectService));
ArrayList allProjects = Combine.GetAllProjects(projectService.CurrentOpenCombine);
if (preCompiledHeader) {
sb.Append(compilerparameters.GetPreCompiledHeaderOptions());
} else {
sb.Append(compilerparameters.GetCompilerOptions());
}
if (compilerparameters.AdditionalCompilerOptions != null && compilerparameters.AdditionalCompilerOptions.Length > 0) {
foreach (string option in compilerparameters.AdditionalCompilerOptions.Split(';')) {
sb.Append(option);
sb.Append("\n");
}
}
foreach (ProjectReference lib in p.ProjectReferences) {
sb.Append("/FU\"");
sb.Append(lib.GetReferencedFileName(p));
sb.Append("\"\n");
}
switch (compilerparameters.ConfigurationType) {
case ConfigurationType.Dll:
sb.Append("/LD\n");
break;
}
bool includedFile = false;
foreach (ProjectFile finfo in p.ProjectFiles) {
if (finfo.Subtype != Subtype.Directory) {
switch (finfo.BuildAction) {
case BuildAction.Compile:
if (CanCompile(finfo.Name))
{
string fileName = Path.GetFileNameWithoutExtension(Path.GetFullPath(finfo.Name)).ToLower();
string headerFile = Path.GetFileNameWithoutExtension(compilerparameters.preCompiledHeaderCPPOptions.HeaderFile).ToLower();
bool isPreHeader = fileName == headerFile;
if (!(preCompiledHeader ^ isPreHeader)) {
if (force || ShouldCompileFile(p, finfo.Name)) {
includedFile = true;
sb.Append("\"");
sb.Append(Path.GetFullPath(finfo.Name));
sb.Append("\"\n");
}
}
}
break;
}
}
}
if (!includedFile) {
return null;
}
string responseFileName = Path.GetTempFileName();
StreamWriter writer = new StreamWriter(responseFileName, false);
// string standardIncludes = Environment.GetEnvironmentVariable("INCLUDE");
// if (standardIncludes != null && standardIncludes.Length > 0) {
// writer.WriteLine("/I\"" + standardIncludes + "\"");
// }
writer.Write(sb.ToString());
writer.Close();
_inputFiles.Append("Creating temporary file ");
_inputFiles.Append(responseFileName);
_inputFiles.Append(" with following content:<BR>");
_inputFiles.Append("<PRE>");
_inputFiles.Append(sb.ToString());
_inputFiles.Append("</PRE>");
return responseFileName;
}
Hashtable lastCompiledFiles = new Hashtable();
private bool ShouldCompileFile(CPPProject p, string fileName)
{
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)p.ActiveConfiguration;
string directory = Path.GetDirectoryName(compilerparameters.OutputFile);
string objectFile = Path.Combine(directory, Path.ChangeExtension(Path.GetFileName(fileName), ".obj"));
if (!File.Exists(objectFile)) {
return true;
}
string[] additinalIncludeDirs = compilerparameters.AdditionalCompilerOptions.Split(';');
ArrayList dirs = new ArrayList(additinalIncludeDirs.Length+1);
dirs.Add(Path.GetDirectoryName(fileName));
foreach (string dir in additinalIncludeDirs)
{
dirs.Add(dir);
}
DateTime lastWriteTime = new IncludeParser(fileName, dirs, true).Parse().GetLastWriteTime();
// DateTime lastWriteTime = File.GetLastWriteTime(fileName);
bool shouldCompile;
if (lastCompiledFiles[fileName] == null) {
shouldCompile = true;
} else {
shouldCompile = lastWriteTime != (DateTime)lastCompiledFiles[fileName];
}
lastCompiledFiles[fileName] = lastWriteTime;
return shouldCompile;
}
private ICompilerResult InternalCompileProject(CPPProject p, bool preCompiledHeader, bool force)
{
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)p.ActiveConfiguration;
string responseFileName = WriteCompilerParameters(p, preCompiledHeader, force);
if (responseFileName == null) {
return null;
}
string output = String.Empty;
string error = String.Empty;
string compilerName = GetCompilerName();
string clstr = compilerName + " \"@" + responseFileName + "\"";
TempFileCollection tf = new TempFileCollection();
string currDir = Directory.GetCurrentDirectory();
string intDir = compilerparameters.IntermediateDirectory;
if (intDir == null || intDir.Length == 0) {
intDir = compilerparameters.OutputDirectory;
}
_inputFiles.Append("Executing command: <C>" + clstr + "</C><hr>");
ICompilerResult result;
try {
Executor.ExecWaitWithCapture(clstr, tf, ref output, ref error);
result = ParseOutput(tf, output, error);
}
catch (System.Runtime.InteropServices.ExternalException e) {
ShowErrorBox(e);
result = CreateErrorCompilerResult(tf, e);
}
finally {
File.Delete(responseFileName);
File.Delete(output);
File.Delete(error);
}
return result;
}
#endregion
#region LINKER
private string GetLinkerName()
{
return @"link.exe";
}
private string WriteLinkerOptions(CPPProject p)
{
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)p.ActiveConfiguration;
StringBuilder sb = new StringBuilder();
string exe = compilerparameters.OutputFile;
string dir = Path.GetDirectoryName(Path.GetFullPath(exe));
sb.Append("/OUT:\"");sb.Append(exe);sb.Append("\"\n");
foreach (ProjectFile finfo in p.ProjectFiles) {
if (finfo.Subtype != Subtype.Directory) {
switch (finfo.BuildAction) {
case BuildAction.Compile:
if (CanCompile(finfo.Name))
{
sb.Append('"');
sb.Append(Path.Combine(dir,
Path.ChangeExtension(Path.GetFileName(finfo.Name),
".obj")));
sb.Append("\"\n");
}
break;
case BuildAction.EmbedAsResource:
sb.Append("/ASSEMBLYRESOURCE:\"");sb.Append(Path.GetFullPath(finfo.Name));sb.Append("\"\n");
break;
}
}
}
switch (compilerparameters.ConfigurationType) {
case ConfigurationType.Dll:
sb.Append("/DLL\n");
break;
}
sb.Append(compilerparameters.GetLinkerOptionsForCompiler());
// write to response file
string responseFileName = Path.GetTempFileName();
StreamWriter writer = new StreamWriter(responseFileName);
// string standardLibs = Environment.GetEnvironmentVariable("LIB");
// if (standardLibs != null && standardLibs.Length > 0) {
// foreach (string lib in standardLibs.Split(';')) {
// if (lib.Length > 0) {
// writer.WriteLine("/LIBPATH:\"" + lib + "\"");
// }
// }
// }
writer.Write(sb.ToString());
writer.Close();
_inputFiles.Append("Creating temporary file <C>" + responseFileName + "</C> with following content:<BR>");
_inputFiles.Append("<PRE>");
_inputFiles.Append(sb.ToString());
_inputFiles.Append("</PRE>");
return responseFileName;
}
private ICompilerResult LinkProject(CPPProject p)
{
CPPCompilerParameters compilerparameters = (CPPCompilerParameters)p.ActiveConfiguration;
string responseFileName = WriteLinkerOptions(p);
string output = String.Empty;
string error = String.Empty;
string compilerName = GetLinkerName();
string clstr = compilerName + " \"@" + responseFileName + "\"";
TempFileCollection tf = new TempFileCollection();
string currDir = Directory.GetCurrentDirectory();
string intDir = compilerparameters.IntermediateDirectory;
if (intDir == null || intDir.Length == 0) {
intDir = compilerparameters.OutputDirectory;
}
_inputFiles.Append("Executing command : <C>");
_inputFiles.Append(clstr);
_inputFiles.Append("</C><hr>");
Executor.ExecWaitWithCapture(clstr, tf, ref output, ref error);
ICompilerResult result = ParseOutput(tf, output, error);
// File.Delete(responseFileName);
File.Delete(output);
File.Delete(error);
return result;
}
#endregion
private ICompilerResult CreateErrorCompilerResult(TempFileCollection tf, System.Runtime.InteropServices.ExternalException e)
{
CompilerError error = new CompilerError();
error.Line = 0;
error.FileName = "";
error.IsWarning = false;
error.ErrorNumber = "";
error.ErrorText = e.Message;
CompilerResults cr = new CompilerResults(tf);
cr.Errors.Add(error);
return new DefaultCompilerResult(cr, "");
}
private void InternalParseOutputFile(StringBuilder compilerOutput, CompilerResults cr, string file)
{
StreamReader sr = new StreamReader(File.OpenRead(file), Encoding.Default);
// skip fist whitespace line
sr.ReadLine();
while (true) {
string curLine = sr.ReadLine();
_buildProcess.Append(curLine);
_buildProcess.Append("\n");
compilerOutput.Append(curLine);
compilerOutput.Append('\n');
if (curLine == null) {
break;
}
curLine = curLine.Trim();
if (curLine.Length == 0) {
continue;
}
CompilerError error = new CompilerError();
// try to match standard errors
Match match = normalError.Match(curLine);
if (match.Success) {
error.Line = Int32.Parse(match.Result("${line}"));
try {
error.FileName = Path.GetFullPath(match.Result("${file}"));
} catch (Exception) {
error.FileName = "";
}
error.IsWarning = match.Result("${error}").EndsWith("warning");
error.ErrorNumber = match.Result("${number}");
error.ErrorText = match.Result("${message}");
} else {
match = generalError.Match(curLine); // try to match general csc errors
if (match.Success) {
error.IsWarning = match.Result("${error}").EndsWith("warning");
error.ErrorNumber = match.Result("${number}");
error.ErrorText = match.Result("${message}");
} else { // give up and skip the line
continue;
}
}
cr.Errors.Add(error);
}
sr.Close();
}
private ICompilerResult ParseOutput(TempFileCollection tf, string outputFile, string errorFile)
{
StringBuilder compilerOutput = new StringBuilder();
CompilerResults cr = new CompilerResults(tf);
InternalParseOutputFile(compilerOutput, cr, outputFile);
InternalParseOutputFile(compilerOutput, cr, errorFile);
return new DefaultCompilerResult(cr, compilerOutput.ToString());
}
}
}

74
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/CPPNetBindingExecutionManager.cs

@ -1,74 +0,0 @@ @@ -1,74 +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.Internal.Project;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.Core;
namespace CPPBinding
{
/// <summary>
/// This class describes the main functionalaty of a language codon
/// </summary>
public class CPPBindingExecutionManager
{
public void Execute(string filename, bool debug)
{
string exe = Path.ChangeExtension(filename, ".exe");
ProcessStartInfo psi = new ProcessStartInfo(Environment.GetEnvironmentVariable("ComSpec"), "/c " + "\"" + exe + "\"" + " & pause");
psi.WorkingDirectory = Path.GetDirectoryName(exe);
psi.UseShellExecute = false;
try {
Process p = new Process();
p.StartInfo = psi;
p.Start();
} catch (Exception) {
throw new ApplicationException("Can't execute " + "\"" + exe + "\"\n(.NET bug? Try restaring SD or manual start)");
}
}
public void Execute(IProject project, bool debug)
{
CPPCompilerParameters parameters = (CPPCompilerParameters)project.ActiveConfiguration;
string exe = ((CPPCompilerParameters)project.ActiveConfiguration).OutputFile;
//string args = ((CPPCompilerParameters)project.ActiveConfiguration).CommandLineParameters;
string args = "";
ProcessStartInfo psi;
string runtimeStarter = String.Empty;
psi = new ProcessStartInfo(runtimeStarter + "\"" + exe + "\"");
psi.Arguments = args;
try {
psi.WorkingDirectory = Path.GetDirectoryName(exe);
psi.UseShellExecute = false;
Process p = new Process();
p.StartInfo = psi;
p.Start();
} catch (Exception) {
throw new ApplicationException("Can't execute " + "\"" + exe + "\"");
}
}
}
}

95
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/CPPNetLanguageBinding.cs

@ -1,95 +0,0 @@ @@ -1,95 +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.Internal.Project;
using ICSharpCode.SharpDevelop.Internal.Templates;
using ICSharpCode.SharpDevelop.Gui;
namespace CPPBinding
{
public class CPPLanguageBinding : ILanguageBinding
{
public const string LanguageName = "C++.NET";
CPPBindingCompilerManager compilerManager = new CPPBindingCompilerManager();
CPPBindingExecutionManager executionManager = new CPPBindingExecutionManager();
public string Language {
get {
return LanguageName;
}
}
public void Execute(string filename, bool debug)
{
Debug.Assert(executionManager != null);
executionManager.Execute(filename, debug);
}
public void Execute(IProject project, bool debug)
{
Debug.Assert(executionManager != null);
executionManager.Execute(project, debug);
}
public string GetCompiledOutputName(string fileName)
{
Debug.Assert(compilerManager != null);
return compilerManager.GetCompiledOutputName(fileName);
}
public string GetCompiledOutputName(IProject project)
{
Debug.Assert(compilerManager != null);
return compilerManager.GetCompiledOutputName(project);
}
public bool CanCompile(string fileName)
{
Debug.Assert(compilerManager != null);
return compilerManager.CanCompile(fileName);
}
public ICompilerResult CompileFile(string fileName)
{
MessageBox.Show("Cannot compile a single file. Create a project first.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);
return null;
}
public ICompilerResult CompileProject(IProject project)
{
return CompileProject(project, false);
}
public ICompilerResult RecompileProject(IProject project)
{
return CompileProject(project, true);
}
public IProject CreateProject(ProjectCreateInformation info, XmlElement projectOptions)
{
return new CPPProject(info, projectOptions);
}
private ICompilerResult CompileProject(IProject project, bool force)
{
Debug.Assert(compilerManager != null);
return compilerManager.CompileProject(project, force);
}
}
}

218
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Dependences.cs

@ -1,218 +0,0 @@ @@ -1,218 +0,0 @@
//
// -*- C# -*-
//
// Author: Roman Taranchenko
// Copyright: (c) 2004 Roman Taranchenko
// Copying Policy: GNU General Public License
//
using System;
using System.Collections;
using System.IO;
namespace CPPBinding
{
public interface IDependence
{
string Name
{
get;
}
DependenceTree DependsOn
{
get;
}
DependenceTree Children
{
get;
}
void Add(IDependence dependence);
DateTime GetLastWriteTime();
bool Exists
{
get;
}
bool Contains(IDependence dep);
bool Contains(string dep);
}
public class SourceFile: IDependence
{
private string _name;
private DependenceTree _dependences = new DependenceTree();
public SourceFile(string name)
{
_name = name;
}
public string Name
{
get
{
return _name;
}
}
public DependenceTree Children
{
get
{
return _dependences;
}
}
public DependenceTree DependsOn
{
get
{
DependenceTree listOfNames = new DependenceTree();
FillListOfNames(this, listOfNames);
return listOfNames;
}
}
public void Add(IDependence dependence)
{
_dependences.Add(dependence);
}
private static void FillListOfNames(IDependence dependence, DependenceTree list)
{
foreach (IDependence dep in dependence.Children)
{
list.Add(dep);
FillListOfNames(dep, list);
}
}
public DateTime GetLastWriteTime()
{
DateTime result = DateTime.MinValue;
if (Exists)
{
result = File.GetLastWriteTime(_name);
foreach (IDependence dep in _dependences)
{
DateTime dt = dep.GetLastWriteTime();
if (dt.CompareTo(result) > 0)
{
result = dt;
}
}
}
return result;
}
public bool Exists
{
get
{
return File.Exists(_name);
}
}
public override string ToString()
{
return _name;
}
public bool Contains(IDependence dep)
{
return Contains(dep.Name);
}
public bool Contains(string dep)
{
if (_name.Equals(dep)) {
return true;
}
return _dependences.Contains(dep);
}
}
public class DependenceTree: IEnumerable
{
private SortedList _list;
public DependenceTree()
{
_list = new SortedList();
}
public void Add(IDependence value)
{
if (!Contains(value))
{
_list.Add(value.Name, value);
}
}
public IDependence Get(string name)
{
return (IDependence) _list.GetByIndex(_list.IndexOfKey(name));
}
public IDependence Get(IDependence dep)
{
return Get(dep.Name);
}
public bool Contains(IDependence dep)
{
return Contains(dep.Name);
}
public bool Contains(string name)
{
return _list.ContainsKey(name);
}
public IEnumerator GetEnumerator()
{
return new DependenceTreeEnumerator(_list.GetEnumerator());
}
}
class DependenceTreeEnumerator: IEnumerator
{
private IDictionaryEnumerator _enum;
public DependenceTreeEnumerator(IDictionaryEnumerator e)
{
_enum = e;
}
public object Current
{
get
{
return ((DictionaryEntry)_enum.Current).Value;
}
}
public bool MoveNext()
{
return _enum.MoveNext();
}
public void Reset()
{
_enum.Reset();
}
}
}

343
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/FormattingStrategy/CPPNetFormattingStrategy.cs

@ -1,343 +0,0 @@ @@ -1,343 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krger" email="mike@icsharpcode.net"/>
// <version value="$version"/>
// </file>
using System;
using System.Collections;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;
using ICSharpCode.Core;
namespace CPPBinding.FormattingStrategy
{
/// <summary>
/// This class handles the auto and smart indenting in the textbuffer while
/// you type.
/// </summary>
public class CSharpFormattingStrategy : DefaultFormattingStrategy
{
public CSharpFormattingStrategy()
{
}
/// <summary>
/// Define CSharp specific smart indenting for a line :)
/// </summary>
protected override int SmartIndentLine(TextArea textArea, int lineNr)
{
if (lineNr > 0) {
LineSegment lineAbove = textArea.Document.GetLineSegment(lineNr - 1);
string lineAboveText = lineAbove == null ? "" : textArea.Document.GetText(lineAbove).Trim();
LineSegment curLine = textArea.Document.GetLineSegment(lineNr);
string curLineText = textArea.Document.GetText(curLine.Offset, curLine.Length).Trim();
if ((lineAboveText.EndsWith(")") && curLineText.StartsWith("{")) || // after for, while, etc.
(lineAboveText.EndsWith("else") && curLineText.StartsWith("{"))) // after else
{
string indentation = GetIndentation(textArea, lineNr - 1);
textArea.Document.Replace(curLine.Offset, curLine.Length, indentation + curLineText);
return indentation.Length;
}
if (curLineText.StartsWith("}")) { // indent closing bracket.
int closingBracketOffset = TextUtilities.SearchBracketBackward(textArea.Document, curLine.Offset + textArea.Document.GetText(curLine.Offset, curLine.Length).IndexOf('}') - 1, '{', '}');
if (closingBracketOffset == -1) { // no closing bracket found -> autoindent
return AutoIndentLine(textArea, lineNr);
}
string indentation = GetIndentation(textArea, textArea.Document.GetLineNumberForOffset(closingBracketOffset));
textArea.Document.Replace(curLine.Offset, curLine.Length, indentation + curLineText);
return indentation.Length;
}
if (lineAboveText.EndsWith(";")) { // expression ended, reset to valid indent.
int closingBracketOffset = TextUtilities.SearchBracketBackward(textArea.Document, curLine.Offset + textArea.Document.GetText(curLine.Offset, curLine.Length).IndexOf('}') - 1, '{', '}');
if (closingBracketOffset == -1) { // no closing bracket found -> autoindent
return AutoIndentLine(textArea, lineNr);
}
int closingBracketLineNr = textArea.Document.GetLineNumberForOffset(closingBracketOffset);
LineSegment closingBracketLine = textArea.Document.GetLineSegment(closingBracketLineNr);
string closingBracketLineText = textArea.Document.GetText(closingBracketLine.Offset, closingBracketLine.Length).Trim();
string indentation = GetIndentation(textArea, closingBracketLineNr);
// special handling for switch statement formatting.
if (closingBracketLineText.StartsWith("switch")) {
if (lineAboveText.StartsWith("break;") ||
lineAboveText.StartsWith("goto") ||
lineAboveText.StartsWith("return")) {
// nothing
} else {
indentation += ICSharpCode.TextEditor.Actions.Tab.GetIndentationString(textArea.Document);
}
}
indentation += ICSharpCode.TextEditor.Actions.Tab.GetIndentationString(textArea.Document);
textArea.Document.Replace(curLine.Offset, curLine.Length, indentation + curLineText);
return indentation.Length;
}
if (lineAboveText.EndsWith("{") || // indent opening bracket.
lineAboveText.EndsWith(":") || // indent case xyz:
(lineAboveText.EndsWith(")") && // indent single line if, for ... etc
(lineAboveText.StartsWith("if") ||
lineAboveText.StartsWith("while") ||
lineAboveText.StartsWith("for"))) ||
lineAboveText.EndsWith("else")) {
string indentation = GetIndentation(textArea, lineNr - 1) + ICSharpCode.TextEditor.Actions.Tab.GetIndentationString(textArea.Document);
textArea.Document.Replace(curLine.Offset, curLine.Length, indentation + curLineText);
return indentation.Length;
} else {
// try to indent linewrap
ArrayList bracketPos = new ArrayList();
for (int i = 0; i < lineAboveText.Length; ++i) { // search for a ( bracket that isn't closed
switch (lineAboveText[i]) {
case '(':
bracketPos.Add(i);
break;
case ')':
if (bracketPos.Count > 0) {
bracketPos.RemoveAt(bracketPos.Count - 1);
}
break;
}
}
if (bracketPos.Count > 0) {
int bracketIndex = (int)bracketPos[bracketPos.Count - 1];
string indentation = GetIndentation(textArea, lineNr - 1);
for (int i = 0; i <= bracketIndex; ++i) { // insert enough spaces to match
indentation += " "; // brace start in the next line
}
textArea.Document.Replace(curLine.Offset, curLine.Length, indentation + curLineText);
return indentation.Length;
}
}
}
return AutoIndentLine(textArea, lineNr);
}
bool NeedCurlyBracket(string text)
{
int curlyCounter = 0;
bool inString = false;
bool inChar = false;
bool lineComment = false;
bool blockComment = false;
for (int i = 0; i < text.Length; ++i) {
switch (text[i]) {
case '\r':
case '\n':
lineComment = false;
break;
case '/':
if (blockComment) {
Debug.Assert(i > 0);
if (text[i - 1] == '*') {
blockComment = false;
}
}
if (!inString && !inChar && i + 1 < text.Length) {
if (!blockComment && text[i + 1] == '/') {
lineComment = true;
}
if (!lineComment && text[i + 1] == '*') {
blockComment = true;
}
}
break;
case '"':
if (!(inChar || lineComment || blockComment)) {
inString = !inString;
}
break;
case '\'':
if (!(inString || lineComment || blockComment)) {
inChar = !inChar;
}
break;
case '{':
if (!(inString || inChar || lineComment || blockComment)) {
++curlyCounter;
}
break;
case '}':
if (!(inString || inChar || lineComment || blockComment)) {
--curlyCounter;
}
break;
}
}
return curlyCounter > 0;
}
bool IsInsideStringOrComment(TextArea textArea, LineSegment curLine, int cursorOffset)
{
// scan cur line if it is inside a string or single line comment (//)
bool isInsideString = false;
bool isInsideComment = false;
for (int i = curLine.Offset; i < cursorOffset; ++i) {
char ch = textArea.Document.GetCharAt(i);
if (ch == '"') {
isInsideString = !isInsideString;
}
if (ch == '/' && i + 1 < cursorOffset && textArea.Document.GetCharAt(i + 1) == '/') {
isInsideComment = true;
break;
}
}
return isInsideString || isInsideComment;
}
bool IsInsideDocumentationComment(TextArea textArea, LineSegment curLine, int cursorOffset)
{
// scan cur line if it is inside a string or single line comment (//)
bool isInsideString = false;
bool isInsideComment = false;
for (int i = curLine.Offset; i < cursorOffset; ++i) {
char ch = textArea.Document.GetCharAt(i);
if (ch == '"') {
isInsideString = !isInsideString;
}
if (!isInsideString) {
if (ch == '/' && i + 2 < cursorOffset && textArea.Document.GetCharAt(i + 1) == '/' && textArea.Document.GetCharAt(i + 2) == '/') {
isInsideComment = true;
break;
}
}
}
return isInsideComment;
}
public override int FormatLine(TextArea textArea, int lineNr, int cursorOffset, char ch) // used for comment tag formater/inserter
{
LineSegment curLine = textArea.Document.GetLineSegment(lineNr);
LineSegment lineAbove = lineNr > 0 ? textArea.Document.GetLineSegment(lineNr - 1) : null;
//// local string for curLine segment
string curLineText="";
if (ch != '\n' && ch != '>') {
if (IsInsideStringOrComment(textArea, curLine, cursorOffset)) {
return 0;
}
}
switch (ch) {
case '>':
if (IsInsideDocumentationComment(textArea, curLine, cursorOffset)) {
curLineText = textArea.Document.GetText(curLine.Offset, curLine.Length);
int column = textArea.Caret.Offset - curLine.Offset;
int index = Math.Min(column - 1, curLineText.Length - 1);
while (index >= 0 && curLineText[index] != '<') {
--index;
if(curLineText[index] == '/')
return 0; // the tag was an end tag or already
}
if (index > 0) {
StringBuilder commentBuilder = new StringBuilder("");
for (int i = index; i < curLineText.Length && i < column && !Char.IsWhiteSpace(curLineText[ i]); ++i) {
commentBuilder.Append(curLineText[ i]);
}
string tag = commentBuilder.ToString().Trim();
if (!tag.EndsWith(">")) {
tag += ">";
}
if (!tag.StartsWith("/")) {
textArea.Document.Insert(textArea.Caret.Offset, "</" + tag.Substring(1));
}
}
}
break;
case '}':
case '{':
return textArea.Document.FormattingStrategy.IndentLine(textArea, lineNr);
case '\n':
if (lineNr <= 0) {
return IndentLine(textArea, lineNr);
}
if (textArea.TextEditorProperties.AutoInsertCurlyBracket) {
string oldLineText = TextUtilities.GetLineAsString(textArea.Document, lineNr - 1);
if (oldLineText.EndsWith("{")) {
if (NeedCurlyBracket(textArea.Document.TextContent)) {
textArea.Document.Insert(curLine.Offset + curLine.Length, "\n}");
IndentLine(textArea, lineNr + 1);
}
}
}
string lineAboveText = lineAbove == null ? "" : textArea.Document.GetText(lineAbove);
//// curLine might have some text which should be added to indentation
curLineText = "";
if (curLine.Length > 0) {
curLineText = textArea.Document.GetText(curLine.Offset,curLine.Length);
}
LineSegment nextLine = lineNr + 1 < textArea.Document.TotalNumberOfLines ? textArea.Document.GetLineSegment(lineNr + 1) : null;
string nextLineText = lineNr + 1 < textArea.Document.TotalNumberOfLines ? textArea.Document.GetText(nextLine.Offset, nextLine.Length) : "";
if (lineAbove.HighlightSpanStack != null && lineAbove.HighlightSpanStack.Count > 0) {
if (!((Span)lineAbove.HighlightSpanStack.Peek()).StopEOL) { // case for /* style comments
int index = lineAboveText == null ? -1 : lineAboveText.IndexOf("/*");
if (index > 0) {
string indentation = GetIndentation(textArea, lineNr - 1);
for (int i = indentation.Length; i < index; ++ i) {
indentation += ' ';
}
//// adding curline text
textArea.Document.Replace(curLine.Offset, cursorOffset - curLine.Offset, indentation + " * "+curLineText);
return indentation.Length + 3+curLineText.Length;
}
index = lineAboveText.IndexOf("*");
if (index > 0) {
string indentation = GetIndentation(textArea, lineNr - 1);
for (int i = indentation.Length; i < index; ++ i) {
indentation += ' ';
}
//// adding curline if present
textArea.Document.Replace(curLine.Offset, cursorOffset - curLine.Offset, indentation + "* "+curLineText);
return indentation.Length + 2 + curLineText.Length;
}
} else { // don't handle // lines, because they're only one lined comments
int indexAbove = lineAboveText.IndexOf("///");
int indexNext = nextLineText.IndexOf("///");
if (indexAbove > 0 && (indexNext != -1 || indexAbove + 4 < lineAbove.Length)) {
string indentation = GetIndentation(textArea, lineNr - 1);
for (int i = indentation.Length; i < indexAbove; ++ i) {
indentation += ' ';
}
//// adding curline text if present
textArea.Document.Replace(curLine.Offset, cursorOffset - curLine.Offset, indentation + "/// " + curLineText);
return indentation.Length + 4 /*+ curLineText.Length*/;
}
}
}
return IndentLine(textArea, lineNr);
}
return 0;
}
}
}

152
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Gui/CPPCodeGenerationPanel.cs

@ -1,152 +0,0 @@ @@ -1,152 +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.Drawing;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.SharpDevelop.Internal.ExternalTool;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.Core;
namespace CPPBinding
{
public abstract class AbstractCPPConfigPanel : AbstractOptionPanel
{
protected CPPCompilerParameters compilerParameters;
protected System.Windows.Forms.PropertyGrid grid = new System.Windows.Forms.PropertyGrid();
protected abstract void SetGridObject();
public override void LoadPanelContents()
{
compilerParameters = (CPPCompilerParameters)((Properties)CustomizationObject).Get("Config");
grid.Dock = DockStyle.Fill;
SetGridObject();
Controls.Add(grid);
}
public override bool StorePanelContents()
{
return true;
}
}
public class CPPCodeGenerationPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters;
}
}
#region compiler panels
public class GeneralCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.generalCPPOptions;
}
}
public class OptimizeCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.optimizeCPPOptions;
}
}
public class PreProcessorCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.preProcessorCPPOptions;
}
}
public class CodeGenerationCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.codeGenerationCPPOptions;
}
}
public class LanguageCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.languageCPPOptions;
}
}
public class PreCompiledHeaderCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.preCompiledHeaderCPPOptions;
}
}
public class OutputFileCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.outputFileCPPOptions;
}
}
public class InformationSearchCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.informationSearchCPPOptions;
}
}
public class ExtendedCPPOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.extendedCPPOptions;
}
}
#endregion
public class GeneralLinkerOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.generalLinkerOptions;
}
}
public class InputLinkerOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.inputLinkerOptions;
}
}
public class DebugLinkerOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.debugLinkerOptions;
}
}
public class SystemLinkerOptionsPanel : AbstractCPPConfigPanel
{
protected override void SetGridObject()
{
grid.SelectedObject = this.compilerParameters.systemLinkerOptions;
}
}
}

123
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/IncludeParser.cs

@ -1,123 +0,0 @@ @@ -1,123 +0,0 @@
//
// -*- C# -*-
//
// Author: Roman Taranchenko
// Copyright: (c) 2004 Roman Taranchenko
// Copying Policy: GNU General Public License
//
using System;
using System.Collections;
using System.IO;
namespace CPPBinding
{
/// <summary>
/// Description of IncludeParser.
/// </summary>
public class IncludeParser
{
private IDependence _owner;
private IList _includeDirectories;
private bool _onlyProjectInclude;
public IncludeParser(IDependence owner, IList includeDirectories, bool onlyProjectInclude)
{
_includeDirectories = includeDirectories;
_owner = owner;
_onlyProjectInclude = onlyProjectInclude;
}
public IncludeParser(String fileName, IList includeDirectories, bool onlyProjectInclude)
{
_includeDirectories = includeDirectories;
_owner = new SourceFile(fileName);
_onlyProjectInclude = onlyProjectInclude;
}
public IDependence Parse()
{
ParseFile(_owner);
return _owner;
}
private void ParseFile(IDependence parent)
{
if (!parent.Exists)
{
return;
}
ArrayList includes = new ArrayList();
StreamReader reader = File.OpenText(parent.Name);
using (reader)
{
string line = null;
while ((line = reader.ReadLine()) != null)
{
line = line.TrimStart(' ', '\t');
if (line.StartsWith("#include"))
{
IDependence include = GetInclude(line);
if (include != null)
{
includes.Add(include);
}
}
}
}
foreach (IDependence include in includes)
{
parent.Add(include);
ParseFile(include);
}
}
private IDependence GetInclude(string line)
{
IDependence result = null;
int start = -1, end = -1;
bool quotes = false;
// find first index
for (int i = 8; i < line.Length; ++i)
{
if (!_onlyProjectInclude && line[i] == '<')
{
start = i+1;
break;
}
if (line[i] == '"')
{
start = i+1;
quotes = true;
break;
}
}
// find second index
if (start > 0 && start + 1 < line.Length)
{
end = line.IndexOf(quotes ? '"' : '>', start + 1);
}
// create include
if (start > 0 && end > start)
{
string includeName = line.Substring(start, end-start);
foreach (string dir in _includeDirectories)
{
string fullName = Path.Combine(dir, includeName);
if (!_owner.Contains(fullName) && File.Exists(fullName))
{
result = new SourceFile(fullName);
}
}
}
return result;
}
}
}

2257
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Project/CPPNetCompilerParameters.cs

File diff suppressed because it is too large Load Diff

61
src/AddIns/BackendBindings/CPPNetBinding/Project/Src/Project/CPPNetProject.cs

@ -1,61 +0,0 @@ @@ -1,61 +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.Collections;
using System.Diagnostics;
using System.ComponentModel;
using System.Xml;
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.SharpDevelop.Internal.Templates;
namespace CPPBinding
{
/// <summary>
/// This class describes a C Sharp project and it compilation options.
/// </summary>
public class CPPProject : AbstractProject
{
public override string ProjectType {
get {
return CPPLanguageBinding.LanguageName;
}
}
public CPPProject()
{
}
public override IConfiguration CreateConfiguration()
{
return new CPPCompilerParameters();
}
public CPPProject(ProjectCreateInformation info, XmlElement projectOptions)
{
if (info != null) {
Name = info.ProjectName;
Configurations.Add(CreateConfiguration("Debug"));
Configurations.Add(CreateConfiguration("Release"));
foreach (CPPCompilerParameters parameter in Configurations) {
parameter.OutputDirectory = info.BinPath + Path.DirectorySeparatorChar + parameter.Name;
parameter.IntermediateDirectory = info.BinPath + Path.DirectorySeparatorChar + parameter.Name;
parameter.OutputAssembly = Name;
if (projectOptions != null) {
if (projectOptions.Attributes["ConfigurationType"] != null) {
parameter.ConfigurationType = (ConfigurationType)Enum.Parse(typeof(ConfigurationType), projectOptions.Attributes["ConfigurationType"].InnerText);
}
}
parameter.OutputFile = parameter.OutputDirectory + Path.DirectorySeparatorChar + Name + (parameter.ConfigurationType == ConfigurationType.Dll ? ".dll" : ".exe");
}
}
}
}
}

22
src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/CPP.Empty.xft

@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
<?xml version="1.0"?>
<Template author="Roman Taranchenko" version="1.0">
<Config
name = "${res:Templates.File.EmptyFile.Name}"
icon = "C++.File.EmptyFile"
category = "C++"
defaultname = "Empty${Number}.cpp"
language = "C++.NET"/>
<Description>${res:Templates.File.EmptyFile.Description}</Description>
<Files>
<File name="${FullName}" language="C++.NET"><![CDATA[${StandardHeader.C++.NET}
]]></File>
</Files>
<AdditionalOptions/>
</Template>

22
src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/CPP.Header.xft

@ -1,22 +0,0 @@ @@ -1,22 +0,0 @@
<?xml version="1.0"?>
<Template author="Roman Taranchenko" version="1.0">
<Config
name = "${res:Templates.File.HeaderFile.Name}"
icon = "C++.File.EmptyFile"
category = "C++"
defaultname = "Empty${Number}.h"
language = "C++.NET"/>
<Description>${res:Templates.File.HeaderFile.Description}</Description>
<Files>
<File name="${FullName}" language="C++.NET"><![CDATA[${StandardHeader.C++.NET}
]]></File>
</Files>
<AdditionalOptions/>
</Template>

84
src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/ConsoleProject.xpt

@ -1,84 +0,0 @@ @@ -1,84 +0,0 @@
<?xml version="1.0"?>
<Template originator = "Mike Krueger"
created = "06/10/2001"
lastModified = "02/01/2003">
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.ConsoleProject.Name}</Name>
<Category>C++.NET</Category>
<Icon>C++.Project.DOSProject</Icon>
<LanguageName>C++.NET</LanguageName>
<Description>${res:Templates.Project.ConsoleProject.Description}</Description>
</TemplateConfiguration>
<!-- Actions -->
<Actions>
<Open filename = "Main.cpp"/>
</Actions>
<!-- Template Content -->
<Combine name = "${ProjectName}" directory = ".">
<Options>
<StartupProject>${ProjectName}</StartupProject>
</Options>
<Project name = "${ProjectName}" directory = ".">
<Options/>
<Files>
<File name="Main.cpp"><![CDATA[#include "Main.h"
int main()
{
System::Console::WriteLine("Hello World!");
}
]]></File>
<File name="Main.h"><![CDATA[${StandardHeader.C++.NET}
#include "StdAfx.h"
]]></File>
<File name="StdAfx.h"><![CDATA[${StandardHeader.C++.NET}
#pragma once
#using <mscorlib.dll>
]]></File>
<File name="AssemblyInfo.cpp"><![CDATA[#include"StdAfx.h"
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")];
[assembly: AssemblyDescription("")];
[assembly: AssemblyConfiguration("")];
[assembly: AssemblyCompany("")];
[assembly: AssemblyProduct("")];
[assembly: AssemblyCopyright("")];
[assembly: AssemblyTrademark("")];
[assembly: AssemblyCulture("")];
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")];
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)];
[assembly: AssemblyKeyFile("")];
]]></File>
</Files>
</Project>
</Combine>
</Template>

18
src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/EmptyProject.xpt

@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
<?xml version="1.0"?>
<Template originator = "Roman Taranchenko"
created = "14/03/2004"
lastModified = "14/03/2004">
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.EmptyProject.Name}</Name>
<Category>C++.NET</Category>
<Icon>C++.Project.EmptyProject</Icon>
<LanguageName>C++.NET</LanguageName>
<Description>${res:Templates.Project.EmptyProject.Description}</Description>
</TemplateConfiguration>
<Combine name = "${ProjectName}" directory = ".">
<Project name = "${ProjectName}" directory = "."/>
</Combine>
</Template>

107
src/AddIns/BackendBindings/CPPNetBinding/Project/Templates/FormsProject.xpt

@ -1,107 +0,0 @@ @@ -1,107 +0,0 @@
<?xml version="1.0"?>
<Template originator = "Mike Krueger"
created = "06/10/2001"
lastModified = "02/01/2003">
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.WindowsApplication.Name}</Name>
<Category>C++.NET</Category>
<Icon>C++.Project.Form</Icon>
<LanguageName>C++.NET</LanguageName>
<Description>${res:Templates.Project.WindowsApplication.Description}</Description>
</TemplateConfiguration>
<!-- Actions -->
<Actions>
<Open filename = "MainForm.cpp"/>
</Actions>
<!-- Template Content -->
<Combine name = "${ProjectName}" directory = ".">
<Options>
<StartupProject>${ProjectName}</StartupProject>
</Options>
<Project name = "${ProjectName}" directory = ".">
<Options/>
<Files>
<File name="MainForm.cpp"><![CDATA[#include "MainForm.h"
MainForm::MainForm()
{
InitializeComponents();
}
void MainForm::InitializeComponents()
{
this->SuspendLayout();
this->Name = "MainForm";
this->Text = "This is my form";
this->Size = System::Drawing::Size(300, 300);
this->ResumeLayout(false);
}
int main()
{
System::Windows::Forms::Application::Run(new MainForm());
}]]></File>
<File name="MainForm.h"><![CDATA[${StandardHeader.C++.NET}
#pragma once
#include "StdAfx.h"
public __gc class MainForm : public System::Windows::Forms::Form
{
public:
MainForm();
private:
void InitializeComponents();
};
]]></File>
<File name="StdAfx.h"><![CDATA[${StandardHeader.C++.NET}
#pragma once
#using <mscorlib.dll>
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>
]]></File>
<File name="AssemblyInfo.cpp"><![CDATA[#include"StdAfx.h"
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")];
[assembly: AssemblyDescription("")];
[assembly: AssemblyConfiguration("")];
[assembly: AssemblyCompany("")];
[assembly: AssemblyProduct("")];
[assembly: AssemblyCopyright("")];
[assembly: AssemblyTrademark("")];
[assembly: AssemblyCulture("")];
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("1.0.*")];
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(false)];
[assembly: AssemblyKeyFile("")];
]]></File>
</Files>
</Project>
</Combine>
</Template>

4
src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/DocumentAccessor.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using ICSharpCode.TextEditor;
@ -130,7 +130,7 @@ namespace CSharpBinding.FormattingStrategy @@ -130,7 +130,7 @@ namespace CSharpBinding.FormattingStrategy
FileStream f;
StreamReader r;
ArrayList lines = new ArrayList();
List<string> lines = new List<string>();
bool dirty = false;
string filename;

4
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/ToolboxProvider.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing.Design;
using System.IO;
using System.Reflection;
@ -23,7 +23,7 @@ namespace ICSharpCode.FormsDesigner @@ -23,7 +23,7 @@ namespace ICSharpCode.FormsDesigner
public class ToolboxProvider
{
static ICSharpCode.FormsDesigner.Services.ToolboxService toolboxService = null;
public static ArrayList SideTabs = new ArrayList();
public static List<AxSideTab> SideTabs = new List<AxSideTab>();
static ComponentLibraryLoader componentLibraryLoader = new ComponentLibraryLoader();

3
src/AddIns/Misc/HighlightingEditor/Project/Src/EditHighlightingPanel.cs

@ -8,7 +8,6 @@ @@ -8,7 +8,6 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Xml;
@ -226,7 +225,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -226,7 +225,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
BuiltinListSelectedIndexChanged(this, EventArgs.Empty);
}
ArrayList errors = new ArrayList();
List<ValidationEventArgs> errors = new List<ValidationEventArgs>();
private SchemeNode LoadFile(XmlTextReader reader, bool userList)
{

13
src/AddIns/Misc/HighlightingEditor/Project/Src/Nodes/EnvironmentNode.cs

@ -29,9 +29,10 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -29,9 +29,10 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
public EnvironmentNode(XmlElement el)
{
ArrayList envColors = new ArrayList();
ArrayList envColorNames = new ArrayList();
ArrayList envColorDescriptions = new ArrayList();
List<EditorHighlightColor> envColors = new List<EditorHighlightColor>();
List<string> envColorNames = new List<string>();
List<string> envColorDescriptions = new List<string>();
if (el != null) {
foreach (XmlNode node in el.ChildNodes) {
if (node is XmlElement) {
@ -55,9 +56,9 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes @@ -55,9 +56,9 @@ namespace ICSharpCode.SharpDevelop.AddIns.HighlightingEditor.Nodes
}
}
EnvironmentNode.ColorNames = (string[])envColorNames.ToArray(typeof(string));
this.ColorDescs = (string[])envColorDescriptions.ToArray(typeof(string));
this.Colors = (EditorHighlightColor[])envColors.ToArray(typeof(EditorHighlightColor));
EnvironmentNode.ColorNames = envColorNames.ToArray();
this.ColorDescs = envColorDescriptions.ToArray();
this.Colors = envColors.ToArray();
StringParser.Parse(ColorDescs);
Text = ResNodeName("EnvironmentColors");

22
src/AddIns/Misc/PInvokeAddIn/Project/Src/PInvokeRepository.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Xml;
@ -85,27 +85,27 @@ namespace ICSharpCode.PInvokeAddIn @@ -85,27 +85,27 @@ namespace ICSharpCode.PInvokeAddIn
XmlDocument doc = new XmlDocument();
doc.Load(configFile);
ArrayList moduleArrayList = new ArrayList();
ArrayList functionArrayList = new ArrayList();
List<string> moduleList = new List<string>();
List<string> functionList = new List<string>();
foreach(XmlElement moduleElement in doc.DocumentElement.SelectNodes("//module"))
{
XmlAttribute moduleName = (XmlAttribute)moduleElement.SelectSingleNode("@name");
moduleArrayList.Add(moduleName.Value);
moduleList.Add(moduleName.Value);
foreach(XmlAttribute functionName in moduleElement.SelectNodes("function/@name"))
{
functionArrayList.Add(functionName.Value);
functionList.Add(functionName.Value);
}
}
moduleNames = new string[moduleArrayList.Count];
moduleArrayList.Sort();
moduleArrayList.CopyTo(moduleNames);
moduleNames = new string[moduleList.Count];
moduleList.Sort();
moduleList.CopyTo(moduleNames);
functionNames = new string[functionArrayList.Count];
functionArrayList.Sort();
functionArrayList.CopyTo(functionNames);
functionNames = new string[functionList.Count];
functionList.Sort();
functionList.CopyTo(functionNames);
}
}
}

4
src/AddIns/Misc/RegExpTk/Project/Src/Dialogs/MainWindow.cs

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
// the compile stuff
using System;
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.Drawing;
@ -66,7 +66,7 @@ namespace Plugins.RegExpTk { @@ -66,7 +66,7 @@ namespace Plugins.RegExpTk {
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.RegExpTkMainForm.xfrm"));
ArrayList quickies = new ArrayList();
List<QuickInsert> quickies = new List<QuickInsert>();
quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.UngreedyStar}", "*?"));
quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.WordCharacter}", "\\w"));
quickies.Add(new QuickInsert("${res:RegExpTk.RegExpMenu.NonWordCharacter}", "\\W"));

37
src/AddIns/Misc/RegExpTk/RegExpTkPad.cs.old

@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Markus Palme" email="MarkusPalme@gmx.de"/>
// <version value="$version"/>
// </file>
using System;
using System.Drawing;
using System.Collections;
using System.Diagnostics;
using System.ComponentModel;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Gui.Dialogs;
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.Core.AddIns;
using ICSharpCode.Core.AddIns.Codons;
using ICSharpCode.Core.Properties;
namespace Plugins.RegExpTk {
public class RegExpTkCommand : AbstractMenuCommand
{
public override void Run()
{
RegExpTkDialog dialog = new RegExpTkDialog();
dialog.ShowDialog();
}
}
public class RegExpTkDialog : Form
{
}
}

17
src/AddIns/Misc/StartPage/Project/Src/ICSharpCodePage.cs

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Xml;
@ -133,13 +133,11 @@ namespace ICSharpCode.StartPage @@ -133,13 +133,11 @@ namespace ICSharpCode.StartPage
set { m_bShowContentBar = value; }
}
private ArrayList TopMenu;
private ArrayList LeftMenu;
private List<MenuItem> TopMenu;
private List<MenuItem> LeftMenu;
public virtual void PopulateTopMenu()
{
TopMenu.Add(new MenuItem(StringParser.Parse("${res:StartPage.StartMenu.Name}"), "startpage://Start"));
TopMenu.Add(new MenuItem(StringParser.Parse("${res:StartPage.ChangeLogMenu.Name}"), "startpage://ChangeLog"));
TopMenu.Add(new MenuItem(StringParser.Parse("${res:StartPage.AuthorsMenu.Name}"), "startpage://Authors"));
@ -148,11 +146,6 @@ namespace ICSharpCode.StartPage @@ -148,11 +146,6 @@ namespace ICSharpCode.StartPage
public virtual void PopulateLeftMenu()
{
// LeftMenu.Add(new MenuItem("Start", "/OpenSource/SD/AnnouncementList.asp"));
// LeftMenu.Add(new MenuItem("ChangeLog", "/OpenSource/SD/WhatsNew.asp"));
// LeftMenu.Add(new MenuItem("Authors", "/OpenSource/SD/NewsHistory.asp"));
// LeftMenu.Add(new MenuItem("Readme", "/OpenSource/SD/NewsHistory.asp"));
// LeftMenu.Add(new MenuItem("Help Wanted", "/pub/relations/"));
}
public string TopMenuSelectedItem
@ -194,11 +187,11 @@ namespace ICSharpCode.StartPage @@ -194,11 +187,11 @@ namespace ICSharpCode.StartPage
{
ColorScheme = ICSharpCode.StartPage.ColorScheme.brown;
TopMenu = new ArrayList();
TopMenu = new List<MenuItem>();
PopulateTopMenu();
TopMenuSelectedItem = "Home";
LeftMenu = new ArrayList();
LeftMenu = new List<MenuItem>();
PopulateLeftMenu();
LeftMenuSelectedItem = "";

8
src/Libraries/ICSharpCode.TextEditor/Project/Src/Undo/UndoQueue.cs

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
namespace ICSharpCode.TextEditor.Undo
{
@ -17,7 +17,7 @@ namespace ICSharpCode.TextEditor.Undo @@ -17,7 +17,7 @@ namespace ICSharpCode.TextEditor.Undo
/// </summary>
public class UndoQueue : IUndoableOperation
{
ArrayList undolist = new ArrayList();
List<IUndoableOperation> undolist = new List<IUndoableOperation>();
/// <summary>
/// </summary>
@ -38,14 +38,14 @@ namespace ICSharpCode.TextEditor.Undo @@ -38,14 +38,14 @@ namespace ICSharpCode.TextEditor.Undo
public void Undo()
{
for (int i = 0; i < undolist.Count; ++i) {
((IUndoableOperation)undolist[i]).Undo();
undolist[i].Undo();
}
}
public void Redo()
{
for (int i = undolist.Count - 1 ; i >= 0 ; --i) {
((IUndoableOperation)undolist[i]).Redo();
undolist[i].Redo();
}
}
}

8
src/Libraries/ICSharpCode.TextEditor/Project/Src/Undo/UndoStack.cs

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
using System;
using System.Drawing;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
namespace ICSharpCode.TextEditor.Undo
{
@ -17,8 +17,8 @@ namespace ICSharpCode.TextEditor.Undo @@ -17,8 +17,8 @@ namespace ICSharpCode.TextEditor.Undo
/// </summary>
public class UndoStack
{
Stack undostack = new Stack();
Stack redostack = new Stack();
Stack<IUndoableOperation> undostack = new Stack<IUndoableOperation>();
Stack<IUndoableOperation> redostack = new Stack<IUndoableOperation>();
public TextEditorControlBase TextEditorControl = null;
@ -36,7 +36,7 @@ namespace ICSharpCode.TextEditor.Undo @@ -36,7 +36,7 @@ namespace ICSharpCode.TextEditor.Undo
/// <summary>
/// This property is EXCLUSIVELY for the UndoQueue class, don't USE it
/// </summary>
internal Stack _UndoStack {
internal Stack<IUndoableOperation> _UndoStack {
get {
return undostack;
}

41
src/Main/Base/Project/Src/Gui/Components/SideBar/AxSideBar.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
@ -929,15 +929,15 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -929,15 +929,15 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public class SideTabCollection : ICollection, IEnumerable
public class SideTabCollection : ICollection<AxSideTab>, IEnumerable<AxSideTab>
{
ArrayList list = new ArrayList();
List<AxSideTab> list = new List<AxSideTab>();
AxSideTab dragOverTab;
AxSideBar sideBar;
public AxSideTab this[int index] {
get {
return (AxSideTab)list[index];
return list[index];
}
set {
list[index] = value;
@ -980,15 +980,16 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -980,15 +980,16 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public virtual AxSideTab Add(AxSideTab item)
public virtual void Add(AxSideTab item)
{
list.Add(item);
return item;
}
public virtual AxSideTab Add(string name)
{
return Add(sideBar.SideTabFactory.CreateSideTab(sideBar, name));
AxSideTab tab = sideBar.SideTabFactory.CreateSideTab(sideBar, name);
Add(tab);
return tab;
}
public virtual void Clear()
@ -1001,7 +1002,12 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -1001,7 +1002,12 @@ namespace ICSharpCode.SharpDevelop.Gui
return list.Contains(item);
}
public IEnumerator GetEnumerator()
public IEnumerator<AxSideTab> GetEnumerator()
{
return list.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return list.GetEnumerator();
}
@ -1013,7 +1019,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -1013,7 +1019,7 @@ namespace ICSharpCode.SharpDevelop.Gui
public void CopyTo(Array dest, int index)
{
list.CopyTo(dest, index);
list.CopyTo((AxSideTab[])dest, index);
}
public virtual AxSideTab Insert(int index, AxSideTab item)
@ -1027,7 +1033,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -1027,7 +1033,7 @@ namespace ICSharpCode.SharpDevelop.Gui
return Insert(index, sideBar.SideTabFactory.CreateSideTab(sideBar, name));
}
public virtual void Remove(AxSideTab item)
public bool Remove(AxSideTab item)
{
if (item == sideBar.ActiveTab) {
int index = IndexOf(item);
@ -1039,19 +1045,30 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -1039,19 +1045,30 @@ namespace ICSharpCode.SharpDevelop.Gui
sideBar.ActiveTab = null;
}
}
list.Remove(item);
return list.Remove(item);
}
public virtual void RemoveAt(int index)
{
list.RemoveAt(index);
}
public bool IsReadOnly {
get {
return false;
}
}
public void CopyTo(AxSideTab[] array, int arrayIndex)
{
list.CopyTo(array, arrayIndex);
}
}
}
public class SpecialDataObject : System.Windows.Forms.IDataObject
{
ArrayList dataObjects = new ArrayList();
List<object> dataObjects = new List<object>();
public object GetData(string format)
{
return GetData(format, true);

39
src/Main/Base/Project/Src/Gui/Components/SideBar/AxSideTab.cs

@ -9,7 +9,7 @@ using System; @@ -9,7 +9,7 @@ using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic;
using ICSharpCode.Core;
namespace ICSharpCode.SharpDevelop.Gui
@ -400,9 +400,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -400,9 +400,9 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public class SideTabItemCollection : ICollection, IEnumerable
public class SideTabItemCollection : ICollection<AxSideTabItem>, IEnumerable<AxSideTabItem>
{
ArrayList list = new ArrayList();
List<AxSideTabItem> list = new List<AxSideTabItem>();
ISideTabItemFactory sideTabItemFactory = new DefaultSideTabItemFactory();
public event SideTabItemEventHandler ItemRemoved;
@ -457,12 +457,11 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -457,12 +457,11 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public virtual AxSideTabItem Add(AxSideTabItem item)
public virtual void Add(AxSideTabItem item)
{
list.Add(item);
return item;
}
public virtual AxSideTabItem Add(string name, object content)
{
return Add(name, content, -1);
@ -472,7 +471,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -472,7 +471,8 @@ namespace ICSharpCode.SharpDevelop.Gui
{
AxSideTabItem item = sideTabItemFactory.CreateSideTabItem(name, imageIndex);
item.Tag = content;
return Add(item);
Add(item);
return item;
}
public virtual void Clear()
@ -485,7 +485,12 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -485,7 +485,12 @@ namespace ICSharpCode.SharpDevelop.Gui
return list.Contains(item);
}
public IEnumerator GetEnumerator()
public IEnumerator<AxSideTabItem> GetEnumerator()
{
return list.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return list.GetEnumerator();
}
@ -497,7 +502,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -497,7 +502,7 @@ namespace ICSharpCode.SharpDevelop.Gui
public void CopyTo(Array dest, int index)
{
list.CopyTo(dest, index);
list.CopyTo((AxSideTabItem[])dest, index);
}
public virtual AxSideTabItem Insert(int index, AxSideTabItem item)
@ -518,10 +523,11 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -518,10 +523,11 @@ namespace ICSharpCode.SharpDevelop.Gui
return Insert(index, item);
}
public virtual void Remove(AxSideTabItem item)
public virtual bool Remove(AxSideTabItem item)
{
list.Remove(item);
bool r = list.Remove(item);
OnItemRemoved(item);
return r;
}
public virtual void RemoveAt(int index)
@ -540,6 +546,17 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -540,6 +546,17 @@ namespace ICSharpCode.SharpDevelop.Gui
ItemRemoved(this, new SideTabItemEventArgs(item));
}
}
public bool IsReadOnly {
get {
return false;
}
}
public void CopyTo(AxSideTabItem[] array, int arrayIndex)
{
throw new NotImplementedException();
}
}
}
}

4
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ExternalToolPanel.cs

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;
using ICSharpCode.SharpDevelop.Internal.ExternalTool;
@ -146,7 +146,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -146,7 +146,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
public override bool StorePanelContents()
{
ArrayList newlist = new ArrayList();
List<ExternalTool> newlist = new List<ExternalTool>();
foreach (ExternalTool tool in ((ListBox)ControlDictionary["toolListBox"]).Items) {
if (!FileUtility.IsValidFileName(tool.Command)) {
MessageService.ShowError(String.Format("The command of tool \"{0}\" is invalid.", tool.MenuCommand));

20
src/Main/Base/Project/Src/Internal/ExternalTool/ToolLoader.cs

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Xml;
@ -23,15 +23,16 @@ namespace ICSharpCode.SharpDevelop.Internal.ExternalTool @@ -23,15 +23,16 @@ namespace ICSharpCode.SharpDevelop.Internal.ExternalTool
static string TOOLFILE = "SharpDevelop-tools.xml";
static string TOOLFILEVERSION = "1";
static ArrayList tool = new ArrayList();
static List<ExternalTool> tool = new List<ExternalTool>();
public static ArrayList Tool {
public static List<ExternalTool> Tool
{
get {
return tool;
}
set {
tool = value;
System.Diagnostics.Debug.Assert(tool != null, "SharpDevelop.Tool.Data.ToolLoader : set ArrayList Tool (value == null)");
System.Diagnostics.Debug.Assert(tool != null, "SharpDevelop.Tool.Data.ToolLoader : set List Tool (value == null)");
}
}
@ -42,18 +43,23 @@ namespace ICSharpCode.SharpDevelop.Internal.ExternalTool @@ -42,18 +43,23 @@ namespace ICSharpCode.SharpDevelop.Internal.ExternalTool
}
XmlDocument doc = new XmlDocument();
try {
try
{
doc.Load(filename);
if (doc.DocumentElement.Attributes["VERSION"].InnerText != TOOLFILEVERSION)
return false;
tool = new ArrayList();
tool = new List<ExternalTool>();
XmlNodeList nodes = doc.DocumentElement.ChildNodes;
foreach (XmlElement el in nodes)
{
tool.Add(new ExternalTool(el));
} catch (Exception) {
}
}
catch (Exception)
{
return false;
}
return true;

18
src/Main/Base/Project/Src/Internal/Templates/File/FileTemplate.cs

@ -136,7 +136,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -136,7 +136,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
/// </summary>
public class FileTemplate : IComparable
{
public static ArrayList FileTemplates = new ArrayList();
public static List<FileTemplate> FileTemplates = new List<FileTemplate>();
string author = null;
string name = null;
@ -150,10 +150,10 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -150,10 +150,10 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
bool newFileDialogVisible = true;
ArrayList files = new ArrayList(); // contains FileDescriptionTemplate classes
ArrayList properties = new ArrayList();
ArrayList scripts = new ArrayList();
ArrayList customTypes = new ArrayList();
List<FileDescriptionTemplate> files = new List<FileDescriptionTemplate>();
List<TemplateProperty> properties = new List<TemplateProperty>();
List<TemplateScript> scripts = new List<TemplateScript>();
List<TemplateType> customTypes = new List<TemplateType>();
XmlElement fileoptions = null;
@ -222,19 +222,19 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -222,19 +222,19 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
}
}
public ArrayList FileDescriptionTemplates {
public List<FileDescriptionTemplate> FileDescriptionTemplates {
get {
return files;
}
}
public ArrayList Properties {
public List<TemplateProperty> Properties {
get {
return properties;
}
}
public ArrayList CustomTypes {
public List<TemplateType> CustomTypes {
get {
return customTypes;
}
@ -246,7 +246,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -246,7 +246,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
}
}
public ArrayList Scripts {
public List<TemplateScript> Scripts {
get {
return scripts;
}

9
src/Main/Base/Project/Src/Internal/Templates/TextTemplate.cs

@ -8,7 +8,6 @@ @@ -8,7 +8,6 @@
using System;
using System.IO;
using System.Xml;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
@ -23,10 +22,10 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -23,10 +22,10 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
/// </summary>
public class TextTemplate
{
public static ArrayList TextTemplates = new ArrayList();
public static List<TextTemplate> TextTemplates = new List<TextTemplate>();
string name = null;
ArrayList entries = new ArrayList();
string name = null;
List<Entry> entries = new List<Entry>();
public string Name {
get {
@ -34,7 +33,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -34,7 +33,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
}
}
public ArrayList Entries {
public List<Entry> Entries {
get {
return entries;
}

6
src/Main/Base/Project/Src/Internal/Undo/UndoQueue.cs

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
namespace ICSharpCode.SharpDevelop.Internal.Undo
{
@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo
/// </summary>
public class UndoQueue : IUndoableOperation
{
ArrayList undolist = new ArrayList();
List<IUndoableOperation> undolist = new List<IUndoableOperation>();
public UndoQueue(UndoStack stack, int numops)
{
@ -37,7 +37,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo @@ -37,7 +37,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo
public void Undo()
{
for (int i = 0; i < undolist.Count; ++i) {
((IUndoableOperation)undolist[i]).Undo();
undolist[i].Undo();
}
}

8
src/Main/Base/Project/Src/Internal/Undo/UndoStack.cs

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
namespace ICSharpCode.SharpDevelop.Internal.Undo
{
@ -16,8 +16,8 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo @@ -16,8 +16,8 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo
/// </summary>
public class UndoStack
{
Stack undostack = new Stack();
Stack redostack = new Stack();
Stack<IUndoableOperation> undostack = new Stack<IUndoableOperation>();
Stack<IUndoableOperation> redostack = new Stack<IUndoableOperation>();
public event EventHandler ActionUndone;
public event EventHandler ActionRedone;
@ -27,7 +27,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo @@ -27,7 +27,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Undo
/// <summary>
/// This property is EXCLUSIVELY for the UndoQueue class, don't USE it
/// </summary>
internal Stack _UndoStack {
internal Stack<IUndoableOperation> _UndoStack {
get {
return undostack;
}

6
src/Main/Base/Project/Src/Services/AmbienceService/AbstractAmbience.cs

@ -66,12 +66,6 @@ namespace ICSharpCode.Core @@ -66,12 +66,6 @@ namespace ICSharpCode.Core
}
}
public bool UseLinkArrayList {
get {
return (conversionFlags & ConversionFlags.UseLinkArrayList) == ConversionFlags.UseLinkArrayList;
}
}
public bool UseFullyQualifiedMemberNames {
get {
return UseFullyQualifiedNames && !((conversionFlags & ConversionFlags.QualifiedNamesOnlyForReturnTypes) == ConversionFlags.QualifiedNamesOnlyForReturnTypes);

41
src/Main/Base/Project/Src/Services/AmbienceService/AmbienceReflectionDecorator.cs

@ -88,47 +88,6 @@ namespace ICSharpCode.Core @@ -88,47 +88,6 @@ namespace ICSharpCode.Core
this.conv = conv;
}
/*
public string Convert(Type type)
{
return conv.Convert(new ReflectionClass(null, type, type.FullName.Replace('+', '.'), null));
}
public string Convert(FieldInfo field)
{
return conv.Convert(new ReflectionField(field, null));
}
public string Convert(PropertyInfo property)
{
return conv.Convert(new ReflectionProperty(property, null));
}
public string Convert(EventInfo e)
{
return conv.Convert(new ReflectionEvent(e, null));
}
public string Convert(MethodBase m)
{
return conv.Convert(new ReflectionMethod(m, null));
}
public string Convert(ParameterInfo param)
{
return conv.Convert(new ReflectionParameter(param, null));
}
*/
public ArrayList LinkArrayList {
get {
return conv.LinkArrayList;
}
set {
conv.LinkArrayList = value;
}
}
public string WrapAttribute(string attribute)
{
return conv.WrapAttribute(attribute);

10
src/Main/Base/Project/Src/Services/AmbienceService/IAmbience.cs

@ -21,7 +21,6 @@ namespace ICSharpCode.Core @@ -21,7 +21,6 @@ namespace ICSharpCode.Core
ShowModifiers = 4,
ShowInheritanceList = 8,
IncludeHTMLMarkup = 32,
UseLinkArrayList = 64,
QualifiedNamesOnlyForReturnTypes = 128,
IncludeBodies = 256,
ShowReturnType = 512,
@ -37,13 +36,6 @@ namespace ICSharpCode.Core @@ -37,13 +36,6 @@ namespace ICSharpCode.Core
ShowModifiers |
ShowReturnType |
ShowInheritanceList,
AssemblyScoutDefaults = StandardConversionFlags |
ShowAccessibility |
QualifiedNamesOnlyForReturnTypes |
IncludeHTMLMarkup |
ShowReturnType|
UseLinkArrayList,
}
public interface IAmbience
@ -72,7 +64,5 @@ namespace ICSharpCode.Core @@ -72,7 +64,5 @@ namespace ICSharpCode.Core
string WrapComment(string comment);
string GetIntrinsicTypeName(string dotNetTypeName);
ArrayList LinkArrayList { get; set; }
}
}

17
src/Main/Base/Project/Src/Services/AmbienceService/NetAmbience.cs

@ -232,19 +232,6 @@ namespace ICSharpCode.Core @@ -232,19 +232,6 @@ namespace ICSharpCode.Core
}
StringBuilder builder = new StringBuilder();
bool linkSet = false;
if (UseLinkArrayList) {
// TODO: Find some replacement for OLD SharpAssembly dependency:
// SharpAssemblyReturnType ret = returnType as SharpAssemblyReturnType;
// if (ret != null) {
// if (ret.UnderlyingClass != null) {
// builder.Append("<a href='as://" + linkArrayList.Add(ret.UnderlyingClass) + "'>");
// linkSet = true;
// }
// }
}
string name = returnType.DotNetName;
if (UseFullyQualifiedNames) {
builder.Append(name);
@ -253,10 +240,6 @@ namespace ICSharpCode.Core @@ -253,10 +240,6 @@ namespace ICSharpCode.Core
builder.Append(name, pos, name.Length - pos);
}
if (linkSet) {
builder.Append("</a>");
}
return builder.ToString();
}

4
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/NRefactoryResolver/NRefactoryASTConvertVisitor.cs

@ -241,10 +241,6 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver @@ -241,10 +241,6 @@ namespace ICSharpCode.SharpDevelop.Dom.NRefactoryResolver
}
foreach (AST.Attribute attribute in section.Attributes) {
//IAttribute a = new DefaultAttribute(attribute.Name, target, new ArrayList(attribute.PositionalArguments), new SortedList());
//foreach (AST.NamedArgumentExpression n in attribute.NamedArguments) {
// a.NamedArguments[n.Name] = n.Expression;
//}
result.Add(new DefaultAttribute(attribute.Name, target));
}
}

8
src/SharpDevelop.sln

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# SharpDevelop 2.1.0.1900
# SharpDevelop 2.1.0.1913
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AddIns", "AddIns", "{14A277EE-7DF1-4529-B639-7D1EF334C1C5}"
ProjectSection(SolutionItems) = postProject
EndProjectSection
@ -40,8 +40,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Backends", "Backends", "{FE @@ -40,8 +40,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Backends", "Backends", "{FE
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixBinding", "AddIns\BackendBindings\WixBinding\Project\WixBinding.csproj", "{e1b288a2-08ee-4318-8bbb-8ab72c69e33e}"
EndProject
Project("{A33008B1-5DAC-44D5-9060-242E3B6E38F2}") = "Boo.InterpreterAddIn", "AddIns\BackendBindings\Boo\Boo.InterpreterAddIn\Project\Boo.InterpreterAddIn.booproj", "{928E34B2-5E46-4A4D-8E4D-2CA2CCDB905A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactoryToBooConverter", "AddIns\BackendBindings\Boo\NRefactoryToBooConverter\Project\NRefactoryToBooConverter.csproj", "{DBCF20A1-BA13-4582-BFA9-74DE4D987B73}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BooBinding", "AddIns\BackendBindings\Boo\BooBinding\Project\BooBinding.csproj", "{4AC2D5F1-F671-480C-A075-6BF62B3721B2}"
@ -104,8 +102,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{66 @@ -104,8 +102,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debugger", "Debugger", "{66
ProjectSection(SolutionItems) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.BooInterpreter", "AddIns\Misc\Debugger\Debugger.BooInterpreter\Project\Debugger.BooInterpreter.csproj", "{B45B39B9-620C-4F84-A555-1833790517AB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.AddIn", "AddIns\Misc\Debugger\Debugger.AddIn\Project\Debugger.AddIn.csproj", "{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Debugger.Core", "AddIns\Misc\Debugger\Debugger.Core\Project\Debugger.Core.csproj", "{1D18D788-F7EE-4585-A23B-34DC8EC63CB8}"
@ -421,7 +417,6 @@ Global @@ -421,7 +417,6 @@ Global
{6e59af58-f635-459a-9a35-c9ac41c00339} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
{4AC2D5F1-F671-480C-A075-6BF62B3721B2} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
{DBCF20A1-BA13-4582-BFA9-74DE4D987B73} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
{928E34B2-5E46-4A4D-8E4D-2CA2CCDB905A} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
{e1b288a2-08ee-4318-8bbb-8ab72c69e33e} = {FEB825FA-4AD8-425D-8E4A-B5A18EE1B81C}
{4B8F0F98-8BE1-402B-AA8B-C8D548577B38} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
{7D5C266F-D6FF-4D14-B315-0C0FC6C4EF51} = {CE5B42B7-6E8C-4385-9E97-F4023FC16BF2}
@ -452,7 +447,6 @@ Global @@ -452,7 +447,6 @@ Global
{B08385CD-F0CC-488C-B4F4-EEB34B6D2688} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{1D18D788-F7EE-4585-A23B-34DC8EC63CB8} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{EC06F96A-AEEC-49D6-B03D-AB87C6EB674C} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{B45B39B9-620C-4F84-A555-1833790517AB} = {6604365C-C702-4C10-9BA8-637F1E3D4D0D}
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}
{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE} = {9421EDF4-9769-4BE9-B5A6-C87DE221D73C}

Loading…
Cancel
Save