Is there a way to exclude unnecessary classes from a keyword search in MSDN? - visual-studio

When using "keyword search" in offline MSDN that came with VS2008, is there any way to exclude unnecessary classes / namespaces that I know beforehand is out of the scope of my search? The search "filter" seems way to broad for this purpose.
To be specific, when I search for a class, say "ListView", I DO NOT want System.Web.UI class to show up as the first suggestion just because it is the first one alphabetically, and instead would like to see System.Windows.Forms.ListView as the document that comes up. I guess I could live with going to search result and browse through to find the intended class, or maybe typing class names with full namespace... But it would make my life easier if I could either temporary or even permanently (I know I won't touch ASP.NET for a while) remove unnecessary classes from the search index.
TIA

After trying several options I found out that manually taking the .HXS files associated with the unneeded namespaces out of the MSDN directory (In my case, C:\Program Files\MSDN\MSDN9.0\1041) seems to do the trick. MSDN document explorer recreates help index on the next launch after the content of the directory was modified. So even in case you need the documentation again, you can restore the help by simply moving the files back into the original folder.
The files I moved to take out System.Web.UI documentations were:
fxref_system.web.ui.adapters.hxs
fxref_system.web.ui.desi_obilecontrols.converters.hxs
fxref_system.web.ui.design.hxs
fxref_system.web.ui.design.mobilecontrols.hxs
fxref_system.web.ui.design.webcontrols.hxs
fxref_system.web.ui.design.webcontrols.webparts.hxs
fxref_system.web.ui.htmlcontrols.hxs
fxref_system.web.ui.hxs
fxref_system.web.ui.mobi_s.adapters.xhtmladapters.hxs
fxref_system.web.ui.mobilecontrols.adapters.hxs
fxref_system.web.ui.mobilecontrols.hxs
fxref_system.web.ui.webcontrols.adapters.hxs
fxref_system.web.ui.webcontrols.hxs
fxref_system.web.ui.webcontrols.webparts.hxs
Was pretty surprised when I saw this kind of somewhat primitive and forcible method to be the most effective...

Type "listview NOT System.Web.UI.ListView" for example - without the quotes :)

Related

VS Code - Ruby code completion with attributes from other Ruby files

I have an issue, I wouldn't say it's a problem at the moment, but I can see how it could turn into one in the future.
I'm following some tutorials from Ruby, so I have a folder with a bunch of different files. In one of them, I was studying Hashes, and they showed that I could name its keys like :key. No problem so far.
The issue came when I was studying Classes and I had to declare the class attributes, IntelliSense (I guess, maybe it is another extension) would recommend code completion with the keys I declared in that Hashes ruby file.
So I tested some stuff and:
It wasn't unique to that file (of course).
It's not just in hashes, it will recommend any type of :attribute I create. Whether it is classes or hashes (which is what I have tried so far), it doesn't matter.
It isn't unique to that folder. If I have the files in different folders, with different depths let's say, it will still appear.
The only way I found to get rid of that was to erase the file, and that's no solution at all.
I guess my precise question is: How can I disable that code completion characteristic?
You can ignore file or folder in code completion by adding it to files.watcherExclude setting.
Files must be closed in editor: if ignored file is open, it will still be used for autocomplete.

MediaWiki search in <syntaxhighlight> tag (SyntaxHighlight GeSHi extension)

How to enable searching in <syntaxhighlight> tag (SyntaxHighlight GeSHi extension)? I'm trying to search for com.android.chrome in it, but no result found :-(. String is IMHO long enough to be found.
<syntaxhighlight lang="java">
supproclist.add("com.whatsapp");
supproclist.add("com.android.chrome");
</syntaxhighlight>
You don't need to do anything special; everything within <syntaxhighlight> tags is already included in the normal site-wide search system (based on MySQL search).
Edit: You definitely should be getting a match on com.android.chrome. Is this on a public wiki? Can you provide a link?
You won't get a result when searching for com.android however, because the search system only finds whole words, and the dot is considered part of the word. This is quite separate from, and not changed by, the SyntaxHightlight extension.

How to get list of figures in Asciidoc

I am using asciid for an article. In the end of my document I want to have a list of figures. How to I create a list of figures? Did not find something useful in the documentation for me.
Nope there isn't one at the time of answer. I checked the docs (which you indicated you did as well) and I also grepped the codebase. There is good news though! You should be able to do this with an extension.
Extensions can be written in any JVM language if you're using asciidoctorj, or in Ruby if you're using the core asciidoctor (I'm not sure about JavaScript for asciidoctorjs). You'll need to create two extensions probably: a TreeProcessor extension to go through the whole AST looking for images and pulling them out into a storage structure. Then you'll also need to create either an inline or block macro to actually place it within the page.
I strongly recommend examining the API for the nodes and functions you'll want to make use of. There are some other examples of processors that may also be helpful to examine.

Orbeon, overriding model.xml and form.xhtml

Is there posibility to override files form.xhtml and model.xml (and template.xml) without compiling Orbeon sources ? I want to add field to form metedata, and I don't know, is it sufficient to add properly files to resource/orbeon/builder/form in my exploded .war file.
regards
Yes.
(That must have been the shortest answer I got a chance to post here!)
To expand on this a little bit, if you want to override Form Builder's form.xhtml, you can place your version in WEB-INF/resources/forms/orbeon/builder/form/form.xhtml. And of course, if there is any way to avoid this, you might want to consider it, as custom changes make it harder to upgrade, and can become quite a nuisance.

Include only certain file types when searching in Visual Studio

Often when I want to search through my code in Visual Studio, I know the thing I'm looking for is in some C# code. However, as I've used the same variable name in a JavaScript file, I have to wade through all those search results too. This gets even worse when the text I'm looking for is also used in a third-party JavaScript library that we've brought into the project: this can result in hundreds of search results.
To compound things, our designers include HTML mock-ups of the pages in the same project, so I often find I'm hitting loads of search results in there too.
I guess what I really want is to see results in my .cs, .aspx, and .ascx files, but not .js or .htm.
Is there any way to do any of the following:
Search only in files of a particular type (search only .cs files).
Search only in files of any of a given set of types (search only .cs, .aspx and .ascx files).
Search in all file types except a particular type or types (search everything except .js).
I suspect not, in which case is there any crafty way of working around this?
In the Find in Files dialog (Ctrl+Shift+F), there should be a field called Find Options. You should be able to enter the extensions of fields you want to search in a field in this dialog:
*.cs; *.aspx; *.ascx;
Instead of Ctrl + F, I think it is Ctrl + Shift + F which gives you the choice to specify file types, you wish to look into.
You can choose file types from default or type your own. Regular expressions available for complex search.
Another way to limit file searches is by only choosing certain folder sets.
I like to exclude js files by using the following search:
*.a*;*.cs*;
Most of the times, I end up searching for stuff in aspx, cs, cshtml files so this is quite helpful.
Notice how I use *.cs* instead of *.c* since the latter would select jquery custom files such as jquery.custom1234.js (which I usually use in most of my projects), of course if you don't you could just use *.c*.
In the Find dialog box, go to "find options->Look at these file types".
Type in you own string, eg, *.cs, *.aspx, *.ascx. The click the "find all" button.

Resources