Permalink
Browse files

A few changes:

 * Added icon and screenshot images + included in vsixmanifest.
 * Modifications in classification types and formats (not entirely correct, but working for now).
 * Changed license to reflect that Markdown.cs is MIT licensed (derivative of the original MarkdownSharp and earlier markdown parsers), but the rest of the world is Ms-PL licensed.
  • Loading branch information...
1 parent 7c66c18 commit 13c63b24b46840358911e0a197b61c29b1ed760e Noah Richards committed Jan 25, 2010
@@ -183,6 +183,7 @@ public MarkdownLinkTitle()
[Name("markdown.link.label")]
[DisplayName("Markdown link label")]
[UserVisible(true)]
+ [Order(After = "markdown.link")]
sealed class MarkdownLinkLabel : ClassificationFormatDefinition
{
public MarkdownLinkLabel()
@@ -192,6 +193,19 @@ public MarkdownLinkLabel()
}
}
+ [Export(typeof(EditorFormatDefinition))]
+ [ClassificationType(ClassificationTypeNames = "markdown.url.inline")]
+ [Name("markdown.url.inline")]
+ [Order(After = "markdown.link")]
+ sealed class MarkdownUrl : ClassificationFormatDefinition
+ {
+ public MarkdownUrl()
+ {
+ this.ForegroundColor = Colors.Blue;
+ this.IsBold = false;
+ }
+ }
+
// Images
[Export(typeof(EditorFormatDefinition))]
@@ -221,6 +235,22 @@ public MarkdownImageAlt()
this.ForegroundColor = Colors.DeepPink;
}
}
+
+ [Export(typeof(EditorFormatDefinition))]
+ [ClassificationType(ClassificationTypeNames = "markdown.image.label")]
+ [Name("markdown.image.label")]
+ [DisplayName("Markdown image label")]
+ [UserVisible(true)]
+ [Order(After = "markdown.image")]
+ sealed class MarkdownImageLabel : ClassificationFormatDefinition
+ {
+ public MarkdownImageLabel()
+ {
+ this.ForegroundColor = Colors.DeepSkyBlue;
+ this.IsBold = false;
+ }
+ }
+
[Export(typeof(EditorFormatDefinition))]
[ClassificationType(ClassificationTypeNames = "markdown.image.title")]
[Name("markdown.image.title")]
@@ -106,6 +106,11 @@ static class MarkdownClassificationTypes
// Links
[Export]
+ [Name("markdown.label")]
+ [BaseDefinition("markdown")]
+ internal static ClassificationTypeDefinition MarkdownLabel = null;
+
+ [Export]
[Name("markdown.link")]
[BaseDefinition("markdown")]
internal static ClassificationTypeDefinition MarkdownLinkDefinition = null;
@@ -122,6 +127,7 @@ static class MarkdownClassificationTypes
[Export]
[Name("markdown.link.label")]
+ [BaseDefinition("markdown.label")]
[BaseDefinition("markdown.link")]
internal static ClassificationTypeDefinition MarkdownLinkLabelDefinition = null;
@@ -165,6 +171,12 @@ static class MarkdownClassificationTypes
internal static ClassificationTypeDefinition MarkdownImageAltDefinition = null;
[Export]
+ [Name("markdown.image.label")]
+ [BaseDefinition("markdown.label")]
+ [BaseDefinition("markdown.image")]
+ internal static ClassificationTypeDefinition MarkdownImageLabelDefinition = null;
+
+ [Export]
[Name("markdown.image.title")]
[BaseDefinition("markdown.image")]
internal static ClassificationTypeDefinition MarkdownImageTitleDefinition = null;
@@ -17,6 +17,9 @@ class MarkdownClassifierProvider : IClassifierProvider
[Import]
IClassificationTypeRegistryService ClassificationRegistry = null;
+ [Import]
+ IClassificationFormatMapService FormatMapService = null;
+
public IClassifier GetClassifier(ITextBuffer buffer)
{
return buffer.Properties.GetOrCreateSingletonProperty(() => new MarkdownClassifier(buffer, ClassificationRegistry));
View
@@ -76,7 +76,7 @@ public Margin(IWpfTextView wpfTextView, MarkdownPackage package, ITextDocument d
if (package != null)
{
var window = package.GetMarkdownPreviewToolWindow(true);
- ((IVsWindowFrame)window.Frame).Show();
+ ((IVsWindowFrame)window.Frame).ShowNoActivate();
}
};
View
@@ -5,6 +5,7 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20305</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
+ <ProjectTypeGuids>{82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ProjectGuid>{1017287A-83B1-41AB-BAC2-045AC45607C7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
@@ -104,7 +105,15 @@
</VSCTCompile>
</ItemGroup>
<ItemGroup>
- <Content Include="ms-pl.txt" />
+ <Content Include="markdown-icon.png">
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="markdown-screenshot.png">
+ <IncludeInVSIX>true</IncludeInVSIX>
+ </Content>
+ <Content Include="ms-pl.txt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="Resources\Images_24bit.bmp" />
</ItemGroup>
<ItemGroup>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,3 +1,9 @@
+Markdown.cs is from MarkdownSharp, and is licensed under the MIT license (see Markdown.cs for license information).
+
+Everything else is licensed under the Microsoft Public License, included below.
+
+----
+
Microsoft Public License (Ms-PL)
This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
@@ -1,24 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Vsix Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
- <Identifier Id="MarkdownMode">
- <Name>MarkdownMode</Name>
- <Author>Noah Richards</Author>
- <Version>1.0</Version>
- <Description>A language service for editing Markdown files.</Description>
- <Locale>1033</Locale>
- <InstalledByMsi>false</InstalledByMsi>
- <License>ms-pl.txt</License>
- <SupportedProducts>
- <VisualStudio Version="10.0">
- <Edition>VST_All</Edition>
- <Edition>Pro</Edition>
- </VisualStudio>
- </SupportedProducts>
- <SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.0" />
- </Identifier>
- <References />
- <Content>
- <MefComponent>|MarkdownMode|</MefComponent>
- <VsPackage>|MarkdownMode;PkgdefProjectOutputGroup|</VsPackage>
- </Content>
+ <Identifier Id="MarkdownMode">
+ <Name>Markdown Mode</Name>
+ <Author>Noah Richards</Author>
+ <Version>0.1</Version>
+ <Description>A language service for editing Markdown files.</Description>
+ <Locale>1033</Locale>
+ <InstalledByMsi>false</InstalledByMsi>
+ <License>ms-pl-MIT.txt</License>
+ <MoreInfoUrl>http://blogs.msdn.com/noahric</MoreInfoUrl>
+ <PreviewImage>markdown-screenshot.png</PreviewImage>
+ <Icon>markdown-icon.png</Icon>
+ <SupportedProducts>
+ <VisualStudio Version="10.0">
+ <Edition>VST_All</Edition>
+ <Edition>Pro</Edition>
+ </VisualStudio>
+ </SupportedProducts>
+ <SupportedFrameworkRuntimeEdition MinVersion="4.0" MaxVersion="4.0" />
+ </Identifier>
+ <References />
+ <Content>
+ <MefComponent>|MarkdownMode|</MefComponent>
+ <VsPackage>|MarkdownMode;PkgdefProjectOutputGroup|</VsPackage>
+ </Content>
</Vsix>

0 comments on commit 13c63b2

Please sign in to comment.