-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from Polidea/development
Merge development
- Loading branch information
Showing
59 changed files
with
969 additions
and
508 deletions.
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
20 changes: 20 additions & 0 deletions
20
CockpitCore/src/main/java/com/polidea/cockpit/core/CockpitParamGroup.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,20 @@ | ||
package com.polidea.cockpit.core | ||
|
||
const val GROUP_DELIMITER = '/' | ||
|
||
data class CockpitParamGroup(val name: String?, val subgroups: List<CockpitParamGroup>, val params: List<CockpitParam<Any>>) { | ||
val displayName: String? | ||
get() = name?.split(GROUP_DELIMITER)?.last() | ||
|
||
val displaySize: Int | ||
get() = subgroups.size + params.size | ||
|
||
fun isChild(): Boolean = name?.contains(GROUP_DELIMITER) == true | ||
} | ||
|
||
data class MutableCockpitParamGroup(val name: String?, | ||
val subgroups: MutableList<MutableCockpitParamGroup> = mutableListOf(), | ||
val params: MutableList<CockpitParam<Any>> = mutableListOf()) { | ||
|
||
fun toReadOnly(): CockpitParamGroup = CockpitParamGroup(name, subgroups.map { it.toReadOnly() }, params) | ||
} |
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
198 changes: 175 additions & 23 deletions
198
CockpitPlugin/src/main/java/com/polidea/cockpitplugin/generator/DebugCockpitGenerator.kt
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.