Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2960 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
31 changed files with 1639 additions and 7 deletions
After Width: | Height: | Size: 578 B |
After Width: | Height: | Size: 292 B |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00 |
||||
# Visual Studio 2008 |
||||
# SharpDevelop 3.0.0.2956 |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.Build.Tasks", "FSharp.Build.Tasks\Project\FSharp.Build.Tasks.csproj", "{674D485B-8340-498D-B91F-BE51543386C8}" |
||||
EndProject |
||||
Global |
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
Debug|Any CPU = Debug|Any CPU |
||||
Release|Any CPU = Release|Any CPU |
||||
EndGlobalSection |
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
EndGlobalSection |
||||
EndGlobal |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Robert Pickering" email="robert@strangelights.com"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System.Reflection; |
||||
|
||||
// Information about this assembly is defined by the following
|
||||
// attributes.
|
||||
//
|
||||
// change them to the information which is associated with the assembly
|
||||
// you compile.
|
||||
|
||||
[assembly: System.Runtime.InteropServices.ComVisible(false)] |
||||
[assembly: AssemblyTitle("FSharp.Build.Tasks")] |
||||
[assembly: AssemblyDescription("Provides F# build tasks for the F# addin.")] |
||||
[assembly: AssemblyConfiguration("")] |
||||
[assembly: AssemblyTrademark("")] |
||||
[assembly: AssemblyCulture("")] |
||||
[assembly: AssemblyCompany("ic#code")] |
||||
[assembly: AssemblyProduct("SharpDevelop")] |
||||
[assembly: AssemblyCopyright("2000-2008 AlphaSierraPapa")] |
||||
[assembly: AssemblyVersion("1.0")] |
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<PropertyGroup> |
||||
<ProjectGuid>{674D485B-8340-498D-B91F-BE51543386C8}</ProjectGuid> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<OutputType>Library</OutputType> |
||||
<RootNamespace>FSharp.Build.Tasks</RootNamespace> |
||||
<AssemblyName>FSharp.Build.Tasks</AssemblyName> |
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> |
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
||||
<NoStdLib>False</NoStdLib> |
||||
<WarningLevel>4</WarningLevel> |
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||
<OutputPath>..\..\RequiredLibraries</OutputPath> |
||||
<DebugSymbols>true</DebugSymbols> |
||||
<DebugType>Full</DebugType> |
||||
<Optimize>False</Optimize> |
||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> |
||||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||
<OutputPath>..\..\RequiredLibraries</OutputPath> |
||||
<DebugSymbols>false</DebugSymbols> |
||||
<DebugType>None</DebugType> |
||||
<Optimize>True</Optimize> |
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> |
||||
<DefineConstants>TRACE</DefineConstants> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> |
||||
<RegisterForComInterop>False</RegisterForComInterop> |
||||
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> |
||||
<BaseAddress>4194304</BaseAddress> |
||||
<PlatformTarget>AnyCPU</PlatformTarget> |
||||
<FileAlignment>4096</FileAlignment> |
||||
</PropertyGroup> |
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> |
||||
<ItemGroup> |
||||
<Reference Include="Microsoft.Build.Framework"> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="Microsoft.Build.Tasks"> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="Microsoft.Build.Utilities" /> |
||||
<Reference Include="System"> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="System.Configuration"> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="System.Xml"> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<Compile Include="Configuration\AssemblyInfo.cs" /> |
||||
<Compile Include="Src\CompilerCommandLineBuilder.cs" /> |
||||
<Compile Include="Src\Fsc.cs" /> |
||||
<None Include="SharpDevelop.Build.Fsc.targets"> |
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
</None> |
||||
</ItemGroup> |
||||
</Project> |
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<UsingTask TaskName="FSharp.Build.Tasks.Fsc" AssemblyFile="FSharp.Build.Tasks.dll" /> |
||||
<UsingTask TaskName="CreateCSharpManifestResourceName" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
||||
|
||||
<PropertyGroup> |
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(FSharpBuildTasksPath)\SharpDevelop.Build.Fsc.targets</MSBuildAllProjects> |
||||
<DefaultLanguageSourceExtension>.fs</DefaultLanguageSourceExtension> |
||||
<Language>F#</Language> |
||||
</PropertyGroup> |
||||
|
||||
<PropertyGroup> |
||||
<CreateManifestResourceNamesDependsOn> |
||||
</CreateManifestResourceNamesDependsOn> |
||||
</PropertyGroup> |
||||
<Target Name="CreateManifestResourceNames" Condition="'@(ResxWithNoCulture)@(ResxWithCulture)@(NonResxWithNoCulture)@(NonResxWithCulture)'!=''" DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"> |
||||
<!-- Create the target resource names for non-culture resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(ResxWithNoCulture)'!=''" ResourceFiles="@(ResxWithNoCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithNoCultureName" /> |
||||
</CreateCSharpManifestResourceName> |
||||
|
||||
<!-- Create the target resource names for culture resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(ResxWithCulture)'!=''" ResourceFiles="@(ResxWithCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithCultureName" /> |
||||
</CreateCSharpManifestResourceName> |
||||
|
||||
<!-- Create the target resource names for non-culture non-resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(NonResxWithNoCulture)'!=''" ResourceFiles="@(NonResxWithNoCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithNoCulture" /> |
||||
</CreateCSharpManifestResourceName> |
||||
|
||||
<!-- Create the target resource names for culture non-resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(NonResxWithCulture)'!=''" ResourceFiles="@(NonResxWithCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithCulture" /> |
||||
</CreateCSharpManifestResourceName> |
||||
</Target> |
||||
|
||||
<Target Name="CoreCompile" Inputs="$(MSBuildAllProjects); |
||||
@(Compile); |
||||
@(ReferencePath); |
||||
@(ManifestResourceWithNoCulture); |
||||
$(ApplicationIcon); |
||||
$(AssemblyOriginatorKeyFile); |
||||
@(ManifestNonResxWithNoCultureOnDisk); |
||||
@(ReferencePath); |
||||
@(CompiledLicenseFile); |
||||
$(Standalone); |
||||
$(NoMLLib)" |
||||
Outputs="@(DocFileItem); |
||||
@(IntermediateAssembly); |
||||
$(NonExistentFile)" |
||||
DependsOnTargets="$(CoreCompileDependsOn)"> |
||||
<Fsc |
||||
DebugType="$(DebugType)" |
||||
EmitDebugInformation="$(DebugSymbols)" |
||||
FileAlignment="$(FileAlignment)" |
||||
KeyContainer="$(KeyContainerName)" |
||||
KeyFile="$(KeyOriginatorFile)" |
||||
Optimize="$(Optimize)" |
||||
OutputAssembly="@(IntermediateAssembly)" |
||||
Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)" |
||||
Sources="@(Compile)" |
||||
References="@(ReferencePath)" |
||||
TargetType="$(OutputType)" |
||||
Standalone="$(Standalone)" |
||||
NoMLLib="$(NoMLLib)" /> |
||||
</Target> |
||||
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" /> |
||||
</Project> |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
// <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.Globalization; |
||||
using System.IO; |
||||
|
||||
using Microsoft.Build.Framework; |
||||
using Microsoft.Build.Utilities; |
||||
using Microsoft.Build.Tasks; |
||||
|
||||
namespace FSharp.Build.Tasks |
||||
{ |
||||
public class CompilerCommandLineBuilder : CommandLineBuilder |
||||
{ |
||||
public void AppendIntegerSwitch(string switchName, int value) |
||||
{ |
||||
AppendSwitchUnquotedIfNotNull(switchName, value.ToString(NumberFormatInfo.InvariantInfo)); |
||||
} |
||||
|
||||
public void AppendFileNameIfNotNull(string switchName, ITaskItem fileItem) |
||||
{ |
||||
if (fileItem != null) { |
||||
AppendFileNameIfNotNull(switchName, fileItem.ItemSpec); |
||||
} |
||||
} |
||||
|
||||
public void AppendFileNameIfNotNull(string switchName, string fileName) |
||||
{ |
||||
if (fileName != null) { |
||||
AppendSpaceIfNotEmpty(); |
||||
AppendTextUnquoted(switchName); |
||||
AppendFileNameWithQuoting(fileName); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,248 @@
@@ -0,0 +1,248 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Robert Pickering" email="robert@strangelights.com"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.IO; |
||||
using System.CodeDom.Compiler; |
||||
using System.Configuration; |
||||
using System.Globalization; |
||||
using Microsoft.Build.Framework; |
||||
using Microsoft.Build.Utilities; |
||||
using Microsoft.Build.Tasks; |
||||
using System.Collections.Generic; |
||||
using System.Text.RegularExpressions; |
||||
|
||||
namespace FSharp.Build.Tasks |
||||
{ |
||||
public sealed class Fsc : ToolTask |
||||
{ |
||||
string keyContainer; |
||||
string keyFile; |
||||
int fileAlignment; |
||||
bool standalone; |
||||
bool noMLLib; |
||||
ITaskItem[] sources; |
||||
ITaskItem[] resources; |
||||
ITaskItem[] references; |
||||
ITaskItem outputAssembly; |
||||
string debugType; |
||||
bool emitDebugInformation; |
||||
string targetType; |
||||
bool optimize; |
||||
|
||||
public int FileAlignment { |
||||
get { return fileAlignment; } |
||||
set { fileAlignment = value; } |
||||
} |
||||
|
||||
public string KeyContainer { |
||||
get { return keyContainer; } |
||||
set { keyContainer = value; } |
||||
} |
||||
|
||||
public string KeyFile { |
||||
get { return keyFile; } |
||||
set { keyFile = value; } |
||||
} |
||||
|
||||
public bool Standalone { |
||||
get { return standalone; } |
||||
set { standalone = value; } |
||||
} |
||||
|
||||
public bool NoMLLib { |
||||
get { return noMLLib; } |
||||
set { noMLLib = value; } |
||||
} |
||||
|
||||
public string DebugType { |
||||
get { return debugType; } |
||||
set { debugType = value; } |
||||
} |
||||
|
||||
public bool EmitDebugInformation { |
||||
get { return emitDebugInformation; } |
||||
set { emitDebugInformation = value; } |
||||
} |
||||
|
||||
public ITaskItem[] Sources { |
||||
get { return sources; } |
||||
set { sources = value; } |
||||
} |
||||
|
||||
public ITaskItem[] References { |
||||
get { return references; } |
||||
set { references = value; } |
||||
} |
||||
|
||||
public ITaskItem[] Resources { |
||||
get { return resources; } |
||||
set { resources = value; } |
||||
} |
||||
|
||||
public bool Optimize { |
||||
get { return optimize; } |
||||
set { optimize = value; } |
||||
} |
||||
|
||||
public ITaskItem OutputAssembly { |
||||
get { return outputAssembly; } |
||||
set { outputAssembly = value; } |
||||
} |
||||
|
||||
public string TargetType { |
||||
get { return targetType; } |
||||
set { targetType = value; } |
||||
} |
||||
|
||||
protected override string ToolName { |
||||
get { return "fsc.exe"; } |
||||
} |
||||
|
||||
protected override string GenerateFullPathToTool() |
||||
{ |
||||
string path = null; |
||||
if (Array.Exists<string>(ConfigurationManager.AppSettings.AllKeys, delegate(string k) { return k == "alt_fs_bin_path"; })) { |
||||
path = Path.Combine(ConfigurationManager.AppSettings["alt_fs_bin_path"], ToolName); |
||||
if (!File.Exists(path)) { |
||||
throw new Exception("you are trying to use the app setting alt_fs_bin_path, but fsc.exe is not localed in the given directory"); |
||||
} |
||||
} else { |
||||
string[] paths = Environment.GetEnvironmentVariable("path").Split(';'); |
||||
path = Array.Find(paths, delegate(string x) { return File.Exists(Path.Combine(x, "fsc.exe")); }); |
||||
if (path != null) { |
||||
path = Path.Combine(path, ToolName); |
||||
} else { |
||||
string[] dirs = Directory.GetDirectories(Environment.GetEnvironmentVariable("ProgramFiles")); |
||||
List<FileInfo> files = new List<FileInfo>(); |
||||
foreach (string dir in dirs) { |
||||
FileInfo file = new FileInfo(Path.Combine(Path.Combine(dir, "bin"), ToolName)); |
||||
if (file.Exists) { |
||||
files.Add(file); |
||||
} |
||||
} |
||||
if (files.Count > 0) { |
||||
files.Sort(delegate(FileInfo x, FileInfo y) { return DateTime.Compare(x.CreationTime, y.CreationTime); }); |
||||
path = files[0].FullName; |
||||
} else { |
||||
throw new Exception("can not find the fsi.exe, ensure a version of the F# compiler is installed"); |
||||
} |
||||
} |
||||
} |
||||
return path; |
||||
} |
||||
|
||||
protected override string GenerateCommandLineCommands() |
||||
{ |
||||
CompilerCommandLineBuilder commandLine = new CompilerCommandLineBuilder(); |
||||
if (((OutputAssembly == null) && (Sources != null)) && ((Sources.Length > 0))) { |
||||
OutputAssembly = new TaskItem(Path.GetFileNameWithoutExtension(this.Sources[0].ItemSpec)); |
||||
if (string.Equals(this.TargetType, "library", StringComparison.InvariantCultureIgnoreCase)) { |
||||
OutputAssembly.ItemSpec += ".dll"; |
||||
} else if (string.Equals(this.TargetType, "module", StringComparison.InvariantCultureIgnoreCase)) { |
||||
OutputAssembly.ItemSpec += ".netmodule"; |
||||
} else { |
||||
OutputAssembly.ItemSpec += ".exe"; |
||||
} |
||||
} |
||||
|
||||
commandLine.AppendSwitch("-g"); |
||||
|
||||
if (Optimize) { |
||||
commandLine.AppendSwitch("-O3"); |
||||
} |
||||
|
||||
commandLine.AppendSwitchIfNotNull("--keyfile ", this.KeyFile); |
||||
|
||||
if (noMLLib) { |
||||
commandLine.AppendSwitch("--no-mllib"); |
||||
} |
||||
|
||||
if (standalone) { |
||||
commandLine.AppendSwitch("--standalone"); |
||||
} |
||||
|
||||
if (Resources != null) { |
||||
foreach (ITaskItem item in Resources) { |
||||
commandLine.AppendSwitchIfNotNull("--resource ", item); |
||||
} |
||||
} |
||||
|
||||
if (FileAlignment > 0) { |
||||
commandLine.AppendIntegerSwitch("--base-address ", FileAlignment); |
||||
} |
||||
|
||||
commandLine.AppendSwitchIfNotNull("-o ", this.OutputAssembly); |
||||
|
||||
if (string.Equals(this.TargetType, "library", StringComparison.InvariantCultureIgnoreCase)) { |
||||
commandLine.AppendSwitch("--target-dll"); |
||||
} else if (string.Equals(this.TargetType, "winexe", StringComparison.InvariantCultureIgnoreCase)) { |
||||
commandLine.AppendSwitch("--target-winexe"); |
||||
} else if (string.Equals(this.TargetType, "module", StringComparison.InvariantCultureIgnoreCase)) { |
||||
commandLine.AppendSwitch("--target-module"); |
||||
} |
||||
|
||||
if (References != null) { |
||||
foreach (ITaskItem reference in References) { |
||||
commandLine.AppendFileNameIfNotNull("-r ", reference); |
||||
} |
||||
} |
||||
commandLine.AppendFileNamesIfNotNull(this.Sources, " "); |
||||
return commandLine.ToString(); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Each line of output, from either standard output or standard error
|
||||
/// is parsed and any compiler errors are logged. If the line cannot
|
||||
/// be parsed it is logged using the specified message importance.
|
||||
/// </summary>
|
||||
protected override void LogEventsFromTextOutput(string singleLine, MessageImportance messageImportance) |
||||
{ |
||||
CompilerError error = ParseLine(singleLine); |
||||
if (error != null) { |
||||
if (error.IsWarning) { |
||||
Log.LogWarning("warning", error.ErrorNumber, null, error.FileName, error.Line, error.Column, error.Line, error.Column, error.ErrorText); |
||||
} else { |
||||
Log.LogError("error", error.ErrorNumber, null, error.FileName, error.Line, error.Column, error.Line, error.Column, error.ErrorText); |
||||
} |
||||
} else { |
||||
Log.LogMessage(messageImportance, singleLine); |
||||
} |
||||
} |
||||
|
||||
|
||||
const string ErrorPattern = @"(?<file>[^\(]*)\((?<line>[0-9]*),(?<column>[0-9]*)\):\s(?<error>[^:]*):\s(?<number>[^:]*):\s(?<message>.*)"; |
||||
static Regex ErrorRegex = new Regex(ErrorPattern, RegexOptions.Compiled); |
||||
const string ErrorPatternNoLine = @"(?<file>[^\(]*)\((?<line>[0-9]*),(?<column>[0-9]*)\):\s(?<error>[^:]*):\s(?<message>.*)"; |
||||
static Regex ErrorNoLineRegex = new Regex(ErrorPatternNoLine, RegexOptions.Compiled); |
||||
|
||||
CompilerError ParseLine(string line) |
||||
{ |
||||
Match match = ErrorRegex.Match(line); |
||||
Match matchNoLine = ErrorNoLineRegex.Match(line); |
||||
if (match.Success) { |
||||
CompilerError error = new CompilerError(); |
||||
error.Column = Int32.Parse(match.Result("${column}")); |
||||
error.Line = Int32.Parse(match.Result("${line}")); |
||||
error.FileName = Path.GetFullPath(match.Result("${file}")); |
||||
error.IsWarning = match.Result("${error}") == "warning"; |
||||
error.ErrorNumber = match.Result("${number}"); |
||||
error.ErrorText = match.Result("${message}"); |
||||
return error; |
||||
} else if (matchNoLine.Success) { |
||||
CompilerError error = new CompilerError(); |
||||
error.Column = Int32.Parse(matchNoLine.Result("${column}")); |
||||
error.FileName = Path.GetFullPath(matchNoLine.Result("${file}")); |
||||
error.IsWarning = matchNoLine.Result("${error}") == "warning"; |
||||
error.ErrorNumber = matchNoLine.Result("${number}"); |
||||
error.ErrorText = matchNoLine.Result("${message}"); |
||||
return error; |
||||
} |
||||
return null; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,78 @@
@@ -0,0 +1,78 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00 |
||||
# Visual Studio 2008 |
||||
# SharpDevelop 3.0.0.2958 |
||||
Project("{982E8BC1-ACD7-4dbf-96AB-B2CE67D6A008}") = "FSharpBinding", "FSharpBinding\Project\FSharpBinding.fsproj", "{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FSharp.Build.Tasks", "FSharp.Build.Tasks\Project\FSharp.Build.Tasks.csproj", "{674D485B-8340-498D-B91F-BE51543386C8}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "..\..\..\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4net", "..\..\..\Libraries\log4net\src\log4net.csproj", "{F6A02431-167E-4347-BC43-65532C31CDB7}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop", "..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj", "{2748AD25-9C63-4E12-877B-4DCE96FBED54}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.Core", "..\..\..\Main\Core\Project\ICSharpCode.Core.csproj", "{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.BuildWorker", "..\..\..\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj", "{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Dom", "..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj", "{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.SharpDevelop.Widgets", "..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj", "{8035765F-D51F-4A0C-A746-2FD100E19419}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NRefactory", "..\..\..\Libraries\NRefactory\Project\NRefactory.csproj", "{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}" |
||||
EndProject |
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormsUI", "..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj", "{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}" |
||||
EndProject |
||||
Global |
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
||||
Debug|Any CPU = Debug|Any CPU |
||||
Release|Any CPU = Release|Any CPU |
||||
EndGlobalSection |
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
||||
{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{674D485B-8340-498D-B91F-BE51543386C8}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{F6A02431-167E-4347-BC43-65532C31CDB7}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{F6A02431-167E-4347-BC43-65532C31CDB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{F6A02431-167E-4347-BC43-65532C31CDB7}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{F6A02431-167E-4347-BC43-65532C31CDB7}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{2748AD25-9C63-4E12-877B-4DCE96FBED54}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{8035765F-D51F-4A0C-A746-2FD100E19419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{8035765F-D51F-4A0C-A746-2FD100E19419}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|Any CPU.Build.0 = Debug|Any CPU |
||||
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
||||
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|Any CPU.Build.0 = Release|Any CPU |
||||
{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}.Release|Any CPU.ActiveCfg = Release|Any CPU |
||||
EndGlobalSection |
||||
EndGlobal |
@ -0,0 +1,129 @@
@@ -0,0 +1,129 @@
|
||||
<AddIn name = "F# Binding" |
||||
author = "Robert Pickering" |
||||
copyright = "prj:///doc/copyright.txt" |
||||
description = "Backend binding for F#"> |
||||
|
||||
<Manifest> |
||||
<Identity name = "ICSharpCode.FSharpBinding"/> |
||||
</Manifest> |
||||
|
||||
<Runtime> |
||||
<Import assembly = "FSharpBinding.dll"/> |
||||
<Import assembly = ":ICSharpCode.SharpDevelop"/> |
||||
<Import assembly = ":ICSharpCode.SharpDevelop.Dom"/> |
||||
</Runtime> |
||||
|
||||
<Path name = "/SharpDevelop/Workbench/Ambiences"> |
||||
<Class id = "F#" |
||||
class = "FSharpBindings.FSharpAmbience"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/ViewContent/DefaultTextEditor/SyntaxModes"> |
||||
<SyntaxMode id = "F# Syntax Mode" |
||||
name = "F#" |
||||
extensions = ".fs;.fsi" |
||||
resource = "FSharpBindings.Resources.FS-Mode.xshd" /> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/MSBuildEngine/CompileTaskNames"> |
||||
<!-- Makes SharpDevelop show the text 'Compiling ProjectName...' when the task is started --> |
||||
<String id="fsc" text = "fsc"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/BackendBindings/Templates"> |
||||
<Directory id = "fsc" path = "./Templates" /> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Workbench/FileFilter"> |
||||
<FileFilter id = "F#" |
||||
insertbefore="AllFiles" |
||||
name = "F# (*.fs)" |
||||
extensions = "*.fs"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Workbench/Combine/FileFilter"> |
||||
<FileFilter id = "FSharpProject" |
||||
insertbefore="AllFiles" |
||||
name = "F# Project Files (*.fsproj)" |
||||
class = "ICSharpCode.SharpDevelop.Project.LoadProject" |
||||
extensions = "*.fsproj"/> |
||||
</Path> |
||||
|
||||
<!-- Project Explorer tree node builders --> |
||||
<Path name = "/SharpDevelop/Views/ProjectBrowser/NodeBuilders"> |
||||
<Class id = "FSharpProjectBuilder" |
||||
insertbefore = "DefaultBuilder" |
||||
class = "FSharpBinding.FSharpProjectNodeBuilder"/> |
||||
</Path> |
||||
|
||||
<Path path = "/SharpDevelop/BackendBindings/ProjectOptions/F#"> |
||||
<DialogPanel id = "Application" |
||||
label = "${res:Dialog.ProjectOptions.ApplicationSettings}" |
||||
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.ApplicationSettings"/> |
||||
<DialogPanel id = "BuildEvents" |
||||
label = "${res:Dialog.ProjectOptions.BuildEvents}" |
||||
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.BuildEvents"/> |
||||
<DialogPanel id = "BuildOptions" |
||||
label = "${res:Dialog.ProjectOptions.BuildOptions}" |
||||
class = "CSharpBinding.OptionPanels.BuildOptions"/> |
||||
<DialogPanel id = "FsOptions" |
||||
label = "F# Options" |
||||
class = "FSharpBinding.FsOptions"/> |
||||
<Include id = "AllManaged" path="/SharpDevelop/BackendBindings/ProjectOptions/AllManaged"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Pads/ProjectBrowser/ContextMenu/FileNode"> |
||||
<Condition name = "ProjectActive" activeproject="F#"> |
||||
<MenuItem id = "MoveUp" |
||||
label = "Move Up" |
||||
class = "FSharpBinding.MoveUpFileEvent"/> |
||||
<MenuItem id = "MoveDown" |
||||
label = "Move Down" |
||||
class = "FSharpBinding.MoveDownFileEvent"/> |
||||
</Condition> |
||||
</Path> |
||||
|
||||
<Path name = "/Workspace/Icons"> |
||||
<Icon id = "F#Prj" |
||||
language = "F#" |
||||
resource = "F#.ProjectIcon"/> |
||||
|
||||
<Icon id = "F#File" |
||||
extensions = ".fs" |
||||
resource = "F#.FileIcon"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/Workbench/Pads"> |
||||
<Pad id = "FSharpInteractive" |
||||
category = "Main" |
||||
title = "F# Interactive" |
||||
icon = "F#.ProjectIcon" |
||||
shortcut = "Control|Shift|B" |
||||
class = "FSharpBinding.FSharpInteractive"/> |
||||
</Path> |
||||
|
||||
<Path name = "/SharpDevelop/ViewContent/DefaultTextEditor/ContextMenu"> |
||||
<Condition name = "ProjectActive" activeproject="F#"> |
||||
<MenuItem id = "SendToFSharpInteractive" |
||||
label = "Send To F# Interactive" |
||||
shortcut = "Alt|Return" |
||||
class= "FSharpBinding.SentToFSharpInteractive"/> |
||||
</Condition> |
||||
</Path> |
||||
|
||||
<Path path = "/SharpDevelop/Workbench/LanguageBindings"> |
||||
<LanguageBinding id = "F#" |
||||
guid = "{982E8BC1-ACD7-4dbf-96AB-B2CE67D6A008}" |
||||
supportedextensions = ".fs" |
||||
projectfileextension = ".fsproj" |
||||
class = "FSharpBinding.FSharpLanguageBinding" /> |
||||
</Path> |
||||
|
||||
<!-- |
||||
Register path to SharpDevelop.Build.FSharp.targets for the MSBuild engine. |
||||
SharpDevelop.Build.FSharp.targets is in the F# AddIn directory |
||||
--> |
||||
<Path name = "/SharpDevelop/MSBuildEngine/AdditionalProperties"> |
||||
<String id = "FSharpBuildTasksPath" text = "${AddInPath:ICSharpCode.FSharpBinding}"/> |
||||
</Path> |
||||
</AddIn> |
@ -0,0 +1,118 @@
@@ -0,0 +1,118 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<PropertyGroup> |
||||
<ProjectGuid>{99BAE3A2-C40D-40D2-A7B4-EBB4798F36E4}</ProjectGuid> |
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
||||
<OutputType>Library</OutputType> |
||||
<RootNamespace>FSharpBindings</RootNamespace> |
||||
<AssemblyName>FSharpBinding</AssemblyName> |
||||
<Standalone>True</Standalone> |
||||
<NoMLLib>True</NoMLLib> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> |
||||
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\BackendBindings\FSharpBinding\</OutputPath> |
||||
<DebugSymbols>True</DebugSymbols> |
||||
<DebugType>Full</DebugType> |
||||
<Optimize>False</Optimize> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' "> |
||||
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\BackendBindings\FSharpBinding\</OutputPath> |
||||
<DebugSymbols>False</DebugSymbols> |
||||
<DebugType>None</DebugType> |
||||
<Optimize>True</Optimize> |
||||
</PropertyGroup> |
||||
<Import Project="$(FSharpBuildTasksPath)\SharpDevelop.Build.Fsc.Targets" /> |
||||
<ItemGroup> |
||||
<Reference Include="FSharp.Build.Tasks"> |
||||
<HintPath>..\..\RequiredLibraries\FSharp.Build.Tasks.dll</HintPath> |
||||
</Reference> |
||||
<Reference Include="log4net"> |
||||
<HintPath>..\..\..\..\..\Libraries\log4net\bin\net\2.0\release\log4net.dll</HintPath> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="Microsoft.Build.Engine, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="Microsoft.Build.Framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="Mono.Cecil"> |
||||
<HintPath>..\..\..\..\..\Libraries\Mono.Cecil\Mono.Cecil.dll</HintPath> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="System.Configuration"> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="System.Core"> |
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Reference Include="System.Security"> |
||||
<Private>False</Private> |
||||
</Reference> |
||||
<Compile Include="Src\project.fs" /> |
||||
<Compile Include="Src\languagebinding.fs" /> |
||||
<Compile Include="Src\fsi.fs" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<EmbeddedResource Include="Resources\FS-Mode.xshd" /> |
||||
<EmbeddedResource Include="Resources\FsOptions.xfrm" /> |
||||
<None Include="..\..\RequiredLibraries\SharpDevelop.Build.Fsc.targets"> |
||||
<Link>SharpDevelop.Build.Fsc.targets</Link> |
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
</None> |
||||
<None Include="FSharpBinding.addin"> |
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
</None> |
||||
<None Include="Templates\ConsoleProject.xpt"> |
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
</None> |
||||
<None Include="Templates\EmptyClass.xft"> |
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
||||
</None> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="..\..\..\..\..\Libraries\DockPanel_Src\WinFormsUI\WinFormsUI.csproj"> |
||||
<Project>{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}</Project> |
||||
<Name>WinFormsUI</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\..\Libraries\ICSharpCode.TextEditor\Project\ICSharpCode.TextEditor.csproj"> |
||||
<Project>{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}</Project> |
||||
<Name>ICSharpCode.TextEditor</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\..\Libraries\NRefactory\Project\NRefactory.csproj"> |
||||
<Project>{3A9AE6AA-BC07-4A2F-972C-581E3AE2F195}</Project> |
||||
<Name>NRefactory</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\..\Main\Base\Project\ICSharpCode.SharpDevelop.csproj"> |
||||
<Project>{2748AD25-9C63-4E12-877B-4DCE96FBED54}</Project> |
||||
<Name>ICSharpCode.SharpDevelop</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\..\Main\Core\Project\ICSharpCode.Core.csproj"> |
||||
<Project>{35CEF10F-2D4C-45F2-9DD1-161E0FEC583C}</Project> |
||||
<Name>ICSharpCode.Core</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\..\Main\ICSharpCode.SharpDevelop.BuildWorker\ICSharpCode.SharpDevelop.BuildWorker.csproj"> |
||||
<Project>{C3CBC8E3-81D8-4C5B-9941-DCCD12D50B1F}</Project> |
||||
<Name>ICSharpCode.SharpDevelop.BuildWorker</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\..\Main\ICSharpCode.SharpDevelop.Dom\Project\ICSharpCode.SharpDevelop.Dom.csproj"> |
||||
<Project>{924EE450-603D-49C1-A8E5-4AFAA31CE6F3}</Project> |
||||
<Name>ICSharpCode.SharpDevelop.Dom</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\..\Main\ICSharpCode.SharpDevelop.Widgets\Project\ICSharpCode.SharpDevelop.Widgets.csproj"> |
||||
<Project>{8035765F-D51F-4A0C-A746-2FD100E19419}</Project> |
||||
<Name>ICSharpCode.SharpDevelop.Widgets</Name> |
||||
<Private>False</Private> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
</Project> |
@ -0,0 +1,263 @@
@@ -0,0 +1,263 @@
|
||||
<?xml version="1.0"?> |
||||
<!-- syntaxdefinition for F# 2000 by Robert Pickering --> |
||||
|
||||
<SyntaxDefinition name = "F#" extensions = ".fs"> |
||||
|
||||
<Properties> |
||||
<Property name="LineComment" value="//"/> |
||||
</Properties> |
||||
|
||||
<Digits name = "Digits" bold = "false" italic = "false" color = "DarkBlue"/> |
||||
|
||||
<RuleSets> |
||||
<RuleSet ignorecase="false"> |
||||
<Delimiters>&<>~!%^*()-+=|\#/{}[]:;"' , .?</Delimiters> |
||||
|
||||
<Span name = "PreprocessorDirectives" rule = "PreprocessorSet" bold="false" italic="false" color="Green" stopateol = "true"> |
||||
<Begin>#</Begin> |
||||
</Span> |
||||
|
||||
<Span name = "DocLineComment" rule = "DocCommentSet" bold = "false" italic = "false" color = "Green" stopateol = "true" noescapesequences="true"> |
||||
<Begin bold = "false" italic = "false" color = "Gray">///@!/@</Begin> |
||||
</Span> |
||||
|
||||
<Span name = "LineComment" rule = "CommentMarkerSet" bold = "false" italic = "false" color = "Green" stopateol = "true"> |
||||
<Begin>//@!/@</Begin> |
||||
</Span> |
||||
<Span name = "LineComment2" rule = "CommentMarkerSet" bold = "false" italic = "false" color = "Green" stopateol = "true"> |
||||
<Begin>////</Begin> |
||||
</Span> |
||||
|
||||
<Span name = "BlockComment" rule = "CommentMarkerSet" bold = "false" italic = "false" color = "Green" stopateol = "false"> |
||||
<Begin>(*</Begin> |
||||
<End>*)</End> |
||||
</Span> |
||||
|
||||
<Span name = "String" bold = "false" italic = "false" color = "DarkBlue" stopateol = "false" escapecharacter="\"> |
||||
<Begin>"</Begin> |
||||
<End>"</End> |
||||
</Span> |
||||
|
||||
<Span name = "MultiLineString" bold = "false" italic = "false" color = "DarkBlue" stopateol = "false" escapecharacter='"'> |
||||
<Begin>@@"</Begin> |
||||
<End>"</End> |
||||
</Span> |
||||
|
||||
<Span name = "Char" bold = "false" italic = "false" color = "Magenta" stopateol = "true" escapecharacter="\"> |
||||
<Begin>'</Begin> |
||||
<End>'</End> |
||||
</Span> |
||||
|
||||
<MarkPrevious bold = "true" italic = "false" color = "MidnightBlue">(</MarkPrevious> |
||||
|
||||
<KeyWords name = "Punctuation" bold = "false" italic = "false" color = "DarkGreen"> |
||||
<Key word = "?" /> |
||||
<Key word = "," /> |
||||
<Key word = "." /> |
||||
<Key word = ";" /> |
||||
<Key word = "(" /> |
||||
<Key word = ")" /> |
||||
<Key word = "[" /> |
||||
<Key word = "]" /> |
||||
<Key word = "{" /> |
||||
<Key word = "}" /> |
||||
<Key word = "+" /> |
||||
<Key word = "-" /> |
||||
<Key word = "/" /> |
||||
<Key word = "%" /> |
||||
<Key word = "*" /> |
||||
<Key word = "<" /> |
||||
<Key word = ">" /> |
||||
<Key word = "^" /> |
||||
<Key word = "=" /> |
||||
<Key word = "~" /> |
||||
<Key word = "!" /> |
||||
<Key word = "|" /> |
||||
<Key word = "&" /> |
||||
</KeyWords> |
||||
|
||||
<KeyWords name = "CurrentKeywords" bold="false" italic="false" color="Blue"> |
||||
<Key word = "abstract"/> |
||||
<Key word = "and"/> |
||||
<Key word = "as"/> |
||||
<Key word = "assert"/> |
||||
<Key word = "begin"/> |
||||
<Key word = "class"/> |
||||
<Key word = "default"/> |
||||
<Key word = "delegate"/> |
||||
<Key word = "do"/> |
||||
<Key word = "done"/> |
||||
<Key word = "downcast"/> |
||||
<Key word = "downto"/> |
||||
<Key word = "else"/> |
||||
<Key word = "end"/> |
||||
<Key word = "enum"/> |
||||
<Key word = "exception"/> |
||||
<Key word = "extern"/> |
||||
<Key word = "false"/> |
||||
<Key word = "finally"/> |
||||
<Key word = "for"/> |
||||
<Key word = "fun"/> |
||||
<Key word = "function"/> |
||||
<Key word = "if"/> |
||||
<Key word = "in"/> |
||||
<Key word = "inherit"/> |
||||
<Key word = "interface"/> |
||||
<Key word = "land"/> |
||||
<Key word = "lazy"/> |
||||
<Key word = "let"/> |
||||
<Key word = "match"/> |
||||
<Key word = "member"/> |
||||
<Key word = "module"/> |
||||
<Key word = "mutable"/> |
||||
<Key word = "namespace"/> |
||||
<Key word = "new"/> |
||||
<Key word = "null"/> |
||||
<Key word = "of"/> |
||||
<Key word = "open"/> |
||||
<Key word = "or"/> |
||||
<Key word = "override"/> |
||||
<Key word = "rec"/> |
||||
<Key word = "sig"/> |
||||
<Key word = "static"/> |
||||
<Key word = "struct"/> |
||||
<Key word = "then"/> |
||||
<Key word = "to"/> |
||||
<Key word = "true"/> |
||||
<Key word = "try"/> |
||||
<Key word = "type"/> |
||||
<Key word = "val"/> |
||||
<Key word = "when"/> |
||||
<Key word = "inline"/> |
||||
<Key word = "upcast"/> |
||||
<Key word = "while"/> |
||||
<Key word = "with"/> |
||||
<Key word = "void"/> |
||||
</KeyWords> |
||||
|
||||
<KeyWords name = "ReservedKeywords" bold="false" italic="false" color="Red"> |
||||
<Key word = "async"/> |
||||
<Key word = "atomic"/> |
||||
<Key word = "break"/> |
||||
<Key word = "checked"/> |
||||
<Key word = "component"/> |
||||
<Key word = "const"/> |
||||
<Key word = "constraint"/> |
||||
<Key word = "constructor"/> |
||||
<Key word = "continue"/> |
||||
<Key word = "decimal"/> |
||||
<Key word = "eager"/> |
||||
<Key word = "event"/> |
||||
<Key word = "external"/> |
||||
<Key word = "fixed"/> |
||||
<Key word = "functor"/> |
||||
<Key word = "include"/> |
||||
<Key word = "method"/> |
||||
<Key word = "mixin"/> |
||||
<Key word = "object"/> |
||||
<Key word = "process"/> |
||||
<Key word = "property"/> |
||||
<Key word = "protected"/> |
||||
<Key word = "public"/> |
||||
<Key word = "pure"/> |
||||
<Key word = "readonly"/> |
||||
<Key word = "return"/> |
||||
<Key word = "sealed"/> |
||||
<Key word = "virtual"/> |
||||
<Key word = "volatile"/> |
||||
</KeyWords> |
||||
</RuleSet> |
||||
|
||||
<RuleSet name = "CommentMarkerSet" ignorecase = "false"> |
||||
<Delimiters><>~!@%^*()-+=|\#/{}[]:;"' , .?</Delimiters> |
||||
<KeyWords name = "ErrorWords" bold="true" italic="false" color="Red"> |
||||
<Key word = "TODO" /> |
||||
<Key word = "FIXME" /> |
||||
</KeyWords> |
||||
<KeyWords name = "WarningWords" bold="true" italic="false" color="#EEE0E000"> |
||||
<Key word = "HACK" /> |
||||
<Key word = "UNDONE" /> |
||||
</KeyWords> |
||||
</RuleSet> |
||||
|
||||
<RuleSet name = "DocCommentSet" ignorecase = "false"> |
||||
<Delimiters><>~!@%^*()-+=|\#/{}[]:;"' , .?</Delimiters> |
||||
|
||||
<Span name = "XmlTag" rule = "XmlDocSet" bold = "false" italic = "false" color = "Gray" stopateol = "true"> |
||||
<Begin><</Begin> |
||||
<End>></End> |
||||
</Span> |
||||
|
||||
<KeyWords name = "ErrorWords" bold="true" italic="false" color="Red"> |
||||
<Key word = "TODO" /> |
||||
<Key word = "FIXME" /> |
||||
</KeyWords> |
||||
|
||||
<KeyWords name = "WarningWords" bold="true" italic="false" color="#EEE0E000"> |
||||
<Key word = "HACK" /> |
||||
<Key word = "UNDONE" /> |
||||
</KeyWords> |
||||
</RuleSet> |
||||
|
||||
<RuleSet name = "PreprocessorSet" ignorecase="false"> |
||||
<Delimiters>&<>~!%^*()-+=|\#/{}[]:;"' , .?</Delimiters> |
||||
|
||||
<KeyWords name = "PreprocessorDirectives" bold="true" italic="false" color="Green"> |
||||
<Key word = "if" /> |
||||
<Key word = "else" /> |
||||
<Key word = "elif" /> |
||||
<Key word = "endif" /> |
||||
<Key word = "define" /> |
||||
<Key word = "undef" /> |
||||
<Key word = "warning" /> |
||||
<Key word = "error" /> |
||||
<Key word = "line" /> |
||||
<Key word = "region" /> |
||||
<Key word = "endregion" /> |
||||
<Key word = "pragma" /> |
||||
</KeyWords> |
||||
</RuleSet> |
||||
|
||||
<RuleSet name = "XmlDocSet" ignorecase = "false"> |
||||
<Delimiters><>~!@%^*()-+=|\#/{}[]:;"' , .?</Delimiters> |
||||
|
||||
<Span name = "String" bold = "true" italic = "false" color = "Silver" stopateol = "true"> |
||||
<Begin>"</Begin> |
||||
<End>"</End> |
||||
</Span> |
||||
|
||||
|
||||
<KeyWords name = "Punctuation" bold = "true" italic = "false" color = "Gray"> |
||||
<Key word = "/" /> |
||||
<Key word = "|" /> |
||||
<Key word = "=" /> |
||||
</KeyWords> |
||||
|
||||
<KeyWords name = "SpecialComment" bold="true" italic="false" color="Gray"> |
||||
<Key word = "c" /> |
||||
<Key word = "code" /> |
||||
<Key word = "example" /> |
||||
<Key word = "exception" /> |
||||
<Key word = "list" /> |
||||
<Key word = "para" /> |
||||
<Key word = "param" /> |
||||
<Key word = "paramref" /> |
||||
<Key word = "permission" /> |
||||
<Key word = "remarks" /> |
||||
<Key word = "returns" /> |
||||
<Key word = "see" /> |
||||
<Key word = "seealso" /> |
||||
<Key word = "summary" /> |
||||
<Key word = "value" /> |
||||
|
||||
<Key word = "type" /> |
||||
<Key word = "name" /> |
||||
<Key word = "cref" /> |
||||
<Key word = "item" /> |
||||
<Key word = "term" /> |
||||
<Key word = "description" /> |
||||
<Key word = "listheader" /> |
||||
</KeyWords> |
||||
</RuleSet> |
||||
</RuleSets> |
||||
</SyntaxDefinition> |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="XmlUserControl1" /> |
||||
<ClientSize value="{Width=384, Height=256}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.GroupBox> |
||||
<Name value="groupBox1" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
<Text value="F# Specific Options" /> |
||||
<Size value="{Width=364, Height=180}" /> |
||||
<TabIndex value="0" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<Controls> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="standaloneCheckBox" /> |
||||
<Location value="{X=8,Y=16}" /> |
||||
<TabIndex value="1" /> |
||||
<Text value="Standalone" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
<System.Windows.Forms.CheckBox> |
||||
<Name value="nomllibCheckBox" /> |
||||
<Location value="{X=8,Y=48}" /> |
||||
<Text value="No ML Lib" /> |
||||
<TabIndex value="2" /> |
||||
</System.Windows.Forms.CheckBox> |
||||
</Controls > |
||||
</System.Windows.Forms.GroupBox> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
@ -0,0 +1,115 @@
@@ -0,0 +1,115 @@
|
||||
// <file> |
||||
// <copyright see="prj:///doc/copyright.txt"/> |
||||
// <license see="prj:///doc/license.txt"/> |
||||
// <owner name="Robert Pickering" email="robert@strangelights.com"/> |
||||
// <version>$Revision$</version> |
||||
// </file> |
||||
|
||||
#light |
||||
namespace FSharpBinding |
||||
|
||||
open System |
||||
open System.IO |
||||
open System.Configuration |
||||
open System.Collections.Generic |
||||
open System.Diagnostics |
||||
open System.Windows.Forms |
||||
open System.Xml |
||||
open ICSharpCode.SharpDevelop.Dom |
||||
open ICSharpCode.SharpDevelop.Dom.CSharp |
||||
open ICSharpCode.SharpDevelop.Internal.Templates |
||||
open ICSharpCode.SharpDevelop.Project |
||||
open ICSharpCode.Core |
||||
open ICSharpCode.SharpDevelop.Gui |
||||
open ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor |
||||
|
||||
module TheControl = |
||||
let outputQueue = new Queue<string>() |
||||
let errorQueue = new Queue<string>() |
||||
let fsiProcess = new Process() |
||||
let panel = new Panel() |
||||
let input = new TextBox(Anchor = (AnchorStyles.Left ||| AnchorStyles.Top ||| AnchorStyles.Right), |
||||
Width = panel.Width) |
||||
input.KeyUp.Add(fun ea -> |
||||
if ea.KeyData = Keys.Return then |
||||
fsiProcess.StandardInput.WriteLine(input.Text) |
||||
input.Text <- "" ) |
||||
let output = new TextBox(Multiline = true, |
||||
Top = input.Height, |
||||
Height = panel.Height - input.Height, |
||||
Width = panel.Width, |
||||
ReadOnly = true, |
||||
Anchor = (AnchorStyles.Left ||| AnchorStyles.Top ||| AnchorStyles.Right ||| AnchorStyles.Bottom)) |
||||
panel.Controls.Add(input) |
||||
panel.Controls.Add(output) |
||||
if ConfigurationManager.AppSettings.AllKeys |> Array.exists (fun x -> x = "alt_fs_bin_path") then |
||||
let path = Path.Combine(ConfigurationManager.AppSettings.get_Item("alt_fs_bin_path"), "fsi.exe") |
||||
if File.Exists(path) then |
||||
fsiProcess.StartInfo.FileName <- path |
||||
else |
||||
failwith "you are trying to use the app setting alt_fs_bin_path, but fsi.exe is not localed in the given directory" |
||||
else |
||||
let path = Environment.GetEnvironmentVariable("PATH") |
||||
let paths = path.Split([|';'|]) |
||||
let path = paths |> Array.tryfind (fun x -> File.Exists(Path.Combine(x, "fsi.exe"))) |
||||
match path with |
||||
| Some x -> fsiProcess.StartInfo.FileName <- Path.Combine(x, "fsi.exe") |
||||
| None -> |
||||
let programFiles = Environment.GetEnvironmentVariable("ProgramFiles") |
||||
let fsdirs = Directory.GetDirectories(programFiles, "FSharp*") |
||||
let possibleFiles = |
||||
fsdirs |> Array.choose |
||||
(fun x -> |
||||
let fileInfo = new FileInfo(Path.Combine(x, "bin\fsi.exe")) |
||||
if fileInfo.Exists then |
||||
Some fileInfo |
||||
else |
||||
None) |
||||
possibleFiles |> Array.sort (fun x y -> DateTime.Compare(x.CreationTime, y.CreationTime)) |
||||
if possibleFiles.Length > 0 then |
||||
fsiProcess.StartInfo.FileName <- possibleFiles.[0].FullName |
||||
else |
||||
failwith "can not find the fsi.exe, ensure a version of the F# compiler is installed" |
||||
fsiProcess.StartInfo.UseShellExecute <- false |
||||
fsiProcess.StartInfo.RedirectStandardError <- true |
||||
fsiProcess.StartInfo.RedirectStandardInput <- true |
||||
fsiProcess.StartInfo.RedirectStandardOutput <- true |
||||
fsiProcess.ErrorDataReceived.Add(fun ea -> lock errorQueue (fun () -> errorQueue.Enqueue(ea.Data)) ) |
||||
fsiProcess.OutputDataReceived.Add(fun ea -> lock outputQueue (fun () -> outputQueue.Enqueue(ea.Data)) ) |
||||
fsiProcess.Exited.Add(fun ea -> |
||||
output.AppendText("fsi.exe died" + Environment.NewLine) |
||||
output.AppendText("restarting ..." + Environment.NewLine) |
||||
fsiProcess.Start() |> ignore) |
||||
fsiProcess.Start() |> ignore |
||||
fsiProcess.BeginErrorReadLine() |
||||
fsiProcess.BeginOutputReadLine() |
||||
let timer = new Timer(Interval = 1000) |
||||
let readAll (q : Queue<string>) = |
||||
while q.Count > 0 do |
||||
output.AppendText(q.Dequeue() + Environment.NewLine) |
||||
timer.Tick.Add(fun _ -> |
||||
lock errorQueue (fun () -> readAll errorQueue) |
||||
lock outputQueue (fun () -> readAll outputQueue)) |
||||
timer.Start() |
||||
|
||||
type FSharpInteractive = class |
||||
inherit AbstractPadContent |
||||
new() = {} |
||||
override x.Control |
||||
with get() = TheControl.panel :> Control |
||||
end |
||||
|
||||
type SentToFSharpInteractive = class |
||||
inherit AbstractMenuCommand |
||||
new () = {} |
||||
override x.Run() = |
||||
let window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow |
||||
if window <> null then |
||||
match window.ActiveViewContent :> obj with |
||||
| :? ITextEditorControlProvider as textArea -> |
||||
let textArea = textArea.TextEditorControl.ActiveTextAreaControl.TextArea |
||||
for selection in textArea.SelectionManager.SelectionCollection do |
||||
TheControl.fsiProcess.StandardInput.WriteLine(selection.SelectedText) |
||||
TheControl.fsiProcess.StandardInput.WriteLine(";;") |
||||
| _ -> () |
||||
end |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
// <file> |
||||
// <copyright see="prj:///doc/copyright.txt"/> |
||||
// <license see="prj:///doc/license.txt"/> |
||||
// <owner name="Robert Pickering" email="robert@strangelights.com"/> |
||||
// <version>$Revision$</version> |
||||
// </file> |
||||
|
||||
#light |
||||
namespace FSharpBinding |
||||
open System |
||||
open System.Xml |
||||
open ICSharpCode.SharpDevelop.Internal.Templates |
||||
open ICSharpCode.SharpDevelop.Project |
||||
open FSharpBinding |
||||
|
||||
type FSharpLanguageBinding() = class |
||||
interface ILanguageBinding with |
||||
member x.Language |
||||
with get () = "F#" |
||||
member x.LoadProject(engineProvider : IMSBuildEngineProvider, fileName : string, projectName : string) = |
||||
new FSharpProject(engineProvider, fileName, projectName ) :> IProject |
||||
member c.CreateProject(info : ProjectCreateInformation) = |
||||
new FSharpProject(info) :> IProject |
||||
end |
||||
end |
@ -0,0 +1,227 @@
@@ -0,0 +1,227 @@
|
||||
// <file> |
||||
// <copyright see="prj:///doc/copyright.txt"/> |
||||
// <license see="prj:///doc/license.txt"/> |
||||
// <owner name="Robert Pickering" email="robert@strangelights.com"/> |
||||
// <version>$Revision$</version> |
||||
// </file> |
||||
|
||||
#light |
||||
namespace FSharpBinding |
||||
|
||||
//Global todos |
||||
//TODO add "compiling" dialog to output the correct directory |
||||
//TODO output to correct directory :) |
||||
//TODO copy all config to the correct locations |
||||
//TODO add directory structure |
||||
|
||||
open System |
||||
open System.ComponentModel |
||||
open System.Diagnostics |
||||
open System.Collections.Generic |
||||
open System.Windows.Forms |
||||
open System.IO |
||||
open System.Xml |
||||
|
||||
open ICSharpCode.SharpDevelop.Dom |
||||
open ICSharpCode.SharpDevelop.Dom.CSharp |
||||
open ICSharpCode.SharpDevelop.Internal.Templates |
||||
open ICSharpCode.SharpDevelop.Project |
||||
open ICSharpCode.Core |
||||
open ICSharpCode.SharpDevelop.Gui |
||||
open ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
|
||||
type FSharpProject = class |
||||
inherit CompilableProject as base |
||||
new (engineProvider : IMSBuildEngineProvider, fileName : string, projectName : string ) as x = |
||||
{ inherit CompilableProject(engineProvider) } then |
||||
base.Name <- projectName |
||||
x.LoadProject(fileName) |
||||
new (info : ProjectCreateInformation) as x = |
||||
{ inherit CompilableProject(info.Solution) } then |
||||
x.Create(info) |
||||
base.AddImport(@"$(FSharpBuildTasksPath)\SharpDevelop.Build.Fsc.Targets", null) |
||||
override x.GetDefaultItemType(fileName : string) = |
||||
if string.Equals(".fs", Path.GetExtension(fileName), StringComparison.InvariantCultureIgnoreCase) then |
||||
ItemType.Compile |
||||
else if string.Equals(".fsi", Path.GetExtension(fileName), StringComparison.InvariantCultureIgnoreCase) then |
||||
ItemType.Compile |
||||
else |
||||
base.GetDefaultItemType(fileName) |
||||
override x.Language |
||||
with get() = "F#" |
||||
override x.LanguageProperties |
||||
with get() = LanguageProperties.None |
||||
end |
||||
|
||||
|
||||
|
||||
type FSharpProjectNode = class |
||||
inherit ProjectNode |
||||
new (project : IProject) as x = |
||||
{ inherit ProjectNode(project) } |
||||
member x.AddParentFolder((virtualName : string), (relativeDirectoryPath : string), (directoryNodeList :Dictionary<string, DirectoryNode>)) = |
||||
if (relativeDirectoryPath.Length = 0 |
||||
|| string.Compare(virtualName, 0, relativeDirectoryPath, 0, relativeDirectoryPath.Length, StringComparison.InvariantCultureIgnoreCase) = 0) then |
||||
let pos = virtualName.IndexOf('/', relativeDirectoryPath.Length + 1) |
||||
if (pos > 0) then |
||||
let subFolderName = virtualName.Substring(relativeDirectoryPath.Length, pos - relativeDirectoryPath.Length); |
||||
let res,node = directoryNodeList.TryGetValue(subFolderName) |
||||
if (res) then |
||||
if (node.FileNodeStatus = FileNodeStatus.None) then |
||||
node.FileNodeStatus <- FileNodeStatus.InProject |
||||
else |
||||
let node = new DirectoryNode(Path.Combine(x.Directory, subFolderName), FileNodeStatus.Missing); |
||||
node.AddTo(x) |
||||
directoryNodeList.[subFolderName] <- node |
||||
override x.Initialize() = |
||||
//Debugger.Break() |
||||
let fileNodeDictionary |
||||
= new Dictionary<string, FileNode>(StringComparer.InvariantCultureIgnoreCase) |
||||
let directoryNodeList = new Dictionary<string, DirectoryNode>(StringComparer.InvariantCultureIgnoreCase) |
||||
|
||||
let relativeDirectoryPath = |
||||
if (x.RelativePath.Length > 0) then |
||||
(x.RelativePath.Replace('\\', '/')) + "/" |
||||
else |
||||
string.Empty |
||||
|
||||
for item in x.Project.Items do |
||||
match item with |
||||
| :? FileProjectItem as item -> |
||||
let virtualName = item.VirtualName.Replace('\\', '/') |
||||
let virtualName = |
||||
if (virtualName.EndsWith("/")) then |
||||
virtualName.Substring(0, virtualName.Length - 1) |
||||
else |
||||
virtualName |
||||
let fileName = Path.GetFileName(virtualName) |
||||
if (not (string.Equals(virtualName, relativeDirectoryPath + fileName, StringComparison.InvariantCultureIgnoreCase))) then |
||||
x.AddParentFolder(virtualName, relativeDirectoryPath, directoryNodeList); |
||||
//continue; |
||||
|
||||
if (item.ItemType = ItemType.Folder || item.ItemType = ItemType.WebReferences) then |
||||
let newDirectoryNode = DirectoryNodeFactory.CreateDirectoryNode(x, x.Project, fileName) |
||||
if not (Directory.Exists(item.FileName)) then |
||||
newDirectoryNode.FileNodeStatus <- FileNodeStatus.Missing |
||||
newDirectoryNode.ProjectItem <- item |
||||
newDirectoryNode.AddTo(x) |
||||
directoryNodeList.[fileName] <- newDirectoryNode |
||||
else |
||||
let fileNode = new FileNode(item.FileName) |
||||
if not (File.Exists(item.FileName)) then |
||||
fileNode.FileNodeStatus <- FileNodeStatus.Missing |
||||
fileNode.ProjectItem <- item |
||||
fileNodeDictionary.[fileName] <- fileNode |
||||
fileNode.AddTo(x) |
||||
| _ -> () |
||||
|
||||
// Add files found in file system |
||||
if (System.IO.Directory.Exists(x.Directory)) then |
||||
for subDirectory in System.IO.Directory.GetDirectories(x.Directory) do |
||||
let filename = Path.GetFileName(subDirectory) |
||||
if (filename <> ".svn") then |
||||
let res, node = directoryNodeList.TryGetValue(filename) |
||||
if res then |
||||
if (node.FileNodeStatus = FileNodeStatus.None) then |
||||
node.FileNodeStatus <- FileNodeStatus.InProject; |
||||
else |
||||
let node = DirectoryNodeFactory.CreateDirectoryNode(x, x.Project, subDirectory) |
||||
node.AddTo(x) |
||||
|
||||
for fullpath in System.IO.Directory.GetFiles(x.Directory) do |
||||
let file = Path.GetFileName(fullpath) |
||||
let res, node = fileNodeDictionary.TryGetValue(file) |
||||
if res then |
||||
if (node.FileNodeStatus = FileNodeStatus.None) then |
||||
node.FileNodeStatus <- FileNodeStatus.InProject |
||||
else |
||||
let node = new FileNode(file) |
||||
node.AddTo(x) |
||||
|
||||
end |
||||
|
||||
type FSharpProjectNodeBuilder() = class |
||||
interface IProjectNodeBuilder with |
||||
member x.CanBuildProjectTree(project : IProject) = |
||||
project :? FSharpProject |
||||
member x.AddProjectNode(solution : TreeNode, project : IProject) = |
||||
let prjNode = new FSharpProjectNode(project) |
||||
prjNode.AddTo(solution) |
||||
|
||||
let referenceFolderNode = new ReferenceFolder(project) |
||||
referenceFolderNode.AddTo(prjNode) |
||||
|
||||
prjNode :> TreeNode |
||||
end |
||||
end |
||||
|
||||
module ProjectHelpers = |
||||
let forEachFileNode f (nodes : TreeNodeCollection) = |
||||
for node in nodes do |
||||
match node with |
||||
| :? FileNode as fileNode -> |
||||
if fileNode.ProjectItem <> null then |
||||
f fileNode |
||||
| _ -> () |
||||
|
||||
let reorderItems (nodes : TreeNodeCollection) (project : IProject) = |
||||
//ProjectService.MarkProjectDirty(project) |
||||
project.Save() |
||||
let doc = new XmlDocument() |
||||
doc.Load(project.FileName) |
||||
let nsmgr = new XmlNamespaceManager(doc.NameTable) |
||||
nsmgr.AddNamespace("proj", "http://schemas.microsoft.com/developer/msbuild/2003") |
||||
nodes |> forEachFileNode |
||||
(fun node -> |
||||
let docNode = doc.SelectSingleNode(Printf.sprintf @"//proj:Compile[@Include=""%s""]" (Path.GetFileName(node.FileName)), nsmgr) |
||||
docNode.ParentNode.RemoveChild(docNode) |> ignore) |
||||
let itemNode = doc.SelectSingleNode("//proj:ItemGroup", nsmgr) |
||||
nodes |> forEachFileNode |
||||
(fun node -> |
||||
let xmlElem = doc.CreateElement("", "Compile", "http://schemas.microsoft.com/developer/msbuild/2003") |
||||
let xmlAttr = doc.CreateAttribute("Include") |
||||
xmlAttr.InnerText <- Path.GetFileName(node.FileName) |
||||
xmlElem.Attributes.Append(xmlAttr) |> ignore |
||||
itemNode.AppendChild(xmlElem) |> ignore) |
||||
doc.Save(project.FileName) |
||||
|
||||
|
||||
type MoveUpFileEvent() = |
||||
inherit AbstractMenuCommand() |
||||
override x.Run() = |
||||
let node = ProjectBrowserPad.Instance.SelectedNode |
||||
match node with |
||||
| :? FileNode as fileNode -> |
||||
let parent = node.Parent |
||||
let nodeIndex = parent.Nodes.IndexOf(node) |
||||
if nodeIndex > 1 then |
||||
parent.Nodes.Remove(node) |
||||
parent.Nodes.Insert(nodeIndex -1, node) |
||||
ProjectHelpers.reorderItems parent.Nodes fileNode.Project |
||||
| _ -> () |
||||
|
||||
|
||||
type MoveDownFileEvent() = |
||||
inherit AbstractMenuCommand() |
||||
override x.Run() = |
||||
let node = ProjectBrowserPad.Instance.SelectedNode |
||||
match node with |
||||
| :? FileNode as fileNode -> |
||||
let parent = node.Parent |
||||
let nodeIndex = parent.Nodes.IndexOf(node) |
||||
if nodeIndex < parent.Nodes.Count then |
||||
parent.Nodes.Remove(node) |
||||
parent.Nodes.Insert(nodeIndex +1, node) |
||||
ProjectHelpers.reorderItems parent.Nodes fileNode.Project |
||||
| _ -> () |
||||
|
||||
|
||||
type FsOptions() = |
||||
inherit AbstractProjectOptionPanel() |
||||
override x.LoadPanelContents() = |
||||
let this = (type FsOptions) |
||||
let caller = this.Assembly |
||||
x.SetupFromXmlStream(caller.GetManifestResourceStream("FSharpBindings.Resources.FsOptions.xfrm")) |
||||
x.InitializeHelper() |
||||
x.helper.BindBoolean(x.Get<CheckBox>("standalone"), "Standalone", false) |> ignore |
||||
x.helper.BindBoolean(x.Get<CheckBox>("nomllib"), "NoMLLib", false) |> ignore |
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0"?> |
||||
<Template originator = "Robert Pickering" |
||||
created = "06/10/2001" |
||||
lastModified = "02/01/2003"> |
||||
|
||||
<!-- Template Header --> |
||||
<TemplateConfiguration> |
||||
<Name>${res:Templates.Project.ConsoleProject.Name}</Name> |
||||
<Category>F#</Category> |
||||
<Icon>C#.Project.DOSProject</Icon> |
||||
<Description>${res:Templates.Project.ConsoleProject.Description}</Description> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename = "file.fs"/> |
||||
</Actions> |
||||
|
||||
<!-- Template Content --> |
||||
<Project language = "F#"> |
||||
<Files> |
||||
<File name="file.fs"><![CDATA[#light |
||||
module MyNamespace.MyModule |
||||
printfn "Hello world" ]]></File> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Robert Pickering" version="1.0"> |
||||
|
||||
<Config |
||||
name = "${res:Templates.File.EmptyClass.Name}" |
||||
icon = "Boo.File.EmptyFile" |
||||
category = "F#" |
||||
defaultname = "file${Number}.fs" |
||||
language = "F#"/> |
||||
|
||||
<Description>${res:Templates.File.EmptyClass.Description}</Description> |
||||
|
||||
<!-- |
||||
Special new file templates: |
||||
${StandardNamespace} -> Standardnamespace of the current project or FileNameWithoutExtension |
||||
${FullName} -> Full generated path name |
||||
${FileName} -> File name with extension |
||||
${FileNameWithoutExtension} -> File name without extension |
||||
${Extension} -> Extension in the form ".cs" |
||||
${Path} -> Full path of the file |
||||
${ClassName} -> Class name (generally FileNameWithoutExtension w/o 'bad' characters) |
||||
--> |
||||
<Files> |
||||
<File name="${FullName}" language="Boo"> |
||||
<![CDATA[#light |
||||
namespace ${StandardNamespace} |
||||
module ${FileNameWithoutExtension} |
||||
|
||||
printfn "Hello world" |
||||
|
||||
]]></File> |
||||
</Files> |
||||
|
||||
<AdditionalOptions/> |
||||
</Template> |
||||
|
Binary file not shown.
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<UsingTask TaskName="FSharp.Build.Tasks.Fsc" AssemblyFile="FSharp.Build.Tasks.dll" /> |
||||
<UsingTask TaskName="CreateCSharpManifestResourceName" AssemblyName="Microsoft.Build.Tasks, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
||||
|
||||
<PropertyGroup> |
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(FSharpBuildTasksPath)\SharpDevelop.Build.Fsc.targets</MSBuildAllProjects> |
||||
<DefaultLanguageSourceExtension>.fs</DefaultLanguageSourceExtension> |
||||
<Language>F#</Language> |
||||
</PropertyGroup> |
||||
|
||||
<PropertyGroup> |
||||
<CreateManifestResourceNamesDependsOn> |
||||
</CreateManifestResourceNamesDependsOn> |
||||
</PropertyGroup> |
||||
<Target Name="CreateManifestResourceNames" Condition="'@(ResxWithNoCulture)@(ResxWithCulture)@(NonResxWithNoCulture)@(NonResxWithCulture)'!=''" DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"> |
||||
<!-- Create the target resource names for non-culture resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(ResxWithNoCulture)'!=''" ResourceFiles="@(ResxWithNoCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithNoCultureName" /> |
||||
</CreateCSharpManifestResourceName> |
||||
|
||||
<!-- Create the target resource names for culture resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(ResxWithCulture)'!=''" ResourceFiles="@(ResxWithCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestResourceWithCultureName" /> |
||||
</CreateCSharpManifestResourceName> |
||||
|
||||
<!-- Create the target resource names for non-culture non-resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(NonResxWithNoCulture)'!=''" ResourceFiles="@(NonResxWithNoCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithNoCulture" /> |
||||
</CreateCSharpManifestResourceName> |
||||
|
||||
<!-- Create the target resource names for culture non-resx files. --> |
||||
<CreateCSharpManifestResourceName Condition="'@(NonResxWithCulture)'!=''" ResourceFiles="@(NonResxWithCulture)" RootNamespace="$(RootNamespace)"> |
||||
<Output TaskParameter="ManifestResourceNames" ItemName="ManifestNonResxWithCulture" /> |
||||
</CreateCSharpManifestResourceName> |
||||
</Target> |
||||
|
||||
<Target Name="CoreCompile" Inputs="$(MSBuildAllProjects); |
||||
@(Compile); |
||||
@(ReferencePath); |
||||
@(ManifestResourceWithNoCulture); |
||||
$(ApplicationIcon); |
||||
$(AssemblyOriginatorKeyFile); |
||||
@(ManifestNonResxWithNoCultureOnDisk); |
||||
@(ReferencePath); |
||||
@(CompiledLicenseFile); |
||||
$(Standalone); |
||||
$(NoMLLib)" |
||||
Outputs="@(DocFileItem); |
||||
@(IntermediateAssembly); |
||||
$(NonExistentFile)" |
||||
DependsOnTargets="$(CoreCompileDependsOn)"> |
||||
<Fsc |
||||
DebugType="$(DebugType)" |
||||
EmitDebugInformation="$(DebugSymbols)" |
||||
FileAlignment="$(FileAlignment)" |
||||
KeyContainer="$(KeyContainerName)" |
||||
KeyFile="$(KeyOriginatorFile)" |
||||
Optimize="$(Optimize)" |
||||
OutputAssembly="@(IntermediateAssembly)" |
||||
Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)" |
||||
Sources="@(Compile)" |
||||
References="@(ReferencePath)" |
||||
TargetType="$(OutputType)" |
||||
Standalone="$(Standalone)" |
||||
NoMLLib="$(NoMLLib)" /> |
||||
</Target> |
||||
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.Common.targets" /> |
||||
</Project> |
Binary file not shown.
@ -1,2 +1,2 @@
@@ -1,2 +1,2 @@
|
||||
%windir%\microsoft.net\framework\v3.5\msbuild /t:clean SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" |
||||
%windir%\microsoft.net\framework\v3.5\msbuild /t:clean SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" "/p:FSharpBuildTasksPath=%CD%\AddIns\BackendBindings\FSharp\RequiredLibraries" |
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE |
@ -1,2 +1,2 @@
@@ -1,2 +1,2 @@
|
||||
%windir%\microsoft.net\framework\v3.5\msbuild SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" |
||||
%windir%\microsoft.net\framework\v3.5\msbuild SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" "/p:FSharpBuildTasksPath=%CD%\AddIns\BackendBindings\FSharp\RequiredLibraries" |
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE |
@ -1,2 +1,2 @@
@@ -1,2 +1,2 @@
|
||||
%windir%\microsoft.net\framework\v3.5\msbuild /property:Configuration=Release SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" |
||||
%windir%\microsoft.net\framework\v3.5\msbuild /property:Configuration=Release SharpDevelop.sln "/p:BooBinPath=%CD%\AddIns\BackendBindings\Boo\RequiredLibraries" "/p:FSharpBuildTasksPath=%CD%\AddIns\BackendBindings\FSharp\RequiredLibraries" |
||||
@IF %ERRORLEVEL% NEQ 0 PAUSE |
Loading…
Reference in new issue