This commit is contained in:
kudzu_cp 2012-01-06 02:08:10 +00:00
parent 04acca08ae
commit 8a67dabe59
3 changed files with 36 additions and 30 deletions

View file

@ -103,7 +103,7 @@
<ButtonText>Assembly Window</ButtonText> <ButtonText>Assembly Window</ButtonText>
</Strings> </Strings>
</Button> </Button>
<Button guid="guidCosmosMenu" id="cmdidCosmosRegisters" priority="0x0100" type="Button"> <Button guid="guidCosmosMenu" id="cmdidCosmosRegisters" priority="0x0101" type="Button">
<Parent guid="guidCosmosMenu" id="TopLevelMenuGroup" /> <Parent guid="guidCosmosMenu" id="TopLevelMenuGroup" />
<Icon guid="guidImages" id="bmpRegisterIcon" /> <Icon guid="guidImages" id="bmpRegisterIcon" />
<Strings> <Strings>
@ -111,7 +111,7 @@
<ButtonText>Registers Window</ButtonText> <ButtonText>Registers Window</ButtonText>
</Strings> </Strings>
</Button> </Button>
<Button guid="guidCosmosMenu" id="cmdidCosmosStack" priority="0x0100" type="Button"> <Button guid="guidCosmosMenu" id="cmdidCosmosStack" priority="0x0102" type="Button">
<Parent guid="guidCosmosMenu" id="TopLevelMenuGroup" /> <Parent guid="guidCosmosMenu" id="TopLevelMenuGroup" />
<Icon guid="guidImages" id="bmpStackIcon" /> <Icon guid="guidImages" id="bmpStackIcon" />
<Strings> <Strings>
@ -119,7 +119,14 @@
<ButtonText>Stack Window</ButtonText> <ButtonText>Stack Window</ButtonText>
</Strings> </Strings>
</Button> </Button>
<Button guid="guidCosmosMenu" id="cmdidCosmosShowAll" priority="0x0100" type="Button"> <Button guid="guidCosmosMenu" id="cmdidCosmosInternal" priority="0x0103" type="Button">
<Parent guid="guidCosmosMenu" id="TopLevelMenuGroup" />
<Strings>
<CommandName>cmdidCosmosInternal</CommandName>
<ButtonText>Internal VSIP Debug Window</ButtonText>
</Strings>
</Button>
<Button guid="guidCosmosMenu" id="cmdidCosmosShowAll" priority="0x0104" type="Button">
<Parent guid="guidCosmosMenu" id="TopLevelMenuGroup" /> <Parent guid="guidCosmosMenu" id="TopLevelMenuGroup" />
<Icon guid="guidImages" id="bmpAllIcon" /> <Icon guid="guidImages" id="bmpAllIcon" />
<Strings> <Strings>
@ -208,6 +215,7 @@
<IDSymbol name="cmdidCosmosAssembly" value="0x0101" /> <IDSymbol name="cmdidCosmosAssembly" value="0x0101" />
<IDSymbol name="cmdidCosmosRegisters" value="0x0102" /> <IDSymbol name="cmdidCosmosRegisters" value="0x0102" />
<IDSymbol name="cmdidCosmosStack" value="0x0103" /> <IDSymbol name="cmdidCosmosStack" value="0x0103" />
<IDSymbol name="cmdidCosmosInternal" value="0x0108" />
<IDSymbol name="cmdidCosmosShowAll" value="0x0104"/> <IDSymbol name="cmdidCosmosShowAll" value="0x0104"/>
</GuidSymbol> </GuidSymbol>

View file

