[squeak-dev] The Trunk: Tools-mt.1127.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Feb 8 12:44:08 UTC 2022
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1127.mcz
==================== Summary ====================
Name: Tools-mt.1127
Author: mt
Time: 8 February 2022, 1:44:06.214027 pm
UUID: 42e60f3a-41e9-134c-9403-e437944ea80d
Ancestors: Tools-ct.1126
Complements Morphic-mt.1876
=============== Diff against Tools-ct.1126 ===============
Item was changed:
----- Method: Browser>>buildAndOpenClassBrowserLabel: (in category 'toolbuilder') -----
buildAndOpenClassBrowserLabel: aLabelString
"assemble the spec for a class browser, build it and open it"
| builder max windowSpec catPaneHeight|
builder := ToolBuilder default.
+ catPaneHeight := builder listHeight.
- catPaneHeight := Preferences standardListFont height + 5 "top margin/border" + 5 "bottom margin/border".
max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4].
windowSpec :=self buildWindowWith: builder specs: {
+ (self topConstantHeightFrame: catPaneHeight fromLeft: 0 width: 0.5) -> [self buildClassListSingletonWith: builder].
+ (self frameOffsetFromTop: catPaneHeight fromLeft: 0 width: 0.5 bottomFraction: max) -> [self buildMessageCategoryListWith: builder].
+ (self topConstantHeightFrame: catPaneHeight fromLeft: 0.5 width: 0.5) -> [self buildSwitchesWith: builder].
+ (self frameOffsetFromTop: catPaneHeight fromLeft: 0.5 width: 0.5 bottomFraction: max) -> [self buildMessageListWith: builder].
- (self topConstantHeightFrame: self buttonHeight fromLeft: 0 width: 0.5) -> [self buildClassListSingletonWith: builder].
- (self frameOffsetFromTop: self buttonHeight fromLeft: 0 width: 0.5 bottomFraction: max) -> [self buildMessageCategoryListWith: builder].
- (self topConstantHeightFrame: self buttonHeight fromLeft: 0.5 width: 0.5) -> [self buildSwitchesWith: builder].
- (self frameOffsetFromTop: self buttonHeight fromLeft: 0.5 width: 0.5 bottomFraction: max) -> [self buildMessageListWith: builder].
(0 at max corner: 1 at 1) -> [self buildCodePaneWith: builder].
}.
self setMultiWindowFor:windowSpec.
windowSpec label: aLabelString.
builder open: windowSpec.
^self
!
Item was changed:
----- Method: Browser>>buildAndOpenMessageCategoryBrowserLabel: (in category 'toolbuilder') -----
buildAndOpenMessageCategoryBrowserLabel: aLabelString
"assemble the spec for a messasge category browser, build it and open it"
+ | builder max windowSpec catPaneHeight |
- | builder max windowSpec|
builder := ToolBuilder default.
+ catPaneHeight := builder listHeight.
max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4].
windowSpec :=self buildWindowWith: builder specs: {
+ (LayoutFrame fractions: (0 at 0 corner: 1.0 at 0) offsets: (0 at 0 corner: 0 at catPaneHeight)) -> [self buildMessageListCatSingletonWith: builder].
+ (LayoutFrame fractions: (0.0 at 0.0 corner: 1.0 at max) offsets: (0@ catPaneHeight corner: 0 at 0)) -> [self buildMessageListWith: builder].
- (0 at 0 corner: 1.0 at 0.08) -> [self buildMessageListCatSingletonWith: builder].
- (0.0 at 0.08 corner: 1.0 at max) -> [self buildMessageListWith: builder].
(0 at max corner: 1 at 1) -> [self buildCodePaneWith: builder].
}.
self setMultiWindowFor:windowSpec.
windowSpec label: aLabelString.
builder open: windowSpec.
^self
!
Item was changed:
----- Method: Browser>>buildCategoryBrowserWith: (in category 'toolbuilder') -----
buildCategoryBrowserWith: builder
"assemble the spec for a system category browser, build it and return it"
| max windowSpec catPaneHeight|
+ catPaneHeight := builder listHeight.
- catPaneHeight := Preferences standardListFont height + 5 "top margin/border" + 5 "bottom margin/border".
max := self wantsOptionalButtons ifTrue:[0.32] ifFalse:[0.4].
windowSpec := self buildWindowWith: builder specs: {
(LayoutFrame fractions: (0 at 0 corner: 1.0 at 0) offsets: (0 at 0 corner: 0 at catPaneHeight)) -> [self buildSystemCatListSingletonWith: builder].
((self classListFrame: max fromTop: 0 fromLeft: 0 width: 0.333)
topOffset: catPaneHeight) -> [self buildClassListWith: builder].
(self switchesFrame: max fromLeft: 0 width: 0.333) -> [self buildSwitchesWith: builder].
(LayoutFrame fractions: (0.333 at 0 corner: 0.666 at max) offsets: (0 at catPaneHeight corner: 0 at 0)) -> [self buildMessageCategoryListWith: builder].
(LayoutFrame fractions: (0.666 at 0 corner: 1 at max) offsets: (0 at catPaneHeight corner: 0 at 0)) -> [self buildMessageListWith: builder].
(0 at max corner: 1 at 1) -> [self buildCodePaneWith: builder].
}.
self setMultiWindowFor:windowSpec.
^builder build: windowSpec
!
Item was changed:
----- Method: Browser>>buildSwitchesWith: (in category 'toolbuilder') -----
buildSwitchesWith: builder
"Build the instance/comment/class switch"
| panelSpec i q c |
panelSpec := builder pluggablePanelSpec new
+ name: #switches;
layout: #horizontal;
+ spacing: (-1 * RealEstateAgent scaleFactor) truncated;
- spacing: -1;
children: OrderedCollection new;
yourself.
i := builder pluggableButtonSpec new.
i
model: self;
label: 'instance';
help: 'Show instance-side methods' translated;
state: #instanceMessagesIndicated;
action: #indicateInstanceMessages.
q := builder pluggableButtonSpec new.
q
model: self;
horizontalResizing: #shrinkWrap;
label: '?';
help: 'Cycle between definition, comment, and hierarchy view' translated;
state: #classCommentIndicated;
action: #plusButtonHit.
c := builder pluggableButtonSpec new.
c
model: self;
label: 'class';
help: 'Show class-side methods' translated;
state: #classMessagesIndicated;
action: #indicateClassMessages.
panelSpec children addAll: {
i. c.
builder pluggableSpacerSpec new.
q
}.
^panelSpec!
Item was changed:
----- Method: CodeHolder>>annotationPaneHeight (in category 'toolbuilder') -----
annotationPaneHeight
+ ^ ToolBuilder default inputFieldHeight!
- ^ (Preferences standardDefaultTextFont height * 3/2) truncated!
Item was changed:
----- Method: CodeHolder>>buildCodePaneWith: (in category 'toolbuilder') -----
buildCodePaneWith: builder
| textSpec top buttonSpec annoSpec |
self wantsOptionalButtons ifTrue: [
top := builder pluggablePanelSpec new.
+ top name: #codePane.
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 frame: self annotationFrame.
top children add: annoSpec].
top ifNotNil: [
textSpec frame: self textFrame.
top children add: textSpec].
^top ifNil: [textSpec]!
Item was changed:
----- Method: CodeHolder>>buttonHeight (in category 'toolbuilder') -----
buttonHeight
+ ^ ToolBuilder default buttonRowHeight!
- ^ Preferences standardButtonFont height * 2!
Item was changed:
----- Method: CodeHolder>>inheritanceButtonColor (in category 'toolbuilder') -----
inheritanceButtonColor
"Check to see if the currently-viewed method has a super send or an override, and if so, change screen feedback, unless the #decorateBrowserButtons says not to."
+ | flags aColor cm defaultButtonColor |
+ defaultButtonColor := (UserInterfaceTheme current get: #color for: #PluggableButtonMorph) ifNil: [Color gray: 0.91].
- | flags aColor cm |
cm := currentCompiledMethod.
((cm isKindOf: CompiledMethod) and: [Preferences decorateBrowserButtons])
+ ifFalse: [^ defaultButtonColor].
- ifFalse: [^Color transparent].
"This table duplicates the old logic, but adds two new colors for the cases where there is a superclass definition, but this method doesn't call it."
flags := 0.
self isThisAnOverride ifTrue: [ flags := flags bitOr: 4 ].
cm sendsToSuper ifTrue: [ flags := flags bitOr: 2 ].
self isThereAnOverride ifTrue: [ flags := flags bitOr: 1 ].
aColor := {
+ defaultButtonColor.
- Color transparent.
Color tan lighter.
Color green muchLighter.
Color blue muchLighter.
Color red muchLighter. "has super but doesn't call it"
(Color r: 0.94 g: 0.823 b: 0.673). "has sub; has super but doesn't call it"
Color green muchLighter.
Color blue muchLighter.
} at: flags + 1.
^aColor!
Item was added:
+ ----- Method: Debugger>>extraCellGap (in category 'toolbuilder') -----
+ extraCellGap
+ "Since BorderedMorph is currently not able to add the #cellGap between *two* fixed buttons rows at the same #topFraction, add that offset here explicitely."
+
+ self flag: #refactor. "mt: See BorderedMorph >> #changeCellGapOfLayoutFrames:."
+ ^ ToolBuilder default panelSpacing!
Item was changed:
----- Method: Debugger>>optionalButtonsFrame (in category 'toolbuilder') -----
optionalButtonsFrame
+
^LayoutFrame new
leftFraction: 0 offset: 0;
+ topFraction: 0 offset: self buttonHeight + self extraCellGap;
- topFraction: 0 offset: self buttonHeight;
rightFraction: 1 offset: 0;
+ bottomFraction: 0 offset: self buttonHeight*2 + self extraCellGap!
- bottomFraction: 0 offset: self buttonHeight*2!
Item was changed:
----- Method: Debugger>>textFrame (in category 'toolbuilder') -----
textFrame
^ super textFrame
+ topOffset: (self wantsOptionalButtons ifTrue: [self buttonHeight * 2 + self extraCellGap] ifFalse: [self buttonHeight]);
- topOffset: (self wantsOptionalButtons ifTrue: [self buttonHeight * 2] ifFalse: [self buttonHeight]);
yourself!
Item was changed:
----- Method: FileList>>buttonHeight (in category 'toolbuilder') -----
buttonHeight
+ ^ ToolBuilder default buttonRowHeight!
- ^ Preferences standardButtonFont height * 2!
Item was changed:
----- Method: FileList>>pathAndPatternFont (in category 'toolbuilder') -----
pathAndPatternFont
+ ^ TextStyle defaultFont!
- ^ Preferences standardDefaultTextFont!
Item was changed:
----- Method: FileList>>pathAndPatternHeight (in category 'toolbuilder') -----
pathAndPatternHeight
+
+ ^ ToolBuilder default inputFieldHeight!
- " Take a whole font line and 50 % for space "
- ^ (self pathAndPatternFont height * 1.5) ceiling!
More information about the Squeak-dev
mailing list
|