The Trunk: Tools-mt.585.mcz

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

The Trunk: Tools-mt.585.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.585.mcz

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

Name: Tools-mt.585
Author: mt
Time: 12 April 2015, 9:10:55.87 pm
UUID: 691d31e5-ac8b-654f-80fe-12e17c85d60f
Ancestors: Tools-mt.584

Some models assume Morphic. This is not good. Added some guards to make those models work with MVC.

=============== Diff against Tools-mt.584 ===============

Item was changed:
  ----- Method: CodeHolder>>listPaneWithSelector: (in category 'categories & search pane') -----
  listPaneWithSelector: aSelector
  "If, among my window's paneMorphs, there is a list pane defined with aSelector as its retriever, answer it, else answer nil"
 
  | aWindow |
+ Smalltalk isMorphic ifFalse: [^ nil].
  ^ (aWindow := self containingWindow) ifNotNil:
  [aWindow paneMorphSatisfying:
  [:aMorph | (aMorph isKindOf: PluggableListMorph) and:
  [aMorph getListSelector == aSelector]]]!

Item was added:
+ ----- Method: CustomMenu>>add:target:selector: (in category 'compatibility') -----
+ add: aString target: target selector: aSymbol
+
+ self add: aString
+ target: target
+ selector: aSymbol
+ argumentList: #()!

Item was changed:
  ----- Method: Inspector>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  "Inspector openOn: SystemOrganization"
+ | windowSpec specs buttonOffset wantsExploreButton |
+ wantsExploreButton := Smalltalk isMorphic.
- | windowSpec buttonOffset |
  buttonOffset := (Preferences standardButtonFont widthOfString: 'explore') * 3/2.
+
+ self flag: #mvc. "mt: We can remove this if we can build trees in MVC and thus have a working object explorer there."
+ specs := {
- windowSpec := self buildWindowWith: builder specs: {
  (0@0 corner: 0.3@0.75)  -> [self buildFieldListWith: builder].
+ (0.3@0.0corner: 1@0.75) -> [self buildValuePaneWith: builder]},
+ (wantsExploreButton
+ ifTrue: [{
+ (LayoutFrame fractions: (0@0.75 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder].
+ (LayoutFrame fractions: (1@0.75 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder].}]
+ ifFalse: [{(0.0@0.7corner: 1@1) -> [self buildCodePaneWith: builder]}]).
+
+ windowSpec := self buildWindowWith: builder specs: specs.
- (0.3@0.0corner: 1@0.75) -> [self buildValuePaneWith: builder].
- (LayoutFrame fractions: (0@0.75 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder].
- (LayoutFrame fractions: (1@0.75 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder].
- }.
  windowSpec extent: self initialExtent.
  ^builder build: windowSpec!

Item was changed:
  ----- Method: MessageSet>>modelWakeUp (in category 'user interface') -----
  modelWakeUp
  "A window with me as model has been activated."
 
- | tm |
  super modelWakeUp.
+ (self canDiscardEdits and: [autoSelectString notNil]) ifTrue: [
+ self codeTextMorph ifNotNil: [:tm |
+ (tm hasProperty: #launched) ifFalse: [
+ tm scrollSelectionIntoView.
+ tm setProperty: #launched toValue: true] ] ]!
- (self canDiscardEdits and: [autoSelectString notNil]) ifTrue:
- [tm := self codeTextMorph.
- (tm hasProperty: #launched) ifFalse:
- [tm scrollSelectionIntoView.
- tm setProperty: #launched toValue: true]
- ]!

Item was changed:
  ----- Method: StringHolder>>textPaneWithSelector: (in category '*Tools') -----
  textPaneWithSelector: aSelector
  "If, among my window's paneMorphs, there is a text pane defined with aSelector as its retriever, answer it, else answer nil"
 
  | aWindow |
+ Smalltalk isMorphic ifFalse: [^ nil].
  ^ (aWindow := self containingWindow) ifNotNil:
  [aWindow paneMorphSatisfying:
  [:aMorph | (aMorph isKindOf: PluggableTextMorph) and:
  [aMorph getTextSelector == aSelector]]]!