Vscode language configuration - autocompletion is not triggering automatically in some specific situation - visual-studio-code

I have problem with automatic invoke code completion when I press dot inside the string when the previous panel is already opened.
I'm using standard yaml language configuration, I added dot notation into some strings. Codecopletion is working, but I have troubles in some specific situation.
Do you know where it is a possible to config some detail around language autocompletion?
Description of the video:
write system without selecting it
add . (dot)
suggestion is NOT automatically invoked (vscode client doesn't create request to LSP)
delete .
add .
suggestion is invoke automatically OK
Note that when I select item from suggested items, everything works ok. When I type the string manually (without selecting it) it works odd.
I tried define this in wordPattern but without success.
https://github.com/redhat-developer/vscode-yaml/blob/a9689529c28cfe83c87e0734e3aa0a84994e76fd/language-configuration.json#L37
Another idea is tmLanguage.json, but not sure where to start.
https://github.com/redhat-developer/vscode-yaml/blob/main/syntaxes/yaml.tmLanguage.json
Note that typescript language is working ok
I will appreciate any help
Thanks

Related

Opening the VSC settings window from code

I'm working on a Visual Studio Code extension, where some settings are required for it to work properly. Right now, in case the user has forgotten something, I'm showing a warning message indicating this, and telling them to fix this property in the settings. I would, however, like to add a button that opens the settings page of that property.
However, after looking around for over an hour, I can't seem to find any support for this in the Api, or anyone else asking this question (which I find a bit weird?). If it really doesn't exist, I'd still expect at least 1 other person asking this somewhere, but as far as I can see there's absolutely nothing.
Is it possible to open the settings window (preferably even filtering them down to only my extension's properties/the one property that has to be filled in) from code?
Thanks in advance
I found it out myself after digging through the keybinds window. You can use the following to open the settings:
vscode.commands.executeCommand("workbench.action.openSettings2");
I did not, however, find how to pass a search query into it to open a specific place in the settings.
EDIT: You can use openSettings & add the search query as an extra argument to executeCommand. For example - if your property is defined as my.extension.property in package.json, you can use this:
vscode.commands.executeCommand("workbench.action.openSettings", "my.extension.property");

Load settings view from code

I'm working on an extension and I'm checking to see if settings have values, if not, I want to show an error and provide a button that launches the settings editor so the user can add those settings.
I think my path forward is to use executeCommand and provide a built in command that does this for me, but I've been having trouble finding a list of built-in available commands.
Hidden in the key-bindings section of the documentation, I found the command I was looking for - workbench.action.openGlobalSettings
The full solution looks like
commands.executeCommand('workbench.action.openGlobalSettings');

Dynamically loaded javascript doesn't show in sources panel?

For example, I have an ajax request and it returns <script src='buggy.js'></script>.
Problem is, it doesn't show up in sources or resources panel. That means I can't do all the cool stuffs like adding breakpoint and inspecting the elements as they run.
I could only see the source of the js file under the Network panel.
Is there anyway to make chrome add them to the sources panel?
Or how do you guys go about debugging dynamically added scripts?
Using Canary.
I was having the same problem, and I found a workaround that is better than the deliberate exception. It does still require changing the code as opposed to just setting a breakpoint inside the chrome dev tools.
I tried using the "//# sourceURL=dynamicScript.js" that was suggested as a workaround by the OP, but it still wasn't showing up for me unless it already existed in my tabs from a previous time when it produced an exception.
Coding a "debugger;" line forced it to break at that location. Then once it was in my tabs in the Sources panel, I could set breakpoints like normal and remove the "debugger;" line.
Please refer to https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-dynamic-javascript
(Original link is broken-- archived link below)
http://web.archive.org/web/20141016164821/https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-dynamic-javascript ("Breakpoints in Dynamic JavaScript").

Plone Workflow: How to check for multiple attributes of an object?

In our project we would like to have a workflow which checks whether all three signatures (implemented through booleans) have been added to an object of type "Project" before it continues to the next state.
Unfortunately this doesn't seem to be possible while editing the workflow through the web and we haven't been able to find it in the documentation either.
How would we do it?
Thank you very much for any assistance.
Use the transition Guard expression to check for this:
python: here.getFirstBoolean() and here.getSecondBoolean() and here.getThirdBoolean()
This can be access through the ZMI:
append /manage onto site root
go to "portal_workflow"
click the "contents" tab
click on the workflow you're using
click the transitions
you should see the area for a guard expression
You could put the login into a Script in the custom folder also if you wanted to make it easier and do it all TTW.

How can I get rid of a persistent VBA Form Object that won't honor the form deletion?

I have an MS Access 2003 database that I'm using to develop a basic little inventory app. I have added some extraneous forms along the way and I wanted to get them out of the DB. I deleted most of them just fine but one of them appears to have left behind its VBA Object. All that's in the object is Option Compare Database. Now whenever I try to work with the database, I get the following error:
The form name 'Transaction1' is misspelled or refers to a form that doesn't exist.
If the invalid form name is a macro, ...
Truncated for typings sake.
Yes, I agree, the form doesn't exist. What confuses me so much is that all of the other forms, when I deleted them, also destroyed their VBA object as well. This one, no matter what, seems to like to stick around and I have no idea how to get rid of it.
How do I get rid of it?
Things I've tried:
Compact and Repair and the DB
Create a new form named what it's expecting, verify that it gets rid of the problem, and then delete that form.
You can try the /decompile switch
Make a backup of your mdb
Open your mdb (hold the SHIFT key down to stop any code from running) via a short
cut: msaccess.exe database.mdb /decompile
Open a module and compile your app
Save and close Access
Open again (SHIFT again) without decompile
Compact and repair database
close Access
I had similar problem. I found I had named the missing form in the STARTUP menu as the default form to open when starting Access. I opened Tools>Startup and deleted the missing forms name from the "Display/Form/Page" field of the Startup. My problem solved.
The problem I was having is that the form was named ~TMPCLP8151 and would not show up in Access no matter what I tried, but I could see it in VBA in the Project Explorer. Here's how I resolved the issue. I created a new form, and created an Event Procedure for Form_Open that contained this:
DoCmd.DeleteObject acForm, "~TMPCLP8151"
Then I just opened the form, and sure enough, the VB code deleted the form that I could not delete myself.
I had a same problem. I created a form with same name and deleted the form again. That fixed the peoblem. Try. BTW try to open the new form in design mode to make sure if the VBA module is assosiated with the new form.
I had to combine both solutions to achieve the goal.
First de- and recompile
next compact and repair
then create new form with the same name and delete it
Pay attention that the form has the status Hasmodule set to Yes
I had this problem. I renamed my default form from Form Login to frmLogin which suits my naming style, but the program was still looking for it on opening. I am using 2013 so I went to File » Options » CurrentDB and in the display dropdown select the new name. The old name remains in the list until you close and restart the application.