[squeak-dev] The Trunk: Tools-mt.668.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Feb 1 09:45:33 UTC 2016
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.668.mcz
==================== Summary ====================
Name: Tools-mt.668
Author: mt
Time: 1 February 2016, 10:44:38.861285 am
UUID: 88b24b27-f952-4e86-9bd5-be64c8e309e2
Ancestors: Tools-mt.667
Adds support for selective refreshing to object explorer. Just re-select the current selection to refresh it. Item will get highlighted just like automatic monitor refresh to indicate inconsistency of displayed information.
Make the still existing deficiency with volatile object state more descriptive with a pop-up instead of a generic assert error. Now that we support selective refreshing, the user is actually able to refresh and THEN invoke the context menu again.
=============== Diff against Tools-mt.667 ===============
Item was changed:
----- Method: ObjectExplorer>>currentSelection: (in category 'accessing') -----
currentSelection: anObject
+ self currentSelection == anObject ifTrue: [
+ self changed: #objectChanged with: anObject.
+ ^ self].
+
- self currentSelection == anObject ifTrue: [^ self].
currentSelection := anObject.
self changed: #currentSelection.
self changed: #style.!
Item was changed:
----- Method: ObjectExplorer>>explorerKey:from:event: (in category 'menus') -----
explorerKey: aChar from: view event: event
event anyModifierKeyPressed ifFalse: [^ false].
currentSelection ifNotNil: [
+ self updateInspectorForSelection ifFalse: [^ true].
- self updateInspectorForSelection.
aChar == $i ifTrue: [self inspector inspectSelection. ^ true].
aChar == $I ifTrue: [self inspector exploreSelection. ^ true].
aChar == $b ifTrue: [self inspector browseMethodFull. ^ true].
aChar == $h ifTrue: [self inspector classHierarchy. ^ true].
aChar == $c ifTrue: [Clipboard clipboardText: self currentSelection key. ^ true].
aChar == $p ifTrue: [self inspector browseFullProtocol. ^ true].
aChar == $N ifTrue: [self inspector browseClassRefs. ^ true].
aChar == $t ifTrue: [self inspector tearOffTile. ^ true].
aChar == $v ifTrue: [self inspector viewerForValue. ^ true]].
^ false!
Item was changed:
----- Method: ObjectExplorer>>genericMenu: (in category 'menus') -----
genericMenu: aMenu
"Borrow a menu from my inspector"
currentSelection
ifNil: [
aMenu
add: '*nothing selected*'
target: self
selector: #yourself]
ifNotNil: [
+ self updateInspectorForSelection ifFalse: [^ aMenu].
- self updateInspectorForSelection.
aMenu defaultTarget: self inspector.
self inspector fieldListMenu: aMenu.
aMenu addLine;
add: 'monitor changes'
target: self
selector: #monitor:
argument: currentSelection].
monitorList isEmptyOrNil
ifFalse: [aMenu addLine;
add: 'stop monitoring all'
target: self
selector: #stopMonitoring].
^ aMenu!
Item was changed:
----- Method: ObjectExplorer>>updateInspectorForSelection (in category 'accessing - other') -----
updateInspectorForSelection
"Reuse the inspector for some callbacks."
self inspector inspect: (self parentObject ifNil: [self object]).
self parentObject
ifNil: [self inspector toggleIndex: 1. "self"]
ifNotNil: [
self inspector toggleIndex: (self inspector fieldList indexOf: self currentSelection key)].
+
+ self inspector selection == self object
+ ifTrue: [
+ ^ true]
+ ifFalse: [
+ self inform: 'Object has changed. Please refresh\before invoking the context menu.' withCRs.
+ ^ false].!
- self assert: self inspector selection == self object.!
More information about the Squeak-dev
mailing list
|