[squeak-dev] The Trunk: Tools-rkrk.109.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: Tools-rkrk.109.mcz

commits-2
Andreas Raab uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-rkrk.109.mcz

==================== Summary ====================

Name: Tools-rkrk.109
Author: rkrk
Time: 23 August 2009, 5:34:26 am
UUID: cb674c2a-574b-420d-adf2-e63a6a44f4d2
Ancestors: Tools-rkrk.108

Fix for http://bugs.squeak.org/view.php?id=7390

Extended Lexicon so that necessary buttons for controlling the browser are appearing again.

=============== Diff against Tools-rkrk.108 ===============

Item was added:
+ ----- Method: Lexicon>>addSpecialButtonsTo:with: (in category 'toolbuilder') -----
+ addSpecialButtonsTo: buttonPanelSpec with: builder
+
+ | homeCatBtnSpec menuBtnSpec mostGenericBtnSpec |
+ homeCatBtnSpec := builder pluggableButtonSpec new
+ model: self;
+ action: #showHomeCategory;
+ label: (ScriptingSystem formAtKey: #Cat) asMorph;
+ help: 'show this method''s home category';
+ yourself.
+ menuBtnSpec := builder pluggableButtonSpec new
+ model: self;
+ action: #offerMenu;
+ label: (ScriptingSystem formAtKey: #TinyMenu) asMorph;
+ help: 'click here to get a menu with further options';
+ yourself.
+ mostGenericBtnSpec :=builder pluggableButtonSpec new
+ model: self;
+ action: #chooseLimitClass;
+ label: #limitClassString;
+ help: 'Governs which classes'' methods should be shown.  If this is the same as the viewed class, then only methods implemented in that class will be shown.  If it is ProtoObject, then methods of all classes in the vocabulary will be shown.'.
+ buttonPanelSpec children
+ add: homeCatBtnSpec;
+ addFirst: mostGenericBtnSpec;
+ addFirst: menuBtnSpec.!

Item was added:
+ ----- Method: Lexicon>>buildCustomButtonsWith: (in category 'toolbuilder') -----
+ buildCustomButtonsWith: builder
+
+ "This method if very similar to StringHolder>>buildOptionalButtonsWith:.
+ Refactor and pass in button specs?"
+ | panelSpec buttonSpec |
+ panelSpec := builder pluggablePanelSpec new.
+ panelSpec children: OrderedCollection new.
+ self customButtonSpecs do: [:spec |
+ buttonSpec := builder pluggableActionButtonSpec new.
+ buttonSpec model: self.
+ buttonSpec label: spec first.
+ buttonSpec action: spec second.
+ spec size > 2 ifTrue: [buttonSpec help: spec third].
+ panelSpec children add: buttonSpec.
+ ].
+ panelSpec layout: #horizontal. "buttons"
+ self addSpecialButtonsTo: panelSpec with: builder.
+ ^panelSpec!

Item was changed:
  ----- Method: Lexicon>>setLimitClass: (in category 'limit class') -----
  setLimitClass: aClass
  "Set aClass as the limit class for this browser"
 
  | currentClass currentSelector |
  currentClass := self selectedClassOrMetaClass.
  currentSelector := self selectedMessageName.
 
  self limitClass: aClass.
  categoryList := nil.
  self categoryListIndex: 0.
  self changed: #categoryList.
  self changed: #methodList.
  self changed: #contents.
+ self changed: #limitClassString.
  self adjustWindowTitle.
  self hasSearchPane
  ifTrue:
  [self setMethodListFromSearchString].
 
  self maybeReselectClass: currentClass selector: currentSelector
 
  !

Item was added:
+ ----- Method: Lexicon>>buildCodePaneWith: (in category 'toolbuilder') -----
+ buildCodePaneWith: builder
+
+ | spec standardButtonPanel codePane customPanelSpec |
+ spec := super buildCodePaneWith: builder.
+ standardButtonPanel := spec children
+ detect: [:ea | ea isKindOf:  PluggablePanelSpec]
+ ifNone: [^ spec]. "do nothing if optionalButtons not enabled"
+ customPanelSpec := self buildCustomButtonsWith: builder.
+ customPanelSpec frame: (0@0.12 corner: 1@0.24).
+ spec children add: customPanelSpec after: standardButtonPanel.
+ "resize code pane so that new panel fits in"
+ codePane := spec children detect: [:ea | ea isKindOf:  PluggableCodePaneSpec].
+ codePane frame:  (codePane frame withTop: 0.24).
+ ^ spec.!

Item was changed:
+ ----- Method: Lexicon>>openOnClass:inWorld:showingSelector: (in category 'toolbuilder') -----
- ----- Method: Lexicon>>openOnClass:inWorld:showingSelector: (in category 'initialization') -----
  openOnClass: aTargetClass inWorld: ignored showingSelector: aSelector
 
  ^self openOnClass: aTargetClass showingSelector: aSelector!

Item was changed:
+ ----- Method: Lexicon>>buildWith: (in category 'toolbuilder') -----
- ----- Method: Lexicon>>buildWith: (in category 'initialization') -----
  buildWith: builder
  "Create the ui for the browser"
  | windowSpec max |
  max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4].
  windowSpec := self buildWindowWith: builder specs: {
  (0@0 corner: 0.5@max) -> [self buildCategoryListWith: builder].
  (0.5@0 corner: 1@max) -> [self buildMessageListWith: builder].
  (0@max corner: 1@1) -> [self buildCodePaneWith: builder].
  }.
  ^builder build: windowSpec!

Item was changed:
+ ----- Method: Lexicon>>openOnClass:showingSelector: (in category 'toolbuilder') -----
- ----- Method: Lexicon>>openOnClass:showingSelector: (in category 'initialization') -----
  openOnClass: aTargetClass showingSelector: aSelector
 
  currentVocabulary ifNil: [currentVocabulary := Vocabulary fullVocabulary].
  targetClass := aTargetClass.
  self initialLimitClass.
 
  self reformulateCategoryList.
  ToolBuilder open: self.
  self adjustWindowTitle.!

Item was changed:
+ ----- Method: Lexicon>>wantsAnnotationPane (in category 'toolbuilder') -----
- ----- Method: Lexicon>>wantsAnnotationPane (in category 'initialization') -----
  wantsAnnotationPane
  "This kind of browser always wants annotation panes, so answer true"
 
  ^ true!

Item was changed:
+ ----- Method: Lexicon>>buildCategoryListWith: (in category 'toolbuilder') -----
- ----- Method: Lexicon>>buildCategoryListWith: (in category 'initialization') -----
  buildCategoryListWith: builder
  | listSpec |
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self;
  list: #categoryList;
  getIndex: #categoryListIndex;
  setIndex: #categoryListIndex:;
  menu: #categoryListMenu:shifted:;
  keyPress: #categoryListKey:from:.
  ^listSpec!