Ejemplo n.º 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");

            if (this.ProjectMgr == null)
            {
                throw new InvalidOperationException();
            }
            if (guidCmdGroup == GuidList.guidIronStudioCmdSet)
            {
                switch (cmd)
                {
                case CommonConstants.SetAsStartupFileCmdId:
                    // Set the StartupFile project property to the Url of this node
                    this.ProjectMgr.SetProjectProperty(CommonConstants.StartupFile, this.Url);
                    break;

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

            return(base.ExecCommandOnNode(guidCmdGroup, cmd, nCmdexecopt, pvaIn, pvaOut));
        }
Ejemplo n.º 2
0
        public CommonProjectNode(CommonProjectPackage /*!*/ package, ImageList /*!*/ imageList)
        {
            ContractUtils.RequiresNotNull(package, "package");
            ContractUtils.RequiresNotNull(imageList, "imageList");

            _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();
        }
Ejemplo n.º 3
0
 public CommonEditorFactory(CommonProjectPackage package)
 {
     _package = package;
 }
Ejemplo n.º 4
0
 public PythonProjectNode(CommonProjectPackage package)
     : base(package, Utilities.GetImageList(typeof(PythonProjectNode).Assembly.GetManifestResourceStream(PythonConstants.ProjectImageList)))
 {
 }
Ejemplo n.º 5
0
 public DirectoryBasedProjectNode(CommonProjectPackage package, ImageList imageList)
     : base(package, imageList) {
 }
 public CommonEditorFactory(CommonProjectPackage package)
 {
     _package = package;
 }
Ejemplo n.º 7
0
 public PythonEditorFactory(CommonProjectPackage package)
     : base(package)
 {
 }
Ejemplo n.º 8
0
 public RubyEditorFactory(CommonProjectPackage package)
     : base(package)
 {
 }
Ejemplo n.º 9
0
 public DirectoryBasedProjectNode(CommonProjectPackage package, ImageList imageList)
     : base(package, imageList)
 {
 }