• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mattonem / PharoJS / 14220696386

11 Mar 2025 04:04PM UTC coverage: 42.026% (-17.4%) from 59.444%
14220696386

push

github

mattonem
more catching

1 of 1 new or added line in 1 file covered. (100.0%)

3707 existing lines in 69 files now uncovered.

8909 of 21199 relevant lines covered (42.03%)

0.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.28
/Pharo/PharoJs-Base-Bridge/PjClientCodeGenerator.class.st
1
"
2
A PjClientCodeGenerator generates the HTML that includes javascript code made available through the server to the client (typically on the browser).
3

4
Instance Variables
5
        converter:                <PjSmalltalkToJavaScriptBasicConverer>
6

7
converter
8
        - translates Smalltalk code into JavaScript
9

10
"
11
Class {
12
        #name : 'PjClientCodeGenerator',
13
        #superclass : 'Object',
14
        #instVars : [
15
                'titleString',
16
                'appClass',
17
                'htmlGenerator',
18
                'appClassDecorator'
19
        ],
20
        #category : 'PharoJs-Base-Bridge-Client-CodeGenerator',
21
        #package : 'PharoJs-Base-Bridge',
22
        #tag : 'Client-CodeGenerator'
23
}
24

25
{ #category : 'accessing' }
26
PjClientCodeGenerator class >> bridgeAppClassDecoratorClass [
1✔
27

1✔
28
        ^ PjBridgeAppClassDecorator
1✔
29
]
1✔
30

31
{ #category : 'public' }
32
PjClientCodeGenerator class >> html [
×
33
        ^self new html
×
34
]
×
35

36
{ #category : 'generating' }
UNCOV
37
PjClientCodeGenerator class >> websocketDelegateClass [
×
UNCOV
38
        ^self bridgeAppClassDecoratorClass websocketDelegateClass
×
UNCOV
39
]
×
40

41
{ #category : 'accessing' }
42
PjClientCodeGenerator >> appClass [
1✔
43

1✔
44
        ^ appClass
1✔
45
]
1✔
46

47
{ #category : 'accessing' }
48
PjClientCodeGenerator >> appClassDecorator [
×
49

×
50
        ^ appClassDecorator
×
51
]
×
52

53
{ #category : 'accessing' }
54
PjClientCodeGenerator >> bridge: aBridge [
1✔
55

1✔
56
        appClassDecorator bridge: aBridge
1✔
57
]
1✔
58

59
{ #category : 'accessing' }
60
PjClientCodeGenerator >> bridgeAppClassDecoratorClass [
1✔
61

1✔
62
        ^ self class bridgeAppClassDecoratorClass
1✔
63
]
1✔
64

65
{ #category : 'public' }
66
PjClientCodeGenerator >> css [
1✔
67

1✔
68
        ^ self cssUsing: self htmlGenerator
1✔
69
]
1✔
70

71
{ #category : 'generating' }
72
PjClientCodeGenerator >> cssUsing: aHtmlGenerator [
1✔
73

1✔
74
        ^ self appClass css ifNotNil: [ :css | 
1✔
75
                  aHtmlGenerator addCssLink: 'index.css'.
1✔
76
                  css ]
1✔
77
]
1✔
78

79
{ #category : 'generating' }
80
PjClientCodeGenerator >> decorateAppClass: anAppClass [
1✔
81

1✔
82
        appClass := anAppClass.
1✔
83
        appClassDecorator := self bridgeAppClassDecoratorClass rawAppClass: anAppClass.
1✔
84
        ^ appClassDecorator
1✔
85
]
1✔
86

87
{ #category : 'generating' }
88
PjClientCodeGenerator >> favicon [
1✔
89

1✔
90
        ^ self appClass favicon
1✔
91
]
1✔
92

93
{ #category : 'generating' }
94
PjClientCodeGenerator >> generateHtmlUsing: aHtmlGenerator [
1✔
95

1✔
96
        aHtmlGenerator title: 'PharoJS:' , self titleString.
1✔
97
        aHtmlGenerator
1✔
98
                add: 'h1'
1✔
99
                contents: 'PharoJS: Develop in Pharo, run in JavaScript'.
1✔
100
        aHtmlGenerator add: 'h2' contents: self titleString.
1✔
101
        aHtmlGenerator addScriptUrl: 'index.js'
1✔
102
]
1✔
103

104
{ #category : 'public' }
105
PjClientCodeGenerator >> html [
1✔
106

1✔
107
        self appClass isHtmlGenerator ifTrue: [ ^self appClass html ].
1✔
108
        self generateHtmlUsing: self htmlGenerator.
1✔
109
        ^ self htmlGenerator html
1✔
110
]
1✔
111

112
{ #category : 'generating' }
113
PjClientCodeGenerator >> htmlGenerator [
1✔
114

1✔
115
        ^ htmlGenerator ifNil: [ htmlGenerator := PjHtmlGenerator new ]
1✔
116
]
1✔
117

118
{ #category : 'generating' }
119
PjClientCodeGenerator >> resetHtmlGenerator [
1✔
120

1✔
121
        htmlGenerator := nil
1✔
122
]
1✔
123

124
{ #category : 'accessing' }
125
PjClientCodeGenerator >> titleString [
1✔
126

1✔
127
        ^ titleString ifNil: [ '' ]
1✔
128
]
1✔
129

130
{ #category : 'accessing' }
131
PjClientCodeGenerator >> titleString: aString [
×
132

×
133
        titleString := aString
×
134
]
×
135

136
{ #category : 'accessing' }
UNCOV
137
PjClientCodeGenerator >> websocketDelegateClass [
×
UNCOV
138

×
UNCOV
139
        ^ self class websocketDelegateClass
×
UNCOV
140
]
×
141

142
{ #category : 'accessing' }
UNCOV
143
PjClientCodeGenerator >> websocketDelegateClassName [
×
UNCOV
144

×
UNCOV
145
        ^ self websocketDelegateClass name
×
UNCOV
146
]
×
147

148
{ #category : 'public' }
149
PjClientCodeGenerator >> withClientLogging [
1✔
150

1✔
151
        ^ PjLoggingClientCodeGenerator new
1✔
152
]
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc