Rename using suggested var name with resharper - vb.net

I'm Using resharper 6 nighty builds and VB.net. I've a big medium project with multiple files that don't follow the code style conventions of my company.
I've configured resharper with my own convenctions and It suggest to me the right name for each variable (perfect!).
But I can't find any automagic way to make the current name to be replaced with the suggested name.
Are there any way to do it? If not ... did you know ane fearure of coderush Xpress to achieve it?
Thanks.

If you've configured ReSharper with your naming conventions, then it should show a warning (blue squiggly underline) under any identifiers that don't comply. If you put the text cursor on one of those misnamed identifiers, you should see a pyramid icon appear near the left margin. Then you can press Alt+Enter (or click the pyramid icon) to drop down a quick-fix menu. There should be an option in the menu to "Rename to '_myField'". Usually it's the first item in the list, so you can just press Enter again to do the rename.
If you want to do this on everything in a source file, you can use the ReSharper > Inspect > Next Issue in File command (or its keyboard shortcut -- F12 in the IDEA keymap) to move the cursor to the next warning in the file. Then, if it's another name warning, you can use Alt+Enter, Enter again to fix it.
Unfortunately, there isn't a way to automatically fix every instance of a warning at once (though it's been requested; please feel free to vote for RSRP-126551 in their issue tracker).

Related

CLion code navigation with C++ doesn't work

I've used AppCode (Intellij C++/ObjC IDE that replaces Xcode) for a while and really gotten used to being able to Ctrl+Click on any identifier to get to its definition/decleration.
Now on a new work place, I'm using CLion for a somewhat larger code base and Ctrl+Click hardly ever works. It only seem to work when the identifier is in the same file.
Is there anything I need to setup for this to work correctly? CLion seem to index the code successfully and doing text searches works fine.
You need to use import project functionality of CLion from File -> Import Project and give ok for CMakeLists.txt file automatic creation. Never mind the file is for CMake, you can build your project with other tools too, but CLion uses it for the dependencies.
Then append in the beginning of that file a line stating:
include_directories(.)
After that go to File -> Settings and there search for Keymap from the left and after that on right, right below the word "keymap" there is a selection element for taking for example Eclipse default keymapping in use and there you have at least (I tested only it) the ctrl + click functionality working like charm!!
kudos about the include_directories(.) goes to this question: CLion indexer does not resolve some includes in the project directory
You need to press ctrl + alt + shift + n.
And after pressing it a dialog box will appear to enter your variable/function name and click enter.
Tip: Filter the result for a better experience. Filter option is present on right side of the dialog box.
To get a quick peek of function/variable definition press ctrl + q while focusing on the variable or function.
To get the detailed or full definition of function press ctrl + shift + i while focusing on the variable or function.
I just looked at one of my more complicated teaching examples with multiple header/source files where this would come up.
What I see is that ctl-click (and the red/green arrows in the gutter) does work only in the same file. But I can right-click on a method from another file and choose to go to either the declaration (in header) or definition (in cpp).
The hotkeys to do this are not ctl-click. But you can remap hotkeys in IntelliJ ides, so you may be able to come up with hotkey combinations that don't seem too awkward to you.
What helped me was to run File > New CMake Project from Sources
Until that point, Ctrl+click in CLion would go to the definitions, but wouldn't find any usages.

IntelliJ IDEA 13.1.2 javadoc and tabs

I hate to ask such simple questions, but nothing I found so far helped me...
So, I've recently started using IntelliJ instead of Eclipse and there are 2 things that really bothers me...
1.) size of javadoc popup window - ok, so I finally get this little guy to pop-up whenever I need it, but it's so small I have to use scroll every single time... and that's pretty anoying when I'm working with unknown libraries...
2.) tabs == spaces - maybe some of you like this, but I don't... Eclipse was treating tabs as tabs and not spaces... I tried to change settings but with no result... or is that maybe connected with project I'm working on? (meaning, if, at the start of a project, setting were such that tabs == spaces and now changes are not applied to it)
Sorry for stupid question but, as I said, nothing I found so far helped me...
1) Just resize the window with your mouse. It will retain the size the next time it opens. You can also click on the gear icon in the upper right corner and adjust the font size. Again, it will retain the size on subsequent use.
2) I'm assuming you make the change to the "Use Tab Character" option on the "Tabs and Indents" tab for all file types and saved the Code Style. After that, you need to run the Reformat Code action (Ctrl+Alt+L or Code > Reformat Code from the menu or Reformat Code from the context menu (i.e. right-click) in The Project Tool window or Navigation Bar). IDEA retains the previous formatting (so spaces in this case) until you run a reformat on the project (or a part of it).
If you have multiple projects already created, for each one, you will need to go into File > Settings > [Project Settings] > Code Style and set the Scheme (and then do a reformat). While the Scheme definition is saved IDE wide, the scheme to use is set per project (which makes sense since an Apache Open Source project you are working on may have different code style requirements than the projects you do at work vs the ones you do for fun).
Finally, you will also want to go into File > Other Settings > Default Settings > [Template Project Settings] > Code Style and make sure your saved code style scheme (with the use tab option) is set so that new projects use that scheme when they are created.

