From 306851e0959f468166a174396820b48f6cd1068e Mon Sep 17 00:00:00 2001 From: Valentin Fondaratov Date: Tue, 21 Apr 2015 15:18:34 +0300 Subject: [PATCH] Change syntaxHighlighterFactory to LanguageEP --- .../fileTypes/SyntaxHighlighterFactoryEP.java | 37 +++++++++++++++++++ .../src/META-INF/PlatformExtensionPoints.xml | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 platform/editor-ui-api/src/com/intellij/openapi/fileTypes/SyntaxHighlighterFactoryEP.java diff --git a/platform/editor-ui-api/src/com/intellij/openapi/fileTypes/SyntaxHighlighterFactoryEP.java b/platform/editor-ui-api/src/com/intellij/openapi/fileTypes/SyntaxHighlighterFactoryEP.java new file mode 100644 index 000000000000..70087e767a2c --- /dev/null +++ b/platform/editor-ui-api/src/com/intellij/openapi/fileTypes/SyntaxHighlighterFactoryEP.java @@ -0,0 +1,37 @@ +/* + * Copyright 2000-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the 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. + */ +package com.intellij.openapi.fileTypes; + +import com.intellij.lang.LanguageExtensionPoint; +import com.intellij.util.xmlb.annotations.Attribute; + +public class SyntaxHighlighterFactoryEP extends LanguageExtensionPoint { + // For backward compatibility + @Deprecated + @Attribute("key") + public String key; + + @Override + public String getKey() { + final String result = super.getKey(); + if (result != null) { + return result; + } + + //noinspection deprecation + return key; + } +} diff --git a/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml b/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml index 4e251f1703b7..20bc0b4dcdbd 100644 --- a/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml +++ b/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml @@ -84,7 +84,7 @@ + beanClass="com.intellij.openapi.fileTypes.SyntaxHighlighterFactoryEP">