Andreas Raab uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ar.156.mcz ==================== Summary ==================== Name: Tools-ar.156 Author: ar Time: 2 January 2010, 3:26:41 am UUID: c7489e4c-9282-0b43-a26f-b097fcf2e129 Ancestors: Tools-ar.155 Make services unloadable: Provide a menu hook which ServiceGUI can utilize to modify various menus in browsers instead of hacking those methods directly. =============== Diff against Tools-ar.155 =============== Item was changed: ----- Method: Browser>>classListMenu:shifted: (in category 'class functions') ----- classListMenu: aMenu shifted: shifted "Set up the menu to apply to the receiver's class list, honoring the #shifted boolean" + (self menuHook: aMenu named: #classListMenu shifted: shifted) ifTrue:[^aMenu]. + shifted ifTrue:[^ self shiftedClassListMenu: aMenu]. - - ServiceGui browser: self classMenu: aMenu. - ServiceGui onlyServices ifTrue: [^aMenu]. - shifted - ifTrue: - [^ self shiftedClassListMenu: aMenu]. aMenu addList: #( - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' spawnHierarchy) ('browse protocol (p)' browseFullProtocol) - ('printOut' printOutClass) ('fileOut' fileOutClass) - ('show hierarchy' hierarchy) ('show definition' editClass) ('show comment' editComment) - ('inst var refs...' browseInstVarRefs) ('inst var defs...' browseInstVarDefs) - ('class var refs...' browseClassVarRefs) ('class vars' browseClassVariables) ('class refs (N)' browseClassRefs) - ('rename class ...' renameClass) ('copy class' copyClass) ('remove class (x)' removeClass) - ('find method...' findMethod) ('find method wildcard...' findMethodWithWildcard) - ('more...' offerShiftedClassListMenu)). ^ aMenu ! Item was changed: ----- Method: Browser>>codePaneMenu:shifted: (in category 'code pane') ----- codePaneMenu: aMenu shifted: shifted + (self menuHook: aMenu named: #codePaneMenu shifted: shifted) ifTrue:[^aMenu]. + ^super codePaneMenu: aMenu shifted: shifted.! - ServiceGui browser: self codePaneMenu: aMenu. - ServiceGui onlyServices ifTrue: [^ aMenu]. - super codePaneMenu: aMenu shifted: shifted. - ^ aMenu! Item was changed: ----- Method: Browser>>systemCategoryMenu: (in category 'system category functions') ----- systemCategoryMenu: aMenu + + (self menuHook: aMenu named: #systemCategoryMenu shifted: false) ifTrue:[^aMenu]. + - - ServiceGui browser: self classCategoryMenu: aMenu. - ServiceGui onlyServices ifTrue: [^aMenu]. ^ aMenu labels: 'find class... (f) recent classes... (r) browse all browse printOut fileOut reorganize alphabetize update add item... rename... remove' lines: #(2 4 6 8) selections: #(findClass recent browseAllClasses buildSystemCategoryBrowser printOutSystemCategory fileOutSystemCategory editSystemCategories alphabetizeSystemCategories updateSystemCategories addSystemCategory renameSystemCategory removeSystemCategory )! Item was changed: ----- Method: Browser>>messageListMenu:shifted: (in category 'message functions') ----- messageListMenu: aMenu shifted: shifted "Answer the message-list menu" + (self menuHook: aMenu named: #messageListMenu shifted: shifted) ifTrue:[^aMenu]. + shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - ServiceGui browser: self messageListMenu: aMenu. - ServiceGui onlyServices ifTrue: [^ aMenu]. - shifted - ifTrue: [^ self shiftedMessageListMenu: aMenu]. aMenu addList: #( ('what to show...' offerWhatToShowMenu) ('toggle break on entry' toggleBreakOnEntry) - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' classHierarchy) ('browse method (O)' openSingleMessageBrowser) ('browse protocol (p)' browseFullProtocol) - ('fileOut' fileOutMessage) ('printOut' printOutMessage) - ('senders of... (n)' browseSendersOfMessages) ('implementors of... (m)' browseMessages) ('inheritance (i)' methodHierarchy) ('tile scriptor' openSyntaxView) ('versions (v)' browseVersions) - ('inst var refs...' browseInstVarRefs) ('inst var defs...' browseInstVarDefs) ('class var refs...' browseClassVarRefs) ('class variables' browseClassVariables) ('class refs (N)' browseClassRefs) - ('remove method (x)' removeMessage) - ('more...' shiftedYellowButtonActivity)). ^ aMenu! Item was changed: ----- Method: Browser>>messageCategoryMenu: (in category 'message category functions') ----- messageCategoryMenu: aMenu + (self menuHook: aMenu named: #messageCategoryMenu shifted: false) ifTrue:[^aMenu]. - ServiceGui browser: self messageCategoryMenu: aMenu. - ServiceGui onlyServices ifTrue: [^aMenu]. ^ aMenu labels: 'browse printOut fileOut reorganize alphabetize remove empty categories categorize all uncategorized new category... rename... remove' lines: #(3 8) selections: #(buildMessageCategoryBrowser printOutMessageCategories fileOutMessageCategories editMessageCategories alphabetizeMessageCategories removeEmptyCategories categorizeAllUncategorizedMethods addCategory renameCategory removeMessageCategory) ! Item was added: + ----- Method: CodeHolder>>menuHook:named:shifted: (in category 'misc') ----- + menuHook: aMenu named: aSymbol shifted: aBool + "Provide a hook for supplemental menu items. The return value indicates + whether to only use the supplemental menu or wether to add the regular + menu items to the menu. The only known user is ServiceGUI." + ^false! |
Free forum by Nabble | Edit this page |