Disable apostrophe t space Intellij IDEA

When I type in a comment (JavaDoc or line comment) IntelliJ automatically inserts a tag when I type something like // don't and I hit the spacebar after the 't I see // don'< ></> with my cursor ready to type in the first tag. Does anyone know how to disable this behavior? I've tried google searching and searching through the settings with no avail. I'm using IntelliJ IDEA 13.0.1 community edition.
It sounds like a live template is being activated via the sequence tspace, although to the best of my knowledge this is not a default one. Go to File > Settings > [IDE Settings] > Live Templates. Search for a template that has t as its shortcut and inserts tags. Either delete it, or change its activation from space to tab (in the lower right). You may also want to check (and possibly change) the "default expand with" setting at the top.

IntelliJ: Move to next typo

IntelliJ IDEA has an inspection that checks for spelling. In the analysis overview, I can see how many spelling mistakes were found, e.g. 12 typos found. In the code they are highlighted using a wavy green line.
However, I find it very hard to look manually for those wavy lines. Is there a keyboard shortcut or a search function which will automatically skip to the next highlighted typo?
F2 and Shift + F2 shortcuts will navigate you to the Next / Previous highlighted error. You need to configure the error navigation first to Go to next problem instead of default Go to high priority problems option(from the context menu of editor right side bar):
See help for details. Another option is to use double click (F4 shortcut) from the Inspection Results window to go to the source.
IntelliJ IDEA 2016.3
If you want to fix all typos from the project, you can list all of them and iterate through them using double click (or F4 to open the source):
Analyze > Run Inspection by Name...
Type "Typo"
You will be able to see a list containing all typos grouped by file:
In Settings -> Editor -> Colors & Fonts -> General, you can add an 'Error stripe mark' color to Typo.
With the default settings of IntelliJ I find it difficult to spot the typos. So I do the following hack to spot and correct them once in a while.
Temporarily change inspection setting to show Typos as Errors.
IntelliJ then highlights the typos as Errors, making it much easier to spot them in the editor. I correct them and then revert the inspection setting changes. The changes can be kept permanently but I don't prefer that!

Xcode question: Quickly jump to a particular selector/class/symbol?

What is the quickest way to jump to a particular symbol/selector/class in Xcode? (I'm looking for keyboard shortcuts preferably).
Right now, I know two ways of doing this:
“Open Quickly” > Click on the Symbols dropdown menu at the top of the editor > Select the selector to jump to it.
Click on “Project Symbols” in the “Groups and Files” section on the left sidebar, and type in a name in the Search text field in the top right of the XCode window.
Is there a quicker way of doing this? (If I could even assign a shortcut to jump to the “Project Symbols”, that would suffice for me. Alternatively, if I can find a keyboard shortcut to jump to the symbol dropdown above an editor that would do it to).
For experienced Xcode programmers, what do you use to jump to a symbol?
In Xcode 3.2, the "Open Quickly" command (Shift-Control-D) lets you type in selectors and class names as well as file names. This would at least get you close to what you wanted.
Your idea about using the "Symbols" drop-down also works. You can use the keystroke Control-2 to bring up the Symbols drop-down menu, and then use the arrow keys, or start typing the name of the method that you want to reach.
Edit: In Xcode 4, the "Symbols" drop-down appears when pressing Control-6. You can change this in the Xcode settings by changing the key binding for "Standart Editor > Show Document Items".
If you're looking at the symbol in a source file and want to jump to its definition, ⌘-click it.
(command + double click) on your symbol/selector/class in any place of your implementation to jump to them
(option + double click) on framework classes/selectors to jump to their reference in help->documentation
One (arguably crude) way to do it seems to be as follows:
This is based on the fact that the Search field at the top right of the Xcode window seems to change behavior depending on what is selected in the Groups & Files sidebar.
Select “Project Symbols” in the “Groups & Files” sidebar
Press ⌥⌘F (That is Command+Option+F) to jump to the Search field
Enter the symbol to jump to, and an outline will quickly show up
(this will remain in effect until you click on something else in the Groups & Files sidebar)