in backend/analyzer/installedIDEs/InstallationsFinder.go [286:310]
func GetIdeProperties(ideaBinary string) (collectedOptions map[string]string) {
var ideaPackage string
collectedOptions = make(map[string]string)
ideaBinary, _ = DetectInstallationByInnerPath(ideaBinary, true)
ideaPackage, _ = DetectInstallationByInnerPath(ideaBinary, false)
InstallationInfo, _ := getIdeInfoByBinary(ideaBinary)
for _, possibleIdeaPropertiesFileLocation := range getOsDependentDir(possibleIdeaPropertiesFileLocations) {
possibleIdeaOptionsFile := strings.Replace(possibleIdeaPropertiesFileLocation, "{IDE_BasefileName}", strings.ToUpper(GetIdeBasefileName(ideaBinary)), -1)
possibleIdeaOptionsFile = strings.Replace(possibleIdeaOptionsFile, "{dataDirectoryName}", InstallationInfo.DataDirectoryName, -1)
possibleIdeaOptionsFile = strings.Replace(possibleIdeaOptionsFile, "{ideaPackage}", ideaPackage, -1)
possibleIdeaOptionsFile = os.ExpandEnv(possibleIdeaOptionsFile)
if FileExists(possibleIdeaOptionsFile) {
//log.Println("found idea.properties file at: \"" + possibleIdeaOptionsFile + "\"")
fillIdePropertiesMap(possibleIdeaOptionsFile, collectedOptions)
} else {
//log.Println("Checked " + possibleIdeaPropertiesFileLocation + ". There is no \"" + possibleIdeaOptionsFile + "\" file.")
}
}
var listOfCollectedOptions string
for option, value := range collectedOptions {
listOfCollectedOptions = listOfCollectedOptions + option + "=" + value + "\n"
}
//log.Println("Collected idea properties:\n" + listOfCollectedOptions)
return collectedOptions
}