Any news about this feature request ?
If I remember correctly, at the most recent ICC Developer Panel, they were talking about exposing the underlying script files to the end user and then they could be opened in your favorite text editor. I may be way off here, I just remember something like that being said.
If I could use VS Code, I’d be very happy
There’s an in-progress ticket to update the editor component and use it everywhere that a code editor is displayed but I don’t know if it includes any of the improvements mentioned in the feature request.
@PGriffith might know more.
Paul has shared progress before. Maybe a sabbatical is in order to finish up? @PGriffith ?
Right now, updating the built-in editors is in progress (awaiting QA). It’s far from complete, but it adds a lot of ‘smarts’ to basic stuff. Some of what I’d like to add will have to wait for 8.2, because of limitations in APIs such as third party scripting modules.
I would love to make the designer an LSP client, which would allow offloading a lot of tasks to external editors; but to do that we’d have to push designer-local resources to disk somewhere, and there’s some tricky complications there.
Similar complications exist for pushing files to disk and opening in external editors; in addition, opening an external editor such as VS Code wouldn’t work perfectly without some doing because: 1. you wouldn’t have your project scripts in the right spots, and 2. you wouldn’t have autocompletion for any system functions, and 3. you wouldn’t have autocompletion for any Java libraries.
Doing that properly might require the designer acting as an LSP server, which is also a big task.
IMHO, script editor most eagerly awaited reasonable improvements are as follow:
- Auto complete for user package
- function/block code folding
- generate comments for function/method (like in PyCharm)
- scope selector
- more color highlight (#TODO, …)
- add multiselection for tag and property in script code windows, to insert a list of paths
The new script editing experience just got merged (to release in 8.1.18). You’ll be able to preview the changes in the next nightly build that goes out.
On Monday I’ll post a full thread detailing the changes.
In the meantime, some hype:
Yay! A bright spot for my first day back from vacation. /:
That looks awesome !
Looks great, will this work for custom libraries and functions as well?
Not in this first round of improvements (a lot of which was “behind the scenes” work to make things easier to improve down the road), but that’s probably the next thing I’ll tackle.
Right now it’s somewhat improved
system function completions, completions for Python’s builtins, and much smarter contextual awareness of things like extension function arguments - plus, like I said, a lot of ground work to make future enhancements easier.
This would be one of the best scripting enhancements I can think about for the platform IMO. Building software tools using Ignition as a platform would become immensely easier and really help expand the communities capabilities into more software focused workflows.
It looks like César Román has already addressed the following issues
- you wouldn’t have your project scripts in the right spots, and 2. you wouldn’t have autocompletion for any system functions, and 3. you wouldn’t have autocompletion for any Java libraries.
with his ignition stubs project
I don't know that would go with break points etc
vscode can also be embedded in a modern web browser
so might be possible to embed vscode (or a tweaked vscode version) in chromium, in ignition, to provide a more 'integrated' experience
IMO, ignition scripters should be encouraged to write against stubs and mocks, along with a test suite. Then, use external version control with pipelines to perform automated testing.