The Trunk: Tools-ul.743.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-ul.743.mcz

commits-2
Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.743.mcz

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

Name: Tools-ul.743
Author: ul
Time: 27 February 2017, 2:27:46.112006 am
UUID: 78530c39-9b21-472a-9729-b5809712f28d
Ancestors: Tools-ul.742

- omit ifAbsent from #index* sends when the default value, 0 would used

=============== Diff against Tools-ul.742 ===============

Item was changed:
  ----- Method: Browser>>messageCategoryListIndex (in category 'message category list') -----
  messageCategoryListIndex
  "Answer the index of the selected message category."
 
+ ^self messageCategoryList indexOf: selectedMessageCategoryName!
- ^self messageCategoryList indexOf: selectedMessageCategoryName ifAbsent: [0].!

Item was changed:
  ----- Method: FileList>>fileNameFromFormattedItem: (in category 'private') -----
  fileNameFromFormattedItem: item
  "Extract fileName and folderString from a formatted fileList item string"
 
  | from to |
  self sortingByName
  ifTrue: [
+ from := item lastIndexOf: $(.
+ to := item lastIndexOf: $)]
- from := item lastIndexOf: $( ifAbsent: [0].
- to := item lastIndexOf: $) ifAbsent: [0]]
  ifFalse: [
+ from := item indexOf: $(.
+ to := item indexOf: $)].
- from := item indexOf: $( ifAbsent: [0].
- to := item indexOf: $) ifAbsent: [0]].
  ^ (from * to = 0
  ifTrue: [item]
  ifFalse: [item copyReplaceFrom: from to: to with: '']) withBlanksTrimmed!

Item was changed:
  ----- Method: InspectorBrowser>>step (in category 'as yet unclassified') -----
  step
  | list fieldString msg |
  (list := super fieldList) = fieldList ifFalse:
  [fieldString := selectionIndex > 0 ifTrue: [fieldList at: selectionIndex] ifFalse: [nil].
  fieldList := list.
+ selectionIndex := fieldList indexOf: fieldString.
- selectionIndex := fieldList indexOf: fieldString ifAbsent: [0].
  self changed: #fieldList.
  self changed: #selectionIndex].
  list := msgList.  msgList := nil.  "force recomputation"
  list = self msgList ifFalse:
  [msg := msgListIndex > 0 ifTrue: [list at: msgListIndex] ifFalse: [nil].
+ msgListIndex := msgList indexOf: msg.
- msgListIndex := msgList indexOf: msg ifAbsent: [0].
  self changed: #msgList.
  self changed: #msgListIndex].
  super step!

Item was changed:
  ----- Method: PackagePaneBrowser>>selectCategoryForClass: (in category 'system category list') -----
  selectCategoryForClass: theClass
  "Set the package and category lists to display the given class."
 
  | cat catName |
  cat := theClass category.
  self packageListIndex: (self packageList indexOf: (cat copyUpTo: $-)).
+ catName := (cat copyFrom: ((cat indexOf: $-) + 1) to: cat size).
- catName := (cat copyFrom: ((cat indexOf: $- ifAbsent: [0]) + 1) to: cat size).
  self selectSystemCategory: catName.!

Item was changed:
  ----- Method: ProcessBrowser>>updateProcessList (in category 'process list') -----
  updateProcessList
  | oldSelectedProcess newIndex now |
  now := Time millisecondClockValue.
  now - lastUpdate < 500
  ifTrue: [^ self].
  "Don't update too fast"
  lastUpdate := now.
  oldSelectedProcess := selectedProcess.
  processList := selectedProcess := selectedSelector := nil.
  Smalltalk garbageCollectMost.
  "lose defunct processes"
 
  processList := Process allSubInstances
  reject: [:each | each isTerminated].
  processList := processList
  sorted: [:a :b | a priority >= b priority].
  processList := WeakArray withAll: processList.
+ newIndex := processList indexOf: oldSelectedProcess.
- newIndex := processList
- indexOf: oldSelectedProcess
- ifAbsent: [0].
  self changed: #processNameList.
  self processListIndex: newIndex!