Package org.netbeans.modules.python
Class PythonUtility
java.lang.Object
org.netbeans.modules.python.PythonUtility
- Author:
- albilu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Filestatic String[]static org.netbeans.api.extexecution.print.LineConvertorstatic org.netbeans.api.extexecution.print.LineConvertors.FileLocatorstatic final Patternstatic final org.netbeans.api.extexecution.print.LineConvertorstatic final String[]static final Loggerstatic String[]static final Patternstatic final Patternstatic final Filestatic final Patternstatic final Filestatic final Stringstatic final Filestatic final org.openide.util.RequestProcessorstatic final Filestatic final Filestatic final org.apache.commons.text.StringTokenizerstatic Preferencesstatic final Filestatic final Filestatic String[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilecreateProperties(org.netbeans.api.project.Project project) static intfinish()static ImageIconstatic StringgetCommandOutput(String[] cmd, org.openide.filesystems.FileObject projectDir) getEnvs()static intstatic ImageIconstatic org.netbeans.api.extexecution.ExecutionDescriptorgetExecutorDescriptor(org.netbeans.api.extexecution.ExecutionDescriptor.LineConvertorFactory convertorFactory, Runnable preExeRunnable, Runnable postRunnable, boolean controllable, boolean select) static Stringstatic ImageIconstatic String[]static ImageIconstatic org.apache.commons.text.StringTokenizerstatic StringgetPipList(String exe) static Stringstatic StringgetPoetryPythonPath(String defaultPython, org.openide.filesystems.FileObject projectDir) static StringgetProjectPythonExe(org.openide.filesystems.FileObject fileObject) static StringgetProjectType(File toFile) static PropertiesgetProperties(org.netbeans.api.project.Project project, boolean isCreating) static ImageIconstatic ImageIconstatic ImageIconstatic ImageIconstatic StringgetPythonStdLibPath(String path) static Stringstatic Stringstatic intstatic Mapstatic StringgetVenv(PythonProject get) static StringgetVersion(String projectPythonExe) static voidinsertUserEnvs(String toString) static intstatic booleanisPoetry(PythonProject project) static booleanstatic voidstatic voidstatic StringnormalizeVenvPath(Path base) static voidpackageInstaller(String errorLline) static intprocessExecutor(String[] cmd, String message) static intvenvPackageInstaller(org.openide.filesystems.FileObject projectDirectory)
-
Field Details
-
LOG
-
STRING_TOKENIZER
public static final org.apache.commons.text.StringTokenizer STRING_TOKENIZER -
RP
public static final org.openide.util.RequestProcessor RP -
PYTHON_MIME_TYPE
- See Also:
-
PYLSP_VENV_DIR
-
HOME_PAGE
-
PAC_VERSIONS
-
NO_MODULE_PATTERN
-
POETRY_PYTHON_PATH
-
HTTP_CONVERTOR
public static final org.netbeans.api.extexecution.print.LineConvertor HTTP_CONVERTOR -
FILE_LOCATOR
public static org.netbeans.api.extexecution.print.LineConvertors.FileLocator FILE_LOCATOR -
FILE_CONVERTOR
public static org.netbeans.api.extexecution.print.LineConvertor FILE_CONVERTOR -
IMPORTANT_FILES
-
EXCLUDED_DIRS
-
VENV_DEPS
-
LSP_DEPS
-
SETTINGS
-
SETTINGS_SCHEMA
-
REPOS
-
PLATFORMS
-
ENVS
-
TEST_RUNNER
-
TOML_HANDLER
-
TERMINAL_PREFS
-
-
Constructor Details
-
PythonUtility
public PythonUtility()
-
-
Method Details
-
getParamsTokenizer
public static org.apache.commons.text.StringTokenizer getParamsTokenizer() -
getTermFontSize
public static int getTermFontSize() -
geTermFontSt
public static int geTermFontSt() -
getTermFontFam
-
getServerVersion
- Throws:
IOException
-
getCommandOutput
public static String getCommandOutput(String[] cmd, org.openide.filesystems.FileObject projectDir) throws IOException - Throws:
IOException
-
getPythonStdLibPath
- Throws:
IOException
-
getLspPythonExe
-
getProjectPythonExe
public static String getProjectPythonExe(org.openide.filesystems.FileObject fileObject) throws IOException - Throws:
IOException
-
getPythonExes
- Throws:
IOException
-
getOsShell
-
getEnvs
-
getPlatformPythonExe
- Throws:
IOException
-
getPythonIcon
-
getClassIcon
-
getMethodIcon
-
getPytestIcon
-
getPackageIcon
-
getPynguinIcon
-
getProperties
public static Properties getProperties(@NonNull org.netbeans.api.project.Project project, boolean isCreating) throws IOException - Throws:
IOException
-
getVersion
- Throws:
IOException
-
getErrorIcon
-
getPythonPackageIcon
-
venvPackageInstaller
public static int venvPackageInstaller(org.openide.filesystems.FileObject projectDirectory) -
normalizeVenvPath
-
packageInstaller
-
processExecutor
-
installLsp
-
getPipList
- Throws:
IOException
-
finish
public static int finish() -
noModuleInstalledHandler
-
getUserEnvs
- Throws:
IOException
-
insertUserEnvs
-
getExecutorDescriptor
-
isRunWithSysEnvs
public static boolean isRunWithSysEnvs() -
manageRunEnvs
-
getVenv
-
getProjectType
-
isPoetry
-
getPoetryPythonPath
-
createProperties
-