Showing preview only (804K chars total). Download the full file or copy to clipboard to get everything.
Repository: James231/Start-Menu-Manager
Branch: master
Commit: 577e5ce171b4
Files: 154
Total size: 755.0 KB
Directory structure:
gitextract_gz0lcu5f/
├── .gitignore
├── CustomAnalysisRules.Test.ruleset
├── CustomAnalysisRules.ruleset
├── Directory.Build.props
├── LICENSE
├── README.md
├── StartMenuManager.sln
├── src/
│ ├── HL/
│ │ ├── AssemblyInfo.cs
│ │ ├── HL.csproj
│ │ ├── HighlightingTheme/
│ │ │ ├── GlobalStyle.cs
│ │ │ └── SyntaxDefinition.cs
│ │ ├── Interfaces/
│ │ │ ├── IHLTheme.cs
│ │ │ └── IThemedHighlightingManager.cs
│ │ ├── LICENSE
│ │ ├── Manager/
│ │ │ ├── BusyManager.cs
│ │ │ ├── DefaultHighlightingManager.cs
│ │ │ ├── DelayLoadedHighlightingDefinition.cs
│ │ │ ├── ExtensionMethods.cs
│ │ │ ├── HLTheme.cs
│ │ │ ├── HighlightingBrush.cs
│ │ │ ├── HighlightingLoader.cs
│ │ │ ├── HighlightingThemeLoader.cs
│ │ │ ├── ThemedHighlightingManager.cs
│ │ │ ├── V2Loader.cs
│ │ │ ├── XmlHighlightingDefinition.cs
│ │ │ └── XshtdLoader.cs
│ │ ├── Modes/
│ │ │ ├── ModeV1.xsd
│ │ │ ├── ModeV2.xsd
│ │ │ └── ModeV2_htd.xsd
│ │ ├── Resources/
│ │ │ ├── HLResources.cs
│ │ │ ├── Light/
│ │ │ │ ├── AS3.xshd
│ │ │ │ ├── ASPX.xshd
│ │ │ │ ├── Boo.xshd
│ │ │ │ ├── CPP-Mode.xshd
│ │ │ │ ├── CSS-Mode.xshd
│ │ │ │ ├── CSharp-Mode.xshd
│ │ │ │ ├── Coco-Mode.xshd
│ │ │ │ ├── DOSBATCH.xshd
│ │ │ │ ├── FSharp-Mode.xshd
│ │ │ │ ├── GRazor-Mode.xshd
│ │ │ │ ├── Gcode.xshd
│ │ │ │ ├── HLSL.xshd
│ │ │ │ ├── HTML-Mode.xshd
│ │ │ │ ├── INI.xshd
│ │ │ │ ├── Java-Mode.xshd
│ │ │ │ ├── JavaScript-Mode.xshd
│ │ │ │ ├── Log.xshd
│ │ │ │ ├── MarkDown-Mode.xshd
│ │ │ │ ├── PHP-Mode.xshd
│ │ │ │ ├── PLSQL.xshd
│ │ │ │ ├── Pascal.xshd
│ │ │ │ ├── Patch-Mode.xshd
│ │ │ │ ├── PowerShell.xshd
│ │ │ │ ├── Python-Mode.xshd
│ │ │ │ ├── Ruby.xshd
│ │ │ │ ├── TSQL-Mode.xshd
│ │ │ │ ├── TXT.xshd
│ │ │ │ ├── Tex-Mode.xshd
│ │ │ │ ├── VB-Mode.xshd
│ │ │ │ ├── XML-Mode.xshd
│ │ │ │ ├── XmlDoc.xshd
│ │ │ │ ├── scheme.xshd
│ │ │ │ ├── squirrel.xshd
│ │ │ │ └── vtl.xshd
│ │ │ └── Themes/
│ │ │ ├── Dark.xshtd
│ │ │ ├── TrueBlue.xshtd
│ │ │ └── VS2019_Dark.xshtd
│ │ └── Xshtd/
│ │ ├── IXshtdVisitor.cs
│ │ ├── XhstdThemeDefinition.cs
│ │ ├── XmlHighlightingThemeDefinition.cs
│ │ ├── XshtdColor.cs
│ │ ├── XshtdElement.cs
│ │ ├── XshtdGlobalStyle.cs
│ │ ├── XshtdGlobalStyles.cs
│ │ ├── XshtdSyntaxDefinition.cs
│ │ └── interfaces/
│ │ ├── IFreezable.cs
│ │ ├── IHighlightingDefinitionReferenceResolver.cs
│ │ └── IHighlightingThemeDefinition.cs
│ ├── StartMenuManager.Builder/
│ │ ├── App.config
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ └── StartMenuManager.Builder.csproj
│ ├── StartMenuManager.Core/
│ │ ├── DataStructures/
│ │ │ ├── Action.cs
│ │ │ ├── Actions/
│ │ │ │ ├── CommandAction.cs
│ │ │ │ ├── FileAction.cs
│ │ │ │ ├── FolderAction.cs
│ │ │ │ ├── SoftwareAction.cs
│ │ │ │ └── WebsiteAction.cs
│ │ │ ├── Config.cs
│ │ │ ├── SettingsConfig.cs
│ │ │ ├── Shortcut.cs
│ │ │ └── ValidationError.cs
│ │ ├── Serialization/
│ │ │ └── Serializer.cs
│ │ └── StartMenuManager.Core.csproj
│ ├── StartMenuManager.GUI/
│ │ ├── App.config
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Builder.cs
│ │ ├── Dialogs/
│ │ │ ├── MessageDialog.cs
│ │ │ ├── SettingsDialog.cs
│ │ │ └── YesNoDialog.cs
│ │ ├── Extensions/
│ │ │ └── ActionExtensions.cs
│ │ ├── IconExtractorWindow.xaml
│ │ ├── IconExtractorWindow.xaml.cs
│ │ ├── JsonViewManager.cs
│ │ ├── LowerMenuBar.cs
│ │ ├── MainWindow.xaml
│ │ ├── MainWindow.xaml.cs
│ │ ├── Properties/
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ ├── Resources.resx
│ │ │ ├── Settings.Designer.cs
│ │ │ └── Settings.settings
│ │ ├── Runner.cs
│ │ ├── Serialization/
│ │ │ ├── IconManager.cs
│ │ │ └── JsonSerializer.cs
│ │ ├── ShortcutControl.xaml
│ │ ├── ShortcutControl.xaml.cs
│ │ ├── ShortcutListArea.cs
│ │ ├── StartMenuManager.GUI.csproj
│ │ ├── Structures/
│ │ │ ├── DialogTypes.cs
│ │ │ └── ShortcutType.cs
│ │ ├── SubShortcutControl.xaml
│ │ ├── SubShortcutControl.xaml.cs
│ │ ├── TitleBarButtons.cs
│ │ ├── Utils/
│ │ │ ├── DialogManager.cs
│ │ │ ├── IconExtractorWindow_TitleBarControl.cs
│ │ │ ├── ThemeManager.cs
│ │ │ ├── TitleBarControl.cs
│ │ │ └── WindowRef.cs
│ │ ├── WelcomeCard.cs
│ │ └── app.manifest
│ ├── StartMenuManager.GUI.Installer/
│ │ ├── Product.wxs
│ │ ├── StartMenuManager.GUI.Installer.wixproj
│ │ └── netchecker.wxs
│ ├── StartMenuManager.PreUninstall/
│ │ ├── App.config
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ └── StartMenuManager.PreUninstall.csproj
│ ├── StartMenuManager.Runner/
│ │ ├── App.config
│ │ ├── Program.cs
│ │ ├── Properties/
│ │ │ └── AssemblyInfo.cs
│ │ └── StartMenuManager.Runner.csproj
│ └── TextEditLib/
│ ├── AssemblyInfo.cs
│ ├── Extensions/
│ │ └── HighlightCurrentLineBackgroundRenderer.cs
│ ├── TextEdit.xaml
│ ├── TextEdit.xaml.cs
│ ├── TextEditLib.csproj
│ └── Themes/
│ ├── DarkBrushs.xaml
│ ├── Generic.xaml
│ ├── Icons.xaml
│ ├── LightBrushs.xaml
│ └── ResourceKeys.cs
└── stylecop.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: 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
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
================================================
FILE: CustomAnalysisRules.Test.ruleset
================================================
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Analysis Rules for Test" Description="Code analysis rules used for test projects." ToolsVersion="14.0">
<Include Path="CustomAnalysisRules.ruleset" Action="Default" />
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1652" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
<Rule Id="CA1707" Action="None" />
<Rule Id="CA1000" Action="None" />
<Rule Id="CA1008" Action="None" />
<Rule Id="CA1010" Action="None" />
<Rule Id="CA1012" Action="None" />
<Rule Id="CA1014" Action="None" />
<Rule Id="CA1016" Action="None" />
<Rule Id="CA1017" Action="None" />
<Rule Id="CA1018" Action="None" />
<Rule Id="CA1024" Action="None" />
<Rule Id="CA1027" Action="None" />
<Rule Id="CA1028" Action="None" />
<Rule Id="CA1030" Action="None" />
<Rule Id="CA1033" Action="None" />
<Rule Id="CA1034" Action="None" />
<Rule Id="CA1036" Action="None" />
<Rule Id="CA1040" Action="None" />
<Rule Id="CA1041" Action="None" />
<Rule Id="CA1043" Action="None" />
<Rule Id="CA1044" Action="None" />
<Rule Id="CA1050" Action="None" />
<Rule Id="CA1051" Action="None" />
<Rule Id="CA1052" Action="None" />
<Rule Id="CA1054" Action="None" />
<Rule Id="CA1055" Action="None" />
<Rule Id="CA1056" Action="None" />
<Rule Id="CA1060" Action="None" />
<Rule Id="CA1061" Action="None" />
<Rule Id="CA1063" Action="None" />
<Rule Id="CA1064" Action="None" />
<Rule Id="CA1065" Action="None" />
<Rule Id="CA1066" Action="None" />
<Rule Id="CA1067" Action="None" />
<Rule Id="CA1068" Action="None" />
<Rule Id="CA1507" Action="None" />
<Rule Id="CA1708" Action="None" />
<Rule Id="CA1710" Action="None" />
<Rule Id="CA1711" Action="None" />
<Rule Id="CA1714" Action="None" />
<Rule Id="CA1715" Action="None" />
<Rule Id="CA1716" Action="None" />
<Rule Id="CA1717" Action="None" />
<Rule Id="CA1720" Action="None" />
<Rule Id="CA1721" Action="None" />
<Rule Id="CA1724" Action="None" />
<Rule Id="CA1725" Action="None" />
<Rule Id="CA1801" Action="None" />
<Rule Id="CA1802" Action="None" />
<Rule Id="CA1806" Action="None" />
<Rule Id="CA1812" Action="None" />
<Rule Id="CA1814" Action="None" />
<Rule Id="CA1815" Action="None" />
<Rule Id="CA1819" Action="None" />
<Rule Id="CA1822" Action="None" />
<Rule Id="CA1823" Action="None" />
<Rule Id="CA2007" Action="None" />
<Rule Id="CA2119" Action="None" />
<Rule Id="CA2211" Action="None" />
<Rule Id="CA2214" Action="None" />
<Rule Id="CA2217" Action="None" />
<Rule Id="CA2219" Action="None" />
<Rule Id="CA2222" Action="None" />
<Rule Id="CA2225" Action="None" />
<Rule Id="CA2226" Action="None" />
<Rule Id="CA2227" Action="None" />
<Rule Id="CA2231" Action="None" />
<Rule Id="CA2244" Action="None" />
<Rule Id="CA9999" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.NetCore.CSharp.Analyzers" RuleNamespace="Microsoft.NetCore.CSharp.Analyzers">
<Rule Id="CA1309" Action="None" />
<Rule Id="CA1414" Action="None" />
<Rule Id="CA1601" Action="None" />
<Rule Id="CA1810" Action="None" />
<Rule Id="CA1824" Action="None" />
<Rule Id="CA1825" Action="None" />
<Rule Id="CA2010" Action="None" />
<Rule Id="CA2201" Action="None" />
<Rule Id="CA2205" Action="None" />
<Rule Id="CA2207" Action="None" />
<Rule Id="CA2215" Action="None" />
<Rule Id="CA5350" Action="None" />
<Rule Id="CA5351" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers">
<Rule Id="CA1304" Action="None" />
<Rule Id="CA1305" Action="None" />
<Rule Id="CA1307" Action="None" />
<Rule Id="CA1308" Action="None" />
<Rule Id="CA1401" Action="None" />
<Rule Id="CA1813" Action="None" />
<Rule Id="CA1816" Action="None" />
<Rule Id="CA1820" Action="None" />
<Rule Id="CA1826" Action="None" />
<Rule Id="CA2002" Action="None" />
<Rule Id="CA2008" Action="None" />
<Rule Id="CA2009" Action="None" />
<Rule Id="CA2101" Action="None" />
<Rule Id="CA2208" Action="None" />
<Rule Id="CA2216" Action="None" />
<Rule Id="CA2241" Action="None" />
<Rule Id="CA2242" Action="None" />
<Rule Id="CA2243" Action="None" />
<Rule Id="CA9999" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeQuality.CSharp.Analyzers" RuleNamespace="Microsoft.CodeQuality.CSharp.Analyzers">
<Rule Id="Async001" Action="None" />
<Rule Id="Async002" Action="None" />
<Rule Id="Async003" Action="None" />
<Rule Id="Async004" Action="None" />
<Rule Id="Async005" Action="None" />
<Rule Id="Async006" Action="None" />
<Rule Id="CA1001" Action="None" />
<Rule Id="CA1003" Action="None" />
<Rule Id="CA1019" Action="None" />
<Rule Id="CA1032" Action="None" />
<Rule Id="CA1200" Action="None" />
<Rule Id="CA1500" Action="None" />
<Rule Id="CA1726" Action="None" />
<Rule Id="CA1821" Action="None" />
<Rule Id="CA2000" Action="None" />
<Rule Id="CA2001" Action="None" />
<Rule Id="CA2109" Action="None" />
<Rule Id="CA2200" Action="None" />
<Rule Id="CA2234" Action="None" />
</Rules>
</RuleSet>
================================================
FILE: CustomAnalysisRules.ruleset
================================================
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Analysis Rules" Description="Code analysis rules." ToolsVersion="14.0">
<Include Path="minimumrecommendedrules.ruleset" Action="Default" />
<Include Path="securityrules.ruleset" Action="Default" />
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
<Rule Id="IDE0003" Action="Warning" />
<Rule Id="IDE0004" Action="Warning" />
<Rule Id="IDE0005" Action="Warning" />
<Rule Id="IDE1005" Action="Warning" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="CS1591" Action="None" />
<Rule Id="SA0001" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1308" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1512" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1615" Action="None" />
<Rule Id="SA1623" Action="None" />
<Rule Id="SA1629" Action="None" />
<Rule Id="SA1652" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
<Rule Id="CA2007" Action="Info" />
<Rule Id="CA1716" Action="Info" />
<Rule Id="CA1054" Action="Info" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeQuality.CSharp.Analyzers" RuleNamespace="Microsoft.CodeQuality.CSharp.Analyzers">
<Rule Id="CA1032" Action="Info" />
</Rules>
<Rules AnalyzerId="Microsoft.NetCore.Analyzers" RuleNamespace="Microsoft.NetCore.Analyzers">
<Rule Id="CA1305" Action="Info" />
</Rules>
</RuleSet>
================================================
FILE: Directory.Build.props
================================================
<Project>
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<DebugType>Full</DebugType>
<LangVersion>7.3</LangVersion>
<HighEntropyVA>true</HighEntropyVA>
<EnableSourceLink Condition="$([MSBuild]::IsOSPlatform('osx'))">false</EnableSourceLink>
<EnableSourceControlManagerQueries>$(EnableSourceLink)</EnableSourceControlManagerQueries>
<!--This will target the latest patch release of the runtime released with the current SDK. -->
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
</PropertyGroup>
<PropertyGroup Condition=" '$(EnableSourceLink)' == 'true' ">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>
<Choose>
<When Condition="$(MSBuildProjectName.Contains('Test'))">
<PropertyGroup>
<IsPackable>false</IsPackable>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\CustomAnalysisRules.Test.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<IsPackable>true</IsPackable>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)\CustomAnalysisRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\stylecop.json" Link="stylecop.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
</ItemGroup>
</Project>
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2019 James231
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Start Menu Manager
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MLD56V6HQWCKU&source=url)
<img align="left" width="64" height="64" src="https://cdn.jam-es.com/img/start-menu-manager/icon.png">
Windows 10 App to improve you productivity with shortcuts. See the features below:
:star: :star: :star: And if you like it ... please star it! :star: :star: :star:
Introduction Video:
[<img width="640" height="360" src="https://cdn.jam-es.com/img/start-menu-manager/thumbnail.png">](https://youtu.be/22APfw-ZSxI)
### Add Shorcuts to Start Menu
The app lets you add any kind of shortcut to the Start Menu:
- Website Shorcuts
- Software Shorcuts
- File Shorcuts
- Folder Shorcuts
- Shorcuts to run Commands/Scripts
- 'Group' Shortcuts which open multiple things at the same time
### Add Shortcuts Anywhere
Once created, those shorcuts can be moved or added elsewhere. They can be pinned to the Start Menu, added to the Taskbar, added to your Desktop, or put anywhere you like.
### Fixes Windows 10 Bugs
Windows 10 Search is buggy and inconsistent. Sometimes you might type in the exact name of an app, but get redirected to Bing search results inside a web brower.
Start Menu Manager fixes this. All shorctuts are treated like apps so they get priority in Windows 10 Search and appear at the top of the search results.
### Additional Features
- Clean modern Graphical Interface with light/dark themes.
- Want an icon for your shortcut? The app can extract images from your favorite websites to use as shortcut icons.
- Or provide custom icons as `.ico` files.
- Shortcuts can be saved to JSON format so you can copy them between devices.
- You can also generate the shortcuts from JSON using a terminal to avoid the GUI.
- If you don't like it, uninstallation removes all shortcuts and leaves no 'junk' behind.
- No performance loss as no background processes are used. Apps will start with an almost unnoticable overhead.
## Screenshots
Click for full size.
[<img width="108" height="103" src="https://cdn.jam-es.com/img/start-menu-manager/screen1.png">](https://cdn.jam-es.com/img/start-menu-manager/screen1.png)
[<img width="129" height="83" src="https://cdn.jam-es.com/img/start-menu-manager/screen2.png">](https://cdn.jam-es.com/img/start-menu-manager/screen2.png)
[<img width="154" height="80" src="https://cdn.jam-es.com/img/start-menu-manager/screen3.png">](https://cdn.jam-es.com/img/start-menu-manager/screen3.png)
## Installation
Requires Windows 10 with recent updates.
**Disclaimer:** The app needs to run with Administrator privileges, so it can access the directories to place the shortcuts. If you don't have Administrator privileges, then it won't work.
1. Go to the [GitHub Releases page](https://github.com/James231/Start-Menu-Manager/releases).
2. Scroll Down and download the `.msi` file in the 'Assets' section.
3. Run the installer to install the software.
## How to Use
It should be intuitive from the app, but just in case ...
1. Open the 'Start Menu Manager' app through the Start Menu.
2. Click the 'Add Shortcut' button to begin creating a shorcut.
3. Change the 'Shortcut Name'. This will be the name which appears in the Start Menu and Windows Search.
4. Change the 'Shortcut Type' to the kind of shortcut you want to create. And fill in the details for that type. E.g. Set the 'Website Url' for Web shortcuts.
5. Next to 'Icon' press 'Select from Website' to pick an icon from your favorite website.
6. Create as many shortcuts as you want in the same way.
7. Press 'Generate' to create the shortcuts. You'll see them added to the start menu under 'Recently Added'.
**Optional:**
8. In the Start Menu, right click on the shortcut to pin it, or add it to the Taskbar.
9. Naviagate to the Start Menu folder through the App Settings and copy the shortcut to wherever you want it.
**Note:** When generating the shorcuts, icons might not immediatley be displayed correctly in the Start Menu. This is a bug with Windows. One fix is to look in the 'Display' settings in the Windows 10 Settings App. Change the 'Scale and Layout' percentage, wait a few seconds, then change it back again.
## Uninstall
Open the 'Apps & Features' page in the Windows 10 Settings app. Select 'Start Menu Manager' and select 'Uninstall'. Everything is removed, including the shorctuts you created with the tool.
## Building the App from Source
If you want to get your hands dirty you can build from the source code. Just clone the repository and open the solution (`.sln`) in Visual Studio 2019 or later.
The `StartMenuManager.GUI` project contains the main WPF application. `StartMenuManager.Builder` is a console app which creates the shorcuts a from JSON file. `StartMenuManager.Runner` is a console app used to run the Shortcuts when they are clicked. There are a few other class libraries, a project which acts as an uninstallation step, and an Wix installer project.
VS may prompt you to open as an administrator, since running the app requires those privileges.
Once built, the various console apps (`.exe` files with `.dll`s) need to be put in the correct locations relative to each other. See the `Program Files` of an installed version of the app to see the correct setup.
## License
This code is released under MIT license. This means you can use this for whatever you want. Modify, distribute, sell, fork, and use this as much as you like. Both for personal and commercial use. I hold no responsibility if anything goes wrong.
If you use this, you don't need to refer to this repo, or give me any kind of credit but it would be appreciated. At least a :star: would be nice.
It took a lot of work to make this available for free. If you are feeling more generous, perhaps you could consider donating?
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MLD56V6HQWCKU&source=url)
## Contributing
Pull Requests are welcome. But, note that by creating a pull request you are giving me permission to merge your code and release it under the MIT license mentioned above. At no point will you be able to withdraw merged code from the repository, or change the license under which it has been made available.
## References
This wouldn't have been possible without ...
[Material Design In Xaml](http://materialdesigninxaml.net/) - The WPF styles used in this app.
[AvalonEdit](http://avalonedit.net/) - The code editor WPF control used for the JSON editing in the app.
[AvalonEditHighlightingThemes](https://github.com/Dirkster99/AvalonEditHighlightingThemes) - Implementation of Themes in AvalonEdit. Used for light/dark JSON editing themes.
[FontAwesome.WPF](https://www.nuget.org/packages/FontAwesome.WPF/) - Only used for the loading spinner on the Icon Extractor page.
[Json.NET](https://www.newtonsoft.com/json) - JSON serializer.
[JsonSubTypes](https://www.newtonsoft.com/json) - JSON SubType implementation for Json.NET.
[Wix Toolset](https://wixtoolset.org/) - Used to create the `.msi` installer.
... and obvious credit to Microsoft for C#, WPF, .NET, and the best OS in existence :)
================================================
FILE: StartMenuManager.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30330.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HL", "src\HL\HL.csproj", "{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartMenuManager.Builder", "src\StartMenuManager.Builder\StartMenuManager.Builder.csproj", "{72692F58-2690-4677-A87B-A686BCAA6FF2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StartMenuManager.Core", "src\StartMenuManager.Core\StartMenuManager.Core.csproj", "{03E687E5-87C9-4234-86F9-1E746E428764}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartMenuManager.GUI", "src\StartMenuManager.GUI\StartMenuManager.GUI.csproj", "{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartMenuManager.PreUninstall", "src\StartMenuManager.PreUninstall\StartMenuManager.PreUninstall.csproj", "{E9C16107-0F20-4B36-A65F-54D4290736AB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartMenuManager.Runner", "src\StartMenuManager.Runner\StartMenuManager.Runner.csproj", "{567580BE-01CE-420C-86F5-1E91EF50BEEE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TextEditLib", "src\TextEditLib\TextEditLib.csproj", "{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}"
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "StartMenuManager.GUI.Installer", "src\StartMenuManager.GUI.Installer\StartMenuManager.GUI.Installer.wixproj", "{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Debug|x86.ActiveCfg = Debug|Any CPU
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Debug|x86.Build.0 = Debug|Any CPU
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Release|Any CPU.Build.0 = Release|Any CPU
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Release|x86.ActiveCfg = Release|Any CPU
{3DFE9408-3EC2-45F6-B814-ACA60A4DA722}.Release|x86.Build.0 = Release|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Debug|x86.ActiveCfg = Debug|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Debug|x86.Build.0 = Debug|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Release|Any CPU.Build.0 = Release|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Release|x86.ActiveCfg = Release|Any CPU
{72692F58-2690-4677-A87B-A686BCAA6FF2}.Release|x86.Build.0 = Release|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Debug|x86.ActiveCfg = Debug|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Debug|x86.Build.0 = Debug|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Release|Any CPU.Build.0 = Release|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Release|x86.ActiveCfg = Release|Any CPU
{03E687E5-87C9-4234-86F9-1E746E428764}.Release|x86.Build.0 = Release|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Debug|x86.ActiveCfg = Debug|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Debug|x86.Build.0 = Debug|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Release|Any CPU.Build.0 = Release|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Release|x86.ActiveCfg = Release|Any CPU
{AB31D486-50B4-4FF1-9E2C-3D8A29FB8EF4}.Release|x86.Build.0 = Release|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Debug|x86.ActiveCfg = Debug|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Debug|x86.Build.0 = Debug|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Release|Any CPU.Build.0 = Release|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Release|x86.ActiveCfg = Release|Any CPU
{E9C16107-0F20-4B36-A65F-54D4290736AB}.Release|x86.Build.0 = Release|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Debug|x86.ActiveCfg = Debug|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Debug|x86.Build.0 = Debug|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Release|Any CPU.Build.0 = Release|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Release|x86.ActiveCfg = Release|Any CPU
{567580BE-01CE-420C-86F5-1E91EF50BEEE}.Release|x86.Build.0 = Release|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Debug|x86.ActiveCfg = Debug|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Debug|x86.Build.0 = Debug|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Release|Any CPU.Build.0 = Release|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Release|x86.ActiveCfg = Release|Any CPU
{3BAB726C-8CFA-4631-80F3-FB05D3CE2D78}.Release|x86.Build.0 = Release|Any CPU
{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Debug|Any CPU.ActiveCfg = Debug|x86
{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Debug|x86.ActiveCfg = Debug|x86
{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Debug|x86.Build.0 = Debug|x86
{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Release|Any CPU.ActiveCfg = Release|x86
{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Release|x86.ActiveCfg = Release|x86
{B7CBB2B3-65E2-44FB-AAD6-9BD76884D09D}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9B76E47D-2E1B-4E6E-B7D2-7D9C00328767}
EndGlobalSection
EndGlobal
================================================
FILE: src/HL/AssemblyInfo.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
using System.Windows;
#pragma warning disable
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
================================================
FILE: src/HL/HL.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFrameworks>net4;netcoreapp3.0</TargetFrameworks>
<UseWPF>true</UseWPF>
<Version>1.0.4</Version>
<AssemblyVersion>1.0.4</AssemblyVersion>
<FileVersion>1.0.4</FileVersion>
<Company>Open Source</Company>
<Product>Dirkster.HL</Product>
<Copyright>2019-2020</Copyright>
<Description>This assembly implements a docking layout system for WPF.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/Dirkster99/HL</PackageProjectUrl>
<RepositoryUrl>https://github.com/Dirkster99/HL</RepositoryUrl>
<PackageId>Dirkster.HL</PackageId>
<Authors>https://github.com/Dirkster99/HL</Authors>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>avalonedit dark-theme light-theme theming highlighting</PackageTags>
<PackageReleaseNotes>Mutlitargetting NetCore3 and Net 4.0</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<None Include="images/icon.png" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<None Remove="Modes\ModeV1.xsd" />
<None Remove="Modes\ModeV2.xsd" />
<None Remove="Modes\ModeV2_htd.xsd" />
<None Remove="Resources\Light\AS3.xshd" />
<None Remove="Resources\Light\ASPX.xshd" />
<None Remove="Resources\Light\Boo.xshd" />
<None Remove="Resources\Light\Coco-Mode.xshd" />
<None Remove="Resources\Light\CPP-Mode.xshd" />
<None Remove="Resources\Light\CSharp-Mode.xshd" />
<None Remove="Resources\Light\CSS-Mode.xshd" />
<None Remove="Resources\Light\DOSBATCH.xshd" />
<None Remove="Resources\Light\FSharp-Mode.xshd" />
<None Remove="Resources\Light\Gcode.xshd" />
<None Remove="Resources\Light\GRazor-Mode.xshd" />
<None Remove="Resources\Light\HLSL.xshd" />
<None Remove="Resources\Light\HTML-Mode.xshd" />
<None Remove="Resources\Light\INI.xshd" />
<None Remove="Resources\Light\Java-Mode.xshd" />
<None Remove="Resources\Light\JavaScript-Mode.xshd" />
<None Remove="Resources\Light\Log.xshd" />
<None Remove="Resources\Light\MarkDown-Mode.xshd" />
<None Remove="Resources\Light\Pascal.xshd" />
<None Remove="Resources\Light\Patch-Mode.xshd" />
<None Remove="Resources\Light\PHP-Mode.xshd" />
<None Remove="Resources\Light\PLSQL.xshd" />
<None Remove="Resources\Light\PowerShell.xshd" />
<None Remove="Resources\Light\Python-Mode.xshd" />
<None Remove="Resources\Light\Ruby.xshd" />
<None Remove="Resources\Light\scheme.xshd" />
<None Remove="Resources\Light\squirrel.xshd" />
<None Remove="Resources\Light\Tex-Mode.xshd" />
<None Remove="Resources\Light\TSQL-Mode.xshd" />
<None Remove="Resources\Light\TXT.xshd" />
<None Remove="Resources\Light\VB-Mode.xshd" />
<None Remove="Resources\Light\vtl.xshd" />
<None Remove="Resources\Light\XML-Mode.xshd" />
<None Remove="Resources\Light\XmlDoc.xshd" />
<None Remove="Resources\Themes\Dark.xshtd" />
<None Remove="Resources\Themes\TrueBlue.xshtd" />
<None Remove="Resources\Themes\VS2019_Dark.xshtd" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Modes\ModeV1.xsd">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Modes\ModeV2.xsd">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Modes\ModeV2_htd.xsd">
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Light\AS3.xshd" />
<EmbeddedResource Include="Resources\Light\ASPX.xshd" />
<EmbeddedResource Include="Resources\Light\Boo.xshd" />
<EmbeddedResource Include="Resources\Light\Coco-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\CPP-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\CSharp-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\CSS-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\DOSBATCH.xshd" />
<EmbeddedResource Include="Resources\Light\FSharp-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\Gcode.xshd" />
<EmbeddedResource Include="Resources\Light\GRazor-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\HLSL.xshd" />
<EmbeddedResource Include="Resources\Light\HTML-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\INI.xshd" />
<EmbeddedResource Include="Resources\Light\Java-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\JavaScript-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\Log.xshd" />
<EmbeddedResource Include="Resources\Light\MarkDown-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\Pascal.xshd" />
<EmbeddedResource Include="Resources\Light\Patch-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\PHP-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\PLSQL.xshd" />
<EmbeddedResource Include="Resources\Light\PowerShell.xshd" />
<EmbeddedResource Include="Resources\Light\Python-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\Ruby.xshd" />
<EmbeddedResource Include="Resources\Light\scheme.xshd" />
<EmbeddedResource Include="Resources\Light\squirrel.xshd" />
<EmbeddedResource Include="Resources\Light\Tex-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\TSQL-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\TXT.xshd" />
<EmbeddedResource Include="Resources\Light\VB-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\vtl.xshd" />
<EmbeddedResource Include="Resources\Light\XML-Mode.xshd" />
<EmbeddedResource Include="Resources\Light\XmlDoc.xshd" />
<EmbeddedResource Include="Resources\Themes\Dark.xshtd" />
<EmbeddedResource Include="Resources\Themes\TrueBlue.xshtd" />
<EmbeddedResource Include="Resources\Themes\VS2019_Dark.xshtd" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AvalonEdit" Version="6.0.1" />
</ItemGroup>
<!-- NuGet Packaging -->
<ItemGroup>
<None Include="LICENSE" Pack="true" PackagePath="" />
</ItemGroup>
<ItemGroup>
<None Update="LICENSE">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
================================================
FILE: src/HL/HighlightingTheme/GlobalStyle.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.HighlightingTheme
{
using HL.Xshtd.interfaces;
using System.Windows.Media;
/// <summary>
/// Implements an object that holds general color and style definitions for the
/// Editor. These style definitions are usually non-highlighting language specific
/// (eg Hyperlink color) and can overwrite existing WPF definition (eg background or
/// foreground color)
/// </summary>
public class GlobalStyle : AbstractFreezable, IFreezable
{
#region fields
private string _TypeName;
private Color? _Foregroundcolor;
private Color? _Backgroundcolor;
private Color? _Bordercolor;
#endregion fields
#region ctors
/// <summary>
/// Construct a named (eg. 'Comment') WordStyle object
/// </summary>
/// <param name="typeName"></param>
public GlobalStyle(string typeName)
: this()
{
this.TypeName = typeName;
}
/// <summary>
/// Hidden standard constructor
/// </summary>
protected GlobalStyle()
{
this.TypeName = string.Empty;
_Foregroundcolor = null;
_Backgroundcolor = null;
_Bordercolor = null;
}
#endregion ctors
#region properties
/// <summary>
/// Typed name of <seealso cref="GlobalStyle"/> object
///
/// (eg 'DefaultStyle', 'NonPrintableCharacter' ...,
/// (this is usually the key in a collection of these styles)
/// </summary>
public string TypeName
{
get
{
return _TypeName;
}
set
{
if (IsFrozen)
throw new System.InvalidOperationException("Property is already frozen.");
_TypeName = value;
}
}
/// <summary>
/// Get/set brush definition for the foreground used in this style
/// </summary>
public Color? foregroundcolor
{
get
{
return _Foregroundcolor;
}
set
{
if (IsFrozen)
throw new System.InvalidOperationException("Property is already frozen.");
_Foregroundcolor = value;
}
}
/// <summary>
/// Get/set brush definition for the background used in this style
/// </summary>
public Color? backgroundcolor
{
get
{
return _Backgroundcolor;
}
set
{
if (IsFrozen)
throw new System.InvalidOperationException("Property is already frozen.");
_Backgroundcolor = value;
}
}
/// <summary>
/// Get/set brush definition for the border used in this style
/// </summary>
public Color? bordercolor
{
get
{
return _Bordercolor;
}
set
{
if (IsFrozen)
throw new System.InvalidOperationException("Property is already frozen.");
_Bordercolor = value;
}
}
#endregion properties
#region methods
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns></returns>
public override string ToString()
{
return "[" + (string.IsNullOrEmpty(this.TypeName) ? string.Empty : this.TypeName) + "]";
}
#endregion methods
}
}
================================================
FILE: src/HL/HighlightingTheme/SyntaxDefinition.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.HighlightingTheme
{
using HL.Xshtd.interfaces;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Utils;
using System;
using System.Collections.Generic;
/// <summary>
/// Implements the object that keeps track of each syntax definition reference
/// within a highlighting theme definition.
/// </summary>
public class SyntaxDefinition : AbstractFreezable, IFreezable
{
#region fields
string _Name;
private readonly Dictionary<string, HighlightingColor> _NamedHighlightingColors;
#endregion fields
#region ctors
/// <summary>
/// Class constructor
/// </summary>
public SyntaxDefinition(string paramName)
: this()
{
this._Name = paramName;
}
/// <summary>
/// Class constructor
/// </summary>
public SyntaxDefinition()
{
this.Extensions = new NullSafeCollection<string>();
_NamedHighlightingColors = new Dictionary<string, HighlightingColor>();
}
#endregion ctors
#region properties
/// <summary>
/// Gets/Sets the name of the color.
/// </summary>
public string Name
{
get
{
return _Name;
}
set
{
if (IsFrozen)
throw new InvalidOperationException();
_Name = value;
}
}
/// <summary>
/// Gets the associated extensions.
/// </summary>
public IList<string> Extensions { get; private set; }
/// <summary>
/// Gets an enumeration of all highlighting colors that are defined
/// for this highlighting pattern (eg. C#) as part of a highlighting theme (eg 'True Blue').
/// </summary>
public IEnumerable<HighlightingColor> NamedHighlightingColors
{
get
{
return _NamedHighlightingColors.Values;
}
}
#endregion properties
#region methods
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns></returns>
public override string ToString()
{
return "[" + GetType().Name + " " + (string.IsNullOrEmpty(this.Name) ? string.Empty : this.Name) + "]";
}
/// <summary>
/// Gets a named color definition or null.
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public HighlightingColor ColorGet(string name)
{
HighlightingColor color;
if (_NamedHighlightingColors.TryGetValue(name, out color))
return color;
return null;
}
/// <summary>
/// Adds another named color definition.
/// Exceptions:
/// <see cref="System.ArgumentNullException"/>
/// key is null.
///
/// <see cref="System.ArgumentException"/>
/// An element with the same key already exists in the System.Collections.Generic.Dictionary`2.
/// </summary>
/// <param name="color"></param>
public void ColorAdd(HighlightingColor color)
{
_NamedHighlightingColors.Add(color.Name, color);
}
internal void ColorReplace(string name, HighlightingColor themeColor)
{
_NamedHighlightingColors.Remove(name);
_NamedHighlightingColors.Add(name, themeColor);
}
#endregion methods
}
}
================================================
FILE: src/HL/Interfaces/IHLTheme.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - © Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using System.Collections.ObjectModel;
using HL.HighlightingTheme;
using HL.Xshtd;
using HL.Xshtd.interfaces;
using ICSharpCode.AvalonEdit.Highlighting;
/// <summary>
/// Defines a highlighting theme which is based on a WPF theme (eg. 'Light')
/// with a corresponding set of highlighting definitions (eg. 'XML', 'C#' etc)
/// to ensure that highlightings are correct in the contecxt of
/// (different background colors) WPF themes.
/// </summary>
public interface IHLTheme
{
#region properties
/// <summary>
/// Gets the display independent key value that should by unique in an
/// overall collection of highlighting themes and should be used for retrieval purposes.
/// </summary>
string Key { get; }
/// <summary>
/// Gets the prefix of the XSHD resources that should be used to lookup
/// the actual resource for this theme.
///
/// This property is null for a derived highlighting theme since finding its
/// base highlighting should by performed through <see cref="HLBaseKey"/>
/// and the corresponding <see cref="HLBasePrefix"/> property of that entry.
/// </summary>
string HLBasePrefix { get; }
/// <summary>
/// Gets the name of theme (eg. 'Dark' or 'Light' which is used as
/// the base of a derived highlighting theme.
///
/// This property has the same value as the <see cref="Key"/> property
/// if the highlighting is GENERIC (since these highlightings come without
/// additional theme resources).
/// </summary>
string HLBaseKey { get; }
/// <summary>
/// Gets the prefix of the resource under which a theme resource definition
/// file xshTd can be found (eg 'HL.Resources.Themes').
/// </summary>
string HLThemePrefix { get; }
/// <summary>
/// Gets the file name under which a theme resource definition
/// file xshTd can be found (eg 'Dark.xshtd').
/// </summary>
string HLThemeFileName { get; }
/// <summary>
/// Gets the name of theme (eg. 'Dark', 'Light' or 'True Blue' for display purposes in the UI.
/// </summary>
string DisplayName { get; }
/// <summary>
/// Gets a copy of all highlightings defined in this object.
/// </summary>
ReadOnlyCollection<IHighlightingDefinition> HighlightingDefinitions { get; }
/// <summary>
/// Gets the theme highlighting definition for this theme
/// or null (highlighting definition is generic and not based on a theme).
/// </summary>
IHighlightingThemeDefinition HlTheme { get; }
/// <summary>
/// Gets/sets whether built-in themes have already been registered or not
/// Use this to avoid registration of built-in themes twice for one and the
/// same highlighting theme.
/// </summary>
bool IsBuiltInThemesRegistered { get; set; }
#endregion properties
#region methods
/// <summary>
/// Gets the highlighting definition by name, or null if it is not found.
/// </summary>
IHighlightingDefinition GetDefinition(string name);
/// <summary>
/// Gets a highlighting definition by extension.
/// Returns null if the definition is not found.
/// </summary>
IHighlightingDefinition GetDefinitionByExtension(string extension);
/// <summary>
/// Registers a highlighting definition.
/// </summary>
/// <param name="name">The name to register the definition with.</param>
/// <param name="extensions">The file extensions to register the definition for.</param>
/// <param name="highlighting">The highlighting definition.</param>
void RegisterHighlighting(string name, string[] extensions, IHighlightingDefinition highlighting);
/// <summary>
/// Gets the highlighting theme definition by name, or null if it is not found.
/// </summary>
/// <param name="highlightingName"></param>
SyntaxDefinition GetThemeDefinition(string highlightingName);
/// <summary>
/// Converts a XSHD reference from namespace prefix and themename
/// into a <see cref="XhstdThemeDefinition"/> object and returns it.
/// </summary>
/// <param name="hLPrefix"></param>
/// <param name="hLThemeName"></param>
/// <returns></returns>
XhstdThemeDefinition ResolveHighLightingTheme(string hLPrefix, string hLThemeName);
#endregion methods
}
}
================================================
FILE: src/HL/Interfaces/IThemedHighlightingManager.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Interfaces
{
using HL.Manager;
using HL.Xshtd.interfaces;
using ICSharpCode.AvalonEdit.Highlighting;
using System;
using System.Collections.ObjectModel;
/// <summary>
/// Defines a Highlighting Manager that associates syntax highlighting definitions with file extentions
/// (*.cs -> 'C#') with consideration of the current WPF App theme
///
/// Extension App Theme SyntaxHighlighter
/// (*.cs + 'Dark') -> 'C#' (with color definitions for 'Dark')
/// </summary>
public interface IThemedHighlightingManager : IHighlightingDefinitionReferenceResolver,
IHighlightingThemeDefinitionReferenceResolver
{
#region properties
/// <summary>
/// Gets the current highlighting theme (eg 'Light' or 'Dark') that should be used as
/// a base for the syntax highlighting in AvalonEdit.
/// </summary>
IHLTheme CurrentTheme { get; }
#endregion properties
#region methods
/// <summary>
/// Gets a copy of all highlightings.
/// </summary>
ReadOnlyCollection<IHighlightingDefinition> HighlightingDefinitions { get; }
/// <summary>
/// Gets a highlighting definition by extension.
/// Returns null if the definition is not found.
/// </summary>
IHighlightingDefinition GetDefinitionByExtension(string extension);
/// <summary>
/// Registers a highlighting definition for the <see cref="CurrentTheme"/>.
/// </summary>
/// <param name="name">The name to register the definition with.</param>
/// <param name="extensions">The file extensions to register the definition for.</param>
/// <param name="highlighting">The highlighting definition.</param>
void RegisterHighlighting(string name, string[] extensions, IHighlightingDefinition highlighting);
/// <summary>
/// Registers a highlighting definition.
/// </summary>
/// <param name="name">The name to register the definition with.</param>
/// <param name="extensions">The file extensions to register the definition for.</param>
/// <param name="lazyLoadedHighlighting">A function that loads the highlighting definition.</param>
void RegisterHighlighting(string name, string[] extensions, Func<IHighlightingDefinition> lazyLoadedHighlighting);
/// <summary>
/// Resets the highlighting theme based on the name of the WPF App Theme
/// (eg: WPF APP Theme 'Dark' -> Resolve highlighting 'C#' to 'Dark'->'C#')
///
/// Throws an <see cref="IndexOutOfRangeException"/> if the WPF APP theme is not known.
/// </summary>
/// <param name="name"></param>
void SetCurrentTheme(string name);
#endregion methods
}
}
================================================
FILE: src/HL/LICENSE
================================================
Copyright 2019-2020 Dirkster99
MIT License (https://opensource.org/licenses/MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: src/HL/Manager/BusyManager.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using System;
using System.Collections.Generic;
/// <summary>
/// This class is used to prevent stack overflows by representing a 'busy' flag
/// that prevents reentrance when another call is running.
/// However, using a simple 'bool busy' is not thread-safe, so we use a
/// thread-static BusyManager.
/// </summary>
internal static class BusyManager
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1815:OverrideEqualsAndOperatorEqualsOnValueTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible",
Justification = "Should always be used with 'var'")]
public struct BusyLock : IDisposable
{
public static readonly BusyLock Failed = new BusyLock(null);
readonly List<object> objectList;
internal BusyLock(List<object> objectList)
{
this.objectList = objectList;
}
public bool Success
{
get { return objectList != null; }
}
public void Dispose()
{
if (objectList != null)
{
objectList.RemoveAt(objectList.Count - 1);
}
}
}
[ThreadStatic] static List<object> _activeObjects;
public static BusyLock Enter(object obj)
{
List<object> activeObjects = _activeObjects;
if (activeObjects == null)
activeObjects = _activeObjects = new List<object>();
for (int i = 0; i < activeObjects.Count; i++)
{
if (activeObjects[i] == obj)
return BusyLock.Failed;
}
activeObjects.Add(obj);
return new BusyLock(activeObjects);
}
}
}
================================================
FILE: src/HL/Manager/DefaultHighlightingManager.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.HighlightingTheme;
using HL.Resources;
using ICSharpCode.AvalonEdit.Highlighting;
using System;
using System.Diagnostics;
using System.IO;
using System.Xml;
/// <summary>
/// Implements a default highlighting manager for
/// AvalonEdit based themable syntax highlighting definitions.
/// </summary>
internal sealed class DefaultHighlightingManager : ThemedHighlightingManager
{
#region ctors
/// <summary>
/// Static class constructor
/// </summary>
static DefaultHighlightingManager()
{
var defaultManager = new DefaultHighlightingManager();
var theme = new HLTheme("Dark", "Light", "Dark",
HL_THEMES_NAMESPACE_ROOT, "Dark.xshtd", defaultManager);
defaultManager.ThemedHighlightingAdd(theme.Key, theme);
theme = new HLTheme("Light", HL_GENERIC_NAMESPACE_ROOT, "Light");
defaultManager.ThemedHighlightingAdd(theme.Key, theme);
// Setup default theme without registration of Highlightings
defaultManager.SetCurrentThemeInternal(theme.Key);
theme = new HLTheme("TrueBlue", "Light", "True Blue",
HL_THEMES_NAMESPACE_ROOT, "TrueBlue.xshtd", defaultManager);
defaultManager.ThemedHighlightingAdd(theme.Key, theme);
theme = new HLTheme("VS2019_Dark", "Light", "VS2019 Dark",
HL_THEMES_NAMESPACE_ROOT, "VS2019_Dark.xshtd", defaultManager);
defaultManager.ThemedHighlightingAdd(theme.Key, theme);
HLResources.RegisterBuiltInHighlightings(defaultManager, defaultManager.CurrentTheme);
Instance = defaultManager;
}
/// <summary>
/// Default class constructor
/// </summary>
public DefaultHighlightingManager()
: base()
{
}
#endregion ctors
/// <summary>
/// Gets an instance of a <see cref="DefaultHighlightingManager"/> object.
/// </summary>
public new static readonly DefaultHighlightingManager Instance;
/// <summary>
/// Registering a built-in highlighting including highlighting themes (if any).
/// </summary>
/// <param name="theme"></param>
/// <param name="name"></param>
/// <param name="extensions"></param>
/// <param name="resourceName"></param>
internal void RegisterHighlighting(IHLTheme theme,
string name,
string[] extensions,
string resourceName)
{
try
{
#if DEBUG
// don't use lazy-loading in debug builds, show errors immediately
ICSharpCode.AvalonEdit.Highlighting.Xshd.XshdSyntaxDefinition xshd;
using (Stream s = HLResources.OpenStream(GetPrefix(CurrentTheme.HLBaseKey), resourceName))
{
using (XmlTextReader reader = new XmlTextReader(s))
{
xshd = HighlightingLoader.LoadXshd(reader, false);
}
}
Debug.Assert(name == xshd.Name);
if (extensions != null)
Debug.Assert(System.Linq.Enumerable.SequenceEqual(extensions, xshd.Extensions));
else
Debug.Assert(xshd.Extensions.Count == 0);
var hlTheme = theme.HlTheme;
SyntaxDefinition themedHighlights = null;
if (hlTheme != null)
{
themedHighlights = hlTheme.GetNamedSyntaxDefinition(name);
}
// round-trip xshd:
// string resourceFileName = Path.Combine(Path.GetTempPath(), resourceName);
// using (XmlTextWriter writer = new XmlTextWriter(resourceFileName, System.Text.Encoding.UTF8)) {
// writer.Formatting = Formatting.Indented;
// new Xshd.SaveXshdVisitor(writer).WriteDefinition(xshd);
// }
// using (FileStream fs = File.Create(resourceFileName + ".bin")) {
// new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter().Serialize(fs, xshd);
// }
// using (FileStream fs = File.Create(resourceFileName + ".compiled")) {
// new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter().Serialize(fs, Xshd.HighlightingLoader.Load(xshd, this));
// }
base.RegisterHighlighting(name, extensions,
HighlightingLoader.Load(themedHighlights, xshd, this));
#else
base.RegisterHighlighting(name, extensions, LoadHighlighting(theme, name, resourceName));
#endif
}
catch (HighlightingDefinitionInvalidException ex)
{
throw new InvalidOperationException("The built-in highlighting '" + name + "' is invalid.", ex);
}
}
/// <summary>
/// Gets a function that is used to load highlighting definition in a delayed/defered way
/// (usually active only when 'Release' is configured).
/// </summary>
/// <param name="name"></param>
/// <param name="theme"></param>
/// <param name="resourceName"></param>
/// <returns></returns>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode",
Justification = "LoadHighlighting is used only in release builds")]
Func<IHighlightingDefinition> LoadHighlighting(IHLTheme theme, string name, string resourceName)
{
Func<IHighlightingDefinition> func = delegate
{
ICSharpCode.AvalonEdit.Highlighting.Xshd.XshdSyntaxDefinition xshd;
using (Stream s = HLResources.OpenStream(GetPrefix(CurrentTheme.HLBaseKey), resourceName))
{
using (XmlTextReader reader = new XmlTextReader(s))
{
// in release builds, skip validating the built-in highlightings
xshd = HighlightingLoader.LoadXshd(reader, true);
}
}
var hlTheme = theme.HlTheme;
SyntaxDefinition themedHighlights = null;
if (hlTheme != null)
{
themedHighlights = hlTheme.GetNamedSyntaxDefinition(name);
}
return HighlightingLoader.Load(themedHighlights, xshd, this);
};
return func;
}
}
}
================================================
FILE: src/HL/Manager/DelayLoadedHighlightingDefinition.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using ICSharpCode.AvalonEdit.Highlighting;
using System;
using System.Collections.Generic;
internal sealed class DelayLoadedHighlightingDefinition : IHighlightingDefinition
{
readonly object lockObj = new object();
readonly string name;
Func<IHighlightingDefinition> lazyLoadingFunction;
IHighlightingDefinition definition;
Exception storedException;
public DelayLoadedHighlightingDefinition(string name, Func<IHighlightingDefinition> lazyLoadingFunction)
{
this.name = name;
this.lazyLoadingFunction = lazyLoadingFunction;
}
public string Name
{
get
{
if (name != null)
return name;
else
return GetDefinition().Name;
}
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes",
Justification = "The exception will be rethrown")]
IHighlightingDefinition GetDefinition()
{
Func<IHighlightingDefinition> func;
lock (lockObj)
{
if (this.definition != null)
return this.definition;
func = this.lazyLoadingFunction;
}
Exception exception = null;
IHighlightingDefinition def = null;
try
{
using (var busyLock = BusyManager.Enter(this))
{
if (!busyLock.Success)
throw new InvalidOperationException("Tried to create delay-loaded highlighting definition recursively. Make sure the are no cyclic references between the highlighting definitions.");
def = func();
}
if (def == null)
throw new InvalidOperationException("Function for delay-loading highlighting definition returned null");
}
catch (Exception ex)
{
exception = ex;
}
lock (lockObj)
{
this.lazyLoadingFunction = null;
if (this.definition == null && this.storedException == null)
{
this.definition = def;
this.storedException = exception;
}
if (this.storedException != null)
throw new HighlightingDefinitionInvalidException("Error delay-loading highlighting definition", this.storedException);
return this.definition;
}
}
public HighlightingRuleSet MainRuleSet
{
get
{
return GetDefinition().MainRuleSet;
}
}
public HighlightingRuleSet GetNamedRuleSet(string name)
{
return GetDefinition().GetNamedRuleSet(name);
}
public HighlightingColor GetNamedColor(string name)
{
return GetDefinition().GetNamedColor(name);
}
public IEnumerable<HighlightingColor> NamedHighlightingColors
{
get
{
return GetDefinition().NamedHighlightingColors;
}
}
public override string ToString()
{
return this.Name;
}
public IDictionary<string, string> Properties
{
get
{
return GetDefinition().Properties;
}
}
}
}
================================================
FILE: src/HL/Manager/ExtensionMethods.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
//// using System.Windows;
//// using System.Windows.Controls;
//// using System.Windows.Media;
using System.Xml;
static class ExtensionMethods
{
#region Epsilon / IsClose / CoerceValue
/// <summary>
/// Epsilon used for <c>IsClose()</c> implementations.
/// We can use up quite a few digits in front of the decimal point (due to visual positions being relative to document origin),
/// and there's no need to be too accurate (we're dealing with pixels here),
/// so we will use the value 0.01.
/// Previosly we used 1e-8 but that was causing issues:
/// http://community.sharpdevelop.net/forums/t/16048.aspx
/// </summary>
public const double Epsilon = 0.01;
/// <summary>
/// Returns true if the doubles are close (difference smaller than 0.01).
/// </summary>
public static bool IsClose(this double d1, double d2)
{
if (d1 == d2) // required for infinities
return true;
return Math.Abs(d1 - d2) < Epsilon;
}
//// /// <summary>
//// /// Returns true if the doubles are close (difference smaller than 0.01).
//// /// </summary>
//// public static bool IsClose(this Size d1, Size d2)
//// {
//// return IsClose(d1.Width, d2.Width) && IsClose(d1.Height, d2.Height);
//// }
////
//// /// <summary>
//// /// Returns true if the doubles are close (difference smaller than 0.01).
//// /// </summary>
//// public static bool IsClose(this Vector d1, Vector d2)
//// {
//// return IsClose(d1.X, d2.X) && IsClose(d1.Y, d2.Y);
//// }
/// <summary>
/// Forces the value to stay between mininum and maximum.
/// </summary>
/// <returns>minimum, if value is less than minimum.
/// Maximum, if value is greater than maximum.
/// Otherwise, value.</returns>
public static double CoerceValue(this double value, double minimum, double maximum)
{
return Math.Max(Math.Min(value, maximum), minimum);
}
/// <summary>
/// Forces the value to stay between mininum and maximum.
/// </summary>
/// <returns>minimum, if value is less than minimum.
/// Maximum, if value is greater than maximum.
/// Otherwise, value.</returns>
public static int CoerceValue(this int value, int minimum, int maximum)
{
return Math.Max(Math.Min(value, maximum), minimum);
}
#endregion
//// #region CreateTypeface
//// /// <summary>
//// /// Creates typeface from the framework element.
//// /// </summary>
//// public static Typeface CreateTypeface(this FrameworkElement fe)
//// {
//// return new Typeface((FontFamily)fe.GetValue(TextBlock.FontFamilyProperty),
//// (FontStyle)fe.GetValue(TextBlock.FontStyleProperty),
//// (FontWeight)fe.GetValue(TextBlock.FontWeightProperty),
//// (FontStretch)fe.GetValue(TextBlock.FontStretchProperty));
//// }
//// #endregion
#region AddRange / Sequence
public static void AddRange<T>(this ICollection<T> collection, IEnumerable<T> elements)
{
foreach (T e in elements)
collection.Add(e);
}
/// <summary>
/// Creates an IEnumerable with a single value.
/// </summary>
public static IEnumerable<T> Sequence<T>(T value)
{
yield return value;
}
#endregion
#region XML reading
/// <summary>
/// Gets the value of the attribute, or null if the attribute does not exist.
/// </summary>
public static string GetAttributeOrNull(this XmlElement element, string attributeName)
{
XmlAttribute attr = element.GetAttributeNode(attributeName);
return attr != null ? attr.Value : null;
}
/// <summary>
/// Gets the value of the attribute as boolean, or null if the attribute does not exist.
/// </summary>
public static bool? GetBoolAttribute(this XmlElement element, string attributeName)
{
XmlAttribute attr = element.GetAttributeNode(attributeName);
return attr != null ? (bool?)XmlConvert.ToBoolean(attr.Value) : null;
}
/// <summary>
/// Gets the value of the attribute as boolean, or null if the attribute does not exist.
/// </summary>
public static bool? GetBoolAttribute(this XmlReader reader, string attributeName)
{
string attributeValue = reader.GetAttribute(attributeName);
if (attributeValue == null)
return null;
else
return XmlConvert.ToBoolean(attributeValue);
}
#endregion
//// #region DPI independence
//// public static Rect TransformToDevice(this Rect rect, Visual visual)
//// {
//// Matrix matrix = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice;
//// return Rect.Transform(rect, matrix);
//// }
////
//// public static Rect TransformFromDevice(this Rect rect, Visual visual)
//// {
//// Matrix matrix = PresentationSource.FromVisual(visual).CompositionTarget.TransformFromDevice;
//// return Rect.Transform(rect, matrix);
//// }
////
//// public static Size TransformToDevice(this Size size, Visual visual)
//// {
//// Matrix matrix = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice;
//// return new Size(size.Width * matrix.M11, size.Height * matrix.M22);
//// }
////
//// public static Size TransformFromDevice(this Size size, Visual visual)
//// {
//// Matrix matrix = PresentationSource.FromVisual(visual).CompositionTarget.TransformFromDevice;
//// return new Size(size.Width * matrix.M11, size.Height * matrix.M22);
//// }
////
//// public static Point TransformToDevice(this Point point, Visual visual)
//// {
//// Matrix matrix = PresentationSource.FromVisual(visual).CompositionTarget.TransformToDevice;
//// return new Point(point.X * matrix.M11, point.Y * matrix.M22);
//// }
////
//// public static Point TransformFromDevice(this Point point, Visual visual)
//// {
//// Matrix matrix = PresentationSource.FromVisual(visual).CompositionTarget.TransformFromDevice;
//// return new Point(point.X * matrix.M11, point.Y * matrix.M22);
//// }
//// #endregion
#region System.Drawing <-> WPF conversions
//// public static System.Drawing.Point ToSystemDrawing(this Point p)
//// {
//// return new System.Drawing.Point((int)p.X, (int)p.Y);
//// }
////
//// public static Point ToWpf(this System.Drawing.Point p)
//// {
//// return new Point(p.X, p.Y);
//// }
////
//// public static Size ToWpf(this System.Drawing.Size s)
//// {
//// return new Size(s.Width, s.Height);
//// }
////
//// public static Rect ToWpf(this System.Drawing.Rectangle rect)
//// {
//// return new Rect(rect.Location.ToWpf(), rect.Size.ToWpf());
//// }
#endregion
//// public static IEnumerable<DependencyObject> VisualAncestorsAndSelf(this DependencyObject obj)
//// {
//// while (obj != null)
//// {
//// yield return obj;
//// if (obj is Visual || obj is System.Windows.Media.Media3D.Visual3D)
//// {
//// obj = VisualTreeHelper.GetParent(obj);
//// }
//// else if (obj is FrameworkContentElement)
//// {
//// // When called with a non-visual such as a TextElement, walk up the
//// // logical tree instead.
//// obj = ((FrameworkContentElement)obj).Parent;
//// }
//// else
//// {
//// break;
//// }
//// }
//// }
////
//// [Conditional("DEBUG")]
//// public static void CheckIsFrozen(Freezable f)
//// {
//// if (f != null && !f.IsFrozen)
//// Debug.WriteLine("Performance warning: Not frozen: " + f.ToString());
//// }
[Conditional("DEBUG")]
public static void Log(bool condition, string format, params object[] args)
{
if (condition)
{
string output = DateTime.Now.ToString("hh:MM:ss") + ": " + string.Format(format, args) + Environment.NewLine + Environment.StackTrace;
Console.WriteLine(output);
Debug.WriteLine(output);
}
}
}
}
================================================
FILE: src/HL/Manager/HLTheme.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.HighlightingTheme;
using HL.Resources;
using HL.Xshtd;
using HL.Xshtd.interfaces;
using ICSharpCode.AvalonEdit.Highlighting;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Xml;
/// <summary>
/// Implements a highlighting theme which is based on a WPF theme (eg. 'Light')
/// with a corresponding set of highlighting definitions (eg. 'XML', 'C#' etc)
/// to ensure that highlightings are correct in the contecxt of
/// (different background colors) WPF themes.
/// </summary>
internal class HLTheme : IHLTheme
{
#region fields
private readonly object lockObj = new object();
private Dictionary<string, IHighlightingDefinition> highlightingsByName = new Dictionary<string, IHighlightingDefinition>();
private Dictionary<string, IHighlightingDefinition> highlightingsByExtension = new Dictionary<string, IHighlightingDefinition>(StringComparer.OrdinalIgnoreCase);
private List<IHighlightingDefinition> allHighlightings = new List<IHighlightingDefinition>();
private bool _HLThemeIsInitialized;
private XhstdThemeDefinition _xshtd;
private XmlHighlightingThemeDefinition _hlTheme;
private readonly IHighlightingThemeDefinitionReferenceResolver _hLThemeResolver;
#endregion fields
#region ctors
/// <summary>
/// Class constructor for GENERIC highlighting definitions.
///
/// Generic highlighting definitions ar usually defined in xshd
/// files and stand on their own (do not need additional processing/resources
/// to compute highlighting rules and formating information).
/// </summary>
/// <param name="paramKey"></param>
/// <param name="paramHLBasePrefix"></param>
/// <param name="paramDisplayName"></param>
public HLTheme(string paramKey,
string paramHLBasePrefix,
string paramDisplayName)
: this()
{
Key = paramKey;
HLBasePrefix = paramHLBasePrefix; // This Highlighting is GENERIC - based on 'itself'
HLBaseKey = paramKey;
DisplayName = paramDisplayName;
}
/// <summary>
/// Class constructor for derived highlighting themes.
///
/// Derived highlighting themes have a base highlighting (eg 'Light')
/// and an 'overwritting' highlighting themes definition using an xshTd file resource.
/// </summary>
/// <param name="paramKey"></param>
/// <param name="paramHLBaseKey"></param>
/// <param name="paramDisplayName"></param>
/// <param name="paramHLThemePrefix"></param>
/// <param name="paramHLThemeName"></param>
/// <param name="themeResolver"></param>
public HLTheme(string paramKey,
string paramHLBaseKey,
string paramDisplayName,
string paramHLThemePrefix, string paramHLThemeName,
IHighlightingThemeDefinitionReferenceResolver themeResolver)
: this()
{
Key = paramKey;
HLBaseKey = paramHLBaseKey;
HLThemePrefix = paramHLThemePrefix;
HLThemeFileName = paramHLThemeName;
_hLThemeResolver = themeResolver;
DisplayName = paramDisplayName;
}
/// <summary>
/// Hidden class constructor
/// </summary>
protected HLTheme()
{
}
#endregion ctors
#region properties
/// <summary>
/// Gets the display independent key value that should by unique in an
/// overall collection of highlighting themes and should be used for retrieval purposes.
/// </summary>
public string Key { get; }
/// <summary>
/// Gets the prefix of the XSHD resources that should be used to lookup
/// the actual resource for this theme.
///
/// This property is null for a derived highlighting theme since finding its
/// base highlighting should by performed through <see cref="HLBaseKey"/>
/// and the corresponding <see cref="HLBasePrefix"/> property of that entry.
/// </summary>
public string HLBasePrefix { get; }
/// <summary>
/// Gets the name of theme (eg. 'Dark' or 'Light' which is used as
/// the base of a derived highlighting theme.
///
/// This property has the same value as the <see cref="Key"/> property
/// if the highlighting is GENERIC (since these highlightings come without
/// additional theme resources).
/// </summary>
public string HLBaseKey { get; }
/// <summary>
/// Gets the prefix of the resource under which a theme resource definition
/// file xshTd can be found (eg 'HL.Resources.Themes').
/// </summary>
public string HLThemePrefix { get; }
/// <summary>
/// Gets the file name under which a theme resource definition
/// file xshTd can be found (eg 'Dark.xshtd').
/// </summary>
public string HLThemeFileName { get; }
/// <summary>
/// Gets the name of theme (eg. 'Dark', 'Light' or 'True Blue' for display purposes in the UI.
/// </summary>
public string DisplayName { get; }
/// <summary>
/// Gets an (ordered by Name) list copy of all highlightings defined in this object.
/// </summary>
public ReadOnlyCollection<IHighlightingDefinition> HighlightingDefinitions
{
get
{
lock (lockObj)
{
return Array.AsReadOnly(allHighlightings.OrderBy(x => x.Name).ToArray());
}
}
}
/// <summary>
/// Gets the theme highlighting definition for this theme
/// or null (highlighting definition is generic and not based on a theme).
/// </summary>
public IHighlightingThemeDefinition HlTheme
{
get
{
ResolveHighLightingTheme();
return _hlTheme;
}
}
/// <summary>
/// Gets/sets whether built-in themes have already been registered or not
/// Use this to avoid registration of built-in themes twice for one and the
/// same highlighting theme.
/// </summary>
public bool IsBuiltInThemesRegistered { get; set; }
#endregion properties
#region methods
/// <summary>
/// Gets the highlighting definition by name, or null if it is not found.
/// </summary>
public IHighlightingDefinition GetDefinition(string name)
{
lock (lockObj)
{
this.ResolveHighLightingTheme();
IHighlightingDefinition rh;
if (highlightingsByName.TryGetValue(name, out rh))
return rh;
else
return null;
}
}
/// <summary>
/// Gets the highlighting theme definition by name, or null if it is not found.
/// </summary>
public SyntaxDefinition GetThemeDefinition(string highlightingName)
{
lock (lockObj)
{
this.ResolveHighLightingTheme();
return _hlTheme.GetNamedSyntaxDefinition(highlightingName);
}
}
/// <summary>
/// Gets a highlighting definition by extension.
/// Returns null if the definition is not found.
/// </summary>
public IHighlightingDefinition GetDefinitionByExtension(string extension)
{
lock (lockObj)
{
this.ResolveHighLightingTheme();
IHighlightingDefinition rh;
if (highlightingsByExtension.TryGetValue(extension, out rh))
return rh;
else
return null;
}
}
/// <summary>
/// Registers a highlighting definition.
/// </summary>
/// <param name="name">The name to register the definition with.</param>
/// <param name="extensions">The file extensions to register the definition for.</param>
/// <param name="highlighting">The highlighting definition.</param>
public void RegisterHighlighting(string name,
string[] extensions,
IHighlightingDefinition highlighting)
{
lock (lockObj)
{
// Perform an update if this highlighting happens to be available already
var itemInList = allHighlightings.FirstOrDefault(i => name == i.Name);
if (itemInList != null)
allHighlightings.Remove(itemInList);
allHighlightings.Add(highlighting);
if (name != null)
{
highlightingsByName[name] = highlighting;
}
if (extensions != null)
{
foreach (string ext in extensions)
{
highlightingsByExtension[ext] = highlighting;
}
}
}
}
/// <summary>
/// Loads the highlighting theme for this highlighting definition
/// (if an additional theme was configured)
/// </summary>
protected virtual void ResolveHighLightingTheme()
{
if (_hlTheme != null || _HLThemeIsInitialized == true)
return;
_HLThemeIsInitialized = true; // Initialize this at most once
// Load the highlighting theme and setup converter to XmlHighlightingThemeDefinition
_xshtd = ResolveHighLightingTheme(HLThemePrefix, HLThemeFileName);
if (_hLThemeResolver == null || _xshtd == null)
return;
_hlTheme = new XmlHighlightingThemeDefinition(_xshtd, _hLThemeResolver);
}
/// <summary>
/// Converts a XSHTD reference from namespace prefix and themename
/// into a <see cref="XhstdThemeDefinition"/> object and returns it.
/// </summary>
/// <param name="hLPrefix"></param>
/// <param name="hLThemeName"></param>
/// <returns></returns>
public XhstdThemeDefinition ResolveHighLightingTheme(string hLPrefix, string hLThemeName)
{
if (string.IsNullOrEmpty(hLPrefix) || string.IsNullOrEmpty(hLThemeName))
return null;
using (Stream s = HLResources.OpenStream(hLPrefix, hLThemeName))
{
using (XmlTextReader reader = new XmlTextReader(s))
{
return HighlightingThemeLoader.LoadXshd(reader, false);
}
}
}
#endregion methods
}
}
================================================
FILE: src/HL/Manager/HighlightingBrush.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.Serialization;
using System.Windows;
using System.Windows.Media;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Rendering;
/// <summary>
/// HighlightingBrush implementation that finds a brush using a resource.
/// </summary>
[Serializable]
sealed class SystemColorHighlightingBrush : HighlightingBrush, ISerializable
{
readonly PropertyInfo property;
public SystemColorHighlightingBrush(PropertyInfo property)
{
Debug.Assert(property.ReflectedType == typeof(SystemColors));
Debug.Assert(typeof(Brush).IsAssignableFrom(property.PropertyType));
this.property = property;
}
public override Brush GetBrush(ITextRunConstructionContext context)
{
return (Brush)property.GetValue(null, null);
}
public override string ToString()
{
return property.Name;
}
SystemColorHighlightingBrush(SerializationInfo info, StreamingContext context)
{
property = typeof(SystemColors).GetProperty(info.GetString("propertyName"));
if (property == null)
throw new ArgumentException("Error deserializing SystemColorHighlightingBrush");
}
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("propertyName", property.Name);
}
public override bool Equals(object obj)
{
SystemColorHighlightingBrush other = obj as SystemColorHighlightingBrush;
if (other == null)
return false;
return object.Equals(this.property, other.property);
}
public override int GetHashCode()
{
return property.GetHashCode();
}
}
}
================================================
FILE: src/HL/Manager/HighlightingLoader.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.HighlightingTheme;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using System;
using System.Xml;
using System.Xml.Schema;
/// <summary>
/// Static class with helper methods to load XSHD highlighting files.
/// </summary>
public static class HighlightingLoader
{
#region XSHD loading
/// <summary>
/// Lodas a syntax definition from the xml reader.
/// </summary>
public static XshdSyntaxDefinition LoadXshd(XmlReader reader)
{
return LoadXshd(reader, false);
}
internal static XshdSyntaxDefinition LoadXshd(XmlReader reader, bool skipValidation)
{
if (reader == null)
throw new ArgumentNullException("reader");
try
{
reader.MoveToContent();
//// if (reader.NamespaceURI == V2Loader.Namespace)
//// {
return V2Loader.LoadDefinition(reader, skipValidation);
//// }
//// else
//// {
//// return V1Loader.LoadDefinition(reader, skipValidation);
//// }
}
catch (XmlSchemaException ex)
{
throw WrapException(ex, ex.LineNumber, ex.LinePosition);
}
catch (XmlException ex)
{
throw WrapException(ex, ex.LineNumber, ex.LinePosition);
}
}
static Exception WrapException(Exception ex, int lineNumber, int linePosition)
{
return new HighlightingDefinitionInvalidException(FormatExceptionMessage(ex.Message, lineNumber, linePosition), ex);
}
internal static string FormatExceptionMessage(string message, int lineNumber, int linePosition)
{
if (lineNumber <= 0)
return message;
else
return "Error at position (line " + lineNumber + ", column " + linePosition + "):\n" + message;
}
internal static XmlReader GetValidatingReader(XmlReader input, bool ignoreWhitespace, XmlSchemaSet schemaSet)
{
XmlReaderSettings settings = new XmlReaderSettings();
settings.CloseInput = true;
settings.IgnoreComments = true;
settings.IgnoreWhitespace = ignoreWhitespace;
if (schemaSet != null)
{
settings.Schemas = schemaSet;
settings.ValidationType = ValidationType.Schema;
}
return XmlReader.Create(input, settings);
}
internal static XmlSchemaSet LoadSchemaSet(XmlReader schemaInput)
{
XmlSchemaSet schemaSet = new XmlSchemaSet();
schemaSet.Add(null, schemaInput);
schemaSet.ValidationEventHandler += delegate (object sender, ValidationEventArgs args)
{
throw new HighlightingDefinitionInvalidException(args.Message);
};
return schemaSet;
}
#endregion
#region Load Highlighting from XSHD
/// <summary>
/// Creates a highlighting definition from the XSHD file.
/// </summary>
public static IHighlightingDefinition Load(XshdSyntaxDefinition syntaxDefinition,
IHighlightingDefinitionReferenceResolver resolver)
{
if (syntaxDefinition == null)
throw new ArgumentNullException("syntaxDefinition");
return new XmlHighlightingDefinition(syntaxDefinition, resolver);
}
/// <summary>
/// Loads a highlighting definition base on a:
/// </summary>
/// <param name="themedHighlights">
/// Themed Highlighting Definition
/// (This contains the color definition for a highlighting in this theme)
/// </param>
/// <param name="syntaxDefinition">
/// A Highlighting definition
/// (This contains the pattern matching and color definitions where the later
/// is usually overwritten be a highlighting theme)
/// </param>
/// <param name="resolver">An object that can resolve a highlighting definition by its name.</param>
/// <returns></returns>
public static IHighlightingDefinition Load(SyntaxDefinition themedHighlights,
XshdSyntaxDefinition syntaxDefinition,
IHighlightingDefinitionReferenceResolver resolver
)
{
if (syntaxDefinition == null)
throw new ArgumentNullException("syntaxDefinition");
return new XmlHighlightingDefinition(themedHighlights, syntaxDefinition, resolver);
}
/// <summary>
/// Creates a highlighting definition from the XSHD file that is already initialled
/// in the <see cref="XmlReader"/> instance of the <paramref name="reader"/> parameter.
/// </summary>
public static IHighlightingDefinition Load(XmlReader reader,
IHighlightingDefinitionReferenceResolver resolver)
{
return Load(LoadXshd(reader), resolver);
}
#endregion
}
}
================================================
FILE: src/HL/Manager/HighlightingThemeLoader.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.Xshtd;
using HL.Xshtd.interfaces;
using ICSharpCode.AvalonEdit.Highlighting;
using System;
using System.Xml;
using System.Xml.Schema;
/// <summary>
/// Static class with helper methods to load XSHTD highlighting files.
/// </summary>
static class HighlightingThemeLoader
{
#region XSHD loading
/// <summary>
/// Lodas a syntax definition from the xml reader.
/// </summary>
public static XhstdThemeDefinition LoadXshd(XmlReader reader)
{
return LoadXshd(reader, false);
}
internal static XhstdThemeDefinition LoadXshd(XmlReader reader, bool skipValidation)
{
if (reader == null)
throw new ArgumentNullException("reader");
try
{
reader.MoveToContent();
if (reader.NamespaceURI == XshtdLoader.Namespace)
{
return XshtdLoader.LoadDefinition(reader, skipValidation);
}
throw new ArgumentOutOfRangeException(reader.NamespaceURI);
}
catch (XmlSchemaException ex)
{
throw WrapException(ex, ex.LineNumber, ex.LinePosition);
}
catch (XmlException ex)
{
throw WrapException(ex, ex.LineNumber, ex.LinePosition);
}
}
static Exception WrapException(Exception ex, int lineNumber, int linePosition)
{
return new HighlightingDefinitionInvalidException(FormatExceptionMessage(ex.Message, lineNumber, linePosition), ex);
}
internal static string FormatExceptionMessage(string message, int lineNumber, int linePosition)
{
if (lineNumber <= 0)
return message;
else
return "Error at position (line " + lineNumber + ", column " + linePosition + "):\n" + message;
}
internal static XmlReader GetValidatingReader(XmlReader input, bool ignoreWhitespace, XmlSchemaSet schemaSet)
{
XmlReaderSettings settings = new XmlReaderSettings();
settings.CloseInput = true;
settings.IgnoreComments = true;
settings.IgnoreWhitespace = ignoreWhitespace;
if (schemaSet != null)
{
settings.Schemas = schemaSet;
settings.ValidationType = ValidationType.Schema;
}
return XmlReader.Create(input, settings);
}
internal static XmlSchemaSet LoadSchemaSet(XmlReader schemaInput)
{
XmlSchemaSet schemaSet = new XmlSchemaSet();
schemaSet.Add(null, schemaInput);
schemaSet.ValidationEventHandler += delegate (object sender, ValidationEventArgs args)
{
throw new HighlightingDefinitionInvalidException(args.Message);
};
return schemaSet;
}
#endregion
#region Load Highlighting from XSHD
/// <summary>
/// Creates a highlighting definition from the XSHD file.
/// </summary>
public static IHighlightingThemeDefinition Load(XhstdThemeDefinition syntaxDefinition,
IHighlightingThemeDefinitionReferenceResolver resolver)
{
if (syntaxDefinition == null)
throw new ArgumentNullException("syntaxDefinition");
return new XmlHighlightingThemeDefinition(syntaxDefinition, resolver);
}
/// <summary>
/// Creates a highlighting definition from the XSHD file.
/// </summary>
public static IHighlightingThemeDefinition Load(XmlReader reader,
IHighlightingThemeDefinitionReferenceResolver resolver)
{
return Load(LoadXshd(reader), resolver);
}
#endregion
}
}
================================================
FILE: src/HL/Manager/ThemedHighlightingManager.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.HighlightingTheme;
using HL.Interfaces;
using HL.Resources;
using HL.Xshtd.interfaces;
using ICSharpCode.AvalonEdit.Highlighting;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
/// <summary>
/// Implements a Highlighting Manager that associates syntax highlighting definitions with file extentions
/// (*.cs -> 'C#') with consideration of the current WPF App theme
///
/// Extension App Theme SyntaxHighlighter
/// (*.cs + 'Dark') -> 'C#' (with color definitions for 'Dark')
/// </summary>
public class ThemedHighlightingManager : IThemedHighlightingManager
{
#region fields
/// <summary>
/// Defines the root namespace under which the built-in xshd highlighting
/// resource files can be found
/// (eg all highlighting for 'Light' should be located here).
/// </summary>
public const string HL_GENERIC_NAMESPACE_ROOT = "HL.Resources.Light";
/// <summary>
/// Defines the root namespace under which the built-in additional xshtd highlighting theme
/// resource files can be found
/// (eg 'Dark' and 'TrueBlue' themes should be located here).
/// </summary>
public const string HL_THEMES_NAMESPACE_ROOT = "HL.Resources.Themes";
private readonly object lockObj = new object();
private readonly Dictionary<string, IHLTheme> _ThemedHighlightings;
#endregion fields
#region ctors
/// <summary>
/// Class constructor
/// </summary>
public ThemedHighlightingManager()
{
_ThemedHighlightings = new Dictionary<string, IHLTheme>();
}
#endregion ctors
#region properties
/// <summary>
/// Gets the current highlighting theme (eg 'Light' or 'Dark') that should be used as
/// a base for the syntax highlighting in AvalonEdit.
/// </summary>
public IHLTheme CurrentTheme { get; private set; }
/// <summary>
/// Gets the default HighlightingManager instance.
/// The default HighlightingManager comes with built-in highlightings.
/// </summary>
public static IThemedHighlightingManager Instance
{
get
{
return DefaultHighlightingManager.Instance;
}
}
#endregion properties
#region methods
/// <summary>
/// Gets the highlighting definition by name, or null if it is not found.
/// </summary>
IHighlightingDefinition IHighlightingDefinitionReferenceResolver.GetDefinition(string name)
{
lock (lockObj)
{
if (CurrentTheme != null)
return CurrentTheme.GetDefinition(name);
return null;
}
}
/// <summary>
/// Gets an (ordered by Name) list copy of all highlightings defined in this object
/// or an empty collection if there is no highlighting definition available.
/// </summary>
public ReadOnlyCollection<IHighlightingDefinition> HighlightingDefinitions
{
get
{
lock (lockObj)
{
if (CurrentTheme != null)
return CurrentTheme.HighlightingDefinitions;
return new ReadOnlyCollection<IHighlightingDefinition>(new List<IHighlightingDefinition>());
}
}
}
/// <summary>
/// Gets a highlighting definition by extension.
/// Returns null if the definition is not found.
/// </summary>
public IHighlightingDefinition GetDefinitionByExtension(string extension)
{
lock (lockObj)
{
IHLTheme theme;
if (_ThemedHighlightings.TryGetValue(CurrentTheme.Key, out theme) == true)
{
return theme.GetDefinitionByExtension(extension);
}
return null;
}
}
/// <summary>
/// Registers a highlighting definition for the <see cref="CurrentTheme"/>.
/// </summary>
/// <param name="name">The name to register the definition with.</param>
/// <param name="extensions">The file extensions to register the definition for.</param>
/// <param name="highlighting">The highlighting definition.</param>
public void RegisterHighlighting(string name, string[] extensions, IHighlightingDefinition highlighting)
{
if (highlighting == null)
throw new ArgumentNullException("highlighting");
lock (lockObj)
{
if (this.CurrentTheme != null)
{
CurrentTheme.RegisterHighlighting(name, extensions, highlighting);
}
}
}
/// <summary>
/// Registers a highlighting definition.
/// </summary>
/// <param name="name">The name to register the definition with.</param>
/// <param name="extensions">The file extensions to register the definition for.</param>
/// <param name="lazyLoadedHighlighting">A function that loads the highlighting definition.</param>
public void RegisterHighlighting(string name, string[] extensions, Func<IHighlightingDefinition> lazyLoadedHighlighting)
{
if (lazyLoadedHighlighting == null)
throw new ArgumentNullException("lazyLoadedHighlighting");
RegisterHighlighting(name, extensions, new DelayLoadedHighlightingDefinition(name, lazyLoadedHighlighting));
}
/// <summary>
/// Sets the current highlighting based on the name of the given highighting theme.
/// (eg: WPF APP Theme 'TrueBlue' -> Resolve highlighting 'C#' to 'TrueBlue'->'C#')
///
/// Throws an <see cref="IndexOutOfRangeException"/> if the WPF APP theme is not known.
/// </summary>
/// <param name="themeNameKey"></param>
public void SetCurrentTheme(string themeNameKey)
{
SetCurrentThemeInternal(themeNameKey);
HLResources.RegisterBuiltInHighlightings(DefaultHighlightingManager.Instance, CurrentTheme);
}
/// <summary>
/// Adds another highlighting theme into the current collection of highlighting themes.
/// </summary>
/// <param name="key"></param>
/// <param name="theme"></param>
public void ThemedHighlightingAdd(string key, IHLTheme theme)
{
lock (lockObj)
{
_ThemedHighlightings.Add(key, theme);
}
}
/// <summary>
/// Removes a highlighting theme from the current collection
/// of highlighting themes.
/// </summary>
/// <param name="removekey"></param>
public void ThemedHighlightingRemove(string removekey)
{
lock (lockObj)
{
_ThemedHighlightings.Remove(removekey);
}
}
/// <summary>
/// Initializes the current default theme available at start-up of application
/// (without registration of highlightings).
/// </summary>
/// <param name="themeNameKey"></param>
protected void SetCurrentThemeInternal(string themeNameKey)
{
CurrentTheme = _ThemedHighlightings[themeNameKey];
}
/// <summary>
/// Helper method to find the correct namespace of an internal xshd resource
/// based on the name of a (WPF) theme (eg. 'TrueBlue') and an internal
/// constant (eg. 'HL.Resources')
/// </summary>
/// <param name="themeNameKey"></param>
/// <returns></returns>
protected virtual string GetPrefix(string themeNameKey)
{
lock (lockObj)
{
IHLTheme theme;
if (_ThemedHighlightings.TryGetValue(themeNameKey, out theme) == true)
{
return theme.HLBasePrefix;
}
}
return null;
}
/// <summary>
/// Gets the highlighting theme definition by name, or null if there is none to be found.
/// </summary>
/// <param name="highlightingName"></param>
SyntaxDefinition IHighlightingThemeDefinitionReferenceResolver.GetThemeDefinition(string highlightingName)
{
lock (lockObj)
{
if (CurrentTheme != null)
return CurrentTheme.GetThemeDefinition(highlightingName);
return null;
}
}
/// <summary>
/// Gets the highlighting theme definition by name of the theme (eg 'Dark2' or 'TrueBlue')
/// and the highlighting, or null if there is none to be found.
/// </summary>
/// <param name="hlThemeName"></param>
/// <param name="highlightingName"></param>
SyntaxDefinition IHighlightingThemeDefinitionReferenceResolver.GetThemeDefinition(string hlThemeName,
string highlightingName)
{
lock (lockObj)
{
IHLTheme highlighting;
this._ThemedHighlightings.TryGetValue(hlThemeName, out highlighting);
if (highlighting != null)
return highlighting.GetThemeDefinition(hlThemeName);
return null;
}
}
#endregion methods
}
}
================================================
FILE: src/HL/Manager/V2Loader.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.Resources;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using System.Windows.Media;
using System.Xml;
using System.Xml.Schema;
/// <summary>
/// Loads .xshd files, version 2.0.
/// Version 2.0 files are recognized by the namespace.
/// </summary>
static class V2Loader
{
public const string Namespace = "http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008";
static XmlSchemaSet schemaSet;
static XmlSchemaSet SchemaSet
{
get
{
if (schemaSet == null)
{
schemaSet = HighlightingLoader.LoadSchemaSet(new XmlTextReader(
HLResources.OpenStream("HL.Modes", "ModeV2.xsd")));
}
return schemaSet;
}
}
public static XshdSyntaxDefinition LoadDefinition(XmlReader reader, bool skipValidation)
{
reader = HighlightingLoader.GetValidatingReader(reader, true, skipValidation ? null : SchemaSet);
reader.Read();
return ParseDefinition(reader);
}
static XshdSyntaxDefinition ParseDefinition(XmlReader reader)
{
Debug.Assert(reader.LocalName == "SyntaxDefinition");
XshdSyntaxDefinition def = new XshdSyntaxDefinition();
def.Name = reader.GetAttribute("name");
string extensions = reader.GetAttribute("extensions");
if (extensions != null)
def.Extensions.AddRange(extensions.Split(';'));
ParseElements(def.Elements, reader);
Debug.Assert(reader.NodeType == XmlNodeType.EndElement);
Debug.Assert(reader.LocalName == "SyntaxDefinition");
return def;
}
static void ParseElements(ICollection<XshdElement> c, XmlReader reader)
{
if (reader.IsEmptyElement)
return;
while (reader.Read() && reader.NodeType != XmlNodeType.EndElement)
{
Debug.Assert(reader.NodeType == XmlNodeType.Element);
if (reader.NamespaceURI != Namespace)
{
if (!reader.IsEmptyElement)
reader.Skip();
continue;
}
switch (reader.Name)
{
case "RuleSet":
c.Add(ParseRuleSet(reader));
break;
case "Property":
c.Add(ParseProperty(reader));
break;
case "Color":
c.Add(ParseNamedColor(reader));
break;
case "Keywords":
c.Add(ParseKeywords(reader));
break;
case "Span":
c.Add(ParseSpan(reader));
break;
case "Import":
c.Add(ParseImport(reader));
break;
case "Rule":
c.Add(ParseRule(reader));
break;
default:
throw new NotSupportedException("Unknown element " + reader.Name);
}
}
}
static XshdElement ParseProperty(XmlReader reader)
{
XshdProperty property = new XshdProperty();
SetPosition(property, reader);
property.Name = reader.GetAttribute("name");
property.Value = reader.GetAttribute("value");
return property;
}
static XshdRuleSet ParseRuleSet(XmlReader reader)
{
XshdRuleSet ruleSet = new XshdRuleSet();
SetPosition(ruleSet, reader);
ruleSet.Name = reader.GetAttribute("name");
ruleSet.IgnoreCase = reader.GetBoolAttribute("ignoreCase");
CheckElementName(reader, ruleSet.Name);
ParseElements(ruleSet.Elements, reader);
return ruleSet;
}
static XshdRule ParseRule(XmlReader reader)
{
XshdRule rule = new XshdRule();
SetPosition(rule, reader);
rule.ColorReference = ParseColorReference(reader);
if (!reader.IsEmptyElement)
{
reader.Read();
if (reader.NodeType == XmlNodeType.Text)
{
rule.Regex = reader.ReadContentAsString();
rule.RegexType = XshdRegexType.IgnorePatternWhitespace;
}
}
return rule;
}
static XshdKeywords ParseKeywords(XmlReader reader)
{
XshdKeywords keywords = new XshdKeywords();
SetPosition(keywords, reader);
keywords.ColorReference = ParseColorReference(reader);
reader.Read();
while (reader.NodeType != XmlNodeType.EndElement)
{
Debug.Assert(reader.NodeType == XmlNodeType.Element);
keywords.Words.Add(reader.ReadElementString());
}
return keywords;
}
static XshdImport ParseImport(XmlReader reader)
{
XshdImport import = new XshdImport();
SetPosition(import, reader);
import.RuleSetReference = ParseRuleSetReference(reader);
if (!reader.IsEmptyElement)
reader.Skip();
return import;
}
static XshdSpan ParseSpan(XmlReader reader)
{
XshdSpan span = new XshdSpan();
SetPosition(span, reader);
span.BeginRegex = reader.GetAttribute("begin");
span.EndRegex = reader.GetAttribute("end");
span.Multiline = reader.GetBoolAttribute("multiline") ?? false;
span.SpanColorReference = ParseColorReference(reader);
span.RuleSetReference = ParseRuleSetReference(reader);
if (!reader.IsEmptyElement)
{
reader.Read();
while (reader.NodeType != XmlNodeType.EndElement)
{
Debug.Assert(reader.NodeType == XmlNodeType.Element);
switch (reader.Name)
{
case "Begin":
if (span.BeginRegex != null)
throw Error(reader, "Duplicate Begin regex");
span.BeginColorReference = ParseColorReference(reader);
span.BeginRegex = reader.ReadElementString();
span.BeginRegexType = XshdRegexType.IgnorePatternWhitespace;
break;
case "End":
if (span.EndRegex != null)
throw Error(reader, "Duplicate End regex");
span.EndColorReference = ParseColorReference(reader);
span.EndRegex = reader.ReadElementString();
span.EndRegexType = XshdRegexType.IgnorePatternWhitespace;
break;
case "RuleSet":
if (span.RuleSetReference.ReferencedElement != null)
throw Error(reader, "Cannot specify both inline RuleSet and RuleSet reference");
span.RuleSetReference = new XshdReference<XshdRuleSet>(ParseRuleSet(reader));
reader.Read();
break;
default:
throw new NotSupportedException("Unknown element " + reader.Name);
}
}
}
return span;
}
static Exception Error(XmlReader reader, string message)
{
return Error(reader as IXmlLineInfo, message);
}
static Exception Error(IXmlLineInfo lineInfo, string message)
{
if (lineInfo != null)
return new HighlightingDefinitionInvalidException(HighlightingLoader.FormatExceptionMessage(message, lineInfo.LineNumber, lineInfo.LinePosition));
else
return new HighlightingDefinitionInvalidException(message);
}
/// <summary>
/// Sets the element's position to the XmlReader's position.
/// </summary>
static void SetPosition(XshdElement element, XmlReader reader)
{
IXmlLineInfo lineInfo = reader as IXmlLineInfo;
if (lineInfo != null)
{
element.LineNumber = lineInfo.LineNumber;
element.ColumnNumber = lineInfo.LinePosition;
}
}
static XshdReference<XshdRuleSet> ParseRuleSetReference(XmlReader reader)
{
string ruleSet = reader.GetAttribute("ruleSet");
if (ruleSet != null)
{
// '/' is valid in highlighting definition names, so we need the last occurence
int pos = ruleSet.LastIndexOf('/');
if (pos >= 0)
{
return new XshdReference<XshdRuleSet>(ruleSet.Substring(0, pos), ruleSet.Substring(pos + 1));
}
else
{
return new XshdReference<XshdRuleSet>(null, ruleSet);
}
}
else
{
return new XshdReference<XshdRuleSet>();
}
}
static void CheckElementName(XmlReader reader, string name)
{
if (name != null)
{
if (name.Length == 0)
throw Error(reader, "The empty string is not a valid name.");
if (name.IndexOf('/') >= 0)
throw Error(reader, "Element names must not contain a slash.");
}
}
#region ParseColor
static XshdColor ParseNamedColor(XmlReader reader)
{
XshdColor color = ParseColorAttributes(reader);
// check removed: invisible named colors may be useful now that apps can read highlighting data
//if (color.Foreground == null && color.FontWeight == null && color.FontStyle == null)
// throw Error(reader, "A named color must have at least one element.");
color.Name = reader.GetAttribute("name");
CheckElementName(reader, color.Name);
color.ExampleText = reader.GetAttribute("exampleText");
return color;
}
static XshdReference<XshdColor> ParseColorReference(XmlReader reader)
{
string color = reader.GetAttribute("color");
if (color != null)
{
int pos = color.LastIndexOf('/');
if (pos >= 0)
{
return new XshdReference<XshdColor>(color.Substring(0, pos), color.Substring(pos + 1));
}
else
{
return new XshdReference<XshdColor>(null, color);
}
}
else
{
return new XshdReference<XshdColor>(ParseColorAttributes(reader));
}
}
static XshdColor ParseColorAttributes(XmlReader reader)
{
XshdColor color = new XshdColor();
SetPosition(color, reader);
IXmlLineInfo position = reader as IXmlLineInfo;
color.Foreground = ParseColor(position, reader.GetAttribute("foreground"));
color.Background = ParseColor(position, reader.GetAttribute("background"));
color.FontWeight = ParseFontWeight(reader.GetAttribute("fontWeight"));
color.FontStyle = ParseFontStyle(reader.GetAttribute("fontStyle"));
color.Underline = reader.GetBoolAttribute("underline");
return color;
}
internal readonly static ColorConverter ColorConverter = new ColorConverter();
internal readonly static FontWeightConverter FontWeightConverter = new FontWeightConverter();
internal readonly static FontStyleConverter FontStyleConverter = new FontStyleConverter();
static HighlightingBrush ParseColor(IXmlLineInfo lineInfo, string color)
{
if (string.IsNullOrEmpty(color))
return null;
if (color.StartsWith("SystemColors.", StringComparison.Ordinal))
return GetSystemColorBrush(lineInfo, color);
else
return FixedColorHighlightingBrush((Color?)ColorConverter.ConvertFromInvariantString(color));
}
internal static SystemColorHighlightingBrush GetSystemColorBrush(IXmlLineInfo lineInfo, string name)
{
Debug.Assert(name.StartsWith("SystemColors.", StringComparison.Ordinal));
string shortName = name.Substring(13);
var property = typeof(SystemColors).GetProperty(shortName + "Brush");
if (property == null)
throw Error(lineInfo, "Cannot find '" + name + "'.");
return new SystemColorHighlightingBrush(property);
}
static HighlightingBrush FixedColorHighlightingBrush(Color? color)
{
if (color == null)
return null;
return new SimpleHighlightingBrush(color.Value);
}
static FontWeight? ParseFontWeight(string fontWeight)
{
if (string.IsNullOrEmpty(fontWeight))
return null;
return (FontWeight?)FontWeightConverter.ConvertFromInvariantString(fontWeight);
}
static FontStyle? ParseFontStyle(string fontStyle)
{
if (string.IsNullOrEmpty(fontStyle))
return null;
return (FontStyle?)FontStyleConverter.ConvertFromInvariantString(fontStyle);
}
#endregion
}
}
================================================
FILE: src/HL/Manager/XmlHighlightingDefinition.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.HighlightingTheme;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
[Serializable]
sealed class XmlHighlightingDefinition : IHighlightingDefinition
{
public string Name { get; private set; }
public XmlHighlightingDefinition(XshdSyntaxDefinition xshd,
IHighlightingDefinitionReferenceResolver resolver)
{
InitializeDefinitions(xshd, resolver);
}
/// <summary>
/// Class constructor from highlighting theme definition resolver
/// and highlighting definition (and resolver)
/// </summary>
/// <param name="xshd"></param>
/// <param name="resolver"></param>
/// <param name="themedHighlights"></param>
public XmlHighlightingDefinition(SyntaxDefinition themedHighlights,
XshdSyntaxDefinition xshd,
IHighlightingDefinitionReferenceResolver resolver
)
{
_themedHighlights = themedHighlights;
InitializeDefinitions(xshd, resolver);
}
#region RegisterNamedElements
sealed class RegisterNamedElementsVisitor : IXshdVisitor
{
XmlHighlightingDefinition def;
internal readonly Dictionary<XshdRuleSet, HighlightingRuleSet> ruleSets
= new Dictionary<XshdRuleSet, HighlightingRuleSet>();
public RegisterNamedElementsVisitor(XmlHighlightingDefinition def)
{
this.def = def;
}
public object VisitRuleSet(XshdRuleSet ruleSet)
{
HighlightingRuleSet hrs = new HighlightingRuleSet();
ruleSets.Add(ruleSet, hrs);
if (ruleSet.Name != null)
{
if (ruleSet.Name.Length == 0)
throw Error(ruleSet, "Name must not be the empty string");
if (def.ruleSetDict.ContainsKey(ruleSet.Name))
throw Error(ruleSet, "Duplicate rule set name '" + ruleSet.Name + "'.");
def.ruleSetDict.Add(ruleSet.Name, hrs);
}
ruleSet.AcceptElements(this);
return null;
}
public object VisitColor(XshdColor color)
{
if (color.Name != null)
{
if (color.Name.Length == 0)
throw Error(color, "Name must not be the empty string");
if (def.colorDict.ContainsKey(color.Name))
throw Error(color, "Duplicate color name '" + color.Name + "'.");
def.colorDict.Add(color.Name, new HighlightingColor());
}
return null;
}
public object VisitKeywords(XshdKeywords keywords)
{
return keywords.ColorReference.AcceptVisitor(this);
}
public object VisitSpan(XshdSpan span)
{
span.BeginColorReference.AcceptVisitor(this);
span.SpanColorReference.AcceptVisitor(this);
span.EndColorReference.AcceptVisitor(this);
return span.RuleSetReference.AcceptVisitor(this);
}
public object VisitImport(XshdImport import)
{
return import.RuleSetReference.AcceptVisitor(this);
}
public object VisitRule(XshdRule rule)
{
return rule.ColorReference.AcceptVisitor(this);
}
}
#endregion
#region TranslateElements
sealed class TranslateElementVisitor : IXshdVisitor
{
readonly XmlHighlightingDefinition def;
readonly Dictionary<XshdRuleSet, HighlightingRuleSet> ruleSetDict;
readonly Dictionary<HighlightingRuleSet, XshdRuleSet> reverseRuleSetDict;
readonly IHighlightingDefinitionReferenceResolver resolver;
HashSet<XshdRuleSet> processingStartedRuleSets = new HashSet<XshdRuleSet>();
HashSet<XshdRuleSet> processedRuleSets = new HashSet<XshdRuleSet>();
bool ignoreCase;
public TranslateElementVisitor(XmlHighlightingDefinition def, Dictionary<XshdRuleSet, HighlightingRuleSet> ruleSetDict, IHighlightingDefinitionReferenceResolver resolver)
{
Debug.Assert(def != null);
Debug.Assert(ruleSetDict != null);
this.def = def;
this.ruleSetDict = ruleSetDict;
this.resolver = resolver;
reverseRuleSetDict = new Dictionary<HighlightingRuleSet, XshdRuleSet>();
foreach (var pair in ruleSetDict)
{
reverseRuleSetDict.Add(pair.Value, pair.Key);
}
}
public object VisitRuleSet(XshdRuleSet ruleSet)
{
HighlightingRuleSet rs = ruleSetDict[ruleSet];
if (processedRuleSets.Contains(ruleSet))
return rs;
if (!processingStartedRuleSets.Add(ruleSet))
throw Error(ruleSet, "RuleSet cannot be processed because it contains cyclic <Import>");
bool oldIgnoreCase = ignoreCase;
if (ruleSet.IgnoreCase != null)
ignoreCase = ruleSet.IgnoreCase.Value;
rs.Name = ruleSet.Name;
foreach (XshdElement element in ruleSet.Elements)
{
object o = element.AcceptVisitor(this);
HighlightingRuleSet elementRuleSet = o as HighlightingRuleSet;
if (elementRuleSet != null)
{
Merge(rs, elementRuleSet);
}
else
{
HighlightingSpan span = o as HighlightingSpan;
if (span != null)
{
rs.Spans.Add(span);
}
else
{
HighlightingRule elementRule = o as HighlightingRule;
if (elementRule != null)
{
rs.Rules.Add(elementRule);
}
}
}
}
ignoreCase = oldIgnoreCase;
processedRuleSets.Add(ruleSet);
return rs;
}
static void Merge(HighlightingRuleSet target, HighlightingRuleSet source)
{
target.Rules.AddRange(source.Rules);
target.Spans.AddRange(source.Spans);
}
public object VisitColor(XshdColor color)
{
HighlightingColor c = null;
if (def._themedHighlights == null)
{
if (color.Name != null)
c = def.colorDict[color.Name];
else if (color.Foreground == null && color.Background == null && color.Underline == null && color.FontStyle == null && color.FontWeight == null)
return null;
else
c = new HighlightingColor();
c.Name = color.Name;
c.Foreground = color.Foreground;
c.Background = color.Background;
c.Underline = color.Underline;
c.FontStyle = color.FontStyle;
c.FontWeight = color.FontWeight;
}
return c;
}
public object VisitKeywords(XshdKeywords keywords)
{
if (keywords.Words.Count == 0)
return Error(keywords, "Keyword group must not be empty.");
foreach (string keyword in keywords.Words)
{
if (string.IsNullOrEmpty(keyword))
throw Error(keywords, "Cannot use empty string as keyword");
}
StringBuilder keyWordRegex = new StringBuilder();
// We can use "\b" only where the keyword starts/ends with a letter or digit, otherwise we don't
// highlight correctly. (example: ILAsm-Mode.xshd with ".maxstack" keyword)
if (keywords.Words.All(IsSimpleWord))
{
keyWordRegex.Append(@"\b(?>");
// (?> = atomic group
// atomic groups increase matching performance, but we
// must ensure that the keywords are sorted correctly.
// "\b(?>in|int)\b" does not match "int" because the atomic group captures "in".
// To solve this, we are sorting the keywords by descending length.
int i = 0;
foreach (string keyword in keywords.Words.OrderByDescending(w => w.Length))
{
if (i++ > 0)
keyWordRegex.Append('|');
keyWordRegex.Append(Regex.Escape(keyword));
}
keyWordRegex.Append(@")\b");
}
else
{
keyWordRegex.Append('(');
int i = 0;
foreach (string keyword in keywords.Words)
{
if (i++ > 0)
keyWordRegex.Append('|');
if (char.IsLetterOrDigit(keyword[0]))
keyWordRegex.Append(@"\b");
keyWordRegex.Append(Regex.Escape(keyword));
if (char.IsLetterOrDigit(keyword[keyword.Length - 1]))
keyWordRegex.Append(@"\b");
}
keyWordRegex.Append(')');
}
return new HighlightingRule
{
Color = GetColor(keywords, keywords.ColorReference),
Regex = CreateRegex(keywords, keyWordRegex.ToString(), XshdRegexType.Default)
};
}
static bool IsSimpleWord(string word)
{
return char.IsLetterOrDigit(word[0]) && char.IsLetterOrDigit(word, word.Length - 1);
}
Regex CreateRegex(XshdElement position, string regex, XshdRegexType regexType)
{
if (regex == null)
throw Error(position, "Regex missing");
RegexOptions options = RegexOptions.CultureInvariant | RegexOptions.ExplicitCapture;
if (regexType == XshdRegexType.IgnorePatternWhitespace)
options |= RegexOptions.IgnorePatternWhitespace;
if (ignoreCase)
options |= RegexOptions.IgnoreCase;
try
{
return new Regex(regex, options);
}
catch (ArgumentException ex)
{
throw Error(position, ex.Message);
}
}
HighlightingColor GetColor(XshdElement position, XshdReference<XshdColor> colorReference)
{
if (colorReference.InlineElement != null)
{
return (HighlightingColor)colorReference.InlineElement.AcceptVisitor(this);
}
else if (colorReference.ReferencedElement != null)
{
IHighlightingDefinition definition = GetDefinition(position, colorReference.ReferencedDefinition);
HighlightingColor color = definition.GetNamedColor(colorReference.ReferencedElement);
if (color == null)
throw Error(position, "Could not find color named '" + colorReference.ReferencedElement + "'.");
return color;
}
else
{
return null;
}
}
IHighlightingDefinition GetDefinition(XshdElement position, string definitionName)
{
if (definitionName == null)
return def;
if (resolver == null)
throw Error(position, "Resolving references to other syntax definitions is not possible because the IHighlightingDefinitionReferenceResolver is null.");
IHighlightingDefinition d = resolver.GetDefinition(definitionName);
if (d == null)
throw Error(position, "Could not find definition with name '" + definitionName + "'.");
return d;
}
HighlightingRuleSet GetRuleSet(XshdElement position, XshdReference<XshdRuleSet> ruleSetReference)
{
if (ruleSetReference.InlineElement != null)
{
return (HighlightingRuleSet)ruleSetReference.InlineElement.AcceptVisitor(this);
}
else if (ruleSetReference.ReferencedElement != null)
{
IHighlightingDefinition definition = GetDefinition(position, ruleSetReference.ReferencedDefinition);
HighlightingRuleSet ruleSet = definition.GetNamedRuleSet(ruleSetReference.ReferencedElement);
if (ruleSet == null)
throw Error(position, "Could not find rule set named '" + ruleSetReference.ReferencedElement + "'.");
return ruleSet;
}
else
{
return null;
}
}
public object VisitSpan(XshdSpan span)
{
string endRegex = span.EndRegex;
if (string.IsNullOrEmpty(span.BeginRegex) && string.IsNullOrEmpty(span.EndRegex))
throw Error(span, "Span has no start/end regex.");
if (!span.Multiline)
{
if (endRegex == null)
endRegex = "$";
else if (span.EndRegexType == XshdRegexType.IgnorePatternWhitespace)
endRegex = "($|" + endRegex + "\n)";
else
endRegex = "($|" + endRegex + ")";
}
HighlightingColor wholeSpanColor = GetColor(span, span.SpanColorReference);
return new HighlightingSpan
{
StartExpression = CreateRegex(span, span.BeginRegex, span.BeginRegexType),
EndExpression = CreateRegex(span, endRegex, span.EndRegexType),
RuleSet = GetRuleSet(span, span.RuleSetReference),
StartColor = GetColor(span, span.BeginColorReference),
SpanColor = wholeSpanColor,
EndColor = GetColor(span, span.EndColorReference),
SpanColorIncludesStart = true,
SpanColorIncludesEnd = true
};
}
public object VisitImport(XshdImport import)
{
HighlightingRuleSet hrs = GetRuleSet(import, import.RuleSetReference);
XshdRuleSet inputRuleSet;
if (reverseRuleSetDict.TryGetValue(hrs, out inputRuleSet))
{
// ensure the ruleset is processed before importing its members
if (VisitRuleSet(inputRuleSet) != hrs)
Debug.Fail("this shouldn't happen");
}
return hrs;
}
public object VisitRule(XshdRule rule)
{
return new HighlightingRule
{
Color = GetColor(rule, rule.ColorReference),
Regex = CreateRegex(rule, rule.Regex, rule.RegexType)
};
}
}
#endregion
static Exception Error(XshdElement element, string message)
{
if (element.LineNumber > 0)
return new HighlightingDefinitionInvalidException(
"Error at line " + element.LineNumber + ":\n" + message);
else
return new HighlightingDefinitionInvalidException(message);
}
Dictionary<string, HighlightingRuleSet> ruleSetDict = new Dictionary<string, HighlightingRuleSet>();
Dictionary<string, HighlightingColor> colorDict = new Dictionary<string, HighlightingColor>();
[OptionalField]
Dictionary<string, string> propDict = new Dictionary<string, string>();
private bool _isThemeInitialized;
/// <summary>
/// Defines highlighting theme information (if any is applicable) for this highlighting.
/// </summary>
private readonly SyntaxDefinition _themedHighlights;
public HighlightingRuleSet MainRuleSet { get; private set; }
public HighlightingRuleSet GetNamedRuleSet(string name)
{
ApplyTheme();
if (string.IsNullOrEmpty(name))
return MainRuleSet;
HighlightingRuleSet r;
if (ruleSetDict.TryGetValue(name, out r))
return r;
else
return null;
}
public HighlightingColor GetNamedColor(string name)
{
ApplyTheme();
HighlightingColor c;
if (colorDict.TryGetValue(name, out c))
return c;
else
return null;
}
public IEnumerable<HighlightingColor> NamedHighlightingColors
{
get
{
ApplyTheme();
return colorDict.Values;
}
}
public override string ToString()
{
return this.Name;
}
public IDictionary<string, string> Properties
{
get
{
return propDict;
}
}
private void InitializeDefinitions(XshdSyntaxDefinition xshd, IHighlightingDefinitionReferenceResolver resolver)
{
this.Name = xshd.Name;
// Create HighlightingRuleSet instances
var rnev = new RegisterNamedElementsVisitor(this);
xshd.AcceptElements(rnev);
// Assign MainRuleSet so that references can be resolved
foreach (XshdElement element in xshd.Elements)
{
XshdRuleSet xrs = element as XshdRuleSet;
if (xrs != null && xrs.Name == null)
{
if (MainRuleSet != null)
throw Error(element, "Duplicate main RuleSet. There must be only one nameless RuleSet!");
else
MainRuleSet = rnev.ruleSets[xrs];
}
}
if (MainRuleSet == null)
throw new HighlightingDefinitionInvalidException("Could not find main RuleSet.");
// Translate elements within the rulesets (resolving references and processing imports)
xshd.AcceptElements(new TranslateElementVisitor(this, rnev.ruleSets, resolver));
foreach (var p in xshd.Elements.OfType<XshdProperty>())
propDict.Add(p.Name, p.Value);
}
private void ApplyTheme()
{
if (_themedHighlights == null || _isThemeInitialized)
return;
_isThemeInitialized = true;
// Replace matching colors in highlightingdefinition with colors from theme sytaxdefinition.
var items = colorDict.ToArray();
for (int i = 0; i < items.Length; i++)
{
HighlightingColor newColor = _themedHighlights.ColorGet(items[i].Key);
if (newColor != null)
{
string key = items[i].Key;
colorDict.Remove(key);
colorDict.Add(key, newColor);
}
}
}
}
}
================================================
FILE: src/HL/Manager/XshtdLoader.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Manager
{
using HL.Resources;
using HL.Xshtd;
using ICSharpCode.AvalonEdit.Highlighting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows;
using System.Windows.Media;
using System.Xml;
using System.Xml.Schema;
/// <summary>
/// Loads .xshd files, version 2.0.
/// Version 2.0 files are recognized by the namespace.
/// </summary>
static class XshtdLoader
{
public const string Namespace = "http://icsharpcode.net/sharpdevelop/themesyntaxdefinition/2019";
static XmlSchemaSet schemaSet;
static XmlSchemaSet SchemaSet
{
get
{
if (schemaSet == null)
{
schemaSet = HighlightingLoader.LoadSchemaSet(new XmlTextReader(
HLResources.OpenStream("HL.Modes", "ModeV2_htd.xsd")));
}
return schemaSet;
}
}
public static XhstdThemeDefinition LoadDefinition(XmlReader reader, bool skipValidation)
{
reader = HighlightingLoader.GetValidatingReader(reader, true, skipValidation ? null : SchemaSet);
reader.Read();
return ParseDefinition(reader);
}
static XhstdThemeDefinition ParseDefinition(XmlReader reader)
{
Debug.Assert(reader.LocalName == "ThemeSyntaxDefinition");
XhstdThemeDefinition def = new XhstdThemeDefinition();
def.Name = reader.GetAttribute("name");
Stack<XshtdElement> xmlPath = new Stack<XshtdElement>();
xmlPath.Push(def);
ParseElements(def.Elements, reader, xmlPath);
var def1 = xmlPath.Pop();
Debug.Assert(object.Equals(def, def1));
Debug.Assert(reader.NodeType == XmlNodeType.EndElement);
Debug.Assert(reader.LocalName == "ThemeSyntaxDefinition");
return def;
}
static void ParseElements(ICollection<XshtdElement> c,
XmlReader reader,
Stack<XshtdElement> xmlPath)
{
if (reader.IsEmptyElement)
return;
while (reader.Read() && reader.NodeType != XmlNodeType.EndElement)
{
Debug.Assert(reader.NodeType == XmlNodeType.Element);
if (reader.NamespaceURI != Namespace)
{
if (!reader.IsEmptyElement)
reader.Skip();
continue;
}
switch (reader.Name)
{
case "SyntaxDefinition":
c.Add(ParseSyntaxDefinition(reader, xmlPath));
break;
case "Color":
var parent = xmlPath.Peek() as XshtdSyntaxDefinition;
if (parent == null)
throw new Exception("Syntax Error: Color cannot occurr outside of SyntaxDefinition");
c.Add(ParseNamedColor(reader, parent));
break;
case "GlobalStyles":
ParseGlobalStyles(reader, xmlPath);
break;
case "DefaultStyle":
case "CurrentLineBackground":
case "LineNumbersForeground":
case "Selection":
case "NonPrintableCharacter":
case "Hyperlink":
ParseGlobalStyle(reader, xmlPath);
break;
default:
throw new NotSupportedException("Unknown element " + reader.Name);
}
}
}
static XshtdSyntaxDefinition ParseSyntaxDefinition(XmlReader reader,
Stack<XshtdElement> xmlPath)
{
Debug.Assert(reader.LocalName == "SyntaxDefinition");
XshtdSyntaxDefinition def = new XshtdSyntaxDefinition();
def.Name = reader.GetAttribute("name");
string extensions = reader.GetAttribute("extensions");
if (extensions != null)
def.Extensions.AddRange(extensions.Split(';'));
xmlPath.Push(def);
ParseElements(def.Elements, reader, xmlPath);
def = xmlPath.Pop() as XshtdSyntaxDefinition;
Debug.Assert(def != null);
Debug.Assert(reader.NodeType == XmlNodeType.EndElement);
Debug.Assert(reader.LocalName == "SyntaxDefinition");
return def;
}
private static XshtdElement ParseGlobalStyles(XmlReader reader, Stack<XshtdElement> xmlPath)
{
Debug.Assert(reader.LocalName == "GlobalStyles");
var def = xmlPath.Peek() as XhstdThemeDefinition;
Debug.Assert(def != null);
xmlPath.Push(def.GlobalStyleElements);
ParseElements(null, reader, xmlPath);
var def2 = xmlPath.Pop();
Debug.Assert(object.Equals(def.GlobalStyleElements, def2));
Debug.Assert(reader.NodeType == XmlNodeType.EndElement);
Debug.Assert(reader.LocalName == "GlobalStyles");
return null;
}
private static XshtdElement ParseGlobalStyle(XmlReader reader, Stack<XshtdElement> xmlPath)
{
var def = xmlPath.Peek() as XshtdGlobalStyles;
Debug.Assert(def != null);
var style = new XshtdGlobalStyle(def);
style.TypeName = reader.Name;
string color;
color = reader.GetAttribute("background");
if (string.IsNullOrEmpty(color) == false)
style.background = (Color?)ColorConverter.ConvertFromInvariantString(color);
color = reader.GetAttribute("foreground");
if (string.IsNullOrEmpty(color) == false)
style.foreground = (Color?)ColorConverter.ConvertFromInvariantString(color);
color = reader.GetAttribute("bordercolor");
if (string.IsNullOrEmpty(color) == false)
style.bordercolor = (Color?)ColorConverter.ConvertFromInvariantString(color);
def.Elements.Add(style);
return def;
}
static Exception Error(XmlReader reader, string message)
{
return Error(reader as IXmlLineInfo, message);
}
static Exception Error(IXmlLineInfo lineInfo, string message)
{
if (lineInfo != null)
return new HighlightingDefinitionInvalidException(HighlightingLoader.FormatExceptionMessage(message, lineInfo.LineNumber, lineInfo.LinePosition));
else
return new HighlightingDefinitionInvalidException(message);
}
/// <summary>
/// Sets the element's position to the XmlReader's position.
/// </summary>
static void SetPosition(XshtdElement element, XmlReader reader)
{
IXmlLineInfo lineInfo = reader as IXmlLineInfo;
if (lineInfo != null)
{
element.LineNumber = lineInfo.LineNumber;
element.ColumnNumber = lineInfo.LinePosition;
}
}
static void CheckElementName(XmlReader reader, string name)
{
if (name != null)
{
if (name.Length == 0)
throw Error(reader, "The empty string is not a valid name.");
if (name.IndexOf('/') >= 0)
throw Error(reader, "Element names must not contain a slash.");
}
}
#region ParseColor
static XshtdColor ParseNamedColor(XmlReader reader, XshtdSyntaxDefinition syntax)
{
XshtdColor color = ParseColorAttributes(reader, syntax);
// check removed: invisible named colors may be useful now that apps can read highlighting data
//if (color.Foreground == null && color.FontWeight == null && color.FontStyle == null)
// throw Error(reader, "A named color must have at least one element.");
color.Name = reader.GetAttribute("name");
CheckElementName(reader, color.Name);
color.ExampleText = reader.GetAttribute("exampleText");
return color;
}
static XshtdColor ParseColorAttributes(XmlReader reader, XshtdSyntaxDefinition syntax)
{
XshtdColor color = new XshtdColor(syntax);
SetPosition(color, reader);
IXmlLineInfo position = reader as IXmlLineInfo;
color.Foreground = ParseColor(position, reader.GetAttribute("foreground"));
color.Background = ParseColor(position, reader.GetAttribute("background"));
color.FontWeight = ParseFontWeight(reader.GetAttribute("fontWeight"));
color.FontStyle = ParseFontStyle(reader.GetAttribute("fontStyle"));
color.Underline = reader.GetBoolAttribute("underline");
return color;
}
internal readonly static ColorConverter ColorConverter = new ColorConverter();
internal readonly static FontWeightConverter FontWeightConverter = new FontWeightConverter();
internal readonly static FontStyleConverter FontStyleConverter = new FontStyleConverter();
static HighlightingBrush ParseColor(IXmlLineInfo lineInfo, string color)
{
if (string.IsNullOrEmpty(color))
return null;
if (color.StartsWith("SystemColors.", StringComparison.Ordinal))
return GetSystemColorBrush(lineInfo, color);
else
return FixedColorHighlightingBrush((Color?)ColorConverter.ConvertFromInvariantString(color));
}
internal static SystemColorHighlightingBrush GetSystemColorBrush(IXmlLineInfo lineInfo, string name)
{
Debug.Assert(name.StartsWith("SystemColors.", StringComparison.Ordinal));
string shortName = name.Substring(13);
var property = typeof(SystemColors).GetProperty(shortName + "Brush");
if (property == null)
throw Error(lineInfo, "Cannot find '" + name + "'.");
return new SystemColorHighlightingBrush(property);
}
static HighlightingBrush FixedColorHighlightingBrush(Color? color)
{
if (color == null)
return null;
return new SimpleHighlightingBrush(color.Value);
}
static FontWeight? ParseFontWeight(string fontWeight)
{
if (string.IsNullOrEmpty(fontWeight))
return null;
return (FontWeight?)FontWeightConverter.ConvertFromInvariantString(fontWeight);
}
static FontStyle? ParseFontStyle(string fontStyle)
{
if (string.IsNullOrEmpty(fontStyle))
return null;
return (FontStyle?)FontStyleConverter.ConvertFromInvariantString(fontStyle);
}
#endregion
}
}
================================================
FILE: src/HL/Modes/ModeV1.xsd
================================================
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:annotation>
<xsd:documentation>
This schema defines the syntax for mode definitions in SharpDevelop.
The schema can be simplified quite a bit but it does the job as is.
If you are using this file as a reference it is probably easiest to scroll to
the botton to find the definition of the root element called SyntaxDefinition and
then unwind the different type definitions and refernces.
Note on coloring:
Many tags define how some symbol should be colored. If a specific symbol
can not be matched onto either a Span definition, Keyword, or a Digit/Number it
will be rendered in the current default color. Which is the default color of the
current span or the default color of the mode as a whole if no span has been entered.
</xsd:documentation>
</xsd:annotation>
<!-- Defines the default rendering of the mode -->
<xsd:complexType name="EnvironmentEntry">
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="CustomEnvironmentEntry">
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<!-- The environment tag defines the coloring of various attributes in SharpDevelop -->
<xsd:complexType name="Environment">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Default" type="EnvironmentEntry" minOccurs="0" maxOccurs="1" />
<xsd:element name="Selection" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="VRuler" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="InvalidLines" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="CaretMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="CaretLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="LineNumbers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="FoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="FoldMarker" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SelectedFoldLine" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="EOLMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SpaceMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="TabMarkers" type="EnvironmentEntry" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom" type="CustomEnvironmentEntry" minOccurs="0" maxOccurs="unbounded"/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType name="Properties">
<xsd:sequence>
<xsd:element name="Property" type="Property" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Property">
<!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="value" type="xsd:string" />
</xsd:complexType>
<!-- The Digits tag defines the color for rendering Digits-->
<xsd:complexType name="Digits">
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
into separate symbols, typically key words. It is not necessary, or desirable to include the
characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
<xsd:complexType name="Delimiters">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- The beginning symbol of a Span -->
<xsd:complexType name="Begin">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="singleword" type="xsd:boolean" />
<xsd:attribute name="startofline" type="xsd:boolean" />
<!-- The default rendering style for the Begin symbol. If not specified
the defaul rendering style for the span will be used. -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- The end symbol of a Span -->
<xsd:complexType name="End">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="singleword" type="xsd:boolean" />
<!-- The default rendering style for the End symbol. If not specified
the defaul rendering style for the span will be used. -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Span">
<xsd:sequence>
<!-- Defines the symbol that indicates the beginning of the span. -->
<xsd:element name="Begin" type="Begin" />
<!-- Defines the symbol that indicates the end of the span. May be omitted for
one-line spans. -->
<xsd:element name="End" minOccurs="0" type="End" />
</xsd:sequence>
<!-- The name of the span definition -->
<xsd:attribute name="name" type="xsd:string" use="required" />
<!-- Defines the rule set that is applicable in the Span. May be omitted. -->
<xsd:attribute name="rule" type="xsd:string" />
<!-- Defines wether the Span should terminate automatically at the end of line. Typical examples
include one-line comments such as // in C++ or REM in Windows .Bat files. -->
<xsd:attribute name="stopateol" type="xsd:boolean" />
<!-- OBSOLUTE: Defines whether C-style escape sequences using \ are applicable or not in the span. -->
<xsd:attribute name="noescapesequences" type="xsd:boolean" />
<!-- defines the escape character -->
<xsd:attribute name="escapecharacter" type="xsd:string" />
<!-- The default rendering style for the span -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="MarkPrevious">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
<xsd:attribute name="markmarker" type="xsd:boolean" />
<!-- The rendering style to be used -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<!-- Allows you to define the coloring of the symbol that follows a specified symbol -->
<xsd:complexType name="MarkFollowing">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<!-- Svante Lidman, looking in the code it is a bit unclear what the intent is here... -->
<xsd:attribute name="markmarker" type="xsd:boolean" />
<!-- The rendering style to be used -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Key">
<!-- The actual KeyWord, typically reserved words or symbols in a programming language -->
<xsd:attribute name="word" type="xsd:string" />
</xsd:complexType>
<!-- A grouping of keywords that sholuld be colored the same way -->
<xsd:complexType name="KeyWords">
<xsd:sequence>
<!-- allow groups with 0 keywords: this simplifies the syntax highlighting editor -->
<!-- A KeyWord -->
<xsd:element name="Key" type="Key" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
<!-- The name of the KeyWord group -->
<xsd:attribute name="name" type="xsd:string" />
<!-- The rendering style of the KeyWord group -->
<xsd:attribute name="bold" type="xsd:boolean" />
<xsd:attribute name="italic" type="xsd:boolean" />
<xsd:attribute name="color" type="xsd:string" />
<xsd:attribute name="bgcolor" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="RuleSet">
<xsd:sequence>
<!-- Defines the delimiting characters of the syntax, e.g., the characters that, "break up" a line
into separate symbols, typically key words. It is not necessary, or desirable to include the
characters that denot the start or end of a span. Space and Tab are implicitly defined as delimeters
and they don't need to be includeded explicitly (this will probably be changed at some future time).-->
<xsd:element name="Delimiters" type="Delimiters" minOccurs="0" maxOccurs="1">
</xsd:element>
<!-- A Span tag defines a scope, or what can be seen as a separate parsing context where a different set of
highlighting rules are applicable compared to the text where the span is found.
Examples of spans include:
- A string in a language as C
- A <script> tag in Html
- The internals of a tag in XML (between < and >).
A span can have a rule set associated with it that defines the highlighting rules that are applicable
in the span. -->
<xsd:element name="Span" type="Span" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- The MarkPrevious tag allows you to define the coloring of the item that preceeds a specific
symbol. An example of where this comes in handy is when coloring the contents of an XML-tag,
in particular the attributes and attribute names. The following definition:
<MarkPrevious bold="false" italic="false" color="Red">=</MarkPrevious>
will make teh highlighter color words that are followed by an = to be colored in Red.
You can see this in this file if you view it with the default XML-mode in SharpDevelop. -->
<xsd:element name="MarkPrevious" type="MarkPrevious" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- The MarkFollowing tag works similarly as the MarkPrevious tag but relates to the coloring
of the symbol that follows the specified symbol. -->
<xsd:element name="MarkFollowing" type="MarkFollowing" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
<!-- Defines a group of keywords that should be colored the same way -->
<xsd:element name="KeyWords" type="KeyWords" minOccurs="0" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
<!-- The name of the RuleSet. Used when you refer to the RuleSet in the rule attribute of a Span tag.
Each mode file should have a rule definition without a defined name. This denotes the default rule
set for the mode. -->
<xsd:attribute name="name" type="xsd:string" />
<!-- Allows you to use another mode, defined in another file as a RuleSet. For an example see the
use of the JavaScript mode from the HTML-mode. -->
<xsd:attribute name="reference" type="xsd:string" />
<!-- Defines whether case is significant for matching keywords in the mode. -->
<xsd:attribute name="ignorecase" type="xsd:boolean" />
<!-- OBSOLETE: noescapesequences -->
<xsd:attribute name="noescapesequences" type="xsd:boolean" />
<!-- defines the escape character -->
<xsd:attribute name="escapecharacter" type="xsd:string" />
</xsd:complexType>
<!-- The RuleSets tag is just a grouping of the set of RuleSets for a mode. -->
<xsd:complexType name="RuleSets">
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<!-- Any number of RuleSet tag can be defined in a mode -->
<xsd:element name="RuleSet" type="RuleSet" minOccurs="1" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<!-- SyntaxDefinition is the root-element in a mode definition file -->
<xsd:element name="SyntaxDefinition">
<xsd:complexType>
<xsd:sequence>
<!-- The Environment tag defines colors, for various standard elements in the SharpDevelop GUI, if
not given the default values are used. -->
<xsd:element name="Environment" type="Environment" minOccurs="0" maxOccurs="1"/>
<!-- The Properties section defines properties which are bound to the highlighting -->
<xsd:element name="Properties" type="Properties" minOccurs="0" maxOccurs="1" />
<!-- The Digits tag defines the color for rendering Digits-->
<xsd:element name="Digits" type="Digits" minOccurs="0" maxOccurs="1"/>
<!-- The RuleSets tag defines the rule sets that are used in the mode. Note that all modes are defined in
a flat structture even if they are used recursively. For an example of a mode that uses
multiple rule sets see the XML-mode. There is a top level rule-set and and another rule-set
that handles highligting within a tag, i.e., between < and >. -->
<xsd:element name="RuleSets" type="RuleSets" />
</xsd:sequence>
<!-- The name of the mode. This is used when you, in the defintion of a RuleSet refers to another
mode. I.e., one that is defined in an external file. For an example of this see the HTML-Mode that
uses the JavaScript-mode this way. -->
<xsd:attribute name="name" type="xsd:string" />
<!-- The file extensions that the mode is applicable for. Extensions must be written with lower case and
should include the ., as in .txt. If several extensions are applicable they should be separeated with | -->
<xsd:attribute name="extensions" type="xsd:string" />
<!-- Name of a syntax mode where rulesets, spans, keywords and other settings are imported from -->
<xsd:attribute name="extends" type="xsd:string" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
================================================
FILE: src/HL/Modes/ModeV2.xsd
================================================
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema version="2" elementFormDefault="qualified" targetNamespace="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- Font Weight -->
<xsd:simpleType name="FontWeight">
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="999"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="bold"/>
<xsd:enumeration value="normal"/>
<xsd:enumeration value="regular"/>
<!-- should we support other font weight names? -->
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
<!-- Font Style -->
<xsd:simpleType name="FontStyle">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="italic"/>
<xsd:enumeration value="normal"/>
<xsd:enumeration value="oblique"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Color -->
<xsd:attributeGroup name="ColorAttributes">
<xsd:attribute name="foreground" type="xsd:string" use="optional" />
<xsd:attribute name="background" type="xsd:string" use="optional" />
<xsd:attribute name="fontWeight" type="FontWeight" use="optional" />
<xsd:attribute name="fontStyle" type="FontStyle" use="optional" />
<xsd:attribute name="underline" type="xsd:boolean" use="optional" />
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:attributeGroup>
<xsd:attributeGroup name="ColorReferenceAttributes">
<xsd:attributeGroup ref="ColorAttributes" />
<xsd:attribute name="color" type="xsd:string" use="optional" />
</xsd:attributeGroup>
<xsd:element name="Color">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="exampleText" type="xsd:string" use="optional" />
<xsd:attributeGroup ref="ColorAttributes"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="Property">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="value" type="xsd:string" use="required" />
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:complexType>
</xsd:element>
<!-- Regular expression -->
<xsd:simpleType name="regex">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="regexIgnorePatternWhitespace">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<!-- Keywords -->
<xsd:element name="Keywords">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Word" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attributeGroup ref="ColorReferenceAttributes"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="Word">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<!-- Spans -->
<xsd:element name="Span">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Begin" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="End" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="RuleSet" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attributeGroup ref="ColorReferenceAttributes"/>
<xsd:attribute name="multiline" type="xsd:boolean" use="optional"/>
<xsd:attribute name="ruleSet" type="xsd:string" use="optional"/>
<xsd:attribute name="begin" type="regex" use="optional"/>
<xsd:attribute name="end" type="regex" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="SpanBeginEnd">
<xsd:simpleContent>
<xsd:extension base="regexIgnorePatternWhitespace">
<xsd:attributeGroup ref="ColorReferenceAttributes"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element name="Begin" type="SpanBeginEnd"/>
<xsd:element name="End" type="SpanBeginEnd"/>
<!-- Imports -->
<xsd:element name="Import">
<xsd:complexType>
<xsd:attribute name="ruleSet" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<!-- Rules -->
<xsd:element name="Rule">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="regexIgnorePatternWhitespace">
<xsd:attributeGroup ref="ColorReferenceAttributes"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<!-- Rule set -->
<xsd:element name="RuleSet">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="Keywords"/>
<xsd:element ref="Span"/>
<xsd:element ref="Import"/>
<xsd:element ref="Rule"/>
<xsd:any namespace="##other" processContents="lax" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:attribute name="ignoreCase" type="xsd:boolean" use="optional" />
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:complexType>
</xsd:element>
<!-- Main syntax definition -->
<xsd:element name="SyntaxDefinition">
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="Property"/>
<xsd:element ref="Color"/>
<xsd:element ref="RuleSet"/>
<xsd:any namespace="##other" processContents="lax" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:attribute name="extensions" type="xsd:string" use="optional" />
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
================================================
FILE: src/HL/Modes/ModeV2_htd.xsd
================================================
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema version="2" elementFormDefault="qualified"
targetNamespace="http://icsharpcode.net/sharpdevelop/themesyntaxdefinition/2019"
xmlns="http://icsharpcode.net/sharpdevelop/themesyntaxdefinition/2019"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="ColorDefinition">
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="\#[0-9a-fA-F]+"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Black"/> <!-- #000000 -->
<xsd:enumeration value="Navy"/> <!-- #000080 -->
<xsd:enumeration value="DarkBlue"/> <!-- #00008B -->
<xsd:enumeration value="MediumBlue"/> <!-- #0000CD -->
<xsd:enumeration value="Blue"/> <!-- #0000FF -->
<xsd:enumeration value="DarkGreen"/> <!-- #006400 -->
<xsd:enumeration value="Green"/> <!-- #008000 -->
<xsd:enumeration value="Teal"/> <!-- #008080 -->
<xsd:enumeration value="DarkCyan"/> <!-- #008B8B -->
<xsd:enumeration value="DeepSkyBlue"/> <!-- #00BFFF -->
<xsd:enumeration value="DarkTurquoise"/> <!-- #00CED1 -->
<xsd:enumeration value="MediumSpringGreen"/> <!-- #00FA9A -->
<xsd:enumeration value="Lime"/> <!-- #00FF00 -->
<xsd:enumeration value="SpringGreen"/> <!-- #00FF7F -->
<xsd:enumeration value="Aqua"/> <!-- #00FFFF -->
<xsd:enumeration value="Cyan"/> <!-- #00FFFF -->
<xsd:enumeration value="MidnightBlue"/> <!-- #191970 -->
<xsd:enumeration value="DodgerBlue"/> <!-- #1E90FF -->
<xsd:enumeration value="LightSeaGreen"/> <!-- #20B2AA -->
<xsd:enumeration value="ForestGreen"/> <!-- #228B22 -->
<xsd:enumeration value="SeaGreen"/> <!-- #2E8B57 -->
<xsd:enumeration value="DarkSlateGray"/> <!-- #2F4F4F -->
<xsd:enumeration value="LimeGreen"/> <!-- #32CD32 -->
<xsd:enumeration value="MediumSeaGreen"/> <!-- #3CB371 -->
<xsd:enumeration value="Turquoise"/> <!-- #40E0D0 -->
<xsd:enumeration value="RoyalBlue"/> <!-- #4169E1 -->
<xsd:enumeration value="SteelBlue"/> <!-- #4682B4 -->
<xsd:enumeration value="DarkSlateBlue"/> <!-- #483D8B -->
<xsd:enumeration value="MediumTurquoise"/> <!-- #48D1CC -->
<xsd:enumeration value="Indigo"/> <!-- #4B0082 -->
<xsd:enumeration value="DarkOliveGreen"/> <!-- #556B2F -->
<xsd:enumeration value="CadetBlue"/> <!-- #5F9EA0 -->
<xsd:enumeration value="CornflowerBlue"/> <!-- #6495ED -->
<xsd:enumeration value="MediumAquaMarine"/> <!-- #66CDAA -->
<xsd:enumeration value="DimGray"/> <!-- #696969 -->
<xsd:enumeration value="SlateBlue"/> <!-- #6A5ACD -->
<xsd:enumeration value="OliveDrab"/> <!-- #6B8E23 -->
<xsd:enumeration value="SlateGray"/> <!-- #708090 -->
<xsd:enumeration value="LightSlateGray"/> <!-- #778899 -->
<xsd:enumeration value="MediumSlateBlue"/> <!-- #7B68EE -->
<xsd:enumeration value="LawnGreen"/> <!-- #7CFC00 -->
<xsd:enumeration value="Chartreuse"/> <!-- #7FFF00 -->
<xsd:enumeration value="Aquamarine"/> <!-- #7FFFD4 -->
<xsd:enumeration value="Maroon"/> <!-- #800000 -->
<xsd:enumeration value="Purple"/> <!-- #800080 -->
<xsd:enumeration value="Olive"/> <!-- #808000 -->
<xsd:enumeration value="Gray"/> <!-- #808080 -->
<xsd:enumeration value="SkyBlue"/> <!-- #87CEEB -->
<xsd:enumeration value="LightSkyBlue"/> <!-- #87CEFA -->
<xsd:enumeration value="BlueViolet"/> <!-- #8A2BE2 -->
<xsd:enumeration value="DarkRed"/> <!-- #8B0000 -->
<xsd:enumeration value="DarkMagenta"/> <!-- #8B008B -->
<xsd:enumeration value="SaddleBrown"/> <!-- #8B4513 -->
<xsd:enumeration value="DarkSeaGreen"/> <!-- #8FBC8F -->
<xsd:enumeration value="LightGreen"/> <!-- #90EE90 -->
<xsd:enumeration value="MediumPurple"/> <!-- #9370D8 -->
<xsd:enumeration value="DarkViolet"/> <!-- #9400D3 -->
<xsd:enumeration value="PaleGreen"/> <!-- #98FB98 -->
<xsd:enumeration value="DarkOrchid"/> <!-- #9932CC -->
<xsd:enumeration value="YellowGreen"/> <!-- #9ACD32 -->
<xsd:enumeration value="Sienna"/> <!-- #A0522D -->
<xsd:enumeration value="Brown"/> <!-- #A52A2A -->
<xsd:enumeration value="DarkGray"/> <!-- #A9A9A9 -->
<xsd:enumeration value="LightBlue"/> <!-- #ADD8E6 -->
<xsd:enumeration value="GreenYellow"/> <!-- #ADFF2F -->
<xsd:enumeration value="PaleTurquoise"/> <!-- #AFEEEE -->
<xsd:enumeration value="LightSteelBlue"/> <!-- #B0C4DE -->
<xsd:enumeration value="PowderBlue"/> <!-- #B0E0E6 -->
<xsd:enumeration value="FireBrick"/> <!-- #B22222 -->
<xsd:enumeration value="DarkGoldenRod"/> <!-- #B8860B -->
<xsd:enumeration value="MediumOrchid"/> <!-- #BA55D3 -->
<xsd:enumeration value="RosyBrown"/> <!-- #BC8F8F -->
<xsd:enumeration value="DarkKhaki"/> <!-- #BDB76B -->
<xsd:enumeration value="Silver"/> <!-- #C0C0C0 -->
<xsd:enumeration value="MediumVioletRed"/> <!-- #C71585 -->
<xsd:enumeration value="IndianRed"/> <!-- #CD5C5C -->
<xsd:enumeration value="Peru"/> <!-- #CD853F -->
<xsd:enumeration value="Chocolate"/> <!-- #D2691E -->
<xsd:enumeration value="Tan"/> <!-- #D2B48C -->
<xsd:enumeration value="LightGray"/> <!-- #D3D3D3 -->
<xsd:enumeration value="PaleVioletRed"/> <!-- #D87093 -->
<xsd:enumeration value="Thistle"/> <!-- #D8BFD8 -->
<xsd:enumeration value="Orchid"/> <!-- #DA70D6 -->
<xsd:enumeration value="GoldenRod"/> <!-- #DAA520 -->
<xsd:enumeration value="Crimson"/> <!-- #DC143C -->
<xsd:enumeration value="Gainsboro"/> <!-- #DCDCDC -->
<xsd:enumeration value="Plum"/> <!-- #DDA0DD -->
<xsd:enumeration value="BurlyWood"/> <!-- #DEB887 -->
<xsd:enumeration value="LightCyan"/> <!-- #E0FFFF -->
<xsd:enumeration value="Lavender"/> <!-- #E6E6FA -->
<xsd:enumeration value="DarkSalmon"/> <!-- #E9967A -->
<xsd:enumeration value="Violet"/> <!-- #EE82EE -->
<xsd:enumeration value="PaleGoldenRod"/> <!-- #EEE8AA -->
<xsd:enumeration value="LightCoral"/> <!-- #F08080 -->
<xsd:enumeration value="Khaki"/> <!-- #F0E68C -->
<xsd:enumeration value="AliceBlue"/> <!-- #F0F8FF -->
<xsd:enumeration value="HoneyDew"/> <!-- #F0FFF0 -->
<xsd:enumeration value="Azure"/> <!-- #F0FFFF -->
<xsd:enumeration value="SandyBrown"/> <!-- #F4A460 -->
<xsd:enumeration value="Wheat"/> <!-- #F5DEB3 -->
<xsd:enumeration value="Beige"/> <!-- #F5F5DC -->
<xsd:enumeration value="WhiteSmoke"/> <!-- #F5F5F5 -->
<xsd:enumeration value="MintCream"/> <!-- #F5FFFA -->
<xsd:enumeration value="GhostWhite"/> <!-- #F8F8FF -->
<xsd:enumeration value="Salmon"/> <!-- #FA8072 -->
<xsd:enumeration value="AntiqueWhite"/> <!-- #FAEBD7 -->
<xsd:enumeration value="Linen"/> <!-- #FAF0E6 -->
<xsd:enumeration value="LightGoldenRodYellow"/> <!-- #FAFAD2 -->
<xsd:enumeration value="OldLace"/> <!-- #FDF5E6 -->
<xsd:enumeration value="Red"/> <!-- #FF0000 -->
<xsd:enumeration value="Fuchsia"/> <!-- #FF00FF -->
<xsd:enumeration value="Magenta"/> <!-- #FF00FF -->
<xsd:enumeration value="DeepPink"/> <!-- #FF1493 -->
<xsd:enumeration value="OrangeRed"/> <!-- #FF4500 -->
<xsd:enumeration value="Tomato"/> <!-- #FF6347 -->
<xsd:enumeration value="HotPink"/> <!-- #FF69B4 -->
<xsd:enumeration value="Coral"/> <!-- #FF7F50 -->
<xsd:enumeration value="Darkorange"/> <!-- #FF8C00 -->
<xsd:enumeration value="LightSalmon"/> <!-- #FFA07A -->
<xsd:enumeration value="Orange"/> <!-- #FFA500 -->
<xsd:enumeration value="LightPink"/> <!-- #FFB6C1 -->
<xsd:enumeration value="Pink"/> <!-- #FFC0CB -->
<xsd:enumeration value="Gold"/> <!-- #FFD700 -->
<xsd:enumeration value="PeachPuff"/> <!-- #FFDAB9 -->
<xsd:enumeration value="NavajoWhite"/> <!-- #FFDEAD -->
<xsd:enumeration value="Moccasin"/> <!-- #FFE4B5 -->
<xsd:enumeration value="Bisque"/> <!-- #FFE4C4 -->
<xsd:enumeration value="MistyRose"/> <!-- #FFE4E1 -->
<xsd:enumeration value="BlanchedAlmond"/> <!-- #FFEBCD -->
<xsd:enumeration value="PapayaWhip"/> <!-- #FFEFD5 -->
<xsd:enumeration value="LavenderBlush"/> <!-- #FFF0F5 -->
<xsd:enumeration value="SeaShell"/> <!-- #FFF5EE -->
<xsd:enumeration value="Cornsilk"/> <!-- #FFF8DC -->
<xsd:enumeration value="LemonChiffon"/> <!-- #FFFACD -->
<xsd:enumeration value="FloralWhite"/> <!-- #FFFAF0 -->
<xsd:enumeration value="Snow"/> <!-- #FFFAFA -->
<xsd:enumeration value="Yellow"/> <!-- #FFFF00 -->
<xsd:enumeration value="LightYellow"/> <!-- #FFFFE0 -->
<xsd:enumeration value="Ivory"/> <!-- #FFFFF0 -->
<xsd:enumeration value="White"/> <!-- #FFFFFF -->
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
<!-- Font Weight -->
<xsd:simpleType name="FontWeight">
<xsd:union>
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="1"/>
<xsd:maxInclusive value="999"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="bold"/>
<xsd:enumeration value="normal"/>
<xsd:enumeration value="regular"/>
<!-- should we support other font weight names? -->
</xsd:restriction>
</xsd:simpleType>
</xsd:union>
</xsd:simpleType>
<!-- Font Style -->
<xsd:simpleType name="FontStyle">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="italic"/>
<xsd:enumeration value="normal"/>
<xsd:enumeration value="oblique"/>
</xsd:restriction>
</xsd:simpleType>
<!-- Color -->
<xsd:attributeGroup name="ColorAttributes">
<xsd:attribute name="foreground" type="ColorDefinition" use="optional" />
<xsd:attribute name="background" type="ColorDefinition" use="optional" />
<xsd:attribute name="fontWeight" type="FontWeight" use="optional" />
<xsd:attribute name="fontStyle" type="FontStyle" use="optional" />
<xsd:attribute name="underline" type="xsd:boolean" use="optional" />
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:attributeGroup>
<xsd:element name="Color">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="exampleText" type="xsd:string" use="optional" />
<xsd:attributeGroup ref="ColorAttributes"/>
</xsd:complexType>
</xsd:element>
<!-- Main syntax definitions control themable elements for each highlighting definition -->
<xsd:element name="SyntaxDefinition">
<xsd:complexType>
<xsd:choice minOccurs="1" maxOccurs="unbounded">
<xsd:element ref="Color"/>
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:attribute name="extensions" type="xsd:string" use="optional" />
</xsd:complexType>
</xsd:element>
<!-- Begin Specify GlobalStyle elements -->
<!-- Default editor foreground and background color -->
<xsd:element name="DefaultStyle">
<xsd:complexType>
<xsd:attribute name="foreground" type="ColorDefinition" use="required" />
<xsd:attribute name="background" type="ColorDefinition" use="required" />
</xsd:complexType>
</xsd:element>
<!-- Background color for the current line in the editor -->
<xsd:element name="CurrentLineBackground">
<xsd:complexType>
<xsd:attribute name="background" type="ColorDefinition" use="required" />
<xsd:attribute name="bordercolor" type="ColorDefinition" use="required" />
</xsd:complexType>
</xsd:element>
<!-- Foreground color of the Line numbers display in the editor-->
<xsd:element name="LineNumbersForeground">
<xsd:complexType>
<xsd:attribute name="foreground" type="ColorDefinition" use="required" />
</xsd:complexType>
</xsd:element>
<xsd:element name="Selection">
<xsd:complexType>
<xsd:attribute name="foreground" type="ColorDefinition" use="required" />
<xsd:attribute name="background" type="ColorDefinition" use="required" />
<xsd:attribute name="bordercolor" type="ColorDefinition" use="required" />
</xsd:complexType>
</xsd:element>
<xsd:element name="NonPrintableCharacter">
<xsd:complexType>
<xsd:attribute name="foreground" type="ColorDefinition" use="required" />
</xsd:complexType>
</xsd:element>
<xsd:element name="Hyperlink">
<xsd:complexType>
<xsd:attribute name="foreground" type="ColorDefinition" use="required" />
<xsd:attribute name="background" type="ColorDefinition" use="required" />
</xsd:complexType>
</xsd:element>
<!--
GlobalStyle elements control WPF Theming elements of the text editor
(editor standard background, foreground, hyperlink color etc)
-->
<xsd:element name="GlobalStyles">
<xsd:complexType>
<xsd:all>
<!-- Default editor foreground and background color -->
<xsd:element ref="DefaultStyle" minOccurs="0" maxOccurs="1"/>
<!-- Background color for the current line in the editor -->
<xsd:element ref="CurrentLineBackground" minOccurs="0" maxOccurs="1"/>
<!-- Foreground color of the Line numbers display in the editor-->
<xsd:element ref="LineNumbersForeground" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="Selection" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="NonPrintableCharacter" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="Hyperlink" minOccurs="0" maxOccurs="1"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<!-- End Specify GlobalStyle elements -->
<xsd:element name="ThemeSyntaxDefinition">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="SyntaxDefinition" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element ref="GlobalStyles" minOccurs="0" maxOccurs="1"/>
<xsd:any namespace="##other" processContents="lax" />
</xsd:choice>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:anyAttribute namespace="##other" processContents="lax" />
</xsd:complexType>
</xsd:element>
</xsd:schema>
================================================
FILE: src/HL/Resources/HLResources.cs
================================================
// -------------------------------------------------------------------------------------------------
// Start Menu Manager - Copyright 2020 - Jam-Es.com
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
#pragma warning disable
namespace HL.Resources
{
using System.IO;
using HL.Manager;
internal class HLResources
{
/// <summary>
/// Open a <see cref="Stream"/> object to an internal resource (eg: xshd file)
/// to load its contents from an 'Embedded Resource'.
/// </summary>
/// <param name="prefix"></param>
/// <param name="name"></param>
/// <returns></returns>
public static Stream OpenStream(string prefix, string name)
{
string fileRef = prefix + "." + name;
Stream s = typeof(HLResources).Assembly.GetManifestResourceStream(fileRef);
if (s == null)
throw new FileNotFoundException("The resource file '" + fileRef + "' was not found.");
return s;
}
/// <summary>
/// Registers the built-in highlighting definitions on first time request for a definition
/// or when the application changes its WPF Theme (eg. from 'Light' to 'Dark') to load the
/// appropriate highlighting resource when queried for it.
/// </summary>
/// <param name="hlm"></param>
/// <param name="theme"></param>
internal static void RegisterBuiltInHighlightings(
DefaultHighlightingManager hlm,
IHLTheme theme)
{
// This registration was already performed for this highlighting theme
if (theme.IsBuiltInThemesRegistered == true)
return;
hlm.RegisterHighlighting(theme, "XmlDoc", null, "XmlDoc.xshd");
hlm.RegisterHighlighting(theme, "C#", new[] { ".cs" }, "CSharp-Mode.xshd");
hlm.RegisterHighlighting(theme, "Gcode", new[] { ".nc" }, "Gcode.xshd");
hlm.RegisterHighlighting(theme, "GRazor", new[] { ".grazor" }, "GRazor-Mode.xshd");
hlm.RegisterHighlighting(theme, "JavaScript", new[] { ".js" }, "JavaScript-Mode.xshd");
hlm.RegisterHighlighting(theme, "HTML", new[] { ".htm", ".html" }, "HTML-Mode.xshd");
hlm.RegisterHighlighting(theme, "ASP/XHTML", new[] { ".asp", ".aspx", ".asax", ".asmx", ".ascx", ".master" }, "ASPX.xshd");
hlm.RegisterHighlighting(theme, "Boo", new[] { ".boo" }, "Boo.xshd");
hlm.RegisterHighlighting(theme, "Coco", new[] { ".atg" }, "Coco-Mode.xshd");
hlm.RegisterHighlighting(theme, "CSS", new[] { ".css" }, "CSS-Mode.xshd");
hlm.RegisterHighlighting(theme, "C++", new[] { ".c", ".h", ".cc", ".cpp", ".hpp" }, "CPP-Mode.xshd");
hlm.RegisterHighlighting(theme, "Java", new[] { ".java" }, "Java-Mode.xshd");
hlm.RegisterHighlighting(theme, "Patch", new[] { ".patch", ".diff" }, "Patch-Mode.xshd");
hlm.RegisterHighlighting(theme, "PowerShell", new[] { ".ps1", ".psm1", ".psd1" }, "PowerShell.xshd");
hlm.RegisterHighlighting(theme, "PHP", new[] { ".php" }, "PHP-Mode.xshd");
hlm.RegisterHighlighting(theme, "Python", new[] { ".py", ".pyw" }, "Python-Mode.xshd");
hlm.RegisterHighlighting(theme, "TeX", new[] { ".tex" }, "Tex-Mode.xshd");
hlm.RegisterHighlighting(theme, "TSQL", new[] { ".sql" }, "TSQL-Mode.xshd");
hlm.RegisterHighlighting(theme, "VB", new[] { ".vb" }, "VB-Mode.xshd");
hlm.RegisterHighlighting(theme, "XML", (".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;" +
".xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.ilproj;" +
".booproj;.build;.xfrm;.targets;.xaml;.xpt;" +
".xft;.map;.wsdl;.disco;.ps1xml;.nuspec").Split(';'),
"XML-Mode.xshd");
hlm.RegisterHighlighting(theme, "MarkDown", new[] { ".md" }, "MarkDown-Mode.xshd");
// Additional Highlightings
hlm.RegisterHighlighting(theme, "ActionScript3", new[] { ".as" }, "AS3.xshd");
hlm.RegisterHighlighting(theme, "BAT", new[] { ".bat", ".dos" }, "DOSBATCH.xshd");
hlm.RegisterHighlighting(theme, "F#", new[] { ".fs" }, "FSharp-Mode.xshd");
hlm.RegisterHighlighting(theme, "HLSL", new[] { ".fx" }, "HLSL.xshd");
hlm.RegisterHighlighting(theme, "INI", new[] { ".cfg", ".conf", ".ini", ".iss" }, "INI.xshd");
hlm.RegisterHighlighting(theme, "LOG", new[] { ".log" }, "Log.xshd");
hlm.RegisterHighlighting(theme, "Pascal", new[] { ".pas" }, "Pascal.xshd");
hlm.RegisterHighlighting(theme, "PLSQL", new[] { ".plsql" }, "PLSQL.xshd");
hlm.RegisterHighlighting(theme, "Ruby", new[] { ".rb" }, "Ruby.xshd");
hlm.RegisterHighlighting(theme, "Scheme", new[] { ".sls", ".sps", ".ss", ".scm" }, "scheme.xshd");
hlm.RegisterHighlighting(theme, "Squirrel", new[] { ".nut" }, "squirrel.xshd");
hlm.RegisterHighlighting(theme, "TXT", new[] { ".txt" }, "TXT.xshd");
hlm.RegisterHighlighting(theme, "VTL", new[] { ".vtl", ".vm" }, "vtl.xshd");
theme.IsBuiltInThemesRegistered = true;
}
}
}
================================================
FILE: src/HL/Resources/Light/AS3.xshd
================================================
<?xml version="1.0"?>
<!-- Source: http://sindney.com/blog/posts/as3-syntax-in-avalonedit/ -->
<SyntaxDefinition name="ActionScript3" extensions=".as" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<!-- The named colors 'Comment' and 'String' are used in SharpDevelop to detect if a line is inside a multiline string/comment -->
<Color name="Comment" foreground="Green" exampleText="// comment" />
<Color name="String" foreground="Brown" exampleText="'str'"/>
<Color name="MethodCall" foreground="DarkBlue" exampleText="o.ToString();"/>
<Color name="Digits" foreground="DarkBlue" exampleText="3.1415"/>
<Color name="Keyword" foreground="DarkBlue" />
<Color name="Keyword1" foreground="Blue" />
<Color name="CommentMarkerSet" foreground="Red" fontWeight="bold" />
<Color name="CommentMarkerSetHackUndone" foreground="#E0E000" fontWeight="bold" />
<RuleSet name="CommentMarkerSet">
<Keywords color="CommentMarkerSet">
<Word>TODO</Word>
<Word>FIXME</Word>
</Keywords>
<Keywords color="CommentMarkerSetHackUndone">
<Word>HACK</Word>
<Word>UNDONE</Word>
</Keywords>
</RuleSet>
<!-- This is the main ruleset. -->
<RuleSet>
<Span color="Comment">
<Begin color="XmlDoc/DocComment">///</Begin>
<RuleSet>
<Import ruleSet="XmlDoc/DocCommentSet"/>
<Import ruleSet="CommentMarkerSet"/>
</RuleSet>
</Span>
<Span color="Comment" ruleSet="CommentMarkerSet">
<Begin>//</Begin>
</Span>
<Span color="Comment" ruleSet="CommentMarkerSet" multiline="true">
<Begin>/\*</Begin>
<End>\*/</End>
</Span>
<Span color="String">
<Begin>"</Begin>
<End>"</End>
<RuleSet>
<!-- span for escape sequences -->
<Span begin="\\" end="."/>
</RuleSet>
</Span>
<Keywords color="Keyword">
<Word>null</Word>
<Word>Infinity</Word>
<Word>NaN</Word>
<Word>undefined</Word>
<Word>true</Word>
<Word>false</Word>
<Word>dynamic</Word>
<Word>private</Word>
<Word>public</Word>
<Word>static</Word>
<Word>intrinsic</Word>
<Word>internal</Word>
<Word>native</Word>
<Word>override</Word>
<Word>protected</Word>
<Word>AS3</Word>
<Word>final</Word>
<Word>void</Word>
<Word>arguments</Word>
<Word>Array</Word>
<Word>Boolean</Word>
<Word>Class</Word>
<Word>int</Word>
<Word>Math</Word>
<Word>Namespace</Word>
<Word>Number</Word>
<Word>Object</Word>
<Word>RegExp</Word>
<Word>uint</Word>
<Word>XML</Word>
<Word>Bitmap</Word>
<Word>BitmapData</Word>
<Word>DisplayObject</Word>
<Word>DisplayObjectContainer</Word>
<Word>MovieClip</Word>
<Word>Shape</Word>
<Word>Sprite</Word>
<Word>Stage</Word>
<Word>ColorTransform</Word>
<Word>Matrix</Word>
<Word>Point</Word>
<Word>Rectangle</Word>
<Word>Transform</Word>
<Word>Sound</Word>
<Word>Video</Word>
<Word>TextField</Word>
<Word>ContextMenu</Word>
<Word>Keyboard</Word>
<Word>Mouse</Word>
<Word>ByteArray</Word>
<Word>Dictionary</Word>
<Word>Endian</Word>
<Word>Proxy</Word>
<Word>Timer</Word>
</Keywords>
<Keywords color="Keyword1">
<Word>class</Word>
<Word>extends</Word>
<Word>implements</Word>
<Word>import</Word>
<Word>interface</Word>
<Word>new</Word>
<Word>case</Word>
<Word>do</Word>
<Word>while</Word>
<Word>else</Word>
<Word>if</Word>
<Word>for</Word>
<Word>in</Word>
<Word>switch</Word>
<Word>throw</Word>
<Word>get</Word>
<Word>set</Word>
<Word>function</Word>
<Word>var</Word>
<Word>try</Word>
<Word>catch</Word>
<Word>finally</Word>
<Word>while</Word>
<Word>with</Word>
<Word>default</Word>
<Word>break</Word>
<Word>continue</Word>
<Word>delete</Word>
<Word>return</Word>
<Word>each</Word>
<Word>const</Word>
<Word>namespace</Word>
<Word>package</Word>
<Word>include</Word>
<Word>use</Word>
<Word>is</Word>
<Word>as</Word>
<Word>instanceof</Word>
<Word>typeof</Word>
<Word>void</Word>
</Keywords>
<!-- Mark previous rule-->
<Rule color="MethodCall">
\b
[\d\w_]+ # an identifier
(?=\s*\() # followed by (
</Rule>
<!-- Digits -->
<Rule color="Digits">
\b0[xX][0-9a-fA-F]+ # hex number
| \b
( \d+(\.[0-9]+)? #number with optional floating point
| \.[0-9]+ #or just starting with floating point
)
([eE][+-]?[0-9]+)? # optional exponent
</Rule>
</RuleSet>
</SyntaxDefinition>
================================================
FILE: src/HL/Resources/Light/ASPX.xshd
================================================
<?xml version="1.0"?>
<!-- converted to AvalonEdit format by Siegfried Pammer in 2010 -->
<SyntaxDefinition name="ASP/XHTML" extensions=".asp;.aspx;.asax;.asmx;.ascx;.master" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="ASPSectionStartEndTags" foreground="Black" background="Yellow" exampleText="<% System.Console.WriteLine("Hello World!"); %>" />
<Color name="ASPSection" foreground="Black" background="#FFF7F2E3" exampleText="<% System.Console.WriteLine("Hello World!"); %>" />
<RuleSet ignoreCase="true">
<Span ruleSet="ASP" multiline="true">
<Begin color="ASPSectionStartEndTags"><%</Begin>
<End color="ASPSectionStartEndTags">%></End>
</Span>
<Import ruleSet="HTML/" />
</RuleSet>
<RuleSet name="ASP">
<Import ruleSet="C#/" />
</RuleSet>
</SyntaxDefinition>
================================================
FILE: src/HL/Resources/Light/Boo.xshd
================================================
<SyntaxDefinition name="Boo" extensions=".boo" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="Green" />
<Color name="Comment1" foreground="Gray" />
<Color name="Comment2" foreground="#FF999999" />
<Color name="NestedComments" foreground="Teal" />
<Color name="String" foreground="Blue" />
<Color name="CodeInsideString" foreground="#FF993366" />
<Color name="Keywords" foreground="Black" fontWeight="bold" />
<Color name="Keywords1" foreground="DarkCyan" fontWeight="bold" />
<Color name="Keywords2" foreground="Blue" fontWeight="bold" />
<Color name="Keywords3" foreground="Navy" />
<Color name="Keywords4" foreground="Teal" fontWeight="bold" />
<Color name="Keywords5" foreground="Olive" />
<Color name="Keywords6" foreground="Purple" fontWeight="bold" />
<Color name="Keywords7" foreground="Red" />
<Color name="Keywords8" foreground="Blue" fontWeight="bold" />
<Color name="Keywords9" foreground="Brown" />
<Color name="Keywords10" foreground="Blue" fontWeight="bold" />
<Color name="Keywords11" foreground="Green" fontWeight="bold" />
<Color name="Keywords12" foreground="SaddleBrown" />
<Color name="Keywords13" foreground="Black" fontWeight="bold" />
<Color name="Keywords14" foreground="Maroon" />
<Color name="Keywords15" foreground="Purple" />
<Color name="Keywords16" foreground="Blue" fontWeight="bold" />
<Color name="Keywords17" foreground="Gray" />
<Color name="Keywords18" foreground="Blue" fontWeight="bold" />
<Color name="Keywords19" foreground="MidnightBlue" />
<Color name="Keywords20" foreground="DarkBlue" />
<Color name="Regex" foreground="#FFFF6600" />
<Color name="CommentMarkerSet" foreground="Red" fontWeight="bold" />
<Color name="CommentMarkerSetHackUndone" foreground="#E0E000" fontWeight="bold" />
<RuleSet name="CommentMarkerSet">
<Keywords color="CommentMarkerSet">
<Word>TODO</Word>
<Word>FIXME</Word>
</Keywords>
<Keywords color="CommentMarkerSetHackUndone">
<Word>HACK</Word>
<Word>UNDONE</Word>
</Keywords>
</RuleSet>
<RuleSet>
<Span color="Comment" multiline="true">
<Begin>"""</Begin>
<End>"""</End>
</Span>
<Span color="Comment1">
<Begin>\#</Begin>
</Span>
<Span color="Comment2">
<Begin>//</Begin>
</Span>
<Span color="Comment" ruleSet="comments set" multiline="true">
<Begin>/\*</Begin>
<End>\*/</End>
</Span>
<Span color="String">
<Begin>"</Begin>
<End>"</End>
<RuleSet>
<Span begin="\\" end="." />
<Span color="CodeInsideString" ruleSet="">
<!-- ruleSet="" reference this file's main ruleset, allowing normal boo code inside ${} -->
<Begin>\$\{</Begin>
<End>}</End>
</Span>
</RuleSet>
</Span>
<Span color="String">
<Begin>'</Begin>
<End>'</End>
<RuleSet>
<Span begin="\\" end="." />
</RuleSet>
</Span>
<Span color="Regex" multiline="true">
<Begin>@/</Begin>
<End>/</End>
</Span>
<Span color="Regex">
<!-- this is a span (not a rule) because " within a regex doesn't start a string literal -->
<Begin>/\S+/</Begin>
<End></End> <!-- end immediately after Begin -->
</Span>
<Keywords color="Keywords">
<Word>self</Word>
<Word>super</Word>
</Keywords>
<Keywords color="Keywords1">
<Word>is</Word>
<Word>isa</Word>
<Word>and</Word>
<Word>or</Word>
<Word>not</Word>
</Keywords>
<Keywords color="Keywords2">
<Word>else</Word>
<Word>elif</Word>
<Word>if</Word>
<Word>match</Word>
<Word>case</Word>
<Word>unless</Word>
<Word>otherwise</Word>
<Word>for</Word>
<Word>in</Word>
<Word>while</Word>
</Keywords>
<Keywords color="Keywords3">
<Word>break</Word>
<Word>continue</Word>
<Word>return</Word>
<Word>yield</Word>
<Word>goto</Word>
</Keywords>
<Keywords color="Keywords4">
<Word>try</Word>
<Word>raise</Word>
<Word>ensure</Word>
<Word>except</Word>
<Word>retry</Word>
<Word>success</Word>
</Keywords>
<Keywords color="Keywords5">
<Word>fixed</Word>
<Word>unsafe</Word>
</Keywords>
<Keywords color="Keywords6">
<Word>bool</Word>
<Word>double</Word>
<Word>single</Word>
<Word>byte</Word>
<Word>sbyte</Word>
<Word>short</Word>
<Word>ushort</Word>
<Word>int</Word>
<Word>uint</Word>
<Word>long</Word>
<Word>ulong</Word>
<Word>date</Word>
<Word>timespan</Word>
<Word>decimal</Word>
<Word>char</Word>
<Word>object</Word>
<Word>duck</Word>
<Word>string</Word>
<Word>regex</Word>
</Keywords>
<Keywords color="Keywords7">
<Word>void</Word>
</Keywords>
<Keywords color="Keywords8">
<Word>cast</Word>
<Word>as</Word>
</Keywords>
<Keywords color="Keywords9">
<Word>override</Word>
<Word>static</Word>
<Word>virtual</Word>
<Word>abstract</Word>
<Word>final</Word>
<Word>transient</Word>
<Word>partial</Word>
</Keywords>
<Keywords color="Keywords10">
<Word>public</Word>
<Word>protected</Word>
<Word>private</Word>
<Word>internal</Word>
</Keywords>
<Keywords color="Keywords11">
<Word>namespace</Word>
<Word>import</Word>
<Word>from</Word>
</Keywords>
<Keywords color="Keywords12">
<Word>get</Word>
<Word>set</Word>
</Keywords>
<Keywords color="Keywords13">
<Word>null</Word>
<Word>value</Word>
<Word>true</Word>
<Word>false</Word>
<Word>ast</Word>
</Keywords>
<Keywords color="Keywords14">
<Word>using</Word>
<Word>unchecked</Word>
<Word>checked</Word>
<Word>lock</Word>
<Word>getter</Word>
<Word>required</Word>
<Word>rawArrayIndexing</Word>
<Word>normalArrayIndexing</Word>
<Word>yieldAll</Word>
</Keywords>
<Keywords color="Keywords15">
<Word>assert</Word>
<Word>array</Word>
<Word>matrix</Word>
<Word>print</Word>
<Word>gets</Word>
<Word>prompt</Word>
<Word>enumerate</Word>
<Word>zip</Word>
<Word>filter</Word>
<Word>map</Word>
<Word>cat</Word>
<Word>__eval__</Word>
<Word>__switch__</Word>
</Keywords>
<Keywords color="Keywords16">
<Word>constructor</Word>
<Word>destructor</Word>
<Word>def</Word>
<Word>include</Word>
<Word>event</Word>
<Word>ref</Word>
</Keywords>
<Keywords color="Keywords17">
<Word>pass</Word>
</Keywords>
<Keywords color="Keywords18">
<Word>enum</Word>
<Word>class</Word>
<Word>struct</Word>
<Word>interface</Word>
<Word>mixin</Word>
<Word>callable</Word>
<Word>do</Word>
<Word>of</Word>
</Keywords>
<Rule color="Keywords19">[\d\w_]+(?=(\s*\())</Rule>
<Rule color="Keywords20">\b0[xX][0-9a-fA-F]+|(\b\d+(\.[0-9]+)?|\.[0-9]+)([eE][+-]?[0-9]+)?</Rule>
</RuleSet>
<RuleSet name="comments set">
<!-- allows nested /**/ comments, coloring them Green/Teal alternately -->
<Span color="NestedComments" multiline="true">
<Begin>/\*</Begin>
<End>\*/</End>
<RuleSet>
<Span color="Comment" ruleSet="comments set" multiline="true">
<Begin>/\*</Begin>
<End>\*/</End>
</Span>
</RuleSet>
</Span>
</RuleSet>
</SyntaxDefinition>
================================================
FILE: src/HL/Resources/Light/CPP-Mode.xshd
================================================
<?xml version="1.0"?>
<!-- syntaxdefinition for C/C++ 2001 by Andrea Paatz and Mike Krueger -->
<!-- converted to AvalonEdit format by Siegfried Pammer in 2010 -->
<SyntaxDefinition name="C++" extensions=".c;.h;.cc;.cpp;.hpp" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="Green" />
<Color name="Character" foreground="Fuchsia" />
<Color name="String" foreground="Fuchsia" />
<Color name="Preprocessor" foreground="Green" />
<Color name="Punctuation" foreground="DarkGreen" />
<Color name="MethodName" foreground="MidnightBlue" fontWeight="bold" />
<Color name="Digits" foreground="DarkBlue" />
<Color name="CompoundKeywords" foreground="Black" fontWeight="bold" />
<Color name="This" foreground="Black" fontWeight="bold" />
<Color name="Operators" foreground="#FF008B8B" fontWeight="bold" />
<Color name="Namespace" foreground="#FF008000" fontWeight="bold" />
<Color name="Friend" foreground="#FFA52A2A" />
<Color name="Modifiers" foreground="#FF0000FF" fontWeight="bold" />
<Color name="TypeKeywords" foreground="#FFFF0000" />
<Color name="BooleanConstants" foreground="#FF000000" fontWeight="bold" />
<Color name="Keywords" foreground="#FF0000FF" fontWeight="bold" />
<Color name="LoopKeywords" foreground="#FF0000FF" fontWeight="bold" />
<Color name="JumpKeywords" foreground="#FF000080" />
<Color name="ExceptionHandling" foreground="#FF008080" fontWeight="bold" />
<Color name="ControlFlow" foreground="#FF0000FF" fontWeight="bold" />
<RuleSet ignoreCase="false">
<Rule color="Punctuation">
[?,.;()\[\]{}+\-/%*<>^=~!&]+
</Rule>
<Keywords color="CompoundKeywords">
<Word>__abstract</Word>
<Word>__box</Word>
<Word>__delegate</Word>
<Word>__gc</Word>
<Word>__identifier</Word>
<Word>__nogc</Word>
<Word>__pin</Word>
<Word>__property</Word>
<Word>__sealed</Word>
<Word>__try_cast</Word>
<Word>__typeof</Word>
<Word>__value</Word>
<Word>__event</Word>
<Word>__hook</Word>
<Word>__raise</Word>
<Word>__unhook</Word>
<Word>__interface</Word>
<Word>ref class</Word>
<Word>ref struct</Word>
<Word>value class</Word>
<Word>value struct</Word>
<Word>interface class</Word>
<Word>interface struct</Word>
<Word>enum class</Word>
<Word>enum struct</Word>
<Word>delegate</Word>
<Word>event</Word>
<Word>property</Word>
<Word>abstract</Word>
<Word>override</Word>
<Word>sealed</Word>
<Word>generic</Word>
<Word>where</Word>
<Word>finally</Word>
<Word>for each</Word>
<Word>gcnew</Word>
<Word>in</Word>
<Word>initonly</Word>
<Word>literal</Word>
<Word>nullptr</Word>
</Keywords>
<Keywords color="This">
<Word>this</Word>
</Keywords>
<Keywords color="Operators">
<Word>and</Word>
<Word>and_eq</Word>
<Word>bitand</Word>
<Word>bitor</Word>
<Word>new</Word>
<Word>not</Word>
<Word>not_eq</Word>
<Word>or</Word>
<Word>or_eq</Word>
<Word>xor</Word>
<Word>xor_eq</Word>
</Keywords>
<Keywords color="Namespace">
<Word>using</Word>
<Word>namespace</Word>
</Keywords>
<Keywords color="Friend">
<Word>friend</Word>
</Keywords>
<Keywords color="Modifiers">
<Word>private</Word>
<Word>protected</Word>
<Word>public</Word>
<Word>const</Word>
gitextract_gz0lcu5f/ ├── .gitignore ├── CustomAnalysisRules.Test.ruleset ├── CustomAnalysisRules.ruleset ├── Directory.Build.props ├── LICENSE ├── README.md ├── StartMenuManager.sln ├── src/ │ ├── HL/ │ │ ├── AssemblyInfo.cs │ │ ├── HL.csproj │ │ ├── HighlightingTheme/ │ │ │ ├── GlobalStyle.cs │ │ │ └── SyntaxDefinition.cs │ │ ├── Interfaces/ │ │ │ ├── IHLTheme.cs │ │ │ └── IThemedHighlightingManager.cs │ │ ├── LICENSE │ │ ├── Manager/ │ │ │ ├── BusyManager.cs │ │ │ ├── DefaultHighlightingManager.cs │ │ │ ├── DelayLoadedHighlightingDefinition.cs │ │ │ ├── ExtensionMethods.cs │ │ │ ├── HLTheme.cs │ │ │ ├── HighlightingBrush.cs │ │ │ ├── HighlightingLoader.cs │ │ │ ├── HighlightingThemeLoader.cs │ │ │ ├── ThemedHighlightingManager.cs │ │ │ ├── V2Loader.cs │ │ │ ├── XmlHighlightingDefinition.cs │ │ │ └── XshtdLoader.cs │ │ ├── Modes/ │ │ │ ├── ModeV1.xsd │ │ │ ├── ModeV2.xsd │ │ │ └── ModeV2_htd.xsd │ │ ├── Resources/ │ │ │ ├── HLResources.cs │ │ │ ├── Light/ │ │ │ │ ├── AS3.xshd │ │ │ │ ├── ASPX.xshd │ │ │ │ ├── Boo.xshd │ │ │ │ ├── CPP-Mode.xshd │ │ │ │ ├── CSS-Mode.xshd │ │ │ │ ├── CSharp-Mode.xshd │ │ │ │ ├── Coco-Mode.xshd │ │ │ │ ├── DOSBATCH.xshd │ │ │ │ ├── FSharp-Mode.xshd │ │ │ │ ├── GRazor-Mode.xshd │ │ │ │ ├── Gcode.xshd │ │ │ │ ├── HLSL.xshd │ │ │ │ ├── HTML-Mode.xshd │ │ │ │ ├── INI.xshd │ │ │ │ ├── Java-Mode.xshd │ │ │ │ ├── JavaScript-Mode.xshd │ │ │ │ ├── Log.xshd │ │ │ │ ├── MarkDown-Mode.xshd │ │ │ │ ├── PHP-Mode.xshd │ │ │ │ ├── PLSQL.xshd │ │ │ │ ├── Pascal.xshd │ │ │ │ ├── Patch-Mode.xshd │ │ │ │ ├── PowerShell.xshd │ │ │ │ ├── Python-Mode.xshd │ │ │ │ ├── Ruby.xshd │ │ │ │ ├── TSQL-Mode.xshd │ │ │ │ ├── TXT.xshd │ │ │ │ ├── Tex-Mode.xshd │ │ │ │ ├── VB-Mode.xshd │ │ │ │ ├── XML-Mode.xshd │ │ │ │ ├── XmlDoc.xshd │ │ │ │ ├── scheme.xshd │ │ │ │ ├── squirrel.xshd │ │ │ │ └── vtl.xshd │ │ │ └── Themes/ │ │ │ ├── Dark.xshtd │ │ │ ├── TrueBlue.xshtd │ │ │ └── VS2019_Dark.xshtd │ │ └── Xshtd/ │ │ ├── IXshtdVisitor.cs │ │ ├── XhstdThemeDefinition.cs │ │ ├── XmlHighlightingThemeDefinition.cs │ │ ├── XshtdColor.cs │ │ ├── XshtdElement.cs │ │ ├── XshtdGlobalStyle.cs │ │ ├── XshtdGlobalStyles.cs │ │ ├── XshtdSyntaxDefinition.cs │ │ └── interfaces/ │ │ ├── IFreezable.cs │ │ ├── IHighlightingDefinitionReferenceResolver.cs │ │ └── IHighlightingThemeDefinition.cs │ ├── StartMenuManager.Builder/ │ │ ├── App.config │ │ ├── Program.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── StartMenuManager.Builder.csproj │ ├── StartMenuManager.Core/ │ │ ├── DataStructures/ │ │ │ ├── Action.cs │ │ │ ├── Actions/ │ │ │ │ ├── CommandAction.cs │ │ │ │ ├── FileAction.cs │ │ │ │ ├── FolderAction.cs │ │ │ │ ├── SoftwareAction.cs │ │ │ │ └── WebsiteAction.cs │ │ │ ├── Config.cs │ │ │ ├── SettingsConfig.cs │ │ │ ├── Shortcut.cs │ │ │ └── ValidationError.cs │ │ ├── Serialization/ │ │ │ └── Serializer.cs │ │ └── StartMenuManager.Core.csproj │ ├── StartMenuManager.GUI/ │ │ ├── App.config │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Builder.cs │ │ ├── Dialogs/ │ │ │ ├── MessageDialog.cs │ │ │ ├── SettingsDialog.cs │ │ │ └── YesNoDialog.cs │ │ ├── Extensions/ │ │ │ └── ActionExtensions.cs │ │ ├── IconExtractorWindow.xaml │ │ ├── IconExtractorWindow.xaml.cs │ │ ├── JsonViewManager.cs │ │ ├── LowerMenuBar.cs │ │ ├── MainWindow.xaml │ │ ├── MainWindow.xaml.cs │ │ ├── Properties/ │ │ │ ├── AssemblyInfo.cs │ │ │ ├── Resources.Designer.cs │ │ │ ├── Resources.resx │ │ │ ├── Settings.Designer.cs │ │ │ └── Settings.settings │ │ ├── Runner.cs │ │ ├── Serialization/ │ │ │ ├── IconManager.cs │ │ │ └── JsonSerializer.cs │ │ ├── ShortcutControl.xaml │ │ ├── ShortcutControl.xaml.cs │ │ ├── ShortcutListArea.cs │ │ ├── StartMenuManager.GUI.csproj │ │ ├── Structures/ │ │ │ ├── DialogTypes.cs │ │ │ └── ShortcutType.cs │ │ ├── SubShortcutControl.xaml │ │ ├── SubShortcutControl.xaml.cs │ │ ├── TitleBarButtons.cs │ │ ├── Utils/ │ │ │ ├── DialogManager.cs │ │ │ ├── IconExtractorWindow_TitleBarControl.cs │ │ │ ├── ThemeManager.cs │ │ │ ├── TitleBarControl.cs │ │ │ └── WindowRef.cs │ │ ├── WelcomeCard.cs │ │ └── app.manifest │ ├── StartMenuManager.GUI.Installer/ │ │ ├── Product.wxs │ │ ├── StartMenuManager.GUI.Installer.wixproj │ │ └── netchecker.wxs │ ├── StartMenuManager.PreUninstall/ │ │ ├── App.config │ │ ├── Program.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── StartMenuManager.PreUninstall.csproj │ ├── StartMenuManager.Runner/ │ │ ├── App.config │ │ ├── Program.cs │ │ ├── Properties/ │ │ │ └── AssemblyInfo.cs │ │ └── StartMenuManager.Runner.csproj │ └── TextEditLib/ │ ├── AssemblyInfo.cs │ ├── Extensions/ │ │ └── HighlightCurrentLineBackgroundRenderer.cs │ ├── TextEdit.xaml │ ├── TextEdit.xaml.cs │ ├── TextEditLib.csproj │ └── Themes/ │ ├── DarkBrushs.xaml │ ├── Generic.xaml │ ├── Icons.xaml │ ├── LightBrushs.xaml │ └── ResourceKeys.cs └── stylecop.json
SYMBOL INDEX (511 symbols across 72 files)
FILE: src/HL/HighlightingTheme/GlobalStyle.cs
class GlobalStyle (line 19) | public class GlobalStyle : AbstractFreezable, IFreezable
method GlobalStyle (line 33) | public GlobalStyle(string typeName)
method GlobalStyle (line 42) | protected GlobalStyle()
method ToString (line 133) | public override string ToString()
FILE: src/HL/HighlightingTheme/SyntaxDefinition.cs
class SyntaxDefinition (line 20) | public class SyntaxDefinition : AbstractFreezable, IFreezable
method SyntaxDefinition (line 31) | public SyntaxDefinition(string paramName)
method SyntaxDefinition (line 40) | public SyntaxDefinition()
method ToString (line 89) | public override string ToString()
method ColorGet (line 99) | public HighlightingColor ColorGet(string name)
method ColorAdd (line 118) | public void ColorAdd(HighlightingColor color)
method ColorReplace (line 123) | internal void ColorReplace(string name, HighlightingColor themeColor)
FILE: src/HL/Interfaces/IHLTheme.cs
type IHLTheme (line 22) | public interface IHLTheme
method GetDefinition (line 91) | IHighlightingDefinition GetDefinition(string name);
method GetDefinitionByExtension (line 97) | IHighlightingDefinition GetDefinitionByExtension(string extension);
method RegisterHighlighting (line 105) | void RegisterHighlighting(string name, string[] extensions, IHighlight...
method GetThemeDefinition (line 111) | SyntaxDefinition GetThemeDefinition(string highlightingName);
method ResolveHighLightingTheme (line 120) | XhstdThemeDefinition ResolveHighLightingTheme(string hLPrefix, string ...
FILE: src/HL/Interfaces/IThemedHighlightingManager.cs
type IThemedHighlightingManager (line 23) | public interface IThemedHighlightingManager : IHighlightingDefinitionRef...
method GetDefinitionByExtension (line 44) | IHighlightingDefinition GetDefinitionByExtension(string extension);
method RegisterHighlighting (line 52) | void RegisterHighlighting(string name, string[] extensions, IHighlight...
method RegisterHighlighting (line 60) | void RegisterHighlighting(string name, string[] extensions, Func<IHigh...
method SetCurrentTheme (line 69) | void SetCurrentTheme(string name);
FILE: src/HL/Manager/BusyManager.cs
class BusyManager (line 19) | internal static class BusyManager
type BusyLock (line 21) | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performanc...
method BusyLock (line 30) | internal BusyLock(List<object> objectList)
method Dispose (line 40) | public void Dispose()
method Enter (line 51) | public static BusyLock Enter(object obj)
FILE: src/HL/Manager/DefaultHighlightingManager.cs
class DefaultHighlightingManager (line 22) | internal sealed class DefaultHighlightingManager : ThemedHighlightingMan...
method DefaultHighlightingManager (line 28) | static DefaultHighlightingManager()
method DefaultHighlightingManager (line 58) | public DefaultHighlightingManager()
method RegisterHighlighting (line 76) | internal void RegisterHighlighting(IHLTheme theme,
method LoadHighlighting (line 140) | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performanc...
FILE: src/HL/Manager/DelayLoadedHighlightingDefinition.cs
class DelayLoadedHighlightingDefinition (line 14) | internal sealed class DelayLoadedHighlightingDefinition : IHighlightingD...
method DelayLoadedHighlightingDefinition (line 22) | public DelayLoadedHighlightingDefinition(string name, Func<IHighlighti...
method GetDefinition (line 39) | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "...
method GetNamedRuleSet (line 89) | public HighlightingRuleSet GetNamedRuleSet(string name)
method GetNamedColor (line 94) | public HighlightingColor GetNamedColor(string name)
method ToString (line 107) | public override string ToString()
FILE: src/HL/Manager/ExtensionMethods.cs
class ExtensionMethods (line 18) | static class ExtensionMethods
method IsClose (line 34) | public static bool IsClose(this double d1, double d2)
method CoerceValue (line 63) | public static double CoerceValue(this double value, double minimum, do...
method CoerceValue (line 74) | public static int CoerceValue(this int value, int minimum, int maximum)
method AddRange (line 94) | public static void AddRange<T>(this ICollection<T> collection, IEnumer...
method Sequence (line 103) | public static IEnumerable<T> Sequence<T>(T value)
method GetAttributeOrNull (line 113) | public static string GetAttributeOrNull(this XmlElement element, strin...
method GetBoolAttribute (line 122) | public static bool? GetBoolAttribute(this XmlElement element, string a...
method GetBoolAttribute (line 131) | public static bool? GetBoolAttribute(this XmlReader reader, string att...
method Log (line 230) | [Conditional("DEBUG")]
FILE: src/HL/Manager/HLTheme.cs
class HLTheme (line 28) | internal class HLTheme : IHLTheme
method HLTheme (line 53) | public HLTheme(string paramKey,
method HLTheme (line 77) | public HLTheme(string paramKey,
method HLTheme (line 98) | protected HLTheme()
method GetDefinition (line 187) | public IHighlightingDefinition GetDefinition(string name)
method GetThemeDefinition (line 204) | public SyntaxDefinition GetThemeDefinition(string highlightingName)
method GetDefinitionByExtension (line 218) | public IHighlightingDefinition GetDefinitionByExtension(string extension)
method RegisterHighlighting (line 238) | public void RegisterHighlighting(string name,
method ResolveHighLightingTheme (line 269) | protected virtual void ResolveHighLightingTheme()
method ResolveHighLightingTheme (line 292) | public XhstdThemeDefinition ResolveHighLightingTheme(string hLPrefix, ...
FILE: src/HL/Manager/HighlightingBrush.cs
class SystemColorHighlightingBrush (line 22) | [Serializable]
method SystemColorHighlightingBrush (line 27) | public SystemColorHighlightingBrush(PropertyInfo property)
method GetBrush (line 34) | public override Brush GetBrush(ITextRunConstructionContext context)
method ToString (line 39) | public override string ToString()
method SystemColorHighlightingBrush (line 44) | SystemColorHighlightingBrush(SerializationInfo info, StreamingContext ...
method GetObjectData (line 51) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont...
method Equals (line 56) | public override bool Equals(object obj)
method GetHashCode (line 64) | public override int GetHashCode()
FILE: src/HL/Manager/HighlightingLoader.cs
class HighlightingLoader (line 20) | public static class HighlightingLoader
method LoadXshd (line 26) | public static XshdSyntaxDefinition LoadXshd(XmlReader reader)
method LoadXshd (line 31) | internal static XshdSyntaxDefinition LoadXshd(XmlReader reader, bool s...
method WrapException (line 57) | static Exception WrapException(Exception ex, int lineNumber, int lineP...
method FormatExceptionMessage (line 62) | internal static string FormatExceptionMessage(string message, int line...
method GetValidatingReader (line 70) | internal static XmlReader GetValidatingReader(XmlReader input, bool ig...
method LoadSchemaSet (line 84) | internal static XmlSchemaSet LoadSchemaSet(XmlReader schemaInput)
method Load (line 100) | public static IHighlightingDefinition Load(XshdSyntaxDefinition syntax...
method Load (line 123) | public static IHighlightingDefinition Load(SyntaxDefinition themedHigh...
method Load (line 138) | public static IHighlightingDefinition Load(XmlReader reader,
FILE: src/HL/Manager/HighlightingThemeLoader.cs
class HighlightingThemeLoader (line 20) | static class HighlightingThemeLoader
method LoadXshd (line 26) | public static XhstdThemeDefinition LoadXshd(XmlReader reader)
method LoadXshd (line 31) | internal static XhstdThemeDefinition LoadXshd(XmlReader reader, bool s...
method WrapException (line 55) | static Exception WrapException(Exception ex, int lineNumber, int lineP...
method FormatExceptionMessage (line 60) | internal static string FormatExceptionMessage(string message, int line...
method GetValidatingReader (line 68) | internal static XmlReader GetValidatingReader(XmlReader input, bool ig...
method LoadSchemaSet (line 82) | internal static XmlSchemaSet LoadSchemaSet(XmlReader schemaInput)
method Load (line 98) | public static IHighlightingThemeDefinition Load(XhstdThemeDefinition s...
method Load (line 110) | public static IHighlightingThemeDefinition Load(XmlReader reader,
FILE: src/HL/Manager/ThemedHighlightingManager.cs
class ThemedHighlightingManager (line 26) | public class ThemedHighlightingManager : IThemedHighlightingManager
method ThemedHighlightingManager (line 51) | public ThemedHighlightingManager()
method GetDefinition (line 81) | IHighlightingDefinition IHighlightingDefinitionReferenceResolver.GetDe...
method GetDefinitionByExtension (line 114) | public IHighlightingDefinition GetDefinitionByExtension(string extension)
method RegisterHighlighting (line 134) | public void RegisterHighlighting(string name, string[] extensions, IHi...
method RegisterHighlighting (line 154) | public void RegisterHighlighting(string name, string[] extensions, Fun...
method SetCurrentTheme (line 169) | public void SetCurrentTheme(string themeNameKey)
method ThemedHighlightingAdd (line 180) | public void ThemedHighlightingAdd(string key, IHLTheme theme)
method ThemedHighlightingRemove (line 193) | public void ThemedHighlightingRemove(string removekey)
method SetCurrentThemeInternal (line 206) | protected void SetCurrentThemeInternal(string themeNameKey)
method GetPrefix (line 218) | protected virtual string GetPrefix(string themeNameKey)
method GetThemeDefinition (line 236) | SyntaxDefinition IHighlightingThemeDefinitionReferenceResolver.GetThem...
method GetThemeDefinition (line 253) | SyntaxDefinition IHighlightingThemeDefinitionReferenceResolver.GetThem...
FILE: src/HL/Manager/V2Loader.cs
class V2Loader (line 25) | static class V2Loader
method LoadDefinition (line 44) | public static XshdSyntaxDefinition LoadDefinition(XmlReader reader, bo...
method ParseDefinition (line 51) | static XshdSyntaxDefinition ParseDefinition(XmlReader reader)
method ParseElements (line 65) | static void ParseElements(ICollection<XshdElement> c, XmlReader reader)
method ParseProperty (line 107) | static XshdElement ParseProperty(XmlReader reader)
method ParseRuleSet (line 116) | static XshdRuleSet ParseRuleSet(XmlReader reader)
method ParseRule (line 128) | static XshdRule ParseRule(XmlReader reader)
method ParseKeywords (line 145) | static XshdKeywords ParseKeywords(XmlReader reader)
method ParseImport (line 159) | static XshdImport ParseImport(XmlReader reader)
method ParseSpan (line 169) | static XshdSpan ParseSpan(XmlReader reader)
method Error (line 214) | static Exception Error(XmlReader reader, string message)
method Error (line 219) | static Exception Error(IXmlLineInfo lineInfo, string message)
method SetPosition (line 230) | static void SetPosition(XshdElement element, XmlReader reader)
method ParseRuleSetReference (line 240) | static XshdReference<XshdRuleSet> ParseRuleSetReference(XmlReader reader)
method CheckElementName (line 262) | static void CheckElementName(XmlReader reader, string name)
method ParseNamedColor (line 274) | static XshdColor ParseNamedColor(XmlReader reader)
method ParseColorReference (line 286) | static XshdReference<XshdColor> ParseColorReference(XmlReader reader)
method ParseColorAttributes (line 307) | static XshdColor ParseColorAttributes(XmlReader reader)
method ParseColor (line 324) | static HighlightingBrush ParseColor(IXmlLineInfo lineInfo, string color)
method GetSystemColorBrush (line 334) | internal static SystemColorHighlightingBrush GetSystemColorBrush(IXmlL...
method FixedColorHighlightingBrush (line 344) | static HighlightingBrush FixedColorHighlightingBrush(Color? color)
method ParseFontWeight (line 351) | static FontWeight? ParseFontWeight(string fontWeight)
method ParseFontStyle (line 358) | static FontStyle? ParseFontStyle(string fontStyle)
FILE: src/HL/Manager/XmlHighlightingDefinition.cs
class XmlHighlightingDefinition (line 21) | [Serializable]
method XmlHighlightingDefinition (line 26) | public XmlHighlightingDefinition(XshdSyntaxDefinition xshd,
method XmlHighlightingDefinition (line 39) | public XmlHighlightingDefinition(SyntaxDefinition themedHighlights,
class RegisterNamedElementsVisitor (line 49) | sealed class RegisterNamedElementsVisitor : IXshdVisitor
method RegisterNamedElementsVisitor (line 55) | public RegisterNamedElementsVisitor(XmlHighlightingDefinition def)
method VisitRuleSet (line 60) | public object VisitRuleSet(XshdRuleSet ruleSet)
method VisitColor (line 77) | public object VisitColor(XshdColor color)
method VisitKeywords (line 92) | public object VisitKeywords(XshdKeywords keywords)
method VisitSpan (line 97) | public object VisitSpan(XshdSpan span)
method VisitImport (line 105) | public object VisitImport(XshdImport import)
method VisitRule (line 110) | public object VisitRule(XshdRule rule)
class TranslateElementVisitor (line 118) | sealed class TranslateElementVisitor : IXshdVisitor
method TranslateElementVisitor (line 128) | public TranslateElementVisitor(XmlHighlightingDefinition def, Dictio...
method VisitRuleSet (line 142) | public object VisitRuleSet(XshdRuleSet ruleSet)
method Merge (line 188) | static void Merge(HighlightingRuleSet target, HighlightingRuleSet so...
method VisitColor (line 194) | public object VisitColor(XshdColor color)
method VisitKeywords (line 218) | public object VisitKeywords(XshdKeywords keywords)
method IsSimpleWord (line 270) | static bool IsSimpleWord(string word)
method CreateRegex (line 275) | Regex CreateRegex(XshdElement position, string regex, XshdRegexType ...
method GetColor (line 294) | HighlightingColor GetColor(XshdElement position, XshdReference<XshdC...
method GetDefinition (line 314) | IHighlightingDefinition GetDefinition(XshdElement position, string d...
method GetRuleSet (line 326) | HighlightingRuleSet GetRuleSet(XshdElement position, XshdReference<X...
method VisitSpan (line 346) | public object VisitSpan(XshdSpan span)
method VisitImport (line 374) | public object VisitImport(XshdImport import)
method VisitRule (line 387) | public object VisitRule(XshdRule rule)
method Error (line 398) | static Exception Error(XshdElement element, string message)
method GetNamedRuleSet (line 421) | public HighlightingRuleSet GetNamedRuleSet(string name)
method GetNamedColor (line 435) | public HighlightingColor GetNamedColor(string name)
method ToString (line 456) | public override string ToString()
method InitializeDefinitions (line 469) | private void InitializeDefinitions(XshdSyntaxDefinition xshd, IHighlig...
method ApplyTheme (line 500) | private void ApplyTheme()
FILE: src/HL/Manager/XshtdLoader.cs
class XshtdLoader (line 25) | static class XshtdLoader
method LoadDefinition (line 44) | public static XhstdThemeDefinition LoadDefinition(XmlReader reader, bo...
method ParseDefinition (line 51) | static XhstdThemeDefinition ParseDefinition(XmlReader reader)
method ParseElements (line 72) | static void ParseElements(ICollection<XshtdElement> c,
method ParseSyntaxDefinition (line 122) | static XshtdSyntaxDefinition ParseSyntaxDefinition(XmlReader reader,
method ParseGlobalStyles (line 146) | private static XshtdElement ParseGlobalStyles(XmlReader reader, Stack<...
method ParseGlobalStyle (line 164) | private static XshtdElement ParseGlobalStyle(XmlReader reader, Stack<X...
method Error (line 191) | static Exception Error(XmlReader reader, string message)
method Error (line 196) | static Exception Error(IXmlLineInfo lineInfo, string message)
method SetPosition (line 207) | static void SetPosition(XshtdElement element, XmlReader reader)
method CheckElementName (line 217) | static void CheckElementName(XmlReader reader, string name)
method ParseNamedColor (line 229) | static XshtdColor ParseNamedColor(XmlReader reader, XshtdSyntaxDefinit...
method ParseColorAttributes (line 241) | static XshtdColor ParseColorAttributes(XmlReader reader, XshtdSyntaxDe...
method ParseColor (line 261) | static HighlightingBrush ParseColor(IXmlLineInfo lineInfo, string color)
method GetSystemColorBrush (line 271) | internal static SystemColorHighlightingBrush GetSystemColorBrush(IXmlL...
method FixedColorHighlightingBrush (line 281) | static HighlightingBrush FixedColorHighlightingBrush(Color? color)
method ParseFontWeight (line 288) | static FontWeight? ParseFontWeight(string fontWeight)
method ParseFontStyle (line 295) | static FontStyle? ParseFontStyle(string fontStyle)
FILE: src/HL/Resources/HLResources.cs
class HLResources (line 13) | internal class HLResources
method OpenStream (line 22) | public static Stream OpenStream(string prefix, string name)
method RegisterBuiltInHighlightings (line 40) | internal static void RegisterBuiltInHighlightings(
FILE: src/HL/Xshtd/IXshtdVisitor.cs
type IXshtdVisitor (line 34) | public interface IXshtdVisitor
method VisitColor (line 43) | object VisitColor(XshtdSyntaxDefinition syntax, XshtdColor color);
method VisitSyntaxDefinition (line 50) | object VisitSyntaxDefinition(XshtdSyntaxDefinition syntax);
method VisitGlobalStyles (line 57) | object VisitGlobalStyles(XshtdGlobalStyles globStyles);
method VisitGlobalStyle (line 66) | object VisitGlobalStyle(XshtdGlobalStyles globStyles, XshtdGlobalStyle...
FILE: src/HL/Xshtd/XhstdThemeDefinition.cs
class XhstdThemeDefinition (line 36) | [Serializable]
method XhstdThemeDefinition (line 42) | public XhstdThemeDefinition()
method AcceptVisitor (line 67) | public override object AcceptVisitor(IXshtdVisitor visitor)
FILE: src/HL/Xshtd/XmlHighlightingThemeDefinition.cs
class XmlHighlightingThemeDefinition (line 22) | internal class XmlHighlightingThemeDefinition : IHighlightingThemeDefini...
method XmlHighlightingThemeDefinition (line 34) | public XmlHighlightingThemeDefinition(XhstdThemeDefinition xshtd,
method XmlHighlightingThemeDefinition (line 50) | protected XmlHighlightingThemeDefinition()
method GetNamedSyntaxDefinition (line 83) | public SyntaxDefinition GetNamedSyntaxDefinition(string name)
method GetNamedColor (line 98) | public HighlightingColor GetNamedColor(string synDefName, string color...
method NamedHighlightingColors (line 111) | public IEnumerable<HighlightingColor> NamedHighlightingColors(string s...
method Error (line 127) | private static System.Exception Error(XshtdElement element, string mes...
class RegisterNamedElementsVisitor (line 143) | sealed class RegisterNamedElementsVisitor : IXshtdVisitor
method RegisterNamedElementsVisitor (line 153) | public RegisterNamedElementsVisitor(XmlHighlightingThemeDefinition def)
method RegisterNamedElementsVisitor (line 162) | private RegisterNamedElementsVisitor()
method VisitSyntaxDefinition (line 173) | public object VisitSyntaxDefinition(XshtdSyntaxDefinition syntax)
method VisitColor (line 202) | public object VisitColor(XshtdSyntaxDefinition syntax, XshtdColor co...
method VisitGlobalStyles (line 230) | public object VisitGlobalStyles(XshtdGlobalStyles globStyles)
method VisitGlobalStyle (line 237) | public object VisitGlobalStyle(XshtdGlobalStyles globStyles, XshtdGl...
class TranslateElementVisitor (line 271) | sealed class TranslateElementVisitor : IXshtdVisitor
method TranslateElementVisitor (line 283) | public TranslateElementVisitor(XmlHighlightingThemeDefinition def,
method VisitSyntaxDefinition (line 298) | public object VisitSyntaxDefinition(XshtdSyntaxDefinition syntax)
method VisitColor (line 327) | public object VisitColor(XshtdSyntaxDefinition syntax, XshtdColor co...
method VisitGlobalStyles (line 364) | public object VisitGlobalStyles(XshtdGlobalStyles globStyles)
method VisitGlobalStyle (line 371) | public object VisitGlobalStyle(XshtdGlobalStyles globStyles, XshtdGl...
FILE: src/HL/Xshtd/XshtdColor.cs
class XshtdColor (line 36) | [Serializable]
method XshtdColor (line 47) | public XshtdColor(XshtdSyntaxDefinition syntax)
method XshtdColor (line 55) | protected XshtdColor(SerializationInfo info, StreamingContext context)
method GetObjectData (line 117) | #if DOTNET4
method AcceptVisitor (line 153) | public override object AcceptVisitor(IXshtdVisitor visitor)
FILE: src/HL/Xshtd/XshtdElement.cs
class XshtdElement (line 32) | [Serializable]
method AcceptVisitor (line 48) | public abstract object AcceptVisitor(IXshtdVisitor visitor);
FILE: src/HL/Xshtd/XshtdGlobalStyle.cs
class XshtdGlobalStyle (line 16) | [Serializable]
method XshtdGlobalStyle (line 28) | public XshtdGlobalStyle(XshtdGlobalStyles styles)
method XshtdGlobalStyle (line 37) | protected XshtdGlobalStyle()
method AcceptVisitor (line 69) | public override object AcceptVisitor(IXshtdVisitor visitor)
FILE: src/HL/Xshtd/XshtdGlobalStyles.cs
class XshtdGlobalStyles (line 17) | [Serializable]
method XshtdGlobalStyles (line 23) | public XshtdGlobalStyles()
method AcceptElements (line 36) | public void AcceptElements(IXshtdVisitor visitor)
method AcceptVisitor (line 49) | public override object AcceptVisitor(IXshtdVisitor visitor)
FILE: src/HL/Xshtd/XshtdSyntaxDefinition.cs
class XshtdSyntaxDefinition (line 34) | [Serializable]
method XshtdSyntaxDefinition (line 40) | public XshtdSyntaxDefinition()
method AcceptElements (line 64) | public void AcceptElements(IXshtdVisitor visitor)
method AcceptVisitor (line 77) | public override object AcceptVisitor(IXshtdVisitor visitor)
FILE: src/HL/Xshtd/interfaces/IFreezable.cs
type IFreezable (line 36) | interface IFreezable
method Freeze (line 46) | void Freeze();
class FreezableHelper (line 49) | static class FreezableHelper
method ThrowIfFrozen (line 51) | public static void ThrowIfFrozen(IFreezable freezable)
method FreezeListAndElements (line 57) | public static IList<T> FreezeListAndElements<T>(IList<T> list)
method FreezeList (line 68) | public static IList<T> FreezeList<T>(IList<T> list)
method Freeze (line 85) | public static void Freeze(object item)
method FreezeAndReturn (line 93) | public static T FreezeAndReturn<T>(T item) where T : IFreezable
method GetFrozenClone (line 104) | public static T GetFrozenClone<T>(T item) where T : IFreezable, IClone...
class AbstractFreezable (line 120) | [Serializable]
method Freeze (line 136) | public void Freeze()
method FreezeInternal (line 149) | protected virtual void FreezeInternal()
FILE: src/HL/Xshtd/interfaces/IHighlightingDefinitionReferenceResolver.cs
type IHighlightingThemeDefinitionReferenceResolver (line 18) | public interface IHighlightingThemeDefinitionReferenceResolver
method GetThemeDefinition (line 26) | SyntaxDefinition GetThemeDefinition(string highlightingName);
method GetThemeDefinition (line 34) | SyntaxDefinition GetThemeDefinition(string hlThemeName,
FILE: src/HL/Xshtd/interfaces/IHighlightingThemeDefinition.cs
type IHighlightingThemeDefinition (line 16) | public interface IHighlightingThemeDefinition
method GetNamedSyntaxDefinition (line 28) | SyntaxDefinition GetNamedSyntaxDefinition(string name);
FILE: src/StartMenuManager.Builder/Program.cs
class Program (line 15) | public class Program
method Main (line 20) | public static void Main(string[] args)
method BuildShortcutFile (line 85) | public static void BuildShortcutFile(Shortcut shortcut)
method CopyIcon (line 113) | public static bool CopyIcon(string iconPath, string newIconPath)
method GetJsonFilePath (line 134) | public static bool GetJsonFilePath(string[] args)
method CouldFindJsonFileInDirectory (line 152) | public static bool CouldFindJsonFileInDirectory()
method GetFileContents (line 164) | public static string GetFileContents()
method ClearDirectoryExceptShortcutsJson (line 172) | public static void ClearDirectoryExceptShortcutsJson(string path)
FILE: src/StartMenuManager.Core/DataStructures/Action.cs
class Action (line 16) | [JsonConverter(typeof(JsonSubtypes), "Type")]
method IsValid (line 26) | public virtual ValidationError IsValid()
method Duplicate (line 31) | public virtual Action Duplicate()
FILE: src/StartMenuManager.Core/DataStructures/Actions/CommandAction.cs
class CommandAction (line 11) | public class CommandAction : Action
method CommandAction (line 13) | public CommandAction(string command, bool keepOpen)
method CommandAction (line 20) | public CommandAction()
method IsValid (line 31) | public override ValidationError IsValid()
method Duplicate (line 41) | public override Action Duplicate()
FILE: src/StartMenuManager.Core/DataStructures/Actions/FileAction.cs
class FileAction (line 13) | public class FileAction : Action
method FileAction (line 15) | public FileAction(string path)
method FileAction (line 21) | public FileAction()
method IsValid (line 29) | public override ValidationError IsValid()
method IsFolder (line 49) | private static bool IsFolder(string path)
method Duplicate (line 67) | public override Action Duplicate()
FILE: src/StartMenuManager.Core/DataStructures/Actions/FolderAction.cs
class FolderAction (line 13) | public class FolderAction : Action
method FolderAction (line 15) | public FolderAction(string path)
method FolderAction (line 21) | public FolderAction()
method IsValid (line 29) | public override ValidationError IsValid()
method IsFile (line 49) | private static bool IsFile(string path)
method Duplicate (line 59) | public override Action Duplicate()
FILE: src/StartMenuManager.Core/DataStructures/Actions/SoftwareAction.cs
class SoftwareAction (line 13) | public class SoftwareAction : Action
method SoftwareAction (line 15) | public SoftwareAction(string path)
method SoftwareAction (line 21) | public SoftwareAction()
method IsValid (line 29) | public override ValidationError IsValid()
method Duplicate (line 44) | public override Action Duplicate()
FILE: src/StartMenuManager.Core/DataStructures/Actions/WebsiteAction.cs
class WebsiteAction (line 13) | public class WebsiteAction : Action
method WebsiteAction (line 15) | public WebsiteAction(string url)
method WebsiteAction (line 21) | public WebsiteAction()
method IsValid (line 29) | public override ValidationError IsValid()
method Duplicate (line 45) | public override Action Duplicate()
FILE: src/StartMenuManager.Core/DataStructures/Config.cs
class Config (line 13) | public class Config
method Config (line 15) | public Config(List<Shortcut> shortcuts)
method Config (line 20) | public Config()
method IsValid (line 27) | public ValidationError IsValid()
FILE: src/StartMenuManager.Core/DataStructures/SettingsConfig.cs
class SettingsConfig (line 10) | public class SettingsConfig
method GetShortcutsFilePath (line 26) | public string GetShortcutsFilePath(string fileName)
method GetShortcutsFilePath (line 31) | public string GetShortcutsFilePath()
method GetDefaultSettings (line 36) | public static SettingsConfig GetDefaultSettings()
FILE: src/StartMenuManager.Core/DataStructures/Shortcut.cs
class Shortcut (line 14) | public class Shortcut
method Shortcut (line 16) | public Shortcut(string name, string iconPath, List<Action> actions)
method Shortcut (line 23) | public Shortcut(string name, string iconPath)
method Shortcut (line 30) | public Shortcut()
method IsValid (line 41) | public ValidationError IsValid()
method Duplicate (line 108) | public Shortcut Duplicate()
FILE: src/StartMenuManager.Core/DataStructures/ValidationError.cs
class ValidationError (line 8) | public class ValidationError
method ValidationError (line 10) | public ValidationError(string error, Action action)
method ValidationError (line 16) | public ValidationError(string error, Shortcut shortcut)
FILE: src/StartMenuManager.Core/Serialization/Serializer.cs
class Serializer (line 14) | public static class Serializer
method SerializeConfig (line 16) | public static string SerializeConfig(Config config)
method DeserializeConfig (line 21) | public static Config DeserializeConfig(string configText)
method SerializeShortcut (line 26) | public static string SerializeShortcut(Shortcut shorcut)
method DeserializeShortcut (line 31) | public static Shortcut DeserializeShortcut(string shortcutText)
FILE: src/StartMenuManager.GUI/App.xaml.cs
class App (line 13) | public partial class App : Application
FILE: src/StartMenuManager.GUI/Builder.cs
class Builder (line 16) | public static class Builder
method Run (line 18) | public static void Run(Config config)
method ContinueRun (line 35) | private static void ContinueRun(Config config, bool donate)
method ExecuteAsAdmin (line 52) | private static void ExecuteAsAdmin(string fileName, string arguments)
FILE: src/StartMenuManager.GUI/Dialogs/MessageDialog.cs
class MessageDialog (line 11) | public static class MessageDialog
method InitEvents (line 13) | public static void InitEvents()
method SetMessage (line 18) | public static void SetMessage(string title, string message)
method CloseDialog (line 24) | public static void CloseDialog(object sender, RoutedEventArgs args)
FILE: src/StartMenuManager.GUI/Dialogs/SettingsDialog.cs
class SettingsDialog (line 13) | public static class SettingsDialog
method InitEvents (line 17) | public static void InitEvents()
method InitDialog (line 30) | public static void InitDialog()
method CloseDialog (line 73) | public static void CloseDialog(object sender, RoutedEventArgs args)
method OpenStartMenuFolder (line 82) | public static void OpenStartMenuFolder(object sender, RoutedEventArgs ...
method OpenGitHubPage (line 96) | public static void OpenGitHubPage(object sender, RoutedEventArgs args)
method ThemeChanged (line 101) | public static void ThemeChanged(object sender, RoutedEventArgs args)
method LineNumbersChanged (line 128) | public static void LineNumbersChanged(bool show)
method ShowConfirmationDialogsChanged (line 141) | public static void ShowConfirmationDialogsChanged(bool show)
FILE: src/StartMenuManager.GUI/Dialogs/YesNoDialog.cs
class YesNoDialog (line 11) | public static class YesNoDialog
method InitEvents (line 17) | public static void InitEvents()
method SetMessage (line 23) | public static void SetMessage(string title, string message, string yes...
method YesButtonPressed (line 32) | public static void YesButtonPressed(object sender, RoutedEventArgs args)
method NoButtonPressed (line 38) | public static void NoButtonPressed(object sender, RoutedEventArgs args)
method CloseDialog (line 44) | private static void CloseDialog()
FILE: src/StartMenuManager.GUI/Extensions/ActionExtensions.cs
class ActionExtensions (line 12) | public static class ActionExtensions
method ToShortcutType (line 14) | public static ShortcutType ToShortcutType(this Action action)
FILE: src/StartMenuManager.GUI/IconExtractorWindow.xaml.cs
class IconExtractorWindow (line 23) | public partial class IconExtractorWindow : Window
method IconExtractorWindow (line 29) | public IconExtractorWindow(MainWindow mainWindow, ShortcutControl cont...
method CreateOrFocusInstance (line 48) | public static void CreateOrFocusInstance(MainWindow window, ShortcutCo...
method FocusInstance (line 63) | public static bool FocusInstance()
method ContainsWindow (line 77) | private static bool ContainsWindow(WindowCollection windows, Window my...
method OnWindowClose (line 90) | private void OnWindowClose(object sender, CancelEventArgs e)
method SearchButtonPressed (line 98) | private async void SearchButtonPressed(object sender, RoutedEventArgs e)
method LoadImage (line 198) | private static BitmapImage LoadImage(byte[] imageData)
FILE: src/StartMenuManager.GUI/JsonViewManager.cs
class JsonViewManager (line 11) | public static class JsonViewManager
method InitEvents (line 15) | public static void InitEvents()
method Init (line 20) | public static void Init()
method ShowLineNumbers (line 27) | public static void ShowLineNumbers(bool enabled)
method SetJson (line 32) | public static void SetJson(string text)
method ResetJsonButtonPressed (line 38) | public static void ResetJsonButtonPressed(object sender, RoutedEventAr...
FILE: src/StartMenuManager.GUI/LowerMenuBar.cs
class LowerMenuBar (line 15) | public static class LowerMenuBar
method InitEvents (line 17) | public static void InitEvents()
method ResetButtonPressed (line 24) | public static void ResetButtonPressed(object sender, RoutedEventArgs a...
method RemoveAllButtonPressed (line 37) | public static void RemoveAllButtonPressed(object sender, RoutedEventAr...
method RemoveAllConfirmation (line 50) | private static void RemoveAllConfirmation(bool isYes)
method GenerateShortcutsButtonPressed (line 59) | public static void GenerateShortcutsButtonPressed(object sender, Route...
method ResetJson (line 78) | private static void ResetJson(bool shouldReset)
FILE: src/StartMenuManager.GUI/MainWindow.xaml.cs
class MainWindow (line 18) | public partial class MainWindow : Window
method MainWindow (line 20) | public MainWindow()
method InitEvents (line 44) | private void InitEvents()
method InitJson (line 57) | private void InitJson()
method Window_PreviewMouseDown (line 77) | private void Window_PreviewMouseDown(object sender, System.Windows.Inp...
method Window_PreviewMouseMove (line 82) | private void Window_PreviewMouseMove(object sender, System.Windows.Inp...
method SelectedWebsiteImage (line 87) | public void SelectedWebsiteImage(MagickImage image, ShortcutControl co...
method CheckSettingsValid (line 94) | private bool CheckSettingsValid()
FILE: src/StartMenuManager.GUI/Properties/Resources.Designer.cs
class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: src/StartMenuManager.GUI/Properties/Settings.Designer.cs
class Settings (line 14) | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
FILE: src/StartMenuManager.GUI/Runner.cs
class Runner (line 12) | public static class Runner
method Run (line 14) | public static void Run(string filePath)
method ExecuteAsAdmin (line 20) | private static void ExecuteAsAdmin(string fileName, string arguments)
FILE: src/StartMenuManager.GUI/Serialization/IconManager.cs
class IconManager (line 14) | public static class IconManager
method SaveIcon (line 22) | public static string SaveIcon(MagickImage icon, string shortcutName)
method ClearUnusedIcons (line 40) | public static void ClearUnusedIcons(Config config)
method GetWebsiteIconsFolder (line 69) | private static string GetWebsiteIconsFolder()
FILE: src/StartMenuManager.GUI/Serialization/JsonSerializer.cs
class JsonSerializer (line 14) | public static class JsonSerializer
method GetSettings (line 16) | public static SettingsConfig GetSettings()
method SaveSettings (line 30) | public static void SaveSettings(SettingsConfig settings)
method GetLastShortcutsJson (line 38) | public static string GetLastShortcutsJson()
method SaveLastShortcutsJson (line 61) | public static void SaveLastShortcutsJson(string jsonString)
method GetDefaultJson (line 78) | private static string GetDefaultJson()
method GetSettingsFilePath (line 84) | private static string GetSettingsFilePath()
FILE: src/StartMenuManager.GUI/ShortcutControl.xaml.cs
class ShortcutControl (line 23) | public partial class ShortcutControl : UserControl
method ShortcutControl (line 28) | public ShortcutControl(ShortcutType shortcutType)
method ShortcutControl (line 34) | public ShortcutControl()
method InitControl (line 72) | private void InitControl(ShortcutType shortcutType)
method SetDefaultAction (line 90) | private void SetDefaultAction()
method UpdateUi (line 117) | public void UpdateUi()
method SetIcon (line 124) | private void SetIcon()
method InitUiBasedOnType (line 149) | private void InitUiBasedOnType()
method SetFieldValuesFromShortcut (line 181) | private void SetFieldValuesFromShortcut()
method CreateGroupActions (line 242) | public void CreateGroupActions(List<Core.DataStructures.Action> actions)
method CreateSubShorcut (line 254) | private SubShortcutControl CreateSubShorcut(Core.DataStructures.Action...
method IconSelectedEvent (line 270) | public void IconSelectedEvent(string filePath)
method ShortcutTypeChanged (line 276) | private void ShortcutTypeChanged(object sender, SelectionChangedEventA...
method ShortcutNameChanged (line 306) | private void ShortcutNameChanged(object sender, TextChangedEventArgs e)
method SelectIconFromFile (line 317) | private void SelectIconFromFile(object sender, RoutedEventArgs e)
method SelectIconFromWebsite (line 332) | private void SelectIconFromWebsite(object sender, RoutedEventArgs e)
method ClearSelectedIcon (line 337) | private void ClearSelectedIcon(object sender, RoutedEventArgs e)
method WebsiteUriTextChanged (line 345) | private void WebsiteUriTextChanged(object sender, TextChangedEventArgs e)
method FileUi_PathChanged (line 358) | private void FileUi_PathChanged(object sender, RoutedEventArgs e)
method FileUi_PathSelectPressed (line 369) | private void FileUi_PathSelectPressed(object sender, RoutedEventArgs e)
method FolderUi_PathChanged (line 392) | private void FolderUi_PathChanged(object sender, RoutedEventArgs e)
method FolderUi_PathSelectPressed (line 403) | private void FolderUi_PathSelectPressed(object sender, RoutedEventArgs e)
method SoftwareUi_PathChanged (line 427) | private void SoftwareUi_PathChanged(object sender, RoutedEventArgs e)
method SoftwareUi_PathSelectPressed (line 438) | private void SoftwareUi_PathSelectPressed(object sender, RoutedEventAr...
method CommandUi_CommandTextChanged (line 461) | private void CommandUi_CommandTextChanged(object sender, RoutedEventAr...
method CommandUi_KeepOpen_Checked (line 472) | private void CommandUi_KeepOpen_Checked(object sender, RoutedEventArgs e)
method CommandUi_KeepOpen_Unchecked (line 483) | private void CommandUi_KeepOpen_Unchecked(object sender, RoutedEventAr...
method MultiUi_AddShorcutButtonPressed (line 496) | private void MultiUi_AddShorcutButtonPressed(object sender, RoutedEven...
method DuplicateChild (line 508) | public void DuplicateChild(SubShortcutControl control)
method MoveUpChild (line 515) | public void MoveUpChild(SubShortcutControl control)
method MoveDownChild (line 527) | public void MoveDownChild(SubShortcutControl control)
method DeleteChild (line 539) | public void DeleteChild(SubShortcutControl control)
method RemoveSubShortcutYes (line 552) | private void RemoveSubShortcutYes(bool isYes, SubShortcutControl control)
method DeleteShortcutButtonClick (line 564) | private void DeleteShortcutButtonClick(object sender, RoutedEventArgs e)
method MenuComboBoxSelectionChanged (line 569) | public void MenuComboBoxSelectionChanged(object sender, SelectionChang...
method TestRunShortcut (line 593) | private void TestRunShortcut()
method DuplicateShortcut (line 598) | private void DuplicateShortcut()
method MoveUpShortcut (line 603) | private void MoveUpShortcut()
method MoveDownShortcut (line 608) | private void MoveDownShortcut()
method DeleteShortcut (line 613) | private void DeleteShortcut()
FILE: src/StartMenuManager.GUI/ShortcutListArea.cs
class ShortcutListArea (line 16) | public static class ShortcutListArea
method InitEvents (line 20) | public static void InitEvents()
method AddShortcut (line 25) | public static void AddShortcut(object sender, RoutedEventArgs args)
method AddShortcut (line 32) | private static ShortcutControl AddShortcut(Shortcut shortcut)
method AddShortcut (line 37) | private static ShortcutControl AddShortcut(Shortcut shortcut, int inse...
method IsFolder (line 64) | private static bool IsFolder(string path)
method RemoveShortcut (line 75) | public static void RemoveShortcut(ShortcutControl control)
method RemoveShortcutYes (line 88) | private static void RemoveShortcutYes(bool isYes, ShortcutControl cont...
method RemoveAllShortcuts (line 97) | public static void RemoveAllShortcuts()
method LoadShortcuts (line 103) | public static void LoadShortcuts(List<Shortcut> shortcuts)
method GetConfig (line 118) | public static Config GetConfig()
method TestRunShortcut (line 131) | public static void TestRunShortcut(Shortcut shortcut, bool isSub = false)
method DuplicateShortcut (line 156) | public static void DuplicateShortcut(ShortcutControl control)
method MoveUpShortcut (line 163) | public static void MoveUpShortcut(ShortcutControl control)
method MoveDownShortcut (line 175) | public static void MoveDownShortcut(ShortcutControl control)
FILE: src/StartMenuManager.GUI/Structures/DialogTypes.cs
type DialogTypes (line 8) | public enum DialogTypes
FILE: src/StartMenuManager.GUI/Structures/ShortcutType.cs
type ShortcutType (line 8) | public enum ShortcutType
FILE: src/StartMenuManager.GUI/SubShortcutControl.xaml.cs
class SubShortcutControl (line 19) | public partial class SubShortcutControl : UserControl
method SubShortcutControl (line 24) | public SubShortcutControl(ShortcutControl parentControl)
method InitControl (line 35) | private void InitControl(ShortcutType shortcutType)
method SetDefaultAction (line 53) | private void SetDefaultAction()
method UpdateUi (line 80) | public void UpdateUi()
method SetIcon (line 87) | private void SetIcon()
method InitUiBasedOnType (line 109) | private void InitUiBasedOnType()
method SetFieldValuesFromShortcut (line 137) | private void SetFieldValuesFromShortcut()
method ShortcutTypeChanged (line 184) | private void ShortcutTypeChanged(object sender, SelectionChangedEventA...
method WebsiteUriTextChanged (line 200) | private void WebsiteUriTextChanged(object sender, TextChangedEventArgs e)
method FileUi_PathChanged (line 213) | private void FileUi_PathChanged(object sender, RoutedEventArgs e)
method FileUi_PathSelectPressed (line 224) | private void FileUi_PathSelectPressed(object sender, RoutedEventArgs e)
method FolderUi_PathChanged (line 247) | private void FolderUi_PathChanged(object sender, RoutedEventArgs e)
method FolderUi_PathSelectPressed (line 258) | private void FolderUi_PathSelectPressed(object sender, RoutedEventArgs e)
method SoftwareUi_PathChanged (line 282) | private void SoftwareUi_PathChanged(object sender, RoutedEventArgs e)
method SoftwareUi_PathSelectPressed (line 293) | private void SoftwareUi_PathSelectPressed(object sender, RoutedEventAr...
method CommandUi_CommandTextChanged (line 316) | private void CommandUi_CommandTextChanged(object sender, RoutedEventAr...
method CommandUi_KeepOpen_Checked (line 327) | private void CommandUi_KeepOpen_Checked(object sender, RoutedEventArgs e)
method CommandUi_KeepOpen_Unchecked (line 338) | private void CommandUi_KeepOpen_Unchecked(object sender, RoutedEventAr...
method DeleteShortcutButtonClick (line 352) | private void DeleteShortcutButtonClick(object sender, RoutedEventArgs e)
method MenuComboBoxSelectionChanged (line 357) | public void MenuComboBoxSelectionChanged(object sender, SelectionChang...
method TestRunShortcut (line 381) | private void TestRunShortcut()
method DuplicateShortcut (line 386) | private void DuplicateShortcut()
method MoveUpShortcut (line 391) | private void MoveUpShortcut()
method MoveDownShortcut (line 396) | private void MoveDownShortcut()
method DeleteShortcut (line 401) | private void DeleteShortcut()
FILE: src/StartMenuManager.GUI/TitleBarButtons.cs
class TitleBarButtons (line 14) | public static class TitleBarButtons
method InitEvents (line 18) | public static void InitEvents()
method SettingsButtonPressed (line 24) | public static void SettingsButtonPressed(object sender, RoutedEventArg...
method JsonButtonPressed (line 34) | public static void JsonButtonPressed(object sender, RoutedEventArgs args)
method LoadJsonFromShortcuts (line 72) | private static void LoadJsonFromShortcuts()
FILE: src/StartMenuManager.GUI/Utils/DialogManager.cs
class DialogManager (line 13) | public static class DialogManager
method Show (line 21) | public static async void Show(Structures.DialogTypes dialogType)
FILE: src/StartMenuManager.GUI/Utils/IconExtractorWindow_TitleBarControl.cs
class IconExtractorWindow_TitleBarControl (line 14) | public static class IconExtractorWindow_TitleBarControl
method InitEvents (line 20) | public static void InitEvents(IconExtractorWindow wind)
method Window_LocationChanged (line 30) | private static void Window_LocationChanged(IconExtractorWindow wind, o...
method System_MouseDown (line 44) | private static void System_MouseDown(IconExtractorWindow wind, object ...
method SendMessage (line 70) | [DllImport("user32.dll")]
method GetSystemMenu (line 73) | [DllImport("user32.dll")]
method TrackPopupMenu (line 76) | [DllImport("user32.dll")]
method System_MouseMove (line 79) | private static void System_MouseMove(IconExtractorWindow wind, object ...
method Maximize_Click (line 97) | private static void Maximize_Click(IconExtractorWindow wind, object se...
method Close_Click (line 102) | private static void Close_Click(IconExtractorWindow wind, object sende...
method Mimimize_Click (line 107) | private static void Mimimize_Click(IconExtractorWindow wind, object se...
method Window_StateChanged (line 112) | private static void Window_StateChanged(IconExtractorWindow wind, obje...
FILE: src/StartMenuManager.GUI/Utils/ThemeManager.cs
class ThemeManager (line 15) | public class ThemeManager
method InitTheme (line 19) | public static void InitTheme()
method SetSystemTheme (line 35) | public static void SetSystemTheme()
method SetDarkTheme (line 47) | public static void SetDarkTheme()
method SetLightTheme (line 58) | public static void SetLightTheme()
method IsSystemLightMode (line 69) | private static bool IsSystemLightMode()
method SetAvalonTheme (line 87) | private static void SetAvalonTheme(bool isDark)
FILE: src/StartMenuManager.GUI/Utils/TitleBarControl.cs
class TitleBarControl (line 16) | public static class TitleBarControl
method InitEvents (line 22) | public static void InitEvents()
method Window_LocationChanged (line 33) | private static void Window_LocationChanged(object sender, EventArgs e)
method System_MouseDown (line 47) | private static void System_MouseDown(object sender, MouseButtonEventAr...
method SendMessage (line 73) | [DllImport("user32.dll")]
method GetSystemMenu (line 76) | [DllImport("user32.dll")]
method TrackPopupMenu (line 79) | [DllImport("user32.dll")]
method System_MouseMove (line 82) | private static void System_MouseMove(object sender, System.Windows.Inp...
method Maximize_Click (line 100) | private static void Maximize_Click(object sender, RoutedEventArgs e)
method Close_Click (line 105) | private static void Close_Click(object sender, RoutedEventArgs e)
method CloseComplete (line 118) | private static void CloseComplete(bool shouldClose)
method Mimimize_Click (line 126) | private static void Mimimize_Click(object sender, RoutedEventArgs e)
method Window_StateChanged (line 131) | private static void Window_StateChanged(object sender, EventArgs e)
FILE: src/StartMenuManager.GUI/Utils/WindowRef.cs
class WindowRef (line 8) | public static class WindowRef
FILE: src/StartMenuManager.GUI/WelcomeCard.cs
class WelcomeCard (line 11) | public static class WelcomeCard
method InitEvents (line 13) | public static void InitEvents()
method CloseCardPressed (line 18) | private static void CloseCardPressed(object sender, RoutedEventArgs args)
method CloseCard (line 25) | public static void CloseCard()
FILE: src/StartMenuManager.PreUninstall/Program.cs
class Program (line 16) | public class Program
method Main (line 20) | public static int Main(string[] args)
FILE: src/StartMenuManager.Runner/Program.cs
class Program (line 13) | public class Program
method Main (line 15) | public static void Main(string[] args)
method ExecuteShortcut (line 48) | public static void ExecuteShortcut(Shortcut shortcut)
FILE: src/TextEditLib/Extensions/HighlightCurrentLineBackgroundRenderer.cs
class HighlightCurrentLineBackgroundRenderer (line 20) | internal class HighlightCurrentLineBackgroundRenderer : IBackgroundRenderer
method HighlightCurrentLineBackgroundRenderer (line 31) | public HighlightCurrentLineBackgroundRenderer(TextEdit editor)
method HighlightCurrentLineBackgroundRenderer (line 40) | protected HighlightCurrentLineBackgroundRenderer()
method Draw (line 62) | public void Draw(TextView textView, DrawingContext drawingContext)
FILE: src/TextEditLib/TextEdit.xaml.cs
class TextEdit (line 18) | public class TextEdit : TextEditor
method TextEdit (line 45) | static TextEdit()
method TextEdit (line 54) | public TextEdit()
method TextEdit_Loaded (line 91) | private void TextEdit_Loaded(object sender, RoutedEventArgs e)
method AdjustCurrentLineBackground (line 99) | private void AdjustCurrentLineBackground()
FILE: src/TextEditLib/Themes/ResourceKeys.cs
class ResourceKeys (line 12) | public static class ResourceKeys
Condensed preview — 154 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (846K chars).
[
{
"path": ".gitignore",
"chars": 5547,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## G"
},
{
"path": "CustomAnalysisRules.Test.ruleset",
"chars": 5483,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RuleSet Name=\"Analysis Rules for Test\" Description=\"Code analysis rules used fo"
},
{
"path": "CustomAnalysisRules.ruleset",
"chars": 1666,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RuleSet Name=\"Analysis Rules\" Description=\"Code analysis rules.\" ToolsVersion=\""
},
{
"path": "Directory.Build.props",
"chars": 1782,
"preview": "<Project>\n <PropertyGroup>\n <TreatWarningsAsErrors>true</TreatWarningsAsErrors>\n <WarningsAsErrors />\n <DebugT"
},
{
"path": "LICENSE",
"chars": 1065,
"preview": "MIT License\n\nCopyright (c) 2019 James231\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\no"
},
{
"path": "README.md",
"chars": 7348,
"preview": "# Start Menu Manager\n\n[](https://www.paypal.com/cgi-bin/w"
},
{
"path": "StartMenuManager.sln",
"chars": 7090,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.3033"
},
{
"path": "src/HL/AssemblyInfo.cs",
"chars": 845,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/HL.csproj",
"chars": 6296,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.WindowsDesktop\">\n\n <PropertyGroup>\n <TargetFrameworks>net4;netcoreapp3.0</TargetFra"
},
{
"path": "src/HL/HighlightingTheme/GlobalStyle.cs",
"chars": 3227,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/HighlightingTheme/SyntaxDefinition.cs",
"chars": 3352,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Interfaces/IHLTheme.cs",
"chars": 4571,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Interfaces/IThemedHighlightingManager.cs",
"chars": 2949,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/LICENSE",
"chars": 1107,
"preview": "Copyright 2019-2020 Dirkster99\n\nMIT License (https://opensource.org/licenses/MIT)\n\nPermission is hereby granted, free o"
},
{
"path": "src/HL/Manager/BusyManager.cs",
"chars": 1933,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/DefaultHighlightingManager.cs",
"chars": 5940,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/DelayLoadedHighlightingDefinition.cs",
"chars": 3109,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/ExtensionMethods.cs",
"chars": 8987,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/HLTheme.cs",
"chars": 9569,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/HighlightingBrush.cs",
"chars": 2044,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/HighlightingLoader.cs",
"chars": 4858,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/HighlightingThemeLoader.cs",
"chars": 3578,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/ThemedHighlightingManager.cs",
"chars": 8389,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/V2Loader.cs",
"chars": 11255,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/XmlHighlightingDefinition.cs",
"chars": 15783,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Manager/XshtdLoader.cs",
"chars": 9324,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Modes/ModeV1.xsd",
"chars": 14772,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" >\n\t<xsd:annotation>\n\t\t<"
},
{
"path": "src/HL/Modes/ModeV2.xsd",
"chars": 5659,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsd:schema version=\"2\" elementFormDefault=\"qualified\" targetNamespace=\"http://ic"
},
{
"path": "src/HL/Modes/ModeV2_htd.xsd",
"chars": 15575,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsd:schema version=\"2\" elementFormDefault=\"qualified\"\n targetNamespac"
},
{
"path": "src/HL/Resources/HLResources.cs",
"chars": 4836,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Resources/Light/AS3.xshd",
"chars": 5701,
"preview": "<?xml version=\"1.0\"?>\n<!-- Source: http://sindney.com/blog/posts/as3-syntax-in-avalonedit/ -->\n<SyntaxDefinition name=\"A"
},
{
"path": "src/HL/Resources/Light/ASPX.xshd",
"chars": 856,
"preview": "<?xml version=\"1.0\"?>\n<!-- converted to AvalonEdit format by Siegfried Pammer in 2010 -->\n<SyntaxDefinition name=\"ASP/XH"
},
{
"path": "src/HL/Resources/Light/Boo.xshd",
"chars": 7550,
"preview": "<SyntaxDefinition name=\"Boo\" extensions=\".boo\" xmlns=\"http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008\">\n\t<Col"
},
{
"path": "src/HL/Resources/Light/CPP-Mode.xshd",
"chars": 5551,
"preview": "<?xml version=\"1.0\"?>\n<!-- syntaxdefinition for C/C++ 2001 by Andrea Paatz and Mike Krueger -->\n<!-- converted to Avalon"
},
{
"path": "src/HL/Resources/Light/CSS-Mode.xshd",
"chars": 1756,
"preview": "<SyntaxDefinition name=\"CSS\" extensions=\".css\" xmlns=\"http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008\">\n\t<Col"
},
{
"path": "src/HL/Resources/Light/CSharp-Mode.xshd",
"chars": 9207,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"C#\" extensions=\".cs\" xmlns=\"http://icsharpcode.net/sharpdevelop/syntaxdefi"
},
{
"path": "src/HL/Resources/Light/Coco-Mode.xshd",
"chars": 2967,
"preview": "<?xml version=\"1.0\" ?>\n<!-- syntaxdefinition for Coco/R 2003 by Mike Krueger -->\n<!-- converted to AvalonEdit format by "
},
{
"path": "src/HL/Resources/Light/DOSBATCH.xshd",
"chars": 5801,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"BAT\" extensions=\".bat;.dos\"\n xmlns=\"http://icsharpcode.n"
},
{
"path": "src/HL/Resources/Light/FSharp-Mode.xshd",
"chars": 7288,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"F#\" extensions=\".fs\" xmlns=\"http://icsharpcode.net/sharpdevelop/syntaxdefi"
},
{
"path": "src/HL/Resources/Light/GRazor-Mode.xshd",
"chars": 11620,
"preview": "<SyntaxDefinition\n\txmlns=\"http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008\"\n\tname=\"GRazor\"\n\textensions=\".grazo"
},
{
"path": "src/HL/Resources/Light/Gcode.xshd",
"chars": 2793,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition\n\txmlns=\"http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008\"\n\tname=\"Gcode"
},
{
"path": "src/HL/Resources/Light/HLSL.xshd",
"chars": 7528,
"preview": "<SyntaxDefinition name = \"HLSL\" extensions = \".fx\"\n xmlns=\"http://icsharpcode.net/sharpdevelop/syntaxde"
},
{
"path": "src/HL/Resources/Light/HTML-Mode.xshd",
"chars": 11581,
"preview": "<?xml version=\"1.0\"?>\n<!-- syntaxdefinition for HTML 2000 by Mike Krueger -->\n<!-- converted to AvalonEdit format by Sie"
},
{
"path": "src/HL/Resources/Light/INI.xshd",
"chars": 2092,
"preview": "<!--\n See also: http://en.wikipedia.org/wiki/INI_file\n\n The INI file format is an informal standard for configuration "
},
{
"path": "src/HL/Resources/Light/Java-Mode.xshd",
"chars": 5066,
"preview": "<?xml version=\"1.0\"?>\n<!-- syntaxdefinition for Java 2001 by Jonathan Pierce & Mike Krueger -->\n<!-- converted to Avalon"
},
{
"path": "src/HL/Resources/Light/JavaScript-Mode.xshd",
"chars": 3751,
"preview": "<?xml version=\"1.0\"?>\n<!-- syntaxdefinition for JavaScript 2.0 by Svante Lidman -->\n<!-- converted to AvalonEdit format "
},
{
"path": "src/HL/Resources/Light/Log.xshd",
"chars": 2631,
"preview": "<!--\n There is no such thing like a log file format but there are usually keywords,\n such as, ERROR, FATAL, DEBUG, or "
},
{
"path": "src/HL/Resources/Light/MarkDown-Mode.xshd",
"chars": 1689,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"MarkDown\" extensions=\".md\" xmlns=\"http://icsharpcode.net/sharpdevelop/syn"
},
{
"path": "src/HL/Resources/Light/PHP-Mode.xshd",
"chars": 4532,
"preview": "<?xml version=\"1.0\"?>\n<!-- syntaxdefinition for PHP 2001 by Chad Smith & Mike Krueger -->\n<!-- converted to AvalonEdit f"
},
{
"path": "src/HL/Resources/Light/PLSQL.xshd",
"chars": 13470,
"preview": "<?xml version=\"1.0\"?>\n<!-- Source: http://community.sharpdevelop.net/forums/t/12893.aspx -->\n<SyntaxDefinition name =\"P"
},
{
"path": "src/HL/Resources/Light/Pascal.xshd",
"chars": 4977,
"preview": "<?xml version=\"1.0\"?>\n<!-- Original Source: http://www.assembla.com/code/PPJCompiler/subversion/nodes/PPJCompiler/bin/Re"
},
{
"path": "src/HL/Resources/Light/Patch-Mode.xshd",
"chars": 1202,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"Patch\" extensions=\".patch;.diff\" xmlns=\"http://icsharpcode.net/sharpdevel"
},
{
"path": "src/HL/Resources/Light/PowerShell.xshd",
"chars": 3688,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"PowerShell\" extensions=\".ps1;.psm1;.psd1\" xmlns=\"http://icsharpcode.net/s"
},
{
"path": "src/HL/Resources/Light/Python-Mode.xshd",
"chars": 2579,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"Python\" extensions=\".py;.pyw\" xmlns=\"http://icsharpcode.net/sharpdevelop/s"
},
{
"path": "src/HL/Resources/Light/Ruby.xshd",
"chars": 7690,
"preview": "<?xml version=\"1.0\"?>\n<!-- Shades of Red-Brown: #a31515, #cf4315, #ffb96e, #ffdc95 -->\n<!-- Shades of Bright-Blue: #0077"
},
{
"path": "src/HL/Resources/Light/TSQL-Mode.xshd",
"chars": 14836,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"TSQL\" extensions=\".sql\" xmlns=\"http://icsharpcode.net/sharpdevelop/syntaxd"
},
{
"path": "src/HL/Resources/Light/TXT.xshd",
"chars": 3952,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"TXT\" extensions=\".txt\"\n xmlns=\"http://icsharpcode.net/sh"
},
{
"path": "src/HL/Resources/Light/Tex-Mode.xshd",
"chars": 4165,
"preview": "<?xml version=\"1.0\"?>\n<!-- syntaxdefinition for TeX document 2001 by Mike Krueger (gleaned from Jedit) -->\n\n<SyntaxDefin"
},
{
"path": "src/HL/Resources/Light/VB-Mode.xshd",
"chars": 6708,
"preview": "<?xml version=\"1.0\"?>\n\n<!-- Syntaxdefinition for VB.NET, v0.1 Rev 1 by Christian Holm -->\n<!-- Updated 2005 by Daniel Gr"
},
{
"path": "src/HL/Resources/Light/XML-Mode.xshd",
"chars": 2399,
"preview": "<SyntaxDefinition name=\"XML\" extensions=\".xml;.xsl;.xslt;.xsd;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.cspro"
},
{
"path": "src/HL/Resources/Light/XmlDoc.xshd",
"chars": 1811,
"preview": "<?xml version=\"1.0\"?>\n<SyntaxDefinition name=\"XmlDoc\" xmlns=\"http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008\">"
},
{
"path": "src/HL/Resources/Light/scheme.xshd",
"chars": 2594,
"preview": "<!-- http://stackoverflow.com/questions/7278940/lisp-syntax-highlighting-for-icsharpcode-texteditor -->\n<SyntaxDefinitio"
},
{
"path": "src/HL/Resources/Light/squirrel.xshd",
"chars": 3907,
"preview": "<?xml version=\"1.0\"?>\n<!-- Source: http://geogen.googlecode.com/svn/trunk/config/squirrel.xshd -->\n<SyntaxDefinition nam"
},
{
"path": "src/HL/Resources/Light/vtl.xshd",
"chars": 2106,
"preview": "<!--\n Syntax Highlighting Definitions for the Velocity Template Language (VTL).\n See also: http://velocity.apache.org/"
},
{
"path": "src/HL/Resources/Themes/Dark.xshtd",
"chars": 36363,
"preview": "<?xml version=\"1.0\"?>\n<ThemeSyntaxDefinition name=\"Dark\" xmlns=\"http://icsharpcode.net/sharpdevelop/themesyntaxdefiniti"
},
{
"path": "src/HL/Resources/Themes/TrueBlue.xshtd",
"chars": 35815,
"preview": "<?xml version=\"1.0\"?>\n<ThemeSyntaxDefinition name=\"TrueBlue\" xmlns=\"http://icsharpcode.net/sharpdevelop/themesyntaxdefi"
},
{
"path": "src/HL/Resources/Themes/VS2019_Dark.xshtd",
"chars": 36252,
"preview": "<?xml version=\"1.0\"?>\n<ThemeSyntaxDefinition name=\"VS2019_Dark\" xmlns=\"http://icsharpcode.net/sharpdevelop/themesyntaxd"
},
{
"path": "src/HL/Xshtd/IXshtdVisitor.cs",
"chars": 3166,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/XhstdThemeDefinition.cs",
"chars": 3003,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/XmlHighlightingThemeDefinition.cs",
"chars": 12350,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Xshtd/XshtdColor.cs",
"chars": 5207,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/XshtdElement.cs",
"chars": 2057,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/XshtdGlobalStyle.cs",
"chars": 1864,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/XshtdGlobalStyles.cs",
"chars": 1420,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/XshtdSyntaxDefinition.cs",
"chars": 2864,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/interfaces/IFreezable.cs",
"chars": 4321,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/HL/Xshtd/interfaces/IHighlightingDefinitionReferenceResolver.cs",
"chars": 1451,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/HL/Xshtd/interfaces/IHighlightingThemeDefinition.cs",
"chars": 1114,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/StartMenuManager.Builder/App.config",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n <startup> \n <supportedRuntime version=\"v4.0\" sku=\".NET"
},
{
"path": "src/StartMenuManager.Builder/Program.cs",
"chars": 6371,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Builder/Properties/AssemblyInfo.cs",
"chars": 1729,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Builder/StartMenuManager.Builder.csproj",
"chars": 4431,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Action.cs",
"chars": 1295,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Actions/CommandAction.cs",
"chars": 1344,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Actions/FileAction.cs",
"chars": 1937,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Actions/FolderAction.cs",
"chars": 1721,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Actions/SoftwareAction.cs",
"chars": 1372,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Actions/WebsiteAction.cs",
"chars": 1464,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Config.cs",
"chars": 1457,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/SettingsConfig.cs",
"chars": 1687,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/Shortcut.cs",
"chars": 3833,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/DataStructures/ValidationError.cs",
"chars": 865,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/Serialization/Serializer.cs",
"chars": 1242,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Core/StartMenuManager.Core.csproj",
"chars": 573,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard2.0</TargetFramework>\n </PropertyG"
},
{
"path": "src/StartMenuManager.GUI/App.config",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n <startup> \n <supportedRuntime version=\"v4.0\" sku=\".NET"
},
{
"path": "src/StartMenuManager.GUI/App.xaml",
"chars": 1294,
"preview": "<Application x:Class=\"StartMenuManager.GUI.App\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presen"
},
{
"path": "src/StartMenuManager.GUI/App.xaml.cs",
"chars": 542,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Builder.cs",
"chars": 2691,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Dialogs/MessageDialog.cs",
"chars": 1161,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Dialogs/SettingsDialog.cs",
"chars": 5747,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Dialogs/YesNoDialog.cs",
"chars": 1831,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Extensions/ActionExtensions.cs",
"chars": 1169,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/IconExtractorWindow.xaml",
"chars": 8754,
"preview": "<Window x:Class=\"StartMenuManager.GUI.IconExtractorWindow\"\n xmlns:materialDesign=\"http://materialdesigninxaml.ne"
},
{
"path": "src/StartMenuManager.GUI/IconExtractorWindow.xaml.cs",
"chars": 7115,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/JsonViewManager.cs",
"chars": 1280,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/LowerMenuBar.cs",
"chars": 3715,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/MainWindow.xaml",
"chars": 20550,
"preview": "<Window x:Class=\"StartMenuManager.GUI.MainWindow\"\n xmlns:materialDesign=\"http://materialdesigninxaml.net/winfx/x"
},
{
"path": "src/StartMenuManager.GUI/MainWindow.xaml.cs",
"chars": 3501,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Properties/AssemblyInfo.cs",
"chars": 2218,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Properties/Resources.Designer.cs",
"chars": 2804,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "src/StartMenuManager.GUI/Properties/Resources.resx",
"chars": 5494,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "src/StartMenuManager.GUI/Properties/Settings.Designer.cs",
"chars": 1075,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "src/StartMenuManager.GUI/Properties/Settings.settings",
"chars": 193,
"preview": "<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"uri:settings\" CurrentProfile=\"(Default)\">\n <Profiles>\n "
},
{
"path": "src/StartMenuManager.GUI/Runner.cs",
"chars": 1101,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Serialization/IconManager.cs",
"chars": 2788,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Serialization/JsonSerializer.cs",
"chars": 3128,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/ShortcutControl.xaml",
"chars": 13017,
"preview": "<UserControl x:Class=\"StartMenuManager.GUI.ShortcutControl\"\n xmlns:materialDesign=\"http://materialdesigninx"
},
{
"path": "src/StartMenuManager.GUI/ShortcutControl.xaml.cs",
"chars": 21245,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/ShortcutListArea.cs",
"chars": 6500,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/StartMenuManager.GUI.csproj",
"chars": 7173,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "src/StartMenuManager.GUI/Structures/DialogTypes.cs",
"chars": 507,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Structures/ShortcutType.cs",
"chars": 533,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/SubShortcutControl.xaml",
"chars": 10446,
"preview": "<UserControl x:Class=\"StartMenuManager.GUI.SubShortcutControl\"\n xmlns:materialDesign=\"http://materialdesign"
},
{
"path": "src/StartMenuManager.GUI/SubShortcutControl.xaml.cs",
"chars": 13692,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/TitleBarButtons.cs",
"chars": 2765,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Utils/DialogManager.cs",
"chars": 2151,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Utils/IconExtractorWindow_TitleBarControl.cs",
"chars": 5292,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Utils/ThemeManager.cs",
"chars": 3752,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Utils/TitleBarControl.cs",
"chars": 5711,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/Utils/WindowRef.cs",
"chars": 486,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/WelcomeCard.cs",
"chars": 1039,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.GUI/app.manifest",
"chars": 3090,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<assembly manifestVersion=\"1.0\" xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n <ass"
},
{
"path": "src/StartMenuManager.GUI.Installer/Product.wxs",
"chars": 11739,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Wix xmlns=\"http://schemas.microsoft.com/wix/2006/wi\"\n xmlns:netfx=\"http"
},
{
"path": "src/StartMenuManager.GUI.Installer/StartMenuManager.GUI.Installer.wixproj",
"chars": 4536,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" InitialTargets=\"EnsureWixTools"
},
{
"path": "src/StartMenuManager.GUI.Installer/netchecker.wxs",
"chars": 5073,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. License"
},
{
"path": "src/StartMenuManager.PreUninstall/App.config",
"chars": 182,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n <startup> \n <supportedRuntime version=\"v4.0\" sku=\".N"
},
{
"path": "src/StartMenuManager.PreUninstall/Program.cs",
"chars": 1628,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.PreUninstall/Properties/AssemblyInfo.cs",
"chars": 1739,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.PreUninstall/StartMenuManager.PreUninstall.csproj",
"chars": 2733,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "src/StartMenuManager.Runner/App.config",
"chars": 180,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n <startup> \n <supportedRuntime version=\"v4.0\" sku=\".NET"
},
{
"path": "src/StartMenuManager.Runner/Program.cs",
"chars": 3291,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Runner/Properties/AssemblyInfo.cs",
"chars": 1727,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/StartMenuManager.Runner/StartMenuManager.Runner.csproj",
"chars": 2837,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "src/TextEditLib/AssemblyInfo.cs",
"chars": 835,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "src/TextEditLib/Extensions/HighlightCurrentLineBackgroundRenderer.cs",
"chars": 2720,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/TextEditLib/TextEdit.xaml",
"chars": 6143,
"preview": "<ResourceDictionary\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n\txmlns:x=\"http://schemas.microso"
},
{
"path": "src/TextEditLib/TextEdit.xaml.cs",
"chars": 4031,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Mana"
},
{
"path": "src/TextEditLib/TextEditLib.csproj",
"chars": 2648,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.WindowsDesktop\">\n\n <PropertyGroup>\n <TargetFrameworks>netcoreapp3.0;net4.5.2</Targe"
},
{
"path": "src/TextEditLib/Themes/DarkBrushs.xaml",
"chars": 3380,
"preview": "<ResourceDictionary\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n\txmlns:x=\"http://schemas.microso"
},
{
"path": "src/TextEditLib/Themes/Generic.xaml",
"chars": 475,
"preview": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft"
},
{
"path": "src/TextEditLib/Themes/Icons.xaml",
"chars": 853,
"preview": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft"
},
{
"path": "src/TextEditLib/Themes/LightBrushs.xaml",
"chars": 3366,
"preview": "<ResourceDictionary\n\txmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n\txmlns:x=\"http://schemas.microso"
},
{
"path": "src/TextEditLib/Themes/ResourceKeys.cs",
"chars": 3411,
"preview": "// -------------------------------------------------------------------------------------------------\n// Start Menu Manag"
},
{
"path": "stylecop.json",
"chars": 1167,
"preview": "{\n \"$schema\": \"https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop."
}
]
About this extraction
This page contains the full source code of the James231/Start-Menu-Manager GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 154 files (755.0 KB), approximately 203.9k tokens, and a symbol index with 511 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.