Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 42b4783

Browse files
committed
Add XmlCore content type
Derived language services can base their content type on this to pull in some common functionality
1 parent 7b66975 commit 42b4783

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

Editor/XmlContentType.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ namespace MonoDevelop.Xml.Editor
3030
static class XmlContentType
3131
{
3232
[Export]
33-
[Name (XmlContentTypeNames.Xml)]
33+
[Name (XmlContentTypeNames.XmlCore)]
3434
[BaseDefinition (StandardContentTypeNames.Code)]
35+
public static readonly ContentTypeDefinition XmlCoreContentTypeDefinition = null;
36+
37+
[Export]
38+
[Name (XmlContentTypeNames.Xml)]
39+
[BaseDefinition (XmlContentTypeNames.XmlCore)]
3540
public static readonly ContentTypeDefinition XmlContentTypeDefinition = null;
3641

3742
[Export]
@@ -63,6 +68,5 @@ static class XmlContentType
6368
[FileExtension (".xsd")]
6469
[ContentType (XmlContentTypeNames.Xsd)]
6570
internal static FileExtensionToContentTypeDefinition XsdFileExtensionDefinition = null;
66-
6771
}
6872
}

Editor/XmlContentTypeNames.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (C) Microsoft Corp. All rights reserved.
33
//
44
// Permission is hereby granted, free of charge, to any person obtaining
@@ -25,6 +25,12 @@ namespace MonoDevelop.Xml.Editor
2525
{
2626
public static class XmlContentTypeNames
2727
{
28+
/// <summary>
29+
/// Content types that derive from this will inherit some basic functionality
30+
/// without lighting up the full XML editor.
31+
/// </summary>
32+
public const string XmlCore = "xmlcore";
33+
2834
public const string Xml = "xml";
2935
public const string Xslt = "xslt";
3036
public const string Xsd = "xsd";

0 commit comments

Comments
 (0)