Skip to content

Commit

Permalink
Refine eclipse plugin kotlin sample
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Merlin <paul@gradle.com>
  • Loading branch information
eskatos committed Sep 5, 2018
1 parent 1904c68 commit 881146b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions subprojects/docs/src/samples/eclipse/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ eclipse.project.file.beforeMerged(Action<Project> {
// tag::wtp-with-xml[]

eclipse.wtp.facet.file.withXml(Action<XmlProvider> {
fun Element.firstElement(predicate: (Element.() -> Boolean)) =
fun Element.firstElement(predicate: Element.() -> Boolean) =
childNodes
.let { children -> (0..children.length)
.map { children.item(it) } }
.let { children -> (0..children.length).map { children.item(it) } }
.filterIsInstance<Element>()
.first { it.predicate() }

Expand Down

0 comments on commit 881146b

Please sign in to comment.