mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Move some python-related file types definitions to new API
GitOrigin-RevId: b8372289edb46c2298617100e35020bd6f6af370
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6d95234d4c
commit
fd339f6c9e
@@ -5,7 +5,7 @@
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
|
||||
<fileTypeFactory implementation="com.jetbrains.rest.RestFileTypeFactory"/>
|
||||
<fileType name="ReST" language="ReST" extensions="rst" implementationClass="com.jetbrains.rest.RestFileType" fieldName="INSTANCE"/>
|
||||
<lang.syntaxHighlighterFactory language="ReST"
|
||||
implementationClass="com.jetbrains.rest.RestHighlighterFactory"/>
|
||||
<lang.parserDefinition language="ReST" implementationClass="com.jetbrains.rest.parsing.RestParserDefinition"/>
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2013 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.jetbrains.rest;
|
||||
|
||||
import com.intellij.openapi.fileTypes.FileTypeConsumer;
|
||||
import com.intellij.openapi.fileTypes.FileTypeFactory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* User : catherine
|
||||
*/
|
||||
public class RestFileTypeFactory extends FileTypeFactory {
|
||||
@Override
|
||||
public void createFileTypes(final @NotNull FileTypeConsumer consumer) {
|
||||
consumer.consume(RestFileType.INSTANCE, RestFileType.DEFAULT_EXTENSION);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,11 @@
|
||||
<framework.detector implementation="com.jetbrains.python.buildout.BuildoutFrameworkDetector"/>
|
||||
|
||||
<lang.parserDefinition language="BuildoutCfg" implementationClass="com.jetbrains.python.buildout.config.BuildoutCfgParserDefinition"/>
|
||||
<fileTypeFactory implementation="com.jetbrains.python.buildout.config.BuildoutCfgFileTypeFactory"/>
|
||||
<fileType name="BuildoutCfg"
|
||||
language="BuildoutCfg"
|
||||
fileNamesCaseInsensitive="buildout.cfg"
|
||||
implementationClass="com.jetbrains.python.buildout.config.BuildoutCfgFileType"
|
||||
fieldName="INSTANCE"/>
|
||||
<lang.syntaxHighlighterFactory language="BuildoutCfg"
|
||||
implementationClass="com.jetbrains.python.buildout.config.BuildoutCfgHighlighterFactory"/>
|
||||
|
||||
|
||||
@@ -16,7 +16,13 @@
|
||||
<nameSuggestionProvider implementation="com.jetbrains.python.refactoring.PyNameSuggestionProvider"/>
|
||||
<methodNavigationOffsetProvider implementation="com.jetbrains.python.codeInsight.PyMethodNavigationOffsetProvider"/>
|
||||
<copyPastePreProcessor implementation="com.jetbrains.python.editor.PythonCopyPasteProcessor"/>
|
||||
<fileTypeFactory implementation="com.jetbrains.python.PythonFileTypeFactory"/>
|
||||
<fileType name="Python"
|
||||
language="Python"
|
||||
extensions="py;pyw;"
|
||||
implementationClass="com.jetbrains.python.PythonFileType"
|
||||
fieldName="INSTANCE"/>
|
||||
<fileType name="Qt UI file" language="XML" extensions="ui" implementationClass="com.jetbrains.pyqt.QtUIFileType" fieldName="INSTANCE"/>
|
||||
<fileType name="XML" language="XML" extensions="qrc"/>
|
||||
<fileTypeDetector implementation="com.jetbrains.python.PyFileTypeDetector"/>
|
||||
<editorHighlighterProvider filetype="Python" implementationClass="com.jetbrains.python.PyEditorHighlighterProvider"/>
|
||||
<lang.syntaxHighlighterFactory language="Python" implementationClass="com.jetbrains.python.highlighting.PySyntaxHighlighterFactory"/>
|
||||
@@ -615,7 +621,11 @@
|
||||
<!-- typing -->
|
||||
<multiHostInjector implementation="com.jetbrains.python.codeInsight.typing.PyTypingAnnotationInjector"/>
|
||||
<lang.parserDefinition language="PythonStub" implementationClass="com.jetbrains.python.pyi.PyiParserDefinition"/>
|
||||
<fileTypeFactory implementation="com.jetbrains.python.pyi.PyiFileTypeFactory"/>
|
||||
<fileType name="PythonStub"
|
||||
language="PythonStub"
|
||||
extensions="pyi"
|
||||
implementationClass="com.jetbrains.python.pyi.PyiFileType"
|
||||
fieldName="INSTANCE"/>
|
||||
<codeInsight.lineMarkerProvider language="Python" implementationClass="com.jetbrains.python.pyi.PyiRelatedItemLineMarkerProvider"/>
|
||||
|
||||
<lang.inspectionSuppressor language="Python" implementationClass="com.jetbrains.python.inspections.PyInspectionsSuppressor"/>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.python;
|
||||
|
||||
import com.intellij.ide.highlighter.XmlFileType;
|
||||
import com.intellij.openapi.fileTypes.FileTypeConsumer;
|
||||
import com.intellij.openapi.fileTypes.FileTypeFactory;
|
||||
import com.jetbrains.pyqt.QtUIFileType;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class PythonFileTypeFactory extends FileTypeFactory {
|
||||
@Override
|
||||
public void createFileTypes(@NonNls @NotNull final FileTypeConsumer consumer) {
|
||||
consumer.consume(PythonFileType.INSTANCE, "py;pyw;");
|
||||
consumer.consume(QtUIFileType.INSTANCE, "ui");
|
||||
consumer.consume(XmlFileType.INSTANCE, "qrc");
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.python.buildout.config;
|
||||
|
||||
import com.intellij.openapi.fileTypes.ExactFileNameMatcher;
|
||||
import com.intellij.openapi.fileTypes.FileTypeConsumer;
|
||||
import com.intellij.openapi.fileTypes.FileTypeFactory;
|
||||
import com.jetbrains.python.buildout.BuildoutFacet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author traff
|
||||
*/
|
||||
public class BuildoutCfgFileTypeFactory extends FileTypeFactory {
|
||||
@Override
|
||||
public void createFileTypes(final @NotNull FileTypeConsumer consumer) {
|
||||
consumer.consume(BuildoutCfgFileType.INSTANCE, new ExactFileNameMatcher(BuildoutFacet.BUILDOUT_CFG, true));
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* 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.jetbrains.python.pyi;
|
||||
|
||||
import com.intellij.openapi.fileTypes.FileTypeConsumer;
|
||||
import com.intellij.openapi.fileTypes.FileTypeFactory;
|
||||
import com.jetbrains.python.PythonFileType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author vlan
|
||||
*/
|
||||
public class PyiFileTypeFactory extends FileTypeFactory {
|
||||
@Override
|
||||
public void createFileTypes(@NotNull FileTypeConsumer consumer) {
|
||||
final PythonFileType instance = PyiFileType.INSTANCE;
|
||||
consumer.consume(instance, instance.getDefaultExtension());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user