@@ -11,38 +11,39 @@ import * as docpane from './ui/docs'
11
11
import * as focusutils from './ui/focusutils'
12
12
import * as cellhighlighter from './ui/cellhighlighter'
13
13
14
- export default {
15
- // TODO remove these from the export default and export them directly (prevents expensive copy)
16
- // TODO don't use this.message use message directly (prevents expensive copy)
17
- notifications : notifications ,
18
- selector : selector ,
19
- views : views ,
20
- progress : progress ,
21
- layout : layout ,
22
- docpane : docpane ,
23
- focusutils : focusutils ,
24
- cellhighlighter : cellhighlighter ,
14
+ exports . notifications = notifications
15
+ exports . selector = selector
16
+ exports . views = views
17
+ exports . progress = progress
18
+ exports . layout = layout
19
+ exports . docpane = docpane
20
+ exports . focusutils = focusutils
21
+ exports . cellhighlighter = cellhighlighter
25
22
26
- activate ( client ) {
27
- this . client = client ;
28
- this . subs = new CompositeDisposable ;
23
+ let client ;
24
+ let subs ;
25
+ let ink ;
29
26
30
- this . notifications . activate ( ) ;
31
- this . subs . add ( atom . config . observe ( 'julia-client.uiOptions.highlightCells' , val => {
27
+ export function activate ( client_in ) {
28
+ client = client_in ;
29
+ subs = new CompositeDisposable ;
30
+
31
+ notifications . activate ( ) ;
32
+ subs . add ( atom . config . observe ( 'julia-client.uiOptions.highlightCells' , val => {
32
33
if ( val ) {
33
- this . cellhighlighter . activate ( ) ;
34
+ cellhighlighter . activate ( ) ;
34
35
} else {
35
- this . cellhighlighter . deactivate ( ) ;
36
+ cellhighlighter . deactivate ( ) ;
36
37
}
37
38
} )
38
39
) ;
39
- this . subs . add ( new Disposable ( ( ) => {
40
- this . cellhighlighter . deactivate ( ) ;
40
+ subs . add ( new Disposable ( ( ) => {
41
+ cellhighlighter . deactivate ( ) ;
41
42
} )
42
43
) ;
43
44
44
- this . subs . add ( this . client . onAttached ( ( ) => {
45
- this . notifications . show ( "Client Connected" ) ;
45
+ subs . add ( client . onAttached ( ( ) => {
46
+ notifications . show ( "Client Connected" ) ;
46
47
} )
47
48
) ;
48
49
subs . add ( client . onDetached ( ( ) => {
@@ -51,23 +52,22 @@ export default {
51
52
}
52
53
} )
53
54
) ;
54
- } ,
55
+ }
55
56
56
- deactivate ( ) {
57
- this . subs . dispose ( ) ;
58
- } ,
57
+ export function deactivate ( ) {
58
+ subs . dispose ( ) ;
59
+ }
59
60
60
- consumeInk ( ink ) {
61
- this . ink = ink ;
62
- this . views . ink = this . ink ;
63
- this . selector . activate ( this . ink ) ;
64
- this . docpane . activate ( this . ink ) ;
65
- this . progress . activate ( this . ink ) ;
66
- this . focusutils . activate ( this . ink ) ;
67
- this . subs . add ( new Disposable ( ( ) => {
68
- this . docpane . deactivate ( ) ;
69
- this . progress . deactivate ( ) ;
70
- this . focusutils . deactivate ( ) ;
61
+ export function consumeInk ( ink_in ) {
62
+ ink = ink_in ;
63
+ views . ink = ink ;
64
+ selector . activate ( ink ) ;
65
+ docpane . activate ( ink ) ;
66
+ progress . activate ( ink ) ;
67
+ focusutils . activate ( ink ) ;
68
+ subs . add ( new Disposable ( ( ) => {
69
+ docpane . deactivate ( ) ;
70
+ progress . deactivate ( ) ;
71
+ focusutils . deactivate ( ) ;
71
72
} ) ) ;
72
- }
73
- } ;
73
+ }
0 commit comments