Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NiftyPerforce commands are added to wrong visual studio extension #85

Open
GoogleCodeExporter opened this issue Mar 24, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Open Visual Studio 2010
2. Generate new Project - Extensibility - Visual Studio Add-in
2.a Select "Create an Add-in using Visual C#"
2.b Check only "Microsoft Visual Studio 2010"
2.c Next
2.d Check "Yes, create a 'Tools'..." and "I would like my Add-in..."
2.e Next and Finish
3. Replace "OnConnection" function by this one (simplified):

        public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
        {
            if (connectMode == ext_ConnectMode.ext_cm_UISetup)
            {
                Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar = ((Microsoft.VisualStudio.CommandBars.CommandBars)((DTE2)application).CommandBars)["MenuBar"];

                CommandBarPopup toolsPopup = (CommandBarPopup)menuBarCommandBar.Controls.Add(MsoControlType.msoControlPopup);

                toolsPopup.Caption = "NiftyBug ? - Addin";
                toolsPopup.Visible = true;
            }
        }

4. Press F5.


What is the expected output? What do you see instead?

Expected output is visual studio 2010 with a new empty menu "NiftyBug ? - 
Addin". Instead there is menu "NiftyBug ? - Addin" with all commands from Nifty 
perforce (see screenshot Menu.jpg).

If you set breakpoint on line toolsPopup.Visible = true; you will see what is 
on screenshot Debugger.jpg.

What version of the product are you using? On what operating system?
I'm using Nifty perforce 1.3.7 with Visual Studio 2010 in Windows 7 X64.


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 31 May 2012 at 11:20

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant