Skip to content

Commit

Permalink
Some minor refactoring, inspired by SwaLint
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed Jul 24, 2021
1 parent d2b5ac7 commit a617c9d
Show file tree
Hide file tree
Showing 16 changed files with 40 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ visitBySearcher: aTextSearcher context: context

self flag: #todo.
"Search source code? Would require better caching."
aTextSearcher visit: self text: self summary context: context
aTextSearcher visit: self contents: self summary context: context
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"state" : "ct 5/8/2021 17:23",
"summary" : "ct 5/8/2021 17:45",
"summaryWithState" : "ct 7/14/2021 23:11",
"visitBySearcher:context:" : "ct 7/2/2021 22:46",
"visitBySearcher:context:" : "ct 7/24/2021 03:08",
"wasAuthoredBy:" : "ct 6/15/2021 14:50" } }
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
accessing - state
involvementFor: aPerson

self flag: #discuss. "Ensure date order - decide about the right place to guarantee this"

self contributions ifNotEmpty: [:contributions |
((contributions first flag: #todo) wasAuthoredBy: aPerson) ifTrue: ["ensure date order"
(contributions first wasAuthoredBy: aPerson) ifTrue: [
^ #started]].

((self messages first flag: #todo) wasAuthoredBy: aPerson) ifTrue: ["ensure date order"
(self messages first wasAuthoredBy: aPerson) ifTrue: [
^ #started].
(self messages anySatisfy: [:message | message wasAuthoredBy: aPerson]) ifTrue: [^ #participated].
(self includesMentionOf: aPerson) ifTrue: [^ #mentioned].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"includesMentionOf:" : "ct 7/1/2021 13:58",
"includesParticipationOf:" : "ct 7/1/2021 13:58",
"initialMessage" : "ct 5/7/2021 15:38",
"involvementFor:" : "ct 7/21/2021 01:07",
"involvementFor:" : "ct 7/24/2021 03:10",
"involvementState" : "ct 6/16/2021 16:27",
"involvementStateFor:" : "ct 6/15/2021 19:49",
"latestDate" : "ct 5/7/2021 15:38",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
initialize-release
accessing
inbox: anInbox

self filters do: [:filter | filter inbox: anInbox]
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
sending messages
newDecoratedReply

| receivers ccReceivers bodyString |
receivers := ({self inbox mailAddress. self mail replyReceiver}, self mail receivers) withoutDuplicates.
ccReceivers := self mail ccReceivers.
bodyString := '{1}\\{2}' withCRs asText format: {self inbox decorateMessage: ''. self textQuoted}.

^ self mail newReply
from: MailSender userEmail;
to: (receivers joinSeparatedBy: ', ');
cc: (ccReceivers joinSeparatedBy: ', ');
subject: self replySubject;
body: (self inbox newMessageBodyFor: bodyString);
yourself
^ self newReply: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
sending messages
newReply: decorated

| receivers ccReceivers bodyString |
receivers := {self inbox mailAddress. self mail replyReceiver} withoutDuplicates.
ccReceivers := self mail ccReceivers.
bodyString := '\\{1}' withCRs format: {self textQuoted}.
decorated ifTrue: [bodyString := (self inbox decorateMessage: '') asText, bodyString].

^ self mail newReply
from: MailSender userEmail;
to: (receivers joinSeparatedBy: ', ');
cc: (ccReceivers joinSeparatedBy: ', ');
subject: self replySubject;
body: (self inbox newMessageBodyFor: bodyString);
yourself
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
sending messages
newReply

| receivers ccReceivers bodyString |
receivers := {self inbox mailAddress. self mail replyReceiver} withoutDuplicates.
ccReceivers := self mail ccReceivers.
bodyString := '\\{1}' withCRs format: {self textQuoted}.

^ self mail newReply
from: MailSender userEmail;
to: (receivers joinSeparatedBy: ', ');
cc: (ccReceivers joinSeparatedBy: ', ');
subject: self replySubject;
body: (self inbox newMessageBodyFor: bodyString);
yourself
^ self newReply: false
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"mail" : "ct 5/7/2021 15:07",
"mail:" : "ct 5/7/2021 15:07",
"nabbleUrl" : "ct 7/14/2021 21:03",
"newDecoratedReply" : "ct 7/14/2021 18:30",
"newReply" : "ct 7/22/2021 15:44",
"newDecoratedReply" : "ct 7/24/2021 03:17",
"newReply" : "ct 7/24/2021 03:15",
"newReply:" : "ct 7/24/2021 03:17",
"openInNabble" : "ct 7/22/2021 18:14",
"openInPipermail" : "ct 7/22/2021 18:14",
"pipermailUrl" : "ct 7/14/2021 21:01",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ compilePredicate: aString
Internally, the expression will be stored as a CompiledMethod with a #DoItIn: selector generated by the compiler. See also Compiler >> #evaluateCue:ifFail: or InspectorField >> #getValueFor:."

| compiledMethod |
compiledMethod := Compiler new
compiledMethod := self compilerClass new
compiledMethodFor: aString
in: self makeFilterContext
to: nil
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
compiling
compilerClass

^ Compiler
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"instance" : {
"accepts:" : "ct 7/21/2021 01:56",
"argumentNameForConversation" : "ct 7/24/2021 00:29",
"compilePredicate:" : "ct 7/24/2021 00:22",
"compilePredicate:" : "ct 7/24/2021 03:25",
"compilerClass" : "ct 7/24/2021 03:25",
"defaultPredicate" : "ct 7/24/2021 00:18",
"defaultPredicateString" : "ct 7/13/2021 02:00",
"editPredicate" : "ct 7/24/2021 00:27",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
accessing - messages
date

^ self initialMessage date
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
accessing - messages
diffText

self conversations ifNotEmpty: [ | text diffEnd summaryStart |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
accessing - messages
messageText

self conversations ifNotEmpty: [ | text diffStart summaryEnd |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
accessing - contribution
state

self repositoryName = #inbox ifTrue: [^ #pending].
Expand Down

0 comments on commit a617c9d

Please sign in to comment.