diff --git a/source/Cosmos.VS.ReadMe.html b/source/Cosmos.VS.ReadMe.html
index cf3e458a1..cf0b2b19f 100644
--- a/source/Cosmos.VS.ReadMe.html
+++ b/source/Cosmos.VS.ReadMe.html
@@ -41,5 +41,7 @@
Cosmos.VS.Wizards
Provides support for creating new Cosmos projects from within Visual Studio.
+
+ Cosmos.VS.XSharp
-
+ MEF based project that provides syntax coloring for X#.
diff --git a/source/Cosmos.sln b/source/Cosmos.sln
index 10aba7eee..1a803539c 100644
--- a/source/Cosmos.sln
+++ b/source/Cosmos.sln
@@ -92,7 +92,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Docs", "..\Docs", "{67E7DEF
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "false"
Release.AspNetCompiler.Debug = "False"
- VWDPort = "10155"
+ VWDPort = "3678"
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Debug.Consts", "..\source2\IL2CPU\Cosmos.IL2CPU.Debug\Cosmos.Debug.Consts.csproj", "{9998B4EA-385E-4DA2-8905-2BBEB5B2C6E2}"
@@ -208,9 +208,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Compiler.XSharp", ".
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Compiler.XSharp.XSC", "..\source2\Compiler\Cosmos.Compiler.XSharp.XSC\Cosmos.Compiler.XSharp.XSC.csproj", "{7B8499A7-0A8D-44FC-8181-9666CC198025}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.VS.XSharp", "..\source2\VSIP\Cosmos.VS.XSharp\Cosmos.VS.XSharp.csproj", "{49125A4E-F2DD-48C8-B19F-D9D4217FA34B}"
+EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
- SccNumberOfProjects = 57
+ SccNumberOfProjects = 58
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs04
SccLocalPath0 = .
@@ -440,6 +442,10 @@ Global
SccProjectTopLevelParentUniqueName56 = Cosmos.sln
SccProjectName56 = ../source2/Users/Matthijs/MatthijsPlayground
SccLocalPath56 = ..\\source2\\Users\\Matthijs\\MatthijsPlayground
+ SccProjectUniqueName57 = ..\\source2\\VSIP\\Cosmos.VS.XSharp\\Cosmos.VS.XSharp.csproj
+ SccProjectTopLevelParentUniqueName57 = Cosmos.sln
+ SccProjectName57 = ../source2/VSIP/Cosmos.VS.XSharp
+ SccLocalPath57 = ..\\source2\\VSIP\\Cosmos.VS.XSharp
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Bootstrap|Any CPU = Bootstrap|Any CPU
@@ -1314,6 +1320,21 @@ Global
{7B8499A7-0A8D-44FC-8181-9666CC198025}.Release|Mixed Platforms.Build.0 = Release|x86
{7B8499A7-0A8D-44FC-8181-9666CC198025}.Release|x86.ActiveCfg = Release|x86
{7B8499A7-0A8D-44FC-8181-9666CC198025}.Release|x86.Build.0 = Release|x86
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Bootstrap|Any CPU.ActiveCfg = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Bootstrap|Any CPU.Build.0 = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Bootstrap|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Bootstrap|Mixed Platforms.Build.0 = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Bootstrap|x86.ActiveCfg = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1360,6 +1381,7 @@ Global
{2259402E-3EAB-448D-9CC6-E5C1C2C716A5} = {CD3F5E45-8B24-424F-ADF1-0211712F4CB7}
{47E8F3DC-FF3F-4CC7-8643-1807260B0B18} = {CD3F5E45-8B24-424F-ADF1-0211712F4CB7}
{EA63FDF9-057F-4E67-9060-74F4E7A09AE0} = {CD3F5E45-8B24-424F-ADF1-0211712F4CB7}
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B} = {CD3F5E45-8B24-424F-ADF1-0211712F4CB7}
{63F7BFB9-419E-4965-B580-304B9C9FA7D8} = {6A15C540-8278-4B9C-B890-FA57FB6AE6A6}
{52BF0A64-EBEF-420A-9F27-6C5226A4B77B} = {6A15C540-8278-4B9C-B890-FA57FB6AE6A6}
{C801F19C-A9D3-42D5-9A57-9FFDF9B4D05E} = {6A15C540-8278-4B9C-B890-FA57FB6AE6A6}
diff --git a/source2/Users/Kudzu/Kudzu-Notes.html b/source2/Users/Kudzu/Kudzu-Notes.html
index 7879dd5ed..de73de4fc 100644
--- a/source2/Users/Kudzu/Kudzu-Notes.html
+++ b/source2/Users/Kudzu/Kudzu-Notes.html
@@ -31,6 +31,10 @@
Syntax highlighting
diff --git a/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.cs b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.cs
new file mode 100644
index 000000000..f3a7f363a
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.Windows.Media;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Classification;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Cosmos.VS.XSharp {
+ /// This class causes a classifier to be added to the set of classifiers. Since
+ /// the content type is set to "text", this classifier applies to all text files
+ [Export(typeof(IClassifierProvider))]
+ [ContentType("XSharp")]
+ internal class XSharpProvider : IClassifierProvider {
+ /// Import the classification registry to be used for getting a reference
+ /// to the custom classification type later.
+ [Import]
+ internal IClassificationTypeRegistryService ClassificationRegistry = null; // Set via MEF
+
+ public IClassifier GetClassifier(ITextBuffer buffer) {
+ return buffer.Properties.GetOrCreateSingletonProperty(delegate { return new XSharp(ClassificationRegistry); });
+ }
+ }
+
+ /// Classifier that classifies all text as an instance of the OrinaryClassifierType
+ class XSharp : IClassifier {
+ IClassificationType _classificationType;
+
+ internal XSharp(IClassificationTypeRegistryService registry) {
+ _classificationType = registry.GetClassificationType("XSharp");
+ }
+
+ /// This method scans the given SnapshotSpan for potential matches for this classification.
+ /// In this instance, it classifies everything and returns each span as a new ClassificationSpan.
+ /// The span currently being classified
+ /// A list of ClassificationSpans that represent spans identified to be of this classification
+ public IList GetClassificationSpans(SnapshotSpan span) {
+ //create a list to hold the results
+ var classifications = new List();
+ classifications.Add(new ClassificationSpan(new SnapshotSpan(span.Snapshot, new Span(span.Start, span.Length)),
+ _classificationType));
+ return classifications;
+ }
+
+#pragma warning disable 67
+ // This event gets raised if a non-text change would affect the classification in some way,
+ // for example typing /* would cause the classification to change in C# without directly
+ // affecting the span.
+ public event EventHandler ClassificationChanged;
+#pragma warning restore 67
+ }
+}
diff --git a/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj
new file mode 100644
index 000000000..6c289fea8
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj
@@ -0,0 +1,88 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20305
+ 2.0
+ {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ {49125A4E-F2DD-48C8-B19F-D9D4217FA34B}
+ Library
+ Properties
+ Cosmos.VS.XSharp
+ Cosmos.VS.XSharp
+ v4.0
+ 512
+ false
+ SAK
+ SAK
+ SAK
+ SAK
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+
+
+
+
\ No newline at end of file
diff --git a/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj.vspscc b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj.vspscc
new file mode 100644
index 000000000..feffdecaa
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharp.csproj.vspscc
@@ -0,0 +1,10 @@
+""
+{
+"FILE_VERSION" = "9237"
+"ENLISTMENT_CHOICE" = "NEVER"
+"PROJECT_FILE_RELATIVE_PATH" = ""
+"NUMBER_OF_EXCLUDED_FILES" = "0"
+"ORIGINAL_PROJECT_FILE_PATH" = ""
+"NUMBER_OF_NESTED_PROJECTS" = "0"
+"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
+}
diff --git a/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharpFormat.cs b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharpFormat.cs
new file mode 100644
index 000000000..a2d74a5f9
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharpFormat.cs
@@ -0,0 +1,22 @@
+using System.ComponentModel.Composition;
+using System.Windows.Media;
+using Microsoft.VisualStudio.Text.Classification;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Cosmos.VS.XSharp {
+ /// Defines an editor format for the XSharp type that has a purple background
+ /// and is underlined.
+ [Export(typeof(EditorFormatDefinition))]
+ [ClassificationType(ClassificationTypeNames = "XSharp")]
+ [Name("XSharp")]
+ [UserVisible(true)]
+ [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
+ internal sealed class XSharpFormat : ClassificationFormatDefinition {
+ /// Defines the visual format for the "Cosmos.VS.XSharp" classification type
+ public XSharpFormat() {
+ this.DisplayName = "XSharp"; //human readable version of the name
+ this.BackgroundColor = Colors.BlueViolet;
+ this.TextDecorations = System.Windows.TextDecorations.Underline;
+ }
+ }
+}
diff --git a/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharpType.cs b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharpType.cs
new file mode 100644
index 000000000..ba9a17f33
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/Cosmos.VS.XSharpType.cs
@@ -0,0 +1,12 @@
+using System.ComponentModel.Composition;
+using Microsoft.VisualStudio.Text.Classification;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Cosmos.VS.XSharp {
+ internal static class XSharpClassificationDefinition {
+ /// Defines the "XSharp" classification type.
+ [Export(typeof(ClassificationTypeDefinition))]
+ [Name("XSharp")]
+ internal static ClassificationTypeDefinition XSharpType = null;
+ }
+}
diff --git a/source2/VSIP/Cosmos.VS.XSharp/FileAndContentTypes.cs b/source2/VSIP/Cosmos.VS.XSharp/FileAndContentTypes.cs
new file mode 100644
index 000000000..e175f649d
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/FileAndContentTypes.cs
@@ -0,0 +1,17 @@
+using System.ComponentModel.Composition;
+using Microsoft.VisualStudio.Text.Classification;
+using Microsoft.VisualStudio.Utilities;
+
+namespace Cosmos.VS.XSharp {
+ internal static class FileAndContentTypeDefinitions {
+ [Export]
+ [Name("XSharp")]
+ [BaseDefinition("text")]
+ internal static ContentTypeDefinition XSharpContentTypeDefinition;
+
+ [Export]
+ [FileExtension(".xs")]
+ [ContentType("XSharp")]
+ internal static FileExtensionToContentTypeDefinition XSharpFileExtensionDefinition;
+ }
+}
diff --git a/source2/VSIP/Cosmos.VS.XSharp/Properties/AssemblyInfo.cs b/source2/VSIP/Cosmos.VS.XSharp/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..0f9fd4da7
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Cosmos.VS.XSharp")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Cosmos.VS.XSharp")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/source2/VSIP/Cosmos.VS.XSharp/source.extension.vsixmanifest b/source2/VSIP/Cosmos.VS.XSharp/source.extension.vsixmanifest
new file mode 100644
index 000000000..6fb3a816f
--- /dev/null
+++ b/source2/VSIP/Cosmos.VS.XSharp/source.extension.vsixmanifest
@@ -0,0 +1,20 @@
+
+
+
+ Cosmos.VS.XSharp
+ Cosmos
+ 1.0
+ This is a sample classifier extension to the Visual Studio Editor.
+ 1033
+
+
+ Pro
+
+
+
+
+
+
+ |%CurrentProject%|
+
+