@ -83,7 +83,6 @@ namespace Cosmos.VS.Windows {
var xWindow = FindWindow(aWindowType); var xWindow = FindWindow(aWindowType);
var xFrame = (IVsWindowFrame)xWindow.Frame; var xFrame = (IVsWindowFrame)xWindow.Frame;
Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(xFrame.Show()); Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(xFrame.Show());
//return xFrame.IsVisible() == 0;
} }
protected void UpdateWindow(Type aWindowType, string aTag, byte[] aData) { protected void UpdateWindow(Type aWindowType, string aTag, byte[] aData) {
@ -91,30 +90,27 @@ namespace Cosmos.VS.Windows {
xWindow.UserControl.Update(aTag, aData); xWindow.UserControl.Update(aTag, aData);
} }
// This function is called when the user clicks the menu item that shows the private void ShowWindowAssembly(object aCommand, EventArgs e) {
// tool window. See the Initialize method to see how the menu item is associated to
// this function using the OleMenuCommandService service and the MenuCommand class.
private void ShowWindowAssembly(object sender, EventArgs e) {
ShowWindow(typeof(AssemblyTW)); ShowWindow(typeof(AssemblyTW));
} }
private void ShowWindowInternal(object sender, EventArgs e) { private void ShowWindowInternal(object aCommand, EventArgs e) {
ShowWindow(typeof(InternalTW)); ShowWindow(typeof(InternalTW));
} }
private void ShowWindowRegisters(object sender, EventArgs e) { private void ShowWindowRegisters(object aCommand, EventArgs e) {
ShowWindow(typeof(RegistersTW)); ShowWindow(typeof(RegistersTW));
} }
private void ShowWindowStack(object sender, EventArgs e) { private void ShowWindowStack(object aCommand, EventArgs e) {
ShowWindow(typeof(StackTW)); ShowWindow(typeof(StackTW));
} }
private void ShowWindowAll(object sender, EventArgs e) { private void ShowWindowAll(object aCommand, EventArgs e) {
ShowWindowAssembly(sender, e); ShowWindowAssembly(aCommand, e);
ShowWindowRegisters(sender, e); ShowWindowRegisters(aCommand, e);
ShowWindowStack(sender, e); ShowWindowStack(aCommand, e);
ShowWindowInternal(sender, e); // Dont show Internal Window, most Cosmos users wont use it.
} }
protected void AddCommand(OleMenuCommandService aMcs, uint aCmdID, EventHandler aHandler) { protected void AddCommand(OleMenuCommandService aMcs, uint aCmdID, EventHandler aHandler) {
@ -135,6 +131,7 @@ namespace Cosmos.VS.Windows {
AddCommand(xMcs, PkgCmdIDList.cmdidCosmosAssembly, ShowWindowAssembly); AddCommand(xMcs, PkgCmdIDList.cmdidCosmosAssembly, ShowWindowAssembly);
AddCommand(xMcs, PkgCmdIDList.cmdidCosmosRegisters, ShowWindowRegisters); AddCommand(xMcs, PkgCmdIDList.cmdidCosmosRegisters, ShowWindowRegisters);
AddCommand(xMcs, PkgCmdIDList.cmdidCosmosStack, ShowWindowStack); AddCommand(xMcs, PkgCmdIDList.cmdidCosmosStack, ShowWindowStack);
AddCommand(xMcs, PkgCmdIDList.cmdidCosmosInternal, ShowWindowInternal);
AddCommand(xMcs, PkgCmdIDList.cmdidCosmosShowAll, ShowWindowAll); AddCommand(xMcs, PkgCmdIDList.cmdidCosmosShowAll, ShowWindowAll);
} }
} }

View file

@ -2,18 +2,19 @@
// MUST match PkgCmdID.h // MUST match PkgCmdID.h
using System; using System;
namespace Cosmos.VS.Windows namespace Cosmos.VS.Windows {
{ static class PkgCmdIDList {
static class PkgCmdIDList public const uint cmdidCosmosAssembly = 0x101;
{ public const uint cmdidCosmosRegisters = 0x102;
public const uint cmdidCosmosAssembly = 0x101; public const uint cmdidCosmosStack = 0x103;
public const uint cmdidCosmosRegisters = 0x102; public const uint cmdidCosmosInternal = 0x108;
public const uint cmdidCosmosStack = 0x103; public const uint cmdidCosmosShowAll = 0x104;
public const uint cmdidCosmosShowAll = 0x104; //
public const uint cmdidAsmFilter = 0x0105; public const uint cmdidAsmFilter = 0x0105;
public const uint cmdidAsmStep = 0x0106; public const uint cmdidAsmStep = 0x0106;
public const uint cmdidAsmCopy = 0x0107; public const uint cmdidAsmCopy = 0x0107;
public const int AsmToolbar = 0x1001; //
public const uint AsmToolbarGroup = 0x1002; public const int AsmToolbar = 0x1001;
}; public const uint AsmToolbarGroup = 0x1002;
};
} }