question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve IDE comfort for DSL usage

See original GitHub issue

Hi,

Trying to write the UI using the DSL builders (as mentioned here: https://kvision.gitbook.io/kvision-guide/part-1-fundamentals/ui-structure#dsl), the IDE (in my case IntelliJ) is not helping, because no auto-completion is showing up.

image

Looking in the source code, I realize that it is because all the extension functions for DSL builder are written in companion objects:

class HPanel {
    companion object {
        fun Container.hPanel(...): HPanel { ... }
    }
}

So, despite it is possible to use the DSL builders as shown in the doc, it needs imports such as:

import pl.treksoft.kvision.panel.HPanel.Companion.hPanel

And IntelliJ does not seem to be able to propose auto-completion for it.

I propose one of the following options:

  1. Don’t write theses function in a companion object*
  2. Document how to setup IntelliJ so that we can have good auto-completion
  3. Publish an IntelliJ plugin

*I have to say, I don’t understand the reasoning behind putting them in the companion object, and I’d be interested to learn the rationale behind it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rjaroscommented, Oct 17, 2019

Released with 2.0.0-M3.

0reactions
rjaroscommented, Oct 17, 2019

It’s now or never. The 2.0 move is the only moment to do such breaking change. Let’s try.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modern IDEs are magic. Why are so many coders still using ...
Familiar and comfortable. It's this type of comfort that has kept whatever perceived war between those still using Vim or Emacs and the...
Read more >
(PDF) All You Need Is Logs: Improving Code Completion by ...
In this work, we propose an approach for collecting completion usage logs from the users in an IDE and using them to train...
Read more >
INTERNET USAGE FOR IMPROVEMENT OF LEARNING
Therefore, in this research tries to investigate and identify of internet usage that how it can improve students' learning, to ensure that the...
Read more >
Internet Usage Policy Aimed at the Performance of Employees
Luckily, the Internet Usage policy has one main purpose. Its key intention is to enhance every worker's performance, resulting in a variety of...
Read more >
Top Integrated Developer Environments (IDEs): Top 50 Tools
ShiftEdit is an online, browser-based IDE allowing you to develop websites from the comfort of your browser. Gain access to project files ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found