/
ide.go
40 lines (35 loc) · 963 Bytes
/
ide.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package ide
type Project struct {
Name string
Dir string
LastOpenTimestamp int64
LastActivationTimestamp int64
}
type IDEType string
const (
GoLand IDEType = "GoLand"
IntelliJIdea IDEType = "IntelliJIdea"
PyCharm IDEType = "PyCharm"
CLion IDEType = "CLion"
WebStorm IDEType = "WebStorm"
PhpStorm IDEType = "PhpStorm"
RustRover IDEType = "RustRover"
RubyMine IDEType = "RubyMine"
Rider IDEType = "Rider"
DataGrip IDEType = "DataGrip"
Aqua IDEType = "Aqua"
Fleet IDEType = "Fleet"
DataSpell IDEType = "DataSpell"
AppCode IDEType = "AppCode"
Writerside IDEType = "Writerside"
VsCode IDEType = "VsCode"
)
func GetRecentProjects(ideTypeStr string) ([]*Project, error) {
ideType := IDEType(ideTypeStr)
switch ideType {
case VsCode:
return GetVsCodeRecentProjects()
default:
return GetJetBrainsRecentProjects(ideType)
}
}