Class PythonUtility

java.lang.Object
org.netbeans.modules.python.PythonUtility

public class PythonUtility extends Object
Author:
albilu
  • Field Details

    • LOG

      public static final Logger 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

      public static final String PYTHON_MIME_TYPE
      See Also:
    • PYLSP_VENV_DIR

      public static final File PYLSP_VENV_DIR
    • HOME_PAGE

      public static final Pattern HOME_PAGE
    • PAC_VERSIONS

      public static final Pattern PAC_VERSIONS
    • NO_MODULE_PATTERN

      public static final Pattern NO_MODULE_PATTERN
    • POETRY_PYTHON_PATH

      public static final 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

      public static final String[] IMPORTANT_FILES
    • EXCLUDED_DIRS

      public static String[] EXCLUDED_DIRS
    • VENV_DEPS

      public static String[] VENV_DEPS
    • LSP_DEPS

      public static String[] LSP_DEPS
    • SETTINGS

      public static final File SETTINGS
    • SETTINGS_SCHEMA

      public static final File SETTINGS_SCHEMA
    • REPOS

      public static final File REPOS
    • PLATFORMS

      public static final File PLATFORMS
    • ENVS

      public static final File ENVS
    • TEST_RUNNER

      public static final File TEST_RUNNER
    • TOML_HANDLER

      public static final File TOML_HANDLER
    • TERMINAL_PREFS

      public static Preferences 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

      public static String getTermFontFam()
    • getServerVersion

      public static String getServerVersion() throws IOException
      Throws:
      IOException
    • getCommandOutput

      public static String getCommandOutput(String[] cmd, org.openide.filesystems.FileObject projectDir) throws IOException
      Throws:
      IOException
    • getPythonStdLibPath

      public static String getPythonStdLibPath(String path) throws IOException
      Throws:
      IOException
    • getLspPythonExe

      public static String getLspPythonExe()
    • getProjectPythonExe

      public static String getProjectPythonExe(org.openide.filesystems.FileObject fileObject) throws IOException
      Throws:
      IOException
    • getPythonExes

      public static List<org.openide.util.Pair<String,String>> getPythonExes() throws IOException
      Throws:
      IOException
    • getOsShell

      public static String[] getOsShell()
    • getEnvs

      public static Map<String,String> getEnvs()
    • getPlatformPythonExe

      public static String getPlatformPythonExe() throws IOException
      Throws:
      IOException
    • getPythonIcon

      public static ImageIcon getPythonIcon()
    • getClassIcon

      public static ImageIcon getClassIcon()
    • getMethodIcon

      public static ImageIcon getMethodIcon()
    • getPytestIcon

      public static ImageIcon getPytestIcon()
    • getPackageIcon

      public static ImageIcon getPackageIcon()
    • getPynguinIcon

      public static ImageIcon getPynguinIcon()
    • getProperties

      public static Properties getProperties(@NonNull org.netbeans.api.project.Project project, boolean isCreating) throws IOException
      Throws:
      IOException
    • getVersion

      public static String getVersion(String projectPythonExe) throws IOException
      Throws:
      IOException
    • getErrorIcon

      public static ImageIcon getErrorIcon()
    • getPythonPackageIcon

      public static ImageIcon getPythonPackageIcon()
    • venvPackageInstaller

      public static int venvPackageInstaller(org.openide.filesystems.FileObject projectDirectory)
    • normalizeVenvPath

      public static String normalizeVenvPath(Path base)
    • packageInstaller

      public static void packageInstaller(String errorLline)
    • processExecutor

      public static int processExecutor(String[] cmd, String message)
    • installLsp

      public static int installLsp(ClassLoader cl)
    • getPipList

      public static String getPipList(String exe) throws IOException
      Throws:
      IOException
    • finish

      public static int finish()
    • noModuleInstalledHandler

      public static void noModuleInstalledHandler(String line)
    • getUserEnvs

      public static Map getUserEnvs() throws IOException
      Throws:
      IOException
    • insertUserEnvs

      public static void insertUserEnvs(String toString)
    • getExecutorDescriptor

      public static org.netbeans.api.extexecution.ExecutionDescriptor getExecutorDescriptor(org.netbeans.api.extexecution.ExecutionDescriptor.LineConvertorFactory convertorFactory, Runnable preExeRunnable, Runnable postRunnable, boolean controllable, boolean select)
    • isRunWithSysEnvs

      public static boolean isRunWithSysEnvs()
    • manageRunEnvs

      public static void manageRunEnvs(ProcessBuilder pb)
    • getVenv

      public static String getVenv(PythonProject get)
    • getProjectType

      public static String getProjectType(File toFile)
    • isPoetry

      public static boolean isPoetry(PythonProject project)
    • getPoetryPythonPath

      public static String getPoetryPythonPath(String defaultPython, org.openide.filesystems.FileObject projectDir)
    • createProperties

      public static File createProperties(org.netbeans.api.project.Project project)