mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
python-openapi module extracted
This commit is contained in:
@@ -53,7 +53,7 @@ private List<String> pycharmPlatformApiModules() {
|
||||
|
||||
|
||||
private List pycharmImplementationModules() {
|
||||
return ["yaml", "graph", "coverage-common", "python", "python-ide"]
|
||||
return ["yaml", "graph", "coverage-common", "python", "python-ide", "python-openapi"]
|
||||
}
|
||||
|
||||
class Paths {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="core-api" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
-15
@@ -1,18 +1,12 @@
|
||||
package com.jetbrains.python;
|
||||
|
||||
import com.intellij.lang.Language;
|
||||
import com.intellij.openapi.editor.colors.EditorColorsScheme;
|
||||
import com.intellij.openapi.editor.highlighter.EditorHighlighter;
|
||||
import com.intellij.openapi.fileTypes.EditorHighlighterProvider;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders;
|
||||
import com.intellij.openapi.fileTypes.LanguageFileType;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.jetbrains.python.lexer.PythonEditorHighlighter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -42,15 +36,6 @@ public class PythonFileType extends LanguageFileType {
|
||||
public PythonFileType(Language language) {
|
||||
super(language);
|
||||
_icon = IconLoader.getIcon("/com/jetbrains/python/icons/pythonFile.png");
|
||||
|
||||
FileTypeEditorHighlighterProviders.INSTANCE.addExplicitExtension(this, new EditorHighlighterProvider() {
|
||||
@Override
|
||||
public EditorHighlighter getEditorHighlighter(@Nullable Project project,
|
||||
@NotNull FileType fileType, @Nullable VirtualFile virtualFile,
|
||||
@NotNull EditorColorsScheme colors) {
|
||||
return new PythonEditorHighlighter(colors, project, virtualFile);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.jetbrains.python;
|
||||
|
||||
import com.intellij.lang.Language;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class PythonLanguage extends Language {
|
||||
public static PythonLanguage getInstance() {
|
||||
return (PythonLanguage)PythonFileType.INSTANCE.getLanguage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCaseSensitive() {
|
||||
return true; // http://jetbrains-feed.appspot.com/message/372001
|
||||
}
|
||||
|
||||
protected PythonLanguage() {
|
||||
super("Python");
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -5,7 +5,6 @@ import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.jetbrains.python.psi.impl.PythonLanguageLevelPusher;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@@ -21,6 +20,8 @@ public enum LanguageLevel {
|
||||
PYTHON32(32, true, false, true, true),
|
||||
PYTHON33(33, true, false, true, true);
|
||||
|
||||
public static LanguageLevel FORCE_LANGUAGE_LEVEL = null;
|
||||
|
||||
public static LanguageLevel getDefault() {
|
||||
return PYTHON26;
|
||||
}
|
||||
@@ -113,7 +114,7 @@ public enum LanguageLevel {
|
||||
if (level != null) return level;
|
||||
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
final LanguageLevel languageLevel = PythonLanguageLevelPusher.FORCE_LANGUAGE_LEVEL;
|
||||
final LanguageLevel languageLevel = FORCE_LANGUAGE_LEVEL;
|
||||
if (languageLevel != null) {
|
||||
return languageLevel;
|
||||
}
|
||||
-1
@@ -1,7 +1,6 @@
|
||||
package com.jetbrains.python.psi;
|
||||
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.jetbrains.python.PythonDialectsTokenSetContributor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
-2
@@ -1,7 +1,5 @@
|
||||
package com.jetbrains.python.psi;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a Python 3 set literal expression, for example, <tt>{1, 2, 3}</tt>
|
||||
*
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user