File tree Expand file tree Collapse file tree 3 files changed +3
-30
lines changed Expand file tree Collapse file tree 3 files changed +3
-30
lines changed Original file line number Diff line number Diff line change @@ -11,35 +11,6 @@ module.exports =
11
11
juliaHome : (p ... ) ->
12
12
path .join (process .env .JULIA_HOME or @ home ' .julia' ), p...
13
13
14
- pkgDir : ->
15
- new Promise (resolve , reject ) =>
16
- fs .readdir @ juliaHome (), (err , data ) =>
17
- if err? then return reject err
18
- @ getVersion ()
19
- .then (ver) =>
20
- r = new RegExp (" v#{ ver .major } \\ .#{ ver .minor } " )
21
- dir = data ? .filter ((path ) => path .search (r) > - 1 )[0 ]
22
- if dir? then resolve @ juliaHome dir else reject ()
23
- .catch => reject ()
24
-
25
- packages : ->
26
- @ pkgDir ().then (dir) =>
27
- new Promise (resolve , reject ) =>
28
- fs .readdir dir, (err , data ) =>
29
- if err? then return reject err
30
- ps = data .filter ((path )=> ! path .startsWith (' .' ) and
31
- [" METADATA" ," REQUIRE" ," META_BRANCH" ].indexOf (path) < 0 )
32
- if ps? then resolve ps else reject ()
33
-
34
- openPackage : ->
35
- require (' ../ui' ).selector .show (@ packages ())
36
- .then (pkg) =>
37
- return unless pkg?
38
- @ pkgDir ().then (dir) ->
39
- atom .open pathsToOpen : [path .join dir, pkg]
40
- .catch =>
41
- atom .notifications .addError " Couldn't find your Julia packages."
42
-
43
14
jlpath : ->
44
15
@ expandHome (atom .config .get (" julia-client.juliaPath" ))
45
16
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ module.exports =
82
82
{label : ' Open Juno Startup File' , command : ' julia:open-juno-startup-file' }
83
83
{label : ' Open Julia Home' , command : ' julia:open-julia-home' }
84
84
{label : ' Open Package in New Window...' , command : ' julia:open-package-in-new-window' }
85
+ {label : ' Open Package as Project Folder...' , command : ' julia:open-package-as-project-folder' }
85
86
86
87
{type : ' separator' }
87
88
Original file line number Diff line number Diff line change 33
33
{ label : ' Work in Folder' , command : ' julia-client:work-in-current-folder' }
34
34
{ label : ' Activate Environment in Folder' , command : ' julia-client:activate-environment-in-current-folder' }
35
35
{ label : ' Activate Environment in Parent Folder' , command : ' julia-client:activate-environment-in-parent-folder' }
36
- { label : ' New Terminal from Folder' , command : ' julia-client:new-terminal-from-current-folder' }
36
+ { label : ' Add Package Folder...' , command : ' julia:open-package-as-project-folder' }
37
+ { label : ' New Terminal from Folder' , command : ' julia-client:new-terminal-from-current-folder' }
37
38
]
38
39
}
39
40
{type : ' separator' }
You can’t perform that action at this time.
0 commit comments