generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
28 changes: 25 additions & 3 deletions
28
ide-common/src/main/kotlin/org/digma/intellij/plugin/analytics/BackendUtils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
package org.digma.intellij.plugin.analytics | ||
|
||
import com.intellij.openapi.project.Project | ||
import org.digma.intellij.plugin.common.findActiveProject | ||
|
||
fun isCentralized(project: Project): Boolean { | ||
return BackendInfoHolder.getInstance(project).isCentralized() | ||
} | ||
|
||
fun getVersion(project: Project): String { | ||
return BackendInfoHolder.getInstance(project).getAbout()?.applicationVersion ?: "unknown"; | ||
} | ||
fun getBackendVersion(project: Project): String { | ||
return BackendInfoHolder.getInstance(project).getAbout()?.applicationVersion ?: "unknown" | ||
} | ||
|
||
fun getBackendVersion(): String { | ||
val project = findActiveProject() | ||
return project?.let { | ||
BackendInfoHolder.getInstance(it).getAbout()?.applicationVersion ?: "unknown" | ||
} ?: "unknown" | ||
} | ||
|
||
fun getBackendDeploymentType(): String { | ||
val project = findActiveProject() | ||
return project?.let { | ||
BackendInfoHolder.getInstance(it).getAbout()?.deploymentType?.name ?: "unknown" | ||
} ?: "unknown" | ||
} | ||
|
||
fun isCentralized(): Boolean { | ||
val project = findActiveProject() | ||
return project?.let { | ||
BackendInfoHolder.getInstance(it).getAbout()?.isCentralize ?: false | ||
} ?:false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters