it wants to open the file from the wrong url and I get the following error message:
I am working on a MS Windows machine and Openhab is installed on a Raspberry Pi.
The problem is the same no matter if I open the folder \\OPENHABIANPI\openHAB-conf or if I am using a network drive.
Hi,
I have the same issue and apparently it is still not solved.
Wonder why, because this is very annoying and makes reasonable working impossible. Does this affect only Windows users that access the openhab2 file system via samba, or why is there no bigger community voting for this issue?
To ask the other way round: How do all the other people do it for who it apparently works? So is there some kind of workaround?
Regards,
Stefan D.
Hmm… I found an ugly workaround.
It seems that VS code or the extension is completely ignoring the drive letter or originating path.
Whenever it tries to open a file, it does this relative to “C:”, which results in looking for a file actually in the path C:\etc\openhab2.
Well, to satisfy the tool, I created that directory and linked the samba file share into it by calling from an administrator’s cmd:
thx for the hint with the mlink seems to work for now but yeah can’t be a permanent solution.
May I ask what happens when you for example select “Go to Definition” of an item in a rule file. Will it jump to the *.item file and display the item itself?
When I add the link to c:\etc\openhab2 the file opening is working, but my openhab log is being flooded with the following error messages every time I am typing in rules files:
2020-07-29 23:22:25.895 [ERROR] [se.xtext.ide.server.WorkspaceManager] - The document file:///etc/openhab2/rules/ZEN_Watering.rules has not been opened.
2020-07-29 23:22:26.069 [ERROR] [se.xtext.ide.server.WorkspaceManager] - The document file:///etc/openhab2/rules/ZEN_Watering.rules has not been opened.
2020-07-29 23:22:26.479 [ERROR] [se.xtext.ide.server.WorkspaceManager] - The document file:///etc/openhab2/rules/ZEN_Watering.rules has not been opened.
2020-07-29 23:22:26.641 [ERROR] [se.xtext.ide.server.WorkspaceManager] - The document file:///etc/openhab2/rules/ZEN_Watering.rules has not been opened.
2020-07-29 23:22:26.752 [ERROR] [se.xtext.ide.server.WorkspaceManager] - The document file:///etc/openhab2/rules/ZEN_Watering.rules has not been opened.
Therefore I deleted the symlink again. Do you also have this issue?
Edit:
Also I am having issues with the file change recognition then.
no for me its working however I do use a mapped drive and not the direct path to the server via \. maybe mount the folder to a drive letter in Windows and then try again,
Hi Andreas,
“Go To Definition” always jumps to the very same file and the very same line where I click on that menu item.
So this is really not helpful.
Do you say, that this function works different in other environments? My expectation would also be that the *.items file would be opened, if I say “Go To Definition” for an item name…
Regards,
Stefan D.
Hi SeeAge,
yes, today I noticed the same error messages in my openhab log. They seem to appear only if the rules file or any other file contains errors. If syntax is OK, then the log is quiet as it should be.
This development environment is really annoying. I wonder if there are setups that are better useable.
I noticed in other forum threads that some people install VS code on the openhab machine and VNC to there. Is that solution working better? Anyone knows?
I have a limited amount of config files, so i am able to find the correct file in the folder i have opened anyway for editing.
The name should be the same.
But that’s just my usecase.
Additionally i do not use/need lsp active.