Disable sql syntax highlighting in html code Goland IDE - go

I worked on my project, then, apparently, accidentally pressed hotkey. After that, the IDE highlights my html code like sql and tells me:
No data sources are configured to run this SQL and provide advanced code assistance. Disable this inspection via problem menu
I do not use databases in the project. This syntax highlight annoys me
Please tell me how to disable it
Screenshot

Go to Settings/Preferences | Settings | Editor | File Types and search for the HTML file type and make sure that the extension is associated in the Registered patterns section.
If the above doesn't work, then you'll have to take all the individual SQL formats available and search for your exact file name in them and remove that association when found.
Edit:
No data sources are configured to run this SQL and provide advanced code assistance. Disable this inspection via problem menu
This refers to the fact that you have not connected the IDE to a supported database so it can assist you with the SQL related features. To learn more about that feature, use the official help page.

Related

Visual Studio 2017: Disable Intellisense for CodeSnippets

I'm using Visual Studio 2017 Enterprise, Version 15.3.3
I looks like IntelliSense has some new features for code completion. On of this feature is, that a field name is automatically suggested when a type is written.
SpacePosition s.. // starting with s, Intellisense suggest "space", "position" and "spacePosition"
I like this feature in general but not for code snippets. Using a code snipped I have the problem, that the name of a literal is automatically replaced by IntelliSense after pressing tab (which is used for navigate to the next literal).
In my example I want to name the property "other" and then jump the the next literal inside the snippet. But because of IntelliSense, the property name is replaced by "spacePosition".
Is there any way to disable the IntelliSense feature inside code snippets?
I found a solution for the same problem in Visual Studio Code:
stackoverflow article but not for Visual Studio
Disable the name suggestions in Tools/Options/TextEditor/C#/IntelliSense. That's what is causing this nonsense. Seems MS realized later that they flipped coders up by adding that feature that changes old behaviour greatly without giving them a way to disable it. Now there is such a checkbox.
I nearly uninstalled this studio because of this lol. Not sure, may be it's a good feature, but i'm too used to Tab code snippets around, that I'm better without it.
How to: Manage Code Snippets
To access the Code Snippets Manager
1.) On the Tools menu, click Code Snippets Manager. Shortcut Ctrl+K,Ctrl+B
How to: Change snippet behavior
To change snippet behavior.
1.) Go to Tools > Options > Text Editor > IntelliSense > Snippet Behavior
2.) See images.
Now there has no such option to disable this intellisense feature inside code snippets, but you can try to click 'Esc' key after type 'other', then click 'Tab' key to jump to next literal, please check the following:
This actually works correctly in Visual Studio 2019 for classes if it is a class that is valid for the current context (i.e. Doesn't exist in a namespace not in the current class namespace or in the using statements for the file).
Here is my example snippet
Snippet Definition
Snippet Use
And here is an example where I use two different classes as the second snippet, one that is a valid class name and works to use tab to autocomplete, and one doesn't work because the class requires adding an additional namespace using statement that is currently missing from the file:
So I see two options.
Use the sucky to cancel any auto-complete logic.
Ensure you have the proper using statements. You can even add using statements to your snippet using the imports declaration:

Detect file changes outside the Visual Basic 6 IDE?

Background
I am working with VB6 legacy code and I am using an external editor because of the features that it has. Unfortunately, those changes aren't refreshed in the IDE because VB6 doesn't monitor loaded code for changes.
I have done some extensive searching on the subject including looking for alternative editors, a fairly exhaustive internet search including following all of the links on this StackExchange link and haven't found a way to refresh the code window to reflect the external file changes.
My company doesn't have access to the latest edition of Visual Studio and will not be purchasing it anytime in the near future. Until then, there is code to fix.
Question
Aside from restarting the program are there any methods that can be used to refresh the code displayed in the VB6 editing window?
Check out vbAdvance add on. It will prompt you to reload source file in case of external modification.
I think a found one possible solution.
The MZ-Tools set has an function called Reload file from Disk. It also allowed me to create a shortcut for this function through the MZ-Tools options menu, so I assigned it to the shortcut keys of my choosing.
It's a solution, but I'm still looking for anything that might be better.

In a Setup Project is it possible to validate the user input in a TextBox(A) dialog

I am using the VS 2010 to create a setup project, I am going to use the TextBox(A) dialog to capture user input.
I would also like to validate inputted value in these text box. Something likes the Next button just be enabled only when the first text box meets a specific criteria. So that, the installer just navigates user to next page when the validation passed.
Is it possible with the VS 2010?
There's no support in VS setups for doing this. It's a feature that's available in other tools and is part of Windows Installer, so you'd need to use another tool to add that functionality to the setup.
I know its not the exact you need but it will gives you idea on how to parse the value during install. See the following link in Scott Guru Blog
and post the solution if you find because for that sake i am now developing a click once application.

Does Eclipse have this extensibility Feature like Visual Studio without any coding?

In Visual Studio you can add an external tool and pass it the selected text as parameter.
Does eclipse have the same kind of feature or are one obliged to code a plugin for that ?
If so, any specific code sample to do just that because all I found is general sample plugin for custom editor.
In the menu, go to : Run > External Tools > External Tools Configuration.
This will open a dialog in which you can create external tools configuration (to execute external programs from Eclipse) :
(source: pascal-martin.fr)
At the bottom of the dialog, there is a region for "Arguments", and a button called "Variables". If you click on this one, you have a liste of variables you can use.
Of of those is "selected_text", which "Returns the text currently selected in the active editor." :
(source: pascal-martin.fr)
This should allow you to launch pretty much whatever program you want/need, directly from Eclipse, without having to create any plugin ;-)
ONly thing is those programs will not be quite well integrated in Eclipse -- but still usefull !
Sure, they are even called "External Tools". look in Run->External Tools.
Actually, start by typing "External Tools" into the Eclipse Help search box.
Eclipse has the kitchen sink, do you think they would leave this out? :-)
As a side note might be added, that the possibility to add external tools was one of the key features of the eclipse platform once it was brought up back in the days. VisualAge had a big problem with external tools.

How do I edit work items in the Visual Studio 2008 xml editor?

I'm trying to customize some TFS work items via the VS2008 xml editor, but every time I open a work item xml file it jumps to the graphical designer. All that gives me is a "View XML" button that doesn't let you edit the xml directly.
I don't have TFS but I know in regular VS there is an Open With... option in most items' contextual menu that even let you change the default editor. Very useful when you are tired of the Designer opening instead of the Code file on Windows forms.
Ah, looks like you have to go to File->Open and click the down arrow next to the Open button to "Open With" the xml editor. If someone wants to copy and paste this, free accepted answer :P
As per Coincoin's answer, this feature is also great for setting the default editor for ASPX. If you want to go to the Code Editor most often, then this is a default you'd want to change.
Reading this - I think perhaps you don't realize - that there is no need to edit the XML - in fact it is very difficult to do so. The graphical designer will actually let you change the Work Item type, adding new fields, changing workflow, rules etc.
The only reason to change the XML is if there's a bug in the Process Editor (the tool that gives the graphic designer). I have done extensive modifications of Work Item types and only had one instance where I had to change the XML.

Resources