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

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

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

Name: Tools-mt.598
Author: mt
Time: 19 April 2015, 9:13:13.454 am
UUID: 3c2fb3f3-54a6-404c-a271-445925faa411
Ancestors: Tools-mt.597

Code duplication in File Contents Browser removed.

=============== Diff against Tools-mt.597 ===============

Item was added:
+ ----- Method: CodeHolder>>buildAnnotationPaneWith: (in category 'toolbuilder') -----
+ buildAnnotationPaneWith: builder
+
+ | annoSpec |
+ annoSpec := builder pluggableInputFieldSpec new.
+ annoSpec
+ model: self;
+ getText: #annotation;
+ setText: #annotation:.
+ ^ annoSpec!

Item was changed:
  ----- Method: CodeHolder>>buildCodePaneWith: (in category 'toolbuilder') -----
  buildCodePaneWith: builder
  | textSpec top buttonSpec annoSpec |
  self wantsOptionalButtons ifTrue: [
  top := builder pluggablePanelSpec new.
  top children: OrderedCollection new.
  buttonSpec := self buildOptionalButtonsWith: builder.
  buttonSpec frame: self optionalButtonsFrame.
  top children add: buttonSpec].
  textSpec := builder pluggableCodePaneSpec new.
  textSpec
  model: self;
  getText: #contents;
  setText: #contents:notifying:;
  selection: #contentsSelection;
  menu: #codePaneMenu:shifted:.
  self wantsAnnotationPane ifTrue: [
  top ifNil: [
  top := builder pluggablePanelSpec new.
  top children: OrderedCollection new].
+ annoSpec := self buildAnnotationPaneWith: builder.
- annoSpec := builder pluggableInputFieldSpec new.
- annoSpec model: self; getText: #annotation; setText: #annotation:.
  annoSpec frame: self annotationFrame.
  top children add: annoSpec].
  top ifNotNil: [
  textSpec frame: self textFrame.
  top children add: textSpec].
  ^top ifNil: [textSpec]!

Item was added:
+ ----- Method: FileContentsBrowser>>buildAnnotationPaneWith: (in category 'toolbuilder') -----
+ buildAnnotationPaneWith: builder
+
+ | textSpec |
+ textSpec := builder pluggableInputFieldSpec new.
+ textSpec
+ model: self;
+ getText: #infoViewContents.
+ ^textSpec!

Item was removed:
- ----- Method: FileContentsBrowser>>buildInfoViewWith: (in category 'toolbuilder') -----
- buildInfoViewWith: builder
- | textSpec |
- textSpec := builder pluggableInputFieldSpec new.
- textSpec
- model: self;
- getText: #infoViewContents.
- ^textSpec!

Item was changed:
  ----- Method: FileContentsBrowser>>buildSystemCatListSingletonWith: (in category 'toolbuilder') -----
  buildSystemCatListSingletonWith: builder
+ "Overwritten to change callbacks for menu and keyboard interaction."
+
+ ^ (super buildSystemCatListSingletonWith: builder)
+ menu: #packageListMenu:shifted:;
+ keyPress: #packageListKey:from:;
+ yourself!
- | listSpec |
- listSpec := builder pluggableListSpec new.
- listSpec
- model: self;
- list: #systemCategorySingleton;
- getIndex: #indexIsOne;
- setIndex: #indexIsOne:;
- menu: #packageListMenu:shifted:;
- keyPress: #packageListKey:from:.
- ^listSpec!

Item was changed:
  ----- Method: FileContentsBrowser>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
+
+ ^ self packages size = 1
+ ifTrue:[
+ self systemCategoryListIndex: 1.
+ self openSystemCatEditString: '']
+ ifFalse: [super buildWith: builder]!
- "Create a pluggable version of all the views for a Browser, including views and controllers."
- | windowSpec buttonHeight |
- buttonHeight := Preferences standardButtonFont height * 5/2.
- self packages size = 1 ifTrue:[
- self systemCategoryListIndex: 1.
- windowSpec := self buildWindowWith: builder specs: {
- (0@0 corner: 1.0@0.16) -> [self buildSystemCatListSingletonWith: builder].
- (LayoutFrame
- fractions: (0@0.16 corner: 0.34@0.45)
- offsets: (0@0 corner: 0@ buttonHeight negated)) -> [self buildClassListWith: builder].
- (LayoutFrame
- fractions: (0@0.45 corner: 0.34@0.45)
- offsets: (0@ buttonHeight negated corner: 0@0)) -> [self buildSwitchesWith: builder].
- (0.34@0.16 corner: 0.67@0.45) -> [self buildMessageCategoryListWith: builder].
- (0.67@0.16 corner: 1.0@0.45) -> [self buildMessageListWith: builder].
- (0.0@0.45 corner: 1.0@0.9) -> [self buildCodePaneWith: builder].
- (0.0@0.9 corner: 1.0@1.0) -> [self buildInfoViewWith: builder].
- }
- ] ifFalse:[
- windowSpec := self buildWindowWith: builder specs: {
- (0@0 corner: 0.25@0.4) -> [self buildSystemCategoryListWith: builder].
- (LayoutFrame
- fractions: (0.25@0 corner: 0.5@0.4)
- offsets: (0@0 corner: 0@ buttonHeight negated)) -> [self buildClassListWith: builder].
- (LayoutFrame
- fractions: (0.25@0.4 corner: 0.5@0.4)
- offsets: (0@ buttonHeight negated corner: 0@0)) -> [self buildSwitchesWith: builder].
- (0.5@0 corner: 0.75@0.4) -> [self buildMessageCategoryListWith: builder].
- (0.75@0 corner: 1.0@0.4) -> [self buildMessageListWith: builder].
- (0.0@0.4 corner: 1.0@0.9) -> [self buildCodePaneWith: builder].
- (0.0@0.9 corner: 1.0@1.0) -> [self buildInfoViewWith: builder].
- }
- ].
- ^ windowSpec
- !

Item was removed:
- ----- Method: FileContentsBrowser>>wantsAnnotationPane (in category 'toolbuilder') -----
- wantsAnnotationPane
- "Never. FCB has its info pane already which serves the same purpose."
- ^false
- !