Permalink
Browse files

moved source files under src

  • Loading branch information...
1 parent 1ce1ffb commit af464dc2752de81e4a822f03cae6011e7916e27f @Mpdreamz Mpdreamz committed Mar 14, 2016
Showing with 315 additions and 47 deletions.
  1. +3 −5 .gitignore
  2. +1 −0 CONTRIBUTORS
  3. +1 −1 build.cmd
  4. +256 −0 build.fsx
  5. +5 −0 paket.dependencies
  6. +6 −0 paket.lock
  7. +11 −9 { → src}/EditorConfig.VisualStudio.sln
  8. 0 { → src}/EditorConfig.VisualStudio.sln.DotSettings
  9. 0 { → src}/EditorConfig.VisualStudio/Classify/EditorClassifierClassifierProvider.cs
  10. 0 { → src}/EditorConfig.VisualStudio/Classify/EditorConfigClassifier.cs
  11. 0 { → src}/EditorConfig.VisualStudio/Completion/CompletionItem.cs
  12. 0 { → src}/EditorConfig.VisualStudio/Completion/EditorConfigCompletionController.cs
  13. 0 { → src}/EditorConfig.VisualStudio/Completion/EditorConfigCompletionSource.cs
  14. 0 { → src}/EditorConfig.VisualStudio/ContentType/EditorConfigContentTypeDefinition.cs
  15. +29 −29 { → src}/EditorConfig.VisualStudio/EditorConfig.VisualStudio.csproj
  16. 0 { → src}/EditorConfig.VisualStudio/EditorConfig.vsct
  17. 0 { → src}/EditorConfig.VisualStudio/EditorConfigPackage.cs
  18. 0 { → src}/EditorConfig.VisualStudio/EditorConfigTextViewCreationListener.cs
  19. 0 { → src}/EditorConfig.VisualStudio/GlobalSuppressions.cs
  20. 0 { → src}/EditorConfig.VisualStudio/Guids.cs
  21. 0 { → src}/EditorConfig.VisualStudio/Helpers/ActiveDocumentRestorer.cs
  22. 0 { → src}/EditorConfig.VisualStudio/Helpers/EditPointExtensions.cs
  23. 0 { → src}/EditorConfig.VisualStudio/Helpers/OutputWindowHelper.cs
  24. 0 { → src}/EditorConfig.VisualStudio/Helpers/SettingsExtensions.cs
  25. 0 { → src}/EditorConfig.VisualStudio/Helpers/TextDocumentExtensions.cs
  26. 0 { → src}/EditorConfig.VisualStudio/Helpers/UndoTransactionHelper.cs
  27. 0 { → src}/EditorConfig.VisualStudio/Integration/Commands/BaseCommand.cs
  28. 0 { → src}/EditorConfig.VisualStudio/Integration/Commands/CleanupActiveCodeCommand.cs
  29. 0 { → src}/EditorConfig.VisualStudio/Integration/Events/BaseEventListener.cs
  30. 0 { → src}/EditorConfig.VisualStudio/Integration/Events/RunningDocumentTableEventListener.cs
  31. 0 { → src}/EditorConfig.VisualStudio/Integration/Events/ShellEventListener.cs
  32. 0 { → src}/EditorConfig.VisualStudio/Integration/Events/TextViewCreationListener.cs
  33. 0 { → src}/EditorConfig.VisualStudio/Integration/Guids.cs
  34. 0 { → src}/EditorConfig.VisualStudio/Integration/PkgCmdIDList.cs
  35. BIN { → src}/EditorConfig.VisualStudio/Key.snk
  36. 0 { → src}/EditorConfig.VisualStudio/License.txt
  37. 0 { → src}/EditorConfig.VisualStudio/Logic/Cleaning/CodeCleanupAvailabilityLogic.cs
  38. 0 { → src}/EditorConfig.VisualStudio/Logic/Cleaning/CodeCleanupManager.cs
  39. 0 { → src}/EditorConfig.VisualStudio/Logic/Cleaning/InitialCleanup.cs
  40. 0 { → src}/EditorConfig.VisualStudio/Logic/Settings/GlobalSettings.cs
  41. 0 { → src}/EditorConfig.VisualStudio/Logic/Settings/LocalSettings.cs
  42. 0 { → src}/EditorConfig.VisualStudio/Logic/Settings/SettingsManager.cs
  43. 0 { → src}/EditorConfig.VisualStudio/Logic/Settings/TextViewMonitor.cs
  44. 0 { → src}/EditorConfig.VisualStudio/Model/CodeItems/BaseCodeItem.cs
  45. 0 { → src}/EditorConfig.VisualStudio/Model/CodeItems/BaseCodeItemElement.cs
  46. 0 { → src}/EditorConfig.VisualStudio/Model/CodeItems/ICodeItem.cs
  47. 0 { → src}/EditorConfig.VisualStudio/Properties/AssemblyInfo.cs
  48. BIN {EditorConfigItemTemplate → src/EditorConfig.VisualStudio/Resources}/EditorConfig.ico
  49. BIN { → src}/EditorConfig.VisualStudio/Resources/EditorConfig.png
  50. BIN { → src}/EditorConfig.VisualStudio/Resources/EditorConfig_Large.png
  51. 0 { → src}/EditorConfig.VisualStudio/VSPackage.resx
  52. 0 { → src}/EditorConfig.VisualStudio/Validation/EditorConfigErrorTag.cs
  53. BIN { → src}/EditorConfig.VisualStudio/logo.png
  54. 0 { → src}/EditorConfig.VisualStudio/paket.references
  55. 0 { → src}/EditorConfig.VisualStudio/source.extension.vsixmanifest
  56. 0 { → src}/EditorConfigItemTemplate/.editorconfig
  57. BIN {EditorConfig.VisualStudio/Resources → src/EditorConfigItemTemplate}/EditorConfig.ico
  58. +3 −3 { → src}/EditorConfigItemTemplate/EditorConfigItemTemplate.csproj
  59. 0 { → src}/EditorConfigItemTemplate/EditorConfigItemTemplate.vstemplate
  60. 0 { → src}/EditorConfigItemTemplate/Properties/AssemblyInfo.cs
  61. 0 { → src}/EditorConfigItemTemplate/paket.references
