The Trunk: Tools-mt.599.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.599.mcz

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

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

Name: Tools-mt.599
Author: mt
Time: 19 April 2015, 6:02:06.356 pm
UUID: 2c5c1b8f-6cf7-804d-91f0-0bf4a9c91187
Ancestors: Tools-mt.598

Code for initial extent refactored in Debugger.

=============== Diff against Tools-mt.598 ===============

Item was changed:
  ----- Method: Debugger>>buildFullWith: (in category 'toolbuilder') -----
  buildFullWith: builder
+ | windowSpec listSpec textSpec |
+ windowSpec := builder pluggableWindowSpec new
+ model: self;
+ label: 'Debugger';
+ children: OrderedCollection new.
- | windowSpec listSpec textSpec extent |
- windowSpec := builder pluggableWindowSpec new.
- windowSpec model: self.
- windowSpec label: 'Debugger'.
- Display height < 800 "a small screen"
- ifTrue:[extent := RealEstateAgent standardWindowExtent]
- ifFalse:[extent := 600@700].
- windowSpec extent: extent.
- windowSpec children: OrderedCollection new.
 
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self;
  list: #contextStackList;
  getIndex: #contextStackIndex;
  setIndex: #toggleContextStackIndex:;
  menu: #contextStackMenu:shifted:;
  keyPress: #contextStackKey:from:;
  frame: (0@0 corner: 1@0.22).
  windowSpec children add: listSpec.
 
 
  textSpec := self buildCodePaneWith: builder.
  textSpec frame: (0@0.22corner: 1@0.8).
  windowSpec children add: textSpec.
 
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self receiverInspector;
  list: #fieldList;
  getIndex: #selectionIndex;
  setIndex: #toggleIndex:;
  menu: #fieldListMenu:;
  keyPress: #inspectorKey:from:;
  frame: (0@0.8 corner: 0.2@1).
  windowSpec children add: listSpec.
 
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self receiverInspector;
  getText: #contents;
  setText: #accept:;
+ help: '<- Select receiver''s field' translated;
  selection: #contentsSelection;
  menu: #codePaneMenu:shifted:;
  frame: (0.2@0.8 corner: 0.5@1).
  windowSpec children add: textSpec.
 
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self contextVariablesInspector;
  list: #fieldList;
  getIndex: #selectionIndex;
  setIndex: #toggleIndex:;
  menu: #fieldListMenu:;
  keyPress: #inspectorKey:from:;
  frame: (0.5@0.8 corner: 0.7@1).
  windowSpec children add: listSpec.
 
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self contextVariablesInspector;
  getText: #contents;
  setText: #accept:;
+ help: '<- Select context''s field' translated;
  selection: #contentsSelection;
  menu: #codePaneMenu:shifted:;
  frame: (0.7@0.8 corner: 1@1).
  windowSpec children add: textSpec.
 
  ^builder build: windowSpec!

Item was changed:
  ----- Method: Debugger>>buildNotifierWith:label:message: (in category 'toolbuilder') -----
  buildNotifierWith: builder label: label message: messageString
  | windowSpec listSpec textSpec panelSpec quads |
+ windowSpec := builder pluggableWindowSpec new
+ model: self;
+ extent: self initialExtentForNotifier;
+ label: label;
+ children: OrderedCollection new.
- windowSpec := builder pluggableWindowSpec new.
- windowSpec model: self.
- windowSpec extent: 450 @ 156. "nice and wide to show plenty of the error msg"
- windowSpec label: label.
- windowSpec children: OrderedCollection new.
 
  panelSpec := builder pluggablePanelSpec new.
  panelSpec children: OrderedCollection new.
  quads := self preDebugButtonQuads.
  (self interruptedContext selector == #doesNotUnderstand:) ifTrue: [
  quads := quads copyWith:
  { 'Create'. #createMethod. #magenta. 'create the missing method' }
  ].
  (#(#notYetImplemented #shouldBeImplemented #requirement) includes: self interruptedContext selector) ifTrue: [
  quads := quads copyWith:
  { 'Create'. #createImplementingMethod. #magenta. 'implement the marked method' }
  ].
  (self interruptedContext selector == #subclassResponsibility) ifTrue: [
  quads := quads copyWith:
  { 'Create'. #createOverridingMethod. #magenta. 'create the missing overriding method' }
  ].
  quads do:[:spec| | buttonSpec |
  buttonSpec := builder pluggableButtonSpec new.
  buttonSpec model: self.
  buttonSpec label: spec first.
  buttonSpec action: spec second.
  buttonSpec help: spec fourth.
  buttonSpec frame: self preDebugButtonQuadFrame.
  panelSpec children add: buttonSpec.
  ].
  panelSpec layout: #horizontal. "buttons"
  panelSpec frame: self preDebugButtonQuadFrame.
  windowSpec children add: panelSpec.
 
  Preferences eToyFriendly | messageString notNil ifFalse:[
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self;
  list: #contextStackList;
  getIndex: #contextStackIndex;
  setIndex: #debugAt:;
  frame: self contextStackFrame.
  windowSpec children add: listSpec.
  ] ifTrue:[
  message := messageString.
  textSpec := builder pluggableTextSpec new.
  textSpec
  model: self;
  getText: #preDebugMessageString;
  setText: nil;
  selection: nil;
  menu: #debugProceedMenu:;
  frame: self contextStackFrame.
  windowSpec children add: textSpec.
  ].
 
  ^windowSpec!

Item was changed:
  ----- Method: Debugger>>initialExtent (in category 'initialize') -----
  initialExtent
+ "Initial extent for the full debugger. For the notifier's extent see #initialExtentForNotifier."
- "Make the full debugger longer!!"
-
- dependents size < 9 ifTrue: [^ super initialExtent]. "Pre debug window"
- RealEstateAgent standardWindowExtent y < 400 "a tiny screen"
- ifTrue: [^ super initialExtent].
 
+ ^ 600@700!
- ^ 600@700
- !

Item was added:
+ ----- Method: Debugger>>initialExtentForNotifier (in category 'initialize') -----
+ initialExtentForNotifier
+
+ ^ 450@200!

Item was removed:
- ----- Method: Debugger>>isNotifier (in category 'accessing') -----
- isNotifier
- "Return true if this debugger has not been expanded into a full sized window"
-
- ^ receiverInspector == nil!

Item was removed:
- ----- Method: Debugger>>notifierButtonHeight (in category 'initialize') -----
- notifierButtonHeight
-
- ^ 18!