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

            if (ProjectMgr == null)
            {
                throw new InvalidOperationException();
            }

            int returnCode;

            if (HierarchyHelpers.ExecCommandOnProjectSourceNode(this, guidCmdGroup, cmd, nCmdexecopt, pvaIn, pvaOut, out returnCode))
            {
                return(returnCode);
            }

            if (guidCmdGroup == MenuCmd.guidNemerleProjectCmdSet && cmd == (uint)MenuCmd.SetAsMain.ID)
            {
                // Set the MainFile project property to the Filename of this Node.
                //
                ProjectMgr.SetProjectProperty(NemerleProjectNodeProperties.MainFilePropertyName, GetRelativePath());

                return(VSConstants.S_OK);
            }

            return(base.ExecCommandOnNode(guidCmdGroup, cmd, nCmdexecopt, pvaIn, pvaOut));
        }
Beispiel #2
0
        protected override int ExecCommandOnNode(Guid cmdGroup, uint cmd, uint cmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
        {
            int returnCode;

            if (HierarchyHelpers.ExecCommandOnProjectSourceNode(this, cmdGroup, cmd, cmdexecopt, pvaIn, pvaOut, out returnCode))
            {
                return(returnCode);
            }

            return(base.ExecCommandOnNode(cmdGroup, cmd, cmdexecopt, pvaIn, pvaOut));
        }