generated from JetBrains/intellij-platform-plugin-template
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(statusbar): add AutoDevStatusService and AutoDevStatus classes
This commit adds the `AutoDevStatusService` and `AutoDevStatus` classes to the status bar feature. The `AutoDevStatusService` class is responsible for managing the status of the auto development feature. It implements the `Disposable` interface and provides methods to get the current status and message. The `AutoDevStatus` enum class defines the possible statuses of the auto development feature: Ready, InProgress, and Error. It also provides an `icon` property that returns the corresponding icon for each status. These classes are necessary for displaying the status of the auto development feature in the status bar widget.
- Loading branch information
Showing
7 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
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
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
19 changes: 19 additions & 0 deletions
19
src/main/kotlin/cc/unitmesh/devti/statusbar/AutoDevStatus.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cc.unitmesh.devti.statusbar | ||
|
||
import cc.unitmesh.devti.AutoDevIcons | ||
import javax.swing.Icon | ||
|
||
enum class AutoDevStatus { | ||
Ready, | ||
InProgress, | ||
Error; | ||
|
||
val icon: Icon | ||
get() { | ||
return when (this) { | ||
Ready -> AutoDevIcons.DARK | ||
InProgress -> AutoDevIcons.IntProgress | ||
Error -> AutoDevIcons.ERROR | ||
} | ||
} | ||
} |
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.