예제 #1
0
        internal static bool TryGetStartupFileAndDirectory(out string filename, out string dir, out ProjectAnalyzer analyzer)
        {
            var startupProject = GetStartupProject();

            if (startupProject != null)
            {
                filename = startupProject.GetStartupFile();
                dir      = startupProject.GetWorkingDirectory();
                analyzer = ((PythonProjectNode)startupProject).GetAnalyzer();
            }
            else
            {
                var textView = CommonPackage.GetActiveTextView();
                if (textView == null)
                {
                    filename = null;
                    dir      = null;
                    analyzer = null;
                    return(false);
                }
                filename = textView.GetFilePath();
                analyzer = textView.GetAnalyzer();
                dir      = Path.GetDirectoryName(filename);
            }
            return(true);
        }
예제 #2
0
 internal override LibraryManager CreateLibraryManager(CommonPackage package)
 {
     return(new PythonLibraryManager((PythonToolsPackage)package));
 }
예제 #3
0
 internal abstract LibraryManager CreateLibraryManager(CommonPackage package);