diff --git a/Nodejs/Product/Nodejs/Nodejs.csproj b/Nodejs/Product/Nodejs/Nodejs.csproj index 12da29ffb..a2c846bfa 100644 --- a/Nodejs/Product/Nodejs/Nodejs.csproj +++ b/Nodejs/Product/Nodejs/Nodejs.csproj @@ -517,7 +517,6 @@ - diff --git a/Nodejs/Product/Nodejs/NodejsPackage.cs b/Nodejs/Product/Nodejs/NodejsPackage.cs index 6c0715dd5..d1f6d71da 100644 --- a/Nodejs/Product/Nodejs/NodejsPackage.cs +++ b/Nodejs/Product/Nodejs/NodejsPackage.cs @@ -77,7 +77,6 @@ namespace Microsoft.NodejsTools { [ProvideMenuResource(1000, 1)] // This attribute is needed to let the shell know that this package exposes some menus. [ProvideBraceCompletion(NodejsConstants.Nodejs)] [ProvideProjectItem(typeof(BaseNodeProjectFactory), NodejsConstants.Nodejs, "FileTemplates\\NewItem", 0)] - [ProvideLanguageTemplates("{349C5851-65DF-11DA-9384-00065B846F21}", NodejsConstants.JavaScript, Guids.NodejsPackageString, "Web", "Node.js Project Templates", "{" + Guids.NodejsBaseProjectFactoryString + "}", ".js", NodejsConstants.Nodejs, "{" + Guids.NodejsBaseProjectFactoryString + "}")] [ProvideTextEditorAutomation(NodejsConstants.Nodejs, 106, 102, ProfileMigrationType.PassThrough)] [ProvideLanguageService(typeof(JadeLanguageInfo), JadeContentTypeDefinition.JadeLanguageName, 3041, RequestStockColors = true, ShowSmartIndent = false, ShowCompletion = false, DefaultToInsertSpaces = true, HideAdvancedMembersByDefault = false, EnableAdvancedMembersOption = false, ShowDropDownOptions = false)] [ProvideEditorExtension2(typeof(JadeEditorFactory), JadeContentTypeDefinition.JadeFileExtension, 50, __VSPHYSICALVIEWATTRIBUTES.PVA_SupportsPreview, "*:1", ProjectGuid = VSConstants.CLSID.MiscellaneousFilesProject_string, NameResourceID = 3041, EditorNameResourceId = 3045)] diff --git a/Nodejs/Product/Nodejs/ProvideLanguageTemplates.cs b/Nodejs/Product/Nodejs/ProvideLanguageTemplates.cs deleted file mode 100644 index 5427171f8..000000000 --- a/Nodejs/Product/Nodejs/ProvideLanguageTemplates.cs +++ /dev/null @@ -1,83 +0,0 @@ -//*********************************************************// -// Copyright (c) Microsoft. All rights reserved. -// -// Apache 2.0 License -// -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -// implied. See the License for the specific language governing -// permissions and limitations under the License. -// -//*********************************************************// - -using System; -using System.Globalization; -using Microsoft.VisualStudio.Shell; - -namespace Microsoft.NodejsTools { - - /// - /// - /// This attribute associates a file extension to a given editor factory. - /// The editor factory may be specified as either a GUID or a type and - /// is placed on a package. - /// - /// This differs from the normal one in that more than one extension can be supplied and - /// a linked editor GUID can be supplied. - /// - [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)] - internal sealed class ProvideLanguageTemplatesAttribute : RegistrationAttribute { - private readonly string _projectFactory, _languageName, _package, _languageGuid, _description, - _codeFileExtension, _templateFolder, _webProjectGuid; - - public ProvideLanguageTemplatesAttribute(string projectFactory, string languageName, string package, - string templateGroup, string description, string languageProjectGuid, string codeFileExtension, string templateFolder, string webProjectGuid) { - _projectFactory = projectFactory; - _languageName = languageName; - _package = package; - _description = description; - _languageGuid = languageProjectGuid; - _codeFileExtension = codeFileExtension; - _templateFolder = templateGroup; - _webProjectGuid = webProjectGuid; - } - - - /// - /// - /// Called to register this attribute with the given context. The context - /// contains the location where the registration inforomation should be placed. - /// it also contains such as the type being registered, and path information. - /// - /// This method is called both for registration and unregistration. The difference is - /// that unregistering just uses a hive that reverses the changes applied to it. - /// - public override void Register(RegistrationContext context) { - string langTemplates = string.Format(CultureInfo.InvariantCulture, "Projects\\{0}\\LanguageTemplates", _projectFactory); - - using (Key projectKey = context.CreateKey(langTemplates)) { - projectKey.SetValue(_languageGuid, _webProjectGuid); - } - - var newProject = string.Format(CultureInfo.InvariantCulture, "Projects\\{0}", _webProjectGuid); - using (Key projectKey = context.CreateKey(newProject)) { - projectKey.SetValue(null, _description); - projectKey.SetValue("Language(VsTemplate)", _languageName); - projectKey.SetValue("Package", _package); - projectKey.SetValue("ShowOnlySpecifiedTemplates(VsTemplate)", 0); - - using (Key propKey = projectKey.CreateSubkey("WebApplicationProperties")) { - propKey.SetValue("CodeFileExtension", _codeFileExtension); - propKey.SetValue("TemplateFolder", _templateFolder); - } - } - } - - public override void Unregister(RegistrationContext context) { - } - } -} \ No newline at end of file