Skip to content

Commit

Permalink
Add emphasizeInterop preference
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Jun 25, 2021
1 parent 7262dde commit e08022e
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
printing
printOnTitle
printInteropOn: aStream
| properties |
aStream nextPutAll: 'ForeignObject'.
properties := OrderedCollection new.
(Interop isNull: self) ifTrue: [ properties add: 'nil' ].
(Interop isHostObject: self) ifTrue: [ properties add: 'host' ].
Expand All @@ -14,6 +15,4 @@ printOnTitle
(Interop hasIdentity: self) ifTrue: [ properties add: 'identity' ].
(Interop hasArrayElements: self) ifTrue: [ properties add: 'arraySize=', (Interop getArraySize: self) ].
(Interop hasMembers: self) ifTrue: [ properties add: 'memberSize=', (Interop getMemberSize: self) ].
^ properties
ifEmpty: [ 'ForeignObject' ]
ifNotEmpty: [ 'ForeignObject[', (properties joinSeparatedBy: ','), ']' ]
properties ifNotEmpty: [ aStream nextPutAll: '[', (properties joinSeparatedBy: ','), ']' ]
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
printing
printOn: aStream
aStream nextPutAll: self printOnTitle
Polyglot emphasizeInterop
ifTrue: [ self printInteropOn: aStream ]
ifFalse: [ aStream nextPutAll: self asString ]
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"notNil" : "fn 11/11/2019 19:51",
"or:" : "fn 2/11/2021 10:35",
"postCopy" : "fn 8/2/2019 16:59",
"printOn:" : "fn 4/13/2019 20:45",
"printOnTitle" : "fn 3/11/2021 14:26",
"printInteropOn:" : "fn 6/25/2021 11:08",
"printOn:" : "fn 6/25/2021 11:08",
"shallowCopy" : "fn 8/2/2019 16:59",
"size" : "fn 11/11/2019 22:08",
"value" : "fn 2/4/2020 00:11",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
preferences
emphasizeInterop: aBoolean

EmphasizeInterop := aBoolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
preferences
emphasizeInterop

<preference: 'Emphasize Language Interoperability'
category: 'Polyglot'
description: 'If true, more information on language interoperability is globally shown.'
type: #Boolean>
^ EmphasizeInterop ifNil: [ false ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
preferences
toggleEmphasizeInterop

self emphasizeInterop: self emphasizeInterop not
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"bindings" : "fn 12/3/2018 10:32",
"code:of:withBindingsNamed:" : "fn 5/27/2020 17:11",
"defaultLanguage" : "fn 6/14/2021 10:42",
"emphasizeInterop" : "fn 6/25/2021 11:11",
"emphasizeInterop:" : "fn 6/25/2021 11:06",
"eval:file:" : "fn 6/14/2019 16:02",
"eval:file:inInnerContext:" : "fn 6/14/2019 16:02",
"eval:string:" : "fn 6/14/2019 14:47",
Expand Down Expand Up @@ -53,6 +55,7 @@
"primitiveLastError" : "fn 10/2/2019 09:09",
"setUpPolyglotEnvironment" : "fn 1/24/2020 14:41",
"signalPolyglotError" : "fn 6/10/2021 16:15",
"startUp:" : "fn 1/24/2020 14:41" },
"startUp:" : "fn 1/24/2020 14:41",
"toggleEmphasizeInterop" : "fn 6/25/2021 11:27" },
"instance" : {
} }
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"LanguageIDToIcon",
"defaultLanguage" ],
"classvars" : [
],
"EmphasizeInterop" ],
"commentStamp" : "fn 11/25/2018 15:08",
"instvars" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ adjustDoMenu
ToolSet browseClass: Interop class.
-
Polyglot askForDefaultLanguage.
Polyglot toggleEmphasizeInterop.
-
Graal runtime inspect.
-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"class" : {
"adjustAppsMenu" : "fn 3/30/2021 10:24",
"adjustDoMenu" : "fn 6/14/2021 14:08",
"adjustDoMenu" : "fn 6/25/2021 11:28",
"arrayStatistics" : "fn 1/27/2021 15:25",
"getAllLayouts" : "fn 2/1/2021 14:59",
"layoutStatistics" : "fn 1/27/2021 15:26",
Expand Down

0 comments on commit e08022e

Please sign in to comment.