I didn’t really see a great place to add this(except maybe git), but I think it might be nice to have the little copy icon attached with the item, not just the thing.
It’d make it so much easier when creating rules and such in a text editor. Right now when you click an item, Paper UI brings up the whole item page, which you then have to select and copy the text at the top. If there was a copy icon next to it in the initial search view I think it would make life a bit easier.
You can file a feature request at the Eclipse Smarthome repo.
Though the officially recommended editor, VSCode with the openHAB extension, provides a list of all your Items and will even provide a list of possible Items for you as you type. For example, if you type “KitchenMotion” and wait half a second a list of all the Items that start with “KitchenMotion” will pop up and you can arrow through the list of all the Items that start with “KitchenMotion” to select the one you want. Then you don’t even need to go to PaperUI in the first place. There is also a list of all the Items in a panel on the bottom left that you can copy and paste from.
I know a lot of people like to feel heroic and only code using plain text editors, but in an environment like OH, you are really shooting yourself in the foot by not using VSCode.
I’ll submit a request tomorrow, thank you.
Problem I have with VSCode is, although it’s nice to have a popup, it tends to popup all the time when it shouldn’t. It’s not really context aware to what you’re actually doing. Start a rule, when you get to the end of it, type “end”, and it’s auto-completing your possible items even though I have no items that start with the letters “end”. Also seems to be missing things that should be there, such as .sendCommand(xyz), etc… It’s cool that it picks up everything from REST, but it’s not quite there for me anyway.
I’ve been using Notepad++ since the 1.8 days and have tweaked it pretty well to allow me to do things quickly. Although it’s not perfect, it doesn’t tend to get in the way of accomplishing the goal quickly.
I guess different strokes for different folks.
Have you submitted any issues on it?
No, as I’ve just started checking out VSCode I wasn’t sure if this was by design or an actual issue.
I would think it’s fairly obvious for anyone running it that it doesn’t specifically work in the easiest manner, but figured maybe that was just because I’m used to simply using vi, or Notepad++.
Either way it is worth filing an issue. It will never get better if people do not contribute.
It may be obvious to you but may not be obvious to the developers. And even if it is obvious to the developers it may be that they have made this a lower priority issue because no one has complained about it.
All of the maintainers and developers are overworked and responsible for whole swaths of OH. Only stuff that is high priority ends up getting worked on.
Even with the flaws (it is getting better all the time), the lack of a centralized documentation for the Rules DSL and all the related libraries means that without introspection you will be severely slowed down without the introspection as you will have to keep looking up stuff in one of four different places. How do I cancel a timer now? Can I reschedule a Timer? How do I get the state of my Item from ten minutes ago? … The answers to all of these types of problems are there for you with the code completion in VSCode but would take some minutes to find in the docs.