Are there any examples on how I could inject/add a menu item to a
selected bundle in the Refactoring Browser? I have created a small tool that gives information about the history of a bundle, and want to enable the tool from the browser. Ideally, I want to avoid using overrides. Kind regards Runar _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
You can inject a new tool for bundles similar to how bundle structure
tool is added, CodeModel class>>bundleStructureToolClass <tool: 36> ^BundleStructureTool BundleStructureTool>>isActive ^(self mostSpecificSelection isKindOf: CodeComponent) and: [self mostSpecificSelection isBundle] -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Runar Jordahl Sent: 13 October 2010 09:22 To: [hidden email] Subject: [vwnc] Adding Menu Item to Selected Bundle in RB Are there any examples on how I could inject/add a menu item to a selected bundle in the Refactoring Browser? I have created a small tool that gives information about the history of a bundle, and want to enable the tool from the browser. Ideally, I want to avoid using overrides. Kind regards Runar _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
You can also add menu items by extending BrowserNavigator (not tested),
menuItemMyBundleTool <itemInMenu: #(#pundleMenu) position: 400> ^(MenuItem labeled: 'My Bundle Tool') visible: [self isBundleSelected]; value: #openMyBundleTool; yourself -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Boris Popov, DeepCove Labs Sent: 13 October 2010 09:45 To: Runar Jordahl; [hidden email] Subject: Re: [vwnc] Adding Menu Item to Selected Bundle in RB You can inject a new tool for bundles similar to how bundle structure tool is added, CodeModel class>>bundleStructureToolClass <tool: 36> ^BundleStructureTool BundleStructureTool>>isActive ^(self mostSpecificSelection isKindOf: CodeComponent) and: [self mostSpecificSelection isBundle] -Boris -- DeepCove Labs Ltd. +1 (604) 689-0322 4th floor, 595 Howe Street Vancouver, British Columbia Canada V6C 2T5 http://tinyurl.com/r7uw4 PacNet Services (Europe) Ltd. +353 (0)61 714-360 Shannon Airport House, SFZ County Clare, Ireland http://tinyurl.com/y952amr CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Runar Jordahl Sent: 13 October 2010 09:22 To: [hidden email] Subject: [vwnc] Adding Menu Item to Selected Bundle in RB Are there any examples on how I could inject/add a menu item to a selected bundle in the Refactoring Browser? I have created a small tool that gives information about the history of a bundle, and want to enable the tool from the browser. Ideally, I want to avoid using overrides. Kind regards Runar _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Thanks a lot! That works.
Runar 2010/10/13 Boris Popov, DeepCove Labs <[hidden email]>: > You can also add menu items by extending BrowserNavigator (not tested), > > menuItemMyBundleTool > <itemInMenu: #(#pundleMenu) position: 400> > ^(MenuItem labeled: 'My Bundle Tool') > visible: [self isBundleSelected]; > value: #openMyBundleTool; > yourself > > -Boris _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |