VSCode: how to scroll through IntelliSense overload signatures in TypeScript and in Javascript ?
Sometimes the IntelliSense hints e.g. (+1 overload) in a tooltip as you write "someObj.someMethod(" and shows one (first) overload, but how to see the other overloads ?
Your screenshot shows the hover tooltip for a method call, which only shows the overload that is actually being used. The only way I know of to see all overloads is in "parameter hints". The parameter hints appear automatically when you type the opening parenthesis of the method call, or you can put the cursor between the parentheses and invoke the "Trigger Parameter Hints" command, normally bound to Ctrl+Shift+Space. The parameter hints pop-up has two small arrow buttons you can click to navigate through the overloads:
Related
I want to be able to achieve the following with Resharper:
When I type (e.g.) "Insights.Report(" I do not want a closing parenthesis added automatically.
Be able to cycle through the individual signatures with the arrow keys
As soon as I type the "(" I get the list of signatures but I cannot loop through them because a weird list of parameters is offered:
I do not see what is wrong in my settings:
My initial thought is that the intellisense prompt is taking focus from the method parameter info list.
Trying it out myself I can tap Escape to dismiss the intellisense prompt and then use the arrow keys to switch between the parameter info options.
As for not automatically populating the closing parentheses I don't know how to set that up and I don't see why you would want to either. I found the option to turn it off in VisualStudio but it seems that ReSharper is overriding it somehow.
Is there a way in Xcode to find all the places where a method or property has been been called?
In Eclipse, for example, you can right-click a method and select Find references. Is there anything similar in Xcode?
Select the method you're interested in, or position the text cursor within it.
Open the "Related Files" menu via the icon at the top-left of the Editor. (It's the button immediately to the left of the back button).
Go to the "Callers" submenu for a list of all methods that call the selected method, and click any of them to jump to that file and method.
In pictures...
A couple of notes:
You can do this for properties too.
Note that when you select a calling method from the Callers menu to jump to where your method was called, Xcode highlights only the first call. Each calling method will only show up in the 'Callers' list once, even if it contains many calls to your method. So if you're trying to make some change at every place in your application where a method is called, be careful not to miss some in places where a calling method contains two calls to the method you're interested in.
Yes, open the Assistant editor and instead of Counterparts select Callers.
Select function, press cmd-shift-A, "Callers"
As of XCode 4.5 you can click on "Show find options" within the search field of the Search Navigator. There you can specify "Symbol References"
Place the insertion point in a method invocation or declaration and choose Find > Find Selected Symbol In Project. For multipart selectors this will only highlight the first part but searching does seem to work relatively reliably. You can also use Find Call Hierarchy which highlights the entire line instead.
The corresponding contextual menu item (Find Selected Symbol in Workspace) also works, but it's a bit trickier to make work properly. Make sure no text gets selected otherwise it'll search for the selected word rather than the entire selector. To do so, you can click with the left mouse button prior to clicking with the right mouse button (or Control-clicking) in the same location. There's no such issue with the contextual Find Call Hierarchy.
With xcode 4 you can now right click on references and select "jump to definition."
How do I stop VS 2010 (RC) from autocompleting html helpers with new object { ... } when I just want to pass in an anonymous type? Backspacing is driving me crazy.
e.g., VS wants:
<%=Html.ActionLink("Register", "Register", new object { controller = "Account" }) %>
I know the helper is declared expecting object, which is why it does this, but can I change this behavior just for mvc helpers?
Theres a button on the Text Editor toolbar that "Toggles between suggestion and standard completion modes" (the default shortcut for the C# developer keyboard layout is Ctrl+Alt+Space). It will prevent the editor from filling in the selected item if you just type "new {" (it's actually meant to allow use-first development).
Note: You will need to hit the up or down arrow to give focus to the suggestion if you actually want Intellisense to fill it in, otherwise typing one of the word-break characters will just dismiss the prompt without modifying what you have typed.
Yes, it is annoying. I just press Escape after the space after new. This cancels the Intellisense window that will fill in object.
Is it possible to view variable values in Eclipse when debugging? Right now when I "mouse over" a variable all I get is the definition.
e.g. for [int mLastView] I get [com.company.samples.MyClass.mLastView] instead of 1. The value that was assigned to it.
Also, is there anyway to improve debugging in Eclipse?
For starter: making the breakpoints visible as in VS (see below)?
Eclipse Break Point
Visual Studio Break Point
I posted this over at Stack Overflow and one of the suggestions was to go into Window -> Preferences -> Java -> Editor -> Hovers and select the Variable Values option and assign a modifier.
When I was first trying to resolve this issue, this was one of the options I looked at, but oddly enough, there was no Variable Values preference available, it was missing. Once my “fix” above was applied, it magically appeared:
Click to see the pictureBroken Link
Actually, since eclipse3.4, not only do you see the value of a variable when you pass the mouse over it, you can actually inspect it:
When debugging, hovers for variables have been enhanced to display an object inspector. The inspector will display logical structures according to the toggle setting in the visible Variables or Expressions view.
If you hit the breakpoint while you are debugging, you do see the value of the variable when you mouse over. You can also select an expression, and inspect the value of it's evaluation using the "Inspect" menu option. You can also use the "Variables" view to see the current value of all in-scope variables.
About breakpoint visibility:
Right-click on the right outline of the editor, you'll see some Preferences, and there in Annotations you can select Breakpoints. I personally added Text as Highlighted and some pinky colour. Shame that the highlighting is really buggy, sticks here and there, breaks between lines, etc. But it somehow works for most cases.
(Another shame is that breakpoint bullet is often hidden behind some suggestion icon or what - why they can't make the gutter wider like Idea does, I don't know.)
I got similar but a little different problem with the thread-starter. Sometimes during debugging, I mouse over a variable, I see it current value. Sometimes it's just the definition, like in coding mode. So what caused the first case, what the second?
PS: Of course I can always choose to view Variables (Alt+Shift+Q,V) but it's faster if you have mouse over value instantly.
Thanks
When I press Ctrl+Left mouse button or F12 on a variable I get to the declaration of the variable.
Is there a shortcut like this to get to the class definition of the variable's type? So when I have a variable string functionCode I'd like to click functionCode anywhere in the program and get straight to the object browser showing me the string class.
Of course, this is most useful for self-defined classes and member variables. Sometimes I do not see the type of a member in a method at all - everywhere just var. To get to a class definition I have to go to the variable definition and from there to the class definition.
OK, this is all about saving one click ... but I am lazy ... is it possible?
PS: ReSharper solutions are welcome, too.
The best way is by use of a mix between the code page and the Code Definition Window : Ctrl+W,D.
You can click on the item in code and view it in the Code Definition Window, then click on the base class in the code definition window and by using F12 it will take your code page to the base class definition.
I just realized that is is possible to click Ctrl+Left mouse button or to press F12 on the var-keyword, too ...