Finding all unassociated labels in the ASP.NET project - visual-studio-2012

I'm undertaking a Section 508 upgrade/conversion/whatever, and one thing that would speed me up a lot is an easy TODO list. A large offender is that we have <asp:label> tags without the AssociatedControlID="" attribute set. How can I easily find all of these tags in my solution?
I'm using Visual Studio 2012 with ReSharper (can a custom pattern help?).

Yes, a custom pattern should be able to find those for you. Use ReSharper → Find → Search with Pattern, and set up the pattern something like:
<asp:label $attributes$ />
where the $attributes$ placeholder is an "attribute placeholder", with the option "Name should NOT match the regex" set to something like \bAssociatedControlID\b.

Related

How does lab.antlr.org get the parser rule and alternative number?

I have been playing with ANTLR Lab (really nice by the way) and was wondering how it is able to label the matching parser rule and alternative number. For example, below content:1, x_tag:2 and x_tag:3 are all rule names and the number after the colon is the alternative within that rule.
I have built a recognizer from my grammar but cannot see from looking at the runtime API how to access them from within a custom listener.
AFAIK, ANTLR Lab and the ANTLR IntelliJ plugin both use the RuleContextWithAltNum to set and get the alternative.
Note that it is only implemented in Java. From the documentation:
A handy class for use with options {contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum;} that provides a backing field / impl for the outer alternative number matched for an internal parse tree node. I'm only putting into Java runtime as I'm certain I'm the only one that will really every use this.
Also see the related stackoverflow Q&A: Is there a way to know which alternative rule ANTLR parser is currently in?

Can custom JavaDoc tags be required?

In Android Studio it is possible to run the inspection "Declaration has JavaDoc problems" and select some "Required Tags".
It allows also to add additional JavaDoc tags, but is there a way to make them required?
Thank you very much for any help!
Example:
If "verifiedBy" tag is added, it seems that there is no way to set it as required.

Resharper naming convention exception for specific word

Our customer has a terminology called A2b, not A2B, exactly A2b.
We want to have the same name in our source code.
However, Resharper always gives warnings and proposes to use A2B.
For example: We would like to have LoadA2bData, CheckA2bAvailability instead of LoadA2BData, CheckA2BAvailability.
Is there any workaround for this?
I saw this question Resharper Naming Exception for "iPhone". But it cannot be applied for our case because A2i is not only used as prefix or postfix, but also in the middle of the names.
You can change the regex off resharper 7 this means that you can enter a custom inspection regex. You can make a new naming style for your current project.

How Can I Define IP Address Field in SharePoint List

I'm creating a list using visual studio 2010, I want the list to contains I-P-Address field which i figured out is not available out of the box, so i guess i need to define that field.
how can i define that field type pro-grammatically?
Edit: I followed the tutorial Here to create Custom Field but when i was adding list from visual studio i tried to change type to Ip Address but i couldnt find it!
thanks in advance.
I don't think this is Visual Studio 2010 you are using. A list wizard like you are showing is not part of VS2010, but rather one of the upcoming features of the new Visual Studio - or you might be using some Add-In. You will most probably not be able to see your custom field type in a dropdown box like that in any case. You can use the regular declerative way to create a list with your fieldtype (or programatically).
In short: Use the declerative way (or programmatic way) to declare your list. VS 11 won't be able to show your custom field type - that would be pretty magic as your field type could do pretty much anything (custom field renderers, validation etc.) - no way you could just "display" that in a wizard.

Codedui object map/properties recording settings

Can anyone help me with this here codedui? I can't seem to find the option to choose when doing a recording on what properties for the object map to use. like for example,
when I do a recording for a calculator or "Something" and do an action/a click on "button 1" It just directly gets all the properties like, ID, name, classname etc. for that single object.
So, my question would be is there any possible settings when recording that I could tick like just use a couple of the properties not all? (ie. ID)
BTW, I'm using VS2010 ultimate.
Cheers,
Kerwin
UIMap editor that comes with feature pack 2 is the best solution for editing seacrh/filter properties of the control.
I have been working on something similar but haven't come up with a really good solution there are a few options but none of them are particularly user friendly or intuitive. You can hook the UIMap save function and prevent it from recording unwanted properties, note that this can make your tests brittle less properties generally means more failed searches. The UIMap is made by an XML file and you can parse and edit it directly. If you only have a few properties to get rid of you can use the UIMap editor that comes with feature pack 2.

Resources