Permalink
Browse files

Solution structure refactoring.

  • Loading branch information...
1 parent be40ba9 commit 4175b82bbe172de390916d4f16d6fad476ad66df @jmis jmis committed Jan 3, 2011
Showing 311 changed files with 1,308 additions and 533 deletions.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -17,11 +17,12 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
+using ClojureExtension.Parsing;
using EnvDTE;
using EnvDTE80;
+using Microsoft.ClojureExtension;
using Microsoft.ClojureExtension.Configuration;
using Microsoft.ClojureExtension.Editor;
-using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.ClojureExtension.Project;
using Microsoft.ClojureExtension.Project.Hierarchy;
using Microsoft.ClojureExtension.Project.Launching;
@@ -36,7 +37,7 @@
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.Win32;
-namespace Microsoft.ClojureExtension
+namespace ClojureExtension.Package
{
[Guid(PackageGuid)]
[PackageRegistration(UseManagedResourcesOnly = true)]
@@ -46,7 +47,7 @@ namespace Microsoft.ClojureExtension
[ProvideProjectItem(typeof (ClojureProjectFactory), "Clojure Items", @"Templates\ProjectItems\Clojure", 500)]
[ProvideMenuResource("Menus.ctmenu", 1)]
[ProvideToolWindow(typeof (ReplToolWindow))]
- [ProvideAutoLoad(UIContextGuids80.NoSolution)]
+ [ProvideAutoLoad(UIContextGuids80.NoSolution)]
public sealed class ClojurePackage : ProjectPackage
{
public const string PackageGuid = "40953a10-3425-499c-8162-a90059792d13";
@@ -56,7 +57,7 @@ protected override void Initialize()
base.Initialize();
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainAssemblyResolve;
RegisterProjectFactory(new ClojureProjectFactory(this));
- var dte = (DTE2)GetService(typeof(DTE));
+ var dte = (DTE2) GetService(typeof (DTE));
dte.Events.DTEEvents.OnStartupComplete +=
() =>
@@ -101,7 +102,7 @@ private void EnableMenuCommandsOnNewClojureBuffers()
EditorCommandFactory editorCommandFactory = new EditorCommandFactory(componentModel.GetService<IEditorOptionsFactoryService>());
OleMenuCommandService menuCommandService = (OleMenuCommandService) GetService(typeof (IMenuCommandService));
DTE2 dte = (DTE2) GetService(typeof (DTE));
-
+
editorFactoryService.TextViewCreated +=
(o, e) =>
{
@@ -146,7 +147,7 @@ private void ShowClojureProjectMenuCommands()
ReplToolWindow replToolWindow = (ReplToolWindow) FindToolWindow(typeof (ReplToolWindow), 0, true);
IVsWindowFrame replToolWindowFrame = (IVsWindowFrame) replToolWindow.Frame;
DTE2 dte = (DTE2) GetService(typeof (DTE));
- IProvider<EnvDTE.Project> projectProvider = new SelectedProjectProvider(dte.Solution, dte.ToolWindows.SolutionExplorer);
+ IProvider<Project> projectProvider = new SelectedProjectProvider(dte.Solution, dte.ToolWindows.SolutionExplorer);
menuCommandService.AddCommand(
new MenuCommand(
@@ -134,7 +134,4 @@
<data name="112" xml:space="preserve">
<value>Information about my package</value>
</data>
- <data name="400" type="System.Resources.ResXFileRef, System.Windows.Forms">
- <value>Resources\Package.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
- </data>
</root>
File renamed without changes.
@@ -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("ClojureExtension.Deployment")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ClojureExtension.Deployment")]
+[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")]
@@ -2,7 +2,7 @@
<Vsix xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
<Identifier Id="40953a10-3425-499c-8162-a90059792d13">
<Name>vsClojure</Name>
- <Author>vsClojure</Author>
+ <Author>jmis</Author>
<Version>1.0.0</Version>
<Description xml:space="preserve">Support for Clojure CLR.</Description>
<Locale>1033</Locale>
@@ -24,7 +24,7 @@
</Identifier>
<References />
<Content>
+ <MefComponent>|ClojureExtension.Editor|</MefComponent>
<VsPackage>|%CurrentProject%;PkgdefProjectOutputGroup|</VsPackage>
- <MefComponent>|%CurrentProject%|</MefComponent>
</Content>
</Vsix>
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using ClojureExtension.Parsing;
using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.ClojureExtension.Utilities;
using Microsoft.VisualStudio.Editor;
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Text;
+using ClojureExtension.Parsing;
using Microsoft.ClojureExtension.Editor.Options;
using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.ClojureExtension.Utilities;
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using ClojureExtension.Parsing;
using Microsoft.ClojureExtension.Editor.Options;
using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.ClojureExtension.Utilities;
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel.Composition;
+using ClojureExtension.Parsing;
using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.ClojureExtension.Utilities;
using Microsoft.VisualStudio.Text;
@@ -1,4 +1,5 @@
using System.Collections.Generic;
+using ClojureExtension.Parsing;
using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.ClojureExtension.Utilities;
@@ -1,4 +1,5 @@
-using Microsoft.ClojureExtension.Editor.Parsing;
+using ClojureExtension.Parsing;
+using Microsoft.ClojureExtension.Editor.Parsing;
namespace Microsoft.ClojureExtension.Editor.BraceMatching
{
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using ClojureExtension.Parsing;
+using Microsoft.ClojureExtension.Editor.Tagger;
+using Microsoft.VisualStudio.Text;
+using Microsoft.VisualStudio.Text.Classification;
+using Microsoft.VisualStudio.Text.Tagging;
+
+namespace Microsoft.ClojureExtension.Editor.Classification
+{
+ public class ClojureClassifier : ITagger<ClassificationTag>
+ {
+ private readonly ITextBuffer _buffer;
+ private readonly ITagAggregator<ClojureTokenTag> _aggregator;
+ private readonly IDictionary<TokenType, IClassificationType> _clojureTypes;
+ public event EventHandler<SnapshotSpanEventArgs> TagsChanged;
+
+ public ClojureClassifier(ITextBuffer buffer,
+ ITagAggregator<ClojureTokenTag> clojureTagAggregator,
+ IClassificationTypeRegistryService typeService)
+ {
+ _buffer = buffer;
+ _aggregator = clojureTagAggregator;
+ _aggregator.TagsChanged += TokenTagsChanged;
+ _clojureTypes = new Dictionary<TokenType, IClassificationType>();
+ _clojureTypes[TokenType.Symbol] = typeService.GetClassificationType("ClojureSymbol");
+ _clojureTypes[TokenType.String] = typeService.GetClassificationType("ClojureString");
+ _clojureTypes[TokenType.Number] = typeService.GetClassificationType("ClojureNumber");
+ _clojureTypes[TokenType.HexNumber] = typeService.GetClassificationType("ClojureNumber");
+ _clojureTypes[TokenType.Comment] = typeService.GetClassificationType("ClojureComment");
+ _clojureTypes[TokenType.Keyword] = typeService.GetClassificationType("ClojureKeyword");
+ _clojureTypes[TokenType.Character] = typeService.GetClassificationType("ClojureCharacter");
+ _clojureTypes[TokenType.BuiltIn] = typeService.GetClassificationType("ClojureBuiltIn");
+ _clojureTypes[TokenType.Boolean] = typeService.GetClassificationType("ClojureBoolean");
+ _clojureTypes[TokenType.ListStart] = typeService.GetClassificationType("ClojureList");
+ _clojureTypes[TokenType.ListEnd] = typeService.GetClassificationType("ClojureList");
+ _clojureTypes[TokenType.VectorStart] = typeService.GetClassificationType("ClojureVector");
+ _clojureTypes[TokenType.VectorEnd] = typeService.GetClassificationType("ClojureVector");
+ _clojureTypes[TokenType.MapStart] = typeService.GetClassificationType("ClojureMap");
+ _clojureTypes[TokenType.MapEnd] = typeService.GetClassificationType("ClojureMap");
+ }
+
+ public void TokenTagsChanged(object sender, TagsChangedEventArgs e)
+ {
+ foreach (var span in e.Span.GetSpans(_buffer)) TagsChanged(this, new SnapshotSpanEventArgs(span));
+ }
+
+ public IEnumerable<ITagSpan<ClassificationTag>> GetTags(NormalizedSnapshotSpanCollection spans)
+ {
+ foreach (var tagSpan in _aggregator.GetTags(spans))
+ {
+ if (!_clojureTypes.ContainsKey(tagSpan.Tag.Token.Type)) continue;
+ var tagSpans = tagSpan.Span.GetSpans(spans[0].Snapshot);
+ yield return new TagSpan<ClassificationTag>(tagSpans[0], new ClassificationTag(_clojureTypes[tagSpan.Tag.Token.Type]));
+ }
+ }
+ }
+}
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{4B160925-5079-4B41-BE21-458EBB74C9AB}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>ClojureExtension.Editor</RootNamespace>
+ <AssemblyName>ClojureExtension.Editor</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ </PropertyGroup>
+ <PropertyGroup>
+ <AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.VisualStudio.CoreUtility, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.VisualStudio.Editor, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.VisualStudio.Text.Data, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.VisualStudio.Text.Logic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.VisualStudio.Text.UI, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+ <Reference Include="Microsoft.VisualStudio.TextManager.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <Reference Include="PresentationCore" />
+ <Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ActiveTextBufferStateProvider.cs" />
+ <Compile Include="AutoFormat\AutoFormatter.cs" />
+ <Compile Include="AutoIndent\ClojureSmartIndent.cs" />
+ <Compile Include="AutoIndent\SmartIndentAdapter.cs" />
+ <Compile Include="AutoIndent\SmartIndentProvider.cs" />
+ <Compile Include="BraceMatching\BraceMatchingFormatDefinitions.cs" />
+ <Compile Include="BraceMatching\BraceMatchingTagger.cs" />
+ <Compile Include="BraceMatching\BraceMatchingTaggerProvider.cs" />
+ <Compile Include="BraceMatching\MatchingBraceFinder.cs" />
+ <Compile Include="BraceMatching\MatchingBracePair.cs" />
+ <Compile Include="Classification\ClassificationFormat.cs" />
+ <Compile Include="Classification\ClassificationType.cs" />
+ <Compile Include="Classification\ClojureClassifier.cs" />
+ <Compile Include="Classification\ClojureClassifierProvider.cs" />
+ <Compile Include="EditorCommandFactory.cs" />
+ <Compile Include="Options\EditorOptions.cs" />
+ <Compile Include="Options\EditorOptionsBuilder.cs" />
+ <Compile Include="Parsing\BufferTextChangeHandler.cs" />
+ <Compile Include="Parsing\ITextBufferAdapter.cs" />
+ <Compile Include="Parsing\TextBufferAdapter.cs" />
+ <Compile Include="Parsing\TextChangeAdapter.cs" />
+ <Compile Include="Parsing\TextChangeData.cs" />
+ <Compile Include="Parsing\TokenChangedEventArgs.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Tagger\ClojureTagProvider.cs" />
+ <Compile Include="Tagger\ClojureTokenTag.cs" />
+ <Compile Include="Tagger\ClojureTokenTagger.cs" />
+ <Compile Include="TokenizedBufferBuilder.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\ClojureExtension.Parsing\ClojureExtension.Parsing.csproj">
+ <Project>{6A42095C-CC50-4E3E-9672-6185A6F7A8A7}</Project>
+ <Name>ClojureExtension.Parsing</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\ClojureExtension.Utilities\ClojureExtension.Utilities.csproj">
+ <Project>{360503CC-98C5-4C00-9934-55519FFC5C26}</Project>
+ <Name>ClojureExtension.Utilities</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Key.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
Binary file not shown.
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
+using ClojureExtension.Parsing;
using Microsoft.ClojureExtension.Utilities;
namespace Microsoft.ClojureExtension.Editor.Parsing
@@ -1,4 +1,5 @@
using System;
+using ClojureExtension.Parsing;
namespace Microsoft.ClojureExtension.Editor.Parsing
{
@@ -0,0 +1,36 @@
+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("ClojureExtension.Editor")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("ClojureExtension.Editor")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[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)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("de08746d-80af-4b62-9e2e-8a17b1340659")]
+
+// 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")]
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel.Composition;
+using ClojureExtension.Parsing;
using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.ClojureExtension.Utilities;
using Microsoft.VisualStudio.Text;
@@ -1,4 +1,5 @@
-using Microsoft.ClojureExtension.Editor.Parsing;
+using ClojureExtension.Parsing;
+using Microsoft.ClojureExtension.Editor.Parsing;
using Microsoft.VisualStudio.Text.Tagging;
namespace Microsoft.ClojureExtension.Editor.Tagger
Oops, something went wrong.

0 comments on commit 4175b82

Please sign in to comment.