Example #1
0
        protected override int ExecCommandOnNode(Guid guidCmdGroup, uint cmd, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
        {
            Debug.Assert(this.ProjectMgr != null, "The Dynamic FileNode has no project manager");

            Utilities.CheckNotNull(this.ProjectMgr);

            if (guidCmdGroup == GuidList.guidPythonToolsCmdSet)
            {
                switch (cmd)
                {
                case CommonConstants.SetAsStartupFileCmdId:
                    // Set the StartupFile project property to the Url of this node
                    ProjectMgr.SetProjectProperty(CommonConstants.StartupFile, CommonUtils.CreateFriendlyPath(this.ProjectMgr.ProjectFolder, this.Url));
                    break;

                case CommonConstants.StartDebuggingCmdId:
                case CommonConstants.StartWithoutDebuggingCmdId:
                    CommonProjectPackage package = (CommonProjectPackage)_project.Package;
                    IProjectLauncher     starter = _project.GetLauncher();
                    if (starter != null)
                    {
                        starter.LaunchFile(this.Url, cmd == CommonConstants.StartDebuggingCmdId);
                    }
                    break;
                }
                return(VSConstants.S_OK);
            }

            return(base.ExecCommandOnNode(guidCmdGroup, cmd, nCmdexecopt, pvaIn, pvaOut));
        }
Example #2
0
        public CommonProjectNode(CommonProjectPackage /*!*/ package, ImageList /*!*/ imageList)
        {
            Contract.Assert(package != null);
            Contract.Assert(imageList != null);

            _package = package;
            CanFileNodesHaveChilds = true;
            OleServiceProvider.AddService(typeof(VSLangProj.VSProject), new OleServiceProvider.ServiceCreatorCallback(CreateServices), false);
            SupportsProjectDesigner = true;
            _imageList = imageList;

            //Store the number of images in ProjectNode so we know the offset of the language icons.
            _imageOffset = ImageHandler.ImageList.Images.Count;
            foreach (Image img in ImageList.Images)
            {
                ImageHandler.AddImage(img);
            }

            InitializeCATIDs();
        }
Example #3
0
 public PythonEditorFactoryPromptForEncoding(CommonProjectPackage package) : base(package, true) { }
Example #4
0
 public PythonEditorFactory(CommonProjectPackage package, bool promptForEncoding) : base(package, promptForEncoding) { }
Example #5
0
 public PythonEditorFactory(CommonProjectPackage package) : base(package) { }
Example #6
0
 public CommonEditorFactory(CommonProjectPackage package)
 {
     _package = package;
 }
Example #7
0
 public PythonProjectNode(CommonProjectPackage package)
     : base(package, Utilities.GetImageList(typeof(PythonProjectNode).Assembly.GetManifestResourceStream(PythonConstants.ProjectImageList)))
 {
 }