]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/visual-studio-code-exploration/visual-studio-code-exploration.factor
editors: adding EDITOR: syntax and use classes instead of tuples
[factor.git] / basis / editors / visual-studio-code-exploration / visual-studio-code-exploration.factor
1 ! Copyright (C) 2020 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators editors editors.visual-studio-code
4 io.pathnames io.standard-paths kernel namespaces system
5 tools.which ;
6 IN: editors.visual-studio-code-exploration
7
8 SINGLETON: visual-studio-code-exploration
9
10 INSTANCE: visual-studio-code-exploration visual-studio-code-base
11
12 editor-class get-global dup [ visual-studio-code? not ] when
13 [ visual-studio-code-exploration editor-class set-global ] unless
14
15 M: visual-studio-code-exploration find-visual-studio-code-path
16     os {
17         { linux [ "code-exploration" which ] }
18         { macosx [
19             "com.microsoft.VSCodeExploration" find-native-bundle
20             [ "Contents/MacOS/Electron" append-path ] [ f ] if* ] }
21         { windows [
22             { "Microsoft VS Code Exploration" } "code-exploration.cmd" find-in-applications ] }
23     } case ;