View
@@ -138,7 +138,7 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
+# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
@@ -147,8 +147,6 @@ publish/
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
-# except build/, which is used as an MSBuild target.
-!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
@@ -189,7 +187,7 @@ ClientBin/
node_modules/
orleans.codegen.cs
-# Since there are multiple workflows, uncomment next line to ignore bower_components
+# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
@@ -244,4 +242,4 @@ _Pvt_Extensions
# JetBrains Rider
.idea/
-*.sln.iml
+*.sln.iml
View
@@ -7,3 +7,4 @@ Tom Potts
Ethan J. Brown
Jed Hunsaker
Steve Cadwallader
+Igal Tabachnik
View
@@ -10,4 +10,4 @@ if errorlevel 1 (
exit /b %errorlevel%
)
-REM packages\build\FAKE\tools\FAKE.exe build.fsx %*
+packages\build\FAKE\tools\FAKE.exe build.fsx %*
View
@@ -0,0 +1,256 @@
+// --------------------------------------------------------------------------------------
+// FAKE build script
+// --------------------------------------------------------------------------------------
+
+#r @"packages/build/FAKE/tools/FakeLib.dll"
+open Fake
+open Fake.Git
+open Fake.AssemblyInfoFile
+open Fake.ReleaseNotesHelper
+open System
+open System.IO
+open System.Text.RegularExpressions
+
+// Information about the project are used
+// - for version and project name in generated AssemblyInfo file
+// - by the generated NuGet package
+// - to run tests and to publish documentation on GitHub gh-pages
+// - for documentation, you also need to edit info in "docs/tools/generate.fsx"
+
+// The name of the project
+// (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src')
+let project = "EditorConfig.VisualStudio"
+
+// Short summary of the project
+// (used as description in AssemblyInfo and as a short summary for NuGet package)
+let summary = "Loads editor options such as indentation sizes from standard, cross-platform .editorconfig files on a per project/solution basis."
+
+// Longer description of the project
+// (used as a description for NuGet package; line breaks are automatically cleaned up)
+let description = "Loads editor options such as indentation sizes from standard, cross-platform .editorconfig files on a per project/solution basis."
+// List of author names (for NuGet package)
+let authors =
+ File.ReadAllText "CONTRIBUTORS"
+ |> splitStr "\n"
+ |> List.skip 2
+ |> List.map (fun l -> l.Trim());
+// Tags for your project (for NuGet package)
+let tags = "editor, code editor, text editor, tabs, whitespace, indentation, newlines"
+
+// File system information
+// (<solutionFile>.sln is built during the building process)
+let solutionFile = "EditorConfig.VisualStudio"
+// Pattern specifying assemblies to be tested using NUnit
+let testAssemblies = "tests/**/bin/Release/*Tests*.dll"
+
+// Git configuration (used for publishing documentation in gh-pages branch)
+// The profile where the project is posted
+let gitOwner = "editorconfig"
+
+// The name of the project on GitHub
+let gitName = "EditorConfig.VisualStudio"
+let cloneUrl = "https://github.com/editorconfig/editorconfig-visualstudio.git"
+
+// Read additional information from the release notes document
+Environment.CurrentDirectory <- __SOURCE_DIRECTORY__
+let release = parseReleaseNotes (IO.File.ReadAllLines "release-notes.md")
+
+let isAppVeyorBuild = environVar "APPVEYOR" <> null
+let buildVersion = sprintf "%s-a%s" release.NugetVersion (DateTime.UtcNow.ToString "yyMMddHHmm")
+
+let buildDir = "bin"
+let vsixDir = "bin/vsix"
+let tempDir = "temp"
+let buildMergedDir = buildDir @@ "merged"
+
+Target "BuildVersion" (fun _ ->
+ Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
+)
+
+// Generate assembly info files with the right version & up-to-date information
+Target "AssemblyInfo" (fun _ ->
+ let shared =
+ [ Attribute.Product project
+ Attribute.Description summary
+ Attribute.Version release.AssemblyVersion
+ Attribute.FileVersion release.AssemblyVersion ]
+
+ CreateCSharpAssemblyInfo "src/EditorConfig.VisualStudio/Properties/AssemblyInfo.cs"
+ (Attribute.InternalsVisibleTo "EditorConfig.VisualStudio.Tests" :: Attribute.Title "EditorConfig.VisualStudio" :: shared)
+
+ let manifest = "src/EditorConfig.VisualStudio/source.extension.vsixmanifest"
+ File.WriteAllLines(
+ manifest,
+ File.ReadAllLines manifest
+ |> Array.map (fun l -> if l.Contains("<Version>") then sprintf " <Version>%s</Version>" release.NugetVersion else l))
+
+)
+
+// --------------------------------------------------------------------------------------
+// Clean build results
+
+Target "Clean" (fun _ ->
+ CleanDirs [buildDir; vsixDir; tempDir; "nuget"]
+)
+
+Target "CleanDocs" (fun _ ->
+ CleanDirs ["docs/output"]
+)
+
+// --------------------------------------------------------------------------------------
+// Build library & test project
+
+Target "Build" (fun _ ->
+ // We would like to build only one solution
+ !! (solutionFile + ".sln")
+ |> MSBuildReleaseExt "" ["VisualStudioVersion", "12.0"] "Rebuild"
+ |> ignore
+)
+
+Target "CleanVSIX" (fun _ ->
+ ZipHelper.Unzip vsixDir "bin/EditorConfig.VisualStudio.vsix"
+ let regex = Regex("bin")
+ let filesToKeep =
+ Directory.GetFiles("bin", "*.dll")
+ |> Seq.map (fun fileName -> regex.Replace(fileName, vsixDir, 1))
+ let filesToDelete =
+ Seq.fold (--) (!! "bin/vsix/*.dll") filesToKeep
+ ++ "bin/vsix/Microsoft.VisualStudio*"
+ ++ "bin/vsix/Microsoft.Build*"
+ DeleteFiles filesToDelete
+
+ CreateDir buildMergedDir
+
+ let filesToPack =
+ ["EditorConfig.VisualStudio.dll"; "EditorConfig.Core.dll"; "FSharp.Core.dll"; "Newtonsoft.Json.dll" ; "Chessie.dll";
+ "ReactiveUI.dll"; "ReactiveUI.Events.dll"; "Splat.dll"; "System.Reactive.Core.dll"; "System.Reactive.Interfaces.dll"; "System.Reactive.Linq.dll"; "System.Reactive.PlatformServices.dll"; "System.Reactive.Windows.Threading.dll"]
+ |> List.map (fun l -> vsixDir @@ l)
+
+ let toPack = filesToPack |> separated " "
+
+ let result =
+ ExecProcess (fun info ->
+ info.FileName <- currentDirectory </> "packages" </> "build" </> "ILRepack" </> "tools" </> "ILRepack.exe"
+ info.Arguments <- sprintf "/verbose /lib:%s /ver:%s /out:%s %s" vsixDir release.AssemblyVersion (buildMergedDir </> "Paket.VisualStudio.dll") toPack
+ ) (TimeSpan.FromMinutes 5.)
+
+ if result <> 0 then failwithf "Error during ILRepack execution."
+
+ DeleteFiles filesToPack
+ CopyFile vsixDir (buildMergedDir </> "Paket.VisualStudio.dll")
+
+ ZipHelper.Zip vsixDir "bin/Paket.VisualStudio.vsix" (!! "bin/vsix/**")
+)
+
+// --------------------------------------------------------------------------------------
+// Generate the documentation
+
+Target "GenerateDocs" (fun _ ->
+ executeFSIWithArgs "docs/tools" "generate.fsx" ["--define:RELEASE"] [] |> ignore
+)
+
+// --------------------------------------------------------------------------------------
+// Release Scripts
+
+Target "ReleaseDocs" (fun _ ->
+ let tempDocsDir = "temp/gh-pages"
+ CleanDir tempDocsDir
+ Repository.cloneSingleBranch "" cloneUrl "gh-pages" tempDocsDir
+
+ fullclean tempDocsDir
+ CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A"
+ StageAll tempDocsDir
+ Git.Commit.Commit tempDocsDir (sprintf "[skip ci] Update generated documentation for version %s" release.NugetVersion)
+ Branches.push tempDocsDir
+)
+
+(*#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
+open Octokit
+
+#I @"packages/build/Selenium.Support/lib/net40"
+#I @"packages/build/Selenium.WebDriver/lib/net40"
+#r @"packages/build/Newtonsoft.Json/lib/net40/Newtonsoft.Json.dll"
+#r @"packages/build/Selenium.Support/lib/net40/WebDriver.Support.dll"
+#r @"packages/build/Selenium.WebDriver/lib/net40/WebDriver.dll"
+#r @"packages/build/canopy/lib/canopy.dll"
+#r @"packages/build/SizSelCsZzz/lib/SizSelCsZzz.dll"
+open canopy
+open runner
+open System
+
+Target "ReleaseToGitHub" (fun _ ->
+ StageAll ""
+ Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion)
+ Branches.pushBranch "" "origin" (Information.getBranchName "")
+
+ Branches.tag "" release.NugetVersion
+ Branches.pushTag "" "origin" release.NugetVersion
+
+ // release on github
+ createClient (getBuildParamOrDefault "github-user" "") (getBuildParamOrDefault "github-pw" "")
+ |> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
+ |> uploadFile "./bin/EditorConfig.VisualStudio.vsix"
+ |> releaseDraft
+ |> Async.RunSynchronously
+)
+
+
+Target "UploadToGallery" (fun _ ->
+ canopy.configuration.chromeDir <- @"./packages/build/Selenium.WebDriver.ChromeDriver/driver"
+ start chrome
+
+ let vsixGuid = "ce104917-e8b3-4365-9490-8432c6e75c36"
+ let galleryUrl = sprintf "https://visualstudiogallery.msdn.microsoft.com/%s/edit?newSession=True" vsixGuid
+
+ let username,password =
+ let lines = File.ReadAllLines("gallerycredentials.txt")
+ lines.[0],lines.[1]
+
+ // log in to msdn
+ url galleryUrl
+ "#i0116" << username
+ "#i0118" << password
+
+ click "#idSIButton9"
+
+ sleep 5
+ // start a new upload session - via hacky form link
+ js (sprintf "$('form[action=\"/%s/edit/changeContributionUpload\"]').submit();" vsixGuid) |> ignore
+
+ // select "upload the vsix"
+ let fi = System.IO.FileInfo("bin/EditorConfig.VisualStudio.vsix")
+
+ ".uploadFileInput" << fi.FullName
+ click "#setContributionTypeButton"
+
+ sleep 15
+
+ click "#uploadButton"
+
+ sleep 15
+
+ quit()
+)
+*)
+
+
+// --------------------------------------------------------------------------------------
+// Run main targets by default. Invoke 'build <Target>' to override
+
+Target "Release" DoNothing
+Target "Default" DoNothing
+
+"Clean"
+ =?> ("BuildVersion", isAppVeyorBuild)
+ ==> "AssemblyInfo"
+ ==> "Build"
+ //==> "CleanVSIX"
+ ==> "Default"
+ (*==> "CleanDocs"
+ ==> "GenerateDocs"
+ ==> "ReleaseDocs"
+ ==> "ReleaseToGitHub"
+ ==> "UploadToGallery"*)
+ ==> "Release"
+
+RunTargetOrDefault "Default"
View
@@ -31,3 +31,8 @@ nuget VSSDK.Text 11.0.4 copy_local: false
nuget VSSDK.Text.11 11.0.4 copy_local: false
nuget VSSDK.TextManager.Interop 7.0.4 copy_local: false
nuget VSSDK.TextManager.Interop.8 8.0.4 copy_local: false
+
+group build
+source https://api.nuget.org/v3/index.json
+
+nuget FAKE
View
@@ -105,3 +105,9 @@ NUGET
VSSDK.OLE.Interop (>= 7.0.4 < 8.0.0)
VSSDK.Shell.Interop (>= 7.0.4 < 8.0.0)
VSSDK.TextManager.Interop (>= 7.0.4 < 8.0.0)
+
+GROUP Build
+NUGET
+ remote: http://api.nuget.org/v3/index.json
+ specs:
+ FAKE (4.22.0)
@@ -3,20 +3,22 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{5C2A67A1-08E3-45C3-AF51-C5652DDC4BE3}"
- ProjectSection(SolutionItems) = preProject
- paket.dependencies = paket.dependencies
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.VisualStudi", "EditorConfig.VisualStudio\EditorConfig.VisualStudio.csproj", "{FEAAE923-0664-4072-903F-0C833CD43D36}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfig.VisualStudio", "EditorConfig.VisualStudio\EditorConfig.VisualStudio.csproj", "{FEAAE923-0664-4072-903F-0C833CD43D36}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EditorConfigItemTemplate", "EditorConfigItemTemplate\EditorConfigItemTemplate.csproj", "{C812CBA0-F505-458A-A984-1B6C5B64DFF0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{947E4BAB-59E4-4953-A9C1-A6A81A6EF229}"
ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- .gitattributes = .gitattributes
- .gitignore = .gitignore
+ ..\.editorconfig = ..\.editorconfig
+ ..\.gitattributes = ..\.gitattributes
+ ..\.gitignore = ..\.gitignore
+ ..\build.cmd = ..\build.cmd
+ ..\build.fsx = ..\build.fsx
+ ..\CONTRIBUTORS = ..\CONTRIBUTORS
+ ..\LICENSE = ..\LICENSE
+ ..\paket.dependencies = ..\paket.dependencies
+ ..\readme.md = ..\readme.md
+ ..\release-notes.md = ..\release-notes.md
EndProjectSection
EndProject
Global
Oops, something went wrong.

0 comments on commit af464dc

Please sign in to comment.