Skip to content

Commit

Permalink
(#365) skip multiple Cake scripting tasks of the same name
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-a committed Sep 27, 2023
1 parent 929b35e commit 8501388
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,17 @@ class CakeTasksWindow(private val project: Project) : SimpleToolWindowPanel(true
val cakeProject = CakeScriptProject(project)
for (cakeFile in cakeProject.getCakeFiles()) {
val fileNode = DefaultMutableTreeNode(cakeFile)
val children = mutableListOf<String>()
rootNode.add(fileNode)

for (task in cakeFile.getTasks()) {
if (children.contains(task.name)) {
// this is an error and won't compile.
// we simply skip it.
continue
}

children.add(task.name)
val taskNode = DefaultMutableTreeNode(task)
fileNode.add(taskNode)
}
Expand Down

0 comments on commit 8501388

Please sign in to comment.