-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper adding and removal of instance variable probe morphs
- Loading branch information
Showing
20 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/instance/addProbe..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
as yet unclassified | ||
addProbe: aProbe | ||
|
||
nameToProbesDict at: aProbe className | ||
nameToProbesDict at: aProbe assignedClassName | ||
ifPresent: [:registeredProbes | registeredProbes add: aProbe] | ||
ifAbsent: [ | k | | ||
k := KeyedSet keyBlock: [ :each | each variableName ]. | ||
nameToProbesDict at: aProbe className put: k] | ||
nameToProbesDict at: aProbe assignedClassName put: k] | ||
|
4 changes: 4 additions & 0 deletions
4
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/instance/at..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
as yet unclassified | ||
at: aClassName | ||
|
||
^ nameToProbesDict at: aClassName |
2 changes: 1 addition & 1 deletion
2
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/instance/removeProbe..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
as yet unclassified | ||
removeProbe: aProbe | ||
|
||
nameToProbesDict at: aProbe className | ||
nameToProbesDict at: aProbe assignedClassName | ||
ifPresent: [:registeredProbes | registeredProbes remove: aProbe] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...ages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/assignedClassName..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
assignedClassName: aString | ||
assignedClassName := aString |
3 changes: 3 additions & 0 deletions
3
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/assignedClassName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
assignedClassName | ||
^ assignedClassName |
3 changes: 0 additions & 3 deletions
3
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/className..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/className.st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/variableName..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
variableName: aString | ||
|
||
variableName := aString | ||
self enclosedExpressionSource: aString |
2 changes: 1 addition & 1 deletion
2
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/variableName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
accessing | ||
variableName | ||
|
||
^ variableName | ||
^ self enclosedExpressionSource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
.../Babylonian-UI.package/BPInstanceVariableProbeMorph.class/instance/removeButtonClicked.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
as yet unclassified | ||
removeButtonClicked | ||
|
||
"LSP violation here - but otherwise the removal of the morph won't happen... -jb" | ||
BPClassNameToInstanceProbes value removeProbe: self annotation. | ||
super removeButtonClicked. | ||
BPClassNameToInstanceProbes value removeProbe: self. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
packages/Babylonian-UI.package/BPStyler.class/instance/applyInstanceVariableIn.for..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
private | ||
applyInstanceVariableIn: aPreformmattedText for: anInstanceProbe | ||
|
||
| interval | | ||
interval := (aPreformmattedText string | ||
allRangesOfRegexMatches: '(''| )', anInstanceProbe variableName, '(''| )') first. | ||
|
||
aPreformmattedText | ||
addAttribute: (BPTextDecoration new | ||
anchoredMorph: (self annotationMorphFor: anInstanceProbe); | ||
yourself) | ||
from: interval start + 1 | ||
to: interval stop - 1. |
17 changes: 17 additions & 0 deletions
17
packages/Babylonian-UI.package/BPStyler.class/instance/formatNonMethod..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
private | ||
formatNonMethod: aText | ||
|
||
| allRangesSubclassRegex className formattedText | | ||
allRangesSubclassRegex := aText string allRangesOfRegexMatches: 'subclass\: #\w+'. | ||
allRangesSubclassRegex ifEmpty: [^ super privateFormat: aText]. | ||
"We are in a class definition and may need to add Text Decorations | ||
for Instance Variable Probes." | ||
className := aText string atAll: (allRangesSubclassRegex first start + ('subclass: #' size) to: | ||
allRangesSubclassRegex first stop ). | ||
formattedText := super privateFormat: aText. | ||
BPClassNameToInstanceProbes value nameToProbesDict at: className | ||
ifPresent: [:probesSet | probesSet do: [:anInstanceProbe | | ||
self | ||
applyInstanceVariableIn: formattedText | ||
for: anInstanceProbe]]. | ||
^ formattedText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters