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

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

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

Name: Tools-mt.1030
Author: mt
Time: 5 March 2021, 9:21:18.794204 am
UUID: d7b63933-664e-b94e-af03-4b96f029b4e3
Ancestors: Tools-mt.1029

Fixes dragging in message-set tools (excluding MessageTrace, which needs drag to select multiple things). Tweaks label in CodeHolder to look like the labels in senders/implementors and all other message-set tools.

=============== Diff against Tools-mt.1029 ===============

Item was changed:
  ----- Method: CodeHolder>>labelString (in category 'initialize-release') -----
  labelString
 
+ ^ currentCompiledMethod
+ ifNil: [self defaultBrowserTitle]
+ ifNotNil: [
+ ('{1} {2} \{{3}\} \{{4}\}' format: {
+ self selectedClassOrMetaClass name.
+ self selectedMessageName.
+ self selectedMessageCategoryName.
+ self selectedSystemCategoryName })]!
- | label |
- label := self defaultBrowserTitle.
- currentCompiledMethod ifNotNil: [
- label := label, (': {1} >> #{2} ({3})' format: {
- self selectedClassOrMetaClass name.
- self selectedMessageName.
- self selectedMessageCategoryName })].
- ^ label!

Item was changed:
  ----- Method: CodeHolder>>selectedMessageCategoryName (in category 'categories') -----
  selectedMessageCategoryName
  "Answer the name of the message category of the message of the currently selected context."
 
+ ^ self selectedClassOrMetaClass organization categoryOfElement: self selectedMessageName!
- ^ self selectedClass organization categoryOfElement: self selectedMessageName!

Item was added:
+ ----- Method: CodeHolder>>selectedSystemCategoryName (in category 'categories') -----
+ selectedSystemCategoryName
+
+ ^ SystemOrganization categoryOfElement: self selectedClass name!

Item was changed:
  ----- Method: MessageSet>>buildMessageListWith: (in category 'toolbuilder') -----
  buildMessageListWith: builder
  | listSpec |
  listSpec := builder pluggableListSpec new.
  listSpec
  model: self;
  list: #messageListFormatted;
  getIndex: #messageListIndex;
  setIndex: #messageListIndex:;
  icon: #messageIconAt:;
  helpItem: #messageHelpAt:;
  menu: #messageListMenu:shifted:;
  keyPress: #messageListKey:from:.
+ SystemBrowser browseWithDragNDrop ifTrue: [
+ listSpec
+ dragItem: #dragFromMessageList:;
+ dragType: #dragTypeForMessageListAt:].
+ ^ listSpec
- SystemBrowser browseWithDragNDrop
- ifTrue:[listSpec dragItem: #dragFromMessageList:].
- ^listSpec
  !

Item was changed:
  ----- Method: MessageSet>>dragFromMessageList: (in category 'drag and drop') -----
  dragFromMessageList: index
+
+ ^ self messageList at: index!
- "Drag a method from the browser"
- ^self selectedClassOrMetaClass compiledMethodAt: (self messageList at: index) ifAbsent:[nil]!

Item was removed:
- ----- Method: MessageSet>>dragPassengerFor:inMorph: (in category 'drag and drop') -----
- dragPassengerFor: item inMorph: dragSource
- | transferType |
- transferType := self dragTransferTypeForMorph: dragSource.
- transferType == #messageList
- ifTrue: [^self selectedClassOrMetaClass->(item contents findTokens: ' ') second asSymbol].
- transferType == #classList
- ifTrue: [^self selectedClass].
- ^nil!

Item was added:
+ ----- Method: MessageSet>>dragTypeForMessageListAt: (in category 'drag and drop') -----
+ dragTypeForMessageListAt: index
+
+ ^ #sourceCode!