Per-solution Atomineer preferences - xml-documentation

With Atomineer Pro Doc for VS, is it possible to have the (some?) settings/preferences saved in the current $(SolutionDir) directory? I realize that there is an option to save/use the prefs.xml file from locations other than the default by setting the Search Paths under General Settings / Preference Storage, but those look to be requiring absolute paths, while my question is specifically about being able to define such paths relative to the current solution/project file.

Yes, it's easy to do this - you just need to use the variable %projectPath% or %solutionPath% in your search paths to make them relative to the current project or solution.
This allows you to use different settings for every project/solution you work in, and also to check the settings into source control so they can be shared across your team easily.

Related

PHPStorm exclude vendor from search but keep Intellisense

Any idea how can I exclude the vendor directory from Search in files and folders but keep it in indexing for Intellisense purposes?
I need to search only in my Symfony files, not the framework and so on.
Tried Scopes in Settings, with this pattern:
!file[abuse]:vendor//*
Thank you!
I tried using scopes but it didn't seem to work for me. The vendor files still turned up when trying to open files (ctrl + shift + n) and in order to use the scope I had to manually select it from the find in all files dialog.
I better solution I found was using the composer settings in PhpStom as shown in this question.
Just add your composer.json and composer.phar into the composer settings and it does the rest for you!
Scopes functionality is the way to go here.
You just need to ensure that you have inclusive parts as well and not exclude rules only. The solution is to include everything recursively and only then exclude unwanted stuff.
The reason for that -- ATM search does not correctly process scopes that have exclude rules only.

How to exclude files from a project in PhpStorm by pattern?

I'm using PhpStorm 10.0.1. I want to exclude files in directories that match a pattern. I want this exclusion to remove the excluded files from the set of files that PhpStorm uses when - for example - finding duplicate definitions of classes.
I've gotten part of the way through the solution, which involves Scopes:
Open a project in PhpStorm
Go to Settings (File -> Settings)
Navigate to Appearance & Behavior -> Scopes
Create a scope to exclude the appropriate file(s).
Click the + icon
Select either Local or Shared
Give the scope a name
Enter an appropriate pattern
For example, to exclude files in directories that match *-b0*, enter !file:*-b0*/*
Click Exclude Recursively
Verify in the tree view that the appropriate file(s) are excluded.
Click OK.
This is where I'm stuck. I can't find any reference anywhere in the UI to that named scope - except in the settings dialog where I created it.
The documentation is no help:
https://www.jetbrains.com/phpstorm/help/scopes.html - "Scopes" describes how to create scopes but not how to use them
https://www.jetbrains.com/phpstorm/help/configuring-scopes-and-file-colors.html - "Configuring Scopes and File Colors" describes how to color files in a scope differently but not how to apply them to a project
How do I apply that scope to the current project?
(It may be the case that scopes are applied automatically. In that case, the Scopes dialog and the rest of PhpStorm disagree on what is included and what excluded and I'll need to file a bug.)
Scopes can be used in Project tool window - click the Project popup in upper left corner and choose the desired scope. They can only be used for search filtering (in Edit/Find/Find in path dialog), in Inspections profiles, file watchers, etc.
But note that choosing your scope in Project window is just a view option, files excluded from scope are NOT excluded from project - they will still be indexed, used in completion/navigation, etc. If you like to exclude certain files/folders completely, so that they are not included in file index, you need adding them to 'Ignore files and folders' in Settings | Editor | File Types. Folders can also be excluded using Mark directory as/Excluded
I've never heard of the ability to apply a custom scope globally. I believe they can only be used to allow specific components of PhpStorm (like code inspections & find/replace) to operate on a subset of your project's files. Edit: This is not accurate; please see the comments below.
This hacky workaround might just do the trick, if the files you'd like to exclude from your project are never going to change:
(a) Using the pattern you've already identified, create a new custom scope that specifically includes the undesirable files.
(b) Perform a very broad search against that scope (Find in Path > Scope > Custom > Custom Scopes), so that every undesired file is matched. You could potentially search for the text <?php, or use a regular expression like .+
(c) Create a new Favorites list, and add all of the search results to that list.
(d) From the Favorites window, highlight all of the files. Right click them and choose "Mark as plain text". This will prevent PhpStorm from indexing them, so they'll no longer be considered by the IDE's static code analysis.

Can I configure the used ruleset for SonarLint

Can I disable / enable the set of rules that are shown by SonarLint for VS? How?
A similar question was already asked in Is there some graphical way to create my own configuration file on SonarLint? but I wasn't able to follow the answer, i.e. did not find the Project/References/Analyzers node in the Solution Explorer, to be able to edit the active rule set file. Can you help me out on this one?
Here is how to open the active rule set of a project:
From there, you'll be able to enable and disable rules:
The path to the rule set file to be used is saved within your .csproj file under the <CodeAnalysisRuleSet>...</CodeAnalysisRuleSet> tag. You can reference the same rule set file from multiple projects, and store the rule set along with your project sources in Git / TFVC if you'd like all developers to share the same rule set.

Sublime Text 2: Cannot override the global file_exclude_pattern?

Is it possible to include a file in per-project settings that's been excluded by Sublime Text's global settings?
For example, the global settings have mandated that "*.obj" files (intending files output by a build process) be excluded. Without changing those global settings, I cannot seem to include .obj files (these being 3d model files) in my project. Putting file_exclude_patterns in the "settings" section doesn't override, and adding a file_include_patterns key to the paths section simply filters every other file type out, and yet the .obj files still aren't included! (Apparently exclusion filters are applied after inclusion filters.)
So do I have to change global settings for this then??
I just came across exactly the same problem for exactly the same files.
The only solution seems to be to override the setting in your user settings, minus the "*.obj" wildcard. If you need to exclude those files in other projects or folders within projects, you'll have to specify the setting in your project settings.

Using MySQL in VC++

I am trying to connect to MySQL using C++. The IDE that I am using is Visual C++ 2010. I followed the steps on the MySQL dev page (http://dev.mysql.com/tech-resources/articles/mysql-connector-cpp.html). I followed the steps exactly as given although i used a different OS(Windows). I get many linker errors in the process, which I am finding difficult to debug. Could somebody direct me towards a better or a simpler approach to acces MySQL using C++.
P.S. I have downloaded mysqlconnector for C++.
You could try mysql++, but you'll encounter the same linker errors I bet.
Have you set the include path (C:...\MySQL Server 5.1\include) and the library path (C:...\MySQL Server 5.1\lib\debug) ? In VC2010 to set global settings you have to :
VS2010 introduces the user settings
file
(Microsoft.cpp..users.props)
to control global settings including
Global search path. These files are
located at
$(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0
directory.
The issue you are seeing is a bug in
the UI. To make it possible to change
the ordering of these read-only
directories, here is the workaround
that you can apply:
open up the property manager,
right click on the .user.props file to bring up the property page
open up VC++ Directories -> Include Directories, add new paths after
$(IncludePath)
Click on the "Edit" dropdown on VC++ Directories -> Include
Directories property, the user
directories as well as the inherited
values will show up in the upper pane
you can move the directory orders as you wish and save.
http://connect.microsoft.com/VisualStudio/feedback/details/550946/vs-2010-how-to-change-vc-directories-inherited-values-read-only