When one hovers over a piece of code, say function call, Eclipse pops out a small window that contains this function declaration. Is it possible to make that window display name of the file in which function is defined?
Don't think so, you can use the links in the popup to quickly show the class in question, so that's almost the same thing.
Related
In VS Code, when writing the name of a method on an object, it seems to take a while for the method menu to pop up. I also am using github copilot, which is great, but it's suggestions often show first and I don't see the menu for the methods until I type some more letters.
Example, let's say I have the following line of code:
my_json = My_Class(id=5).
and I want to type the name of the method that returns some json. Gitlab copilot might suggest something like the following, where the 'get_json' portion is in grey and available for tab complete.
my_json = My_Class(id=5).get_json()
But, let's say the correct name for the method is 'get_object_json', I would have to type the following before the object method/attribute menu pops up
my_json = My_Class(id=5).get_o
Is there a way to manually open the object method/attribute menu? A keyboard shortcut? So that I can open it right after I have typed the period?
Similarly, sometimes I DO want the GitHub suggestion but, right as I hit tab, Pylance IntelliSense replaces the tab complete with the name of some variable or library, or global (i.e. some built-in exception class).
It would be great if there was a way to assign a specific key combo for tab complete of GitHub copilot. Like tab-option, or something, that will only complete the github copilot suggestion, if there is one.
I am using VSCode to debug C++ project with cmake: debug
So, when program stop at a breakpoint, the CALL STACK dialog can show call stack. But the function name which be called attaching with its parameters are always too long, so the source file name will be hide unless one enlarge this dialog by mouse.
In my case, I care more about source file name than function parameters. So I hope function parameters can be hidden, and the source file name can show.
How to make this? Thank you!
I am used to IDEs like Eclipse and Intellij and am trying to completely switch over to Atom. Few of the things I have been unable to figure out (or found packages for):
1. How to view the structure of the file in Atom. For e.g. a shortcut that would show me the classes/methods/variables in a file so that I can jump from one to the other quickly.
2. How to go to the declaration of a method or class? I see "Go to declaration" as one of the options when I right click but it does not seem to do anything -- at least for php files. Am I missing something there?
Thanks.
For 1.) How to view the structure of the file in Atom. For e.g. a shortcut that would show me the classes/methods/variables in a file so that I can jump from one to the other quickly you could use symbols-tree-view which I just discovered because I was searching for the same functionality. You can browse for classes, functions, vars, ... and click on them to get there.
Your question 2.) How to go to the declaration of a method or class? I see "Go to declaration" as one of the options when I right click but it does not seem to do anything -- at least for php files. Am I missing something there? should be answered, too by this, or not?
Try this https://github.com/alibaba/structure-view
Structure View for ATOM editor, just like Outline view in Eclipse or Structure tool window in IDEA / WebStorm, provides quick navigation for symbols of source code with a tree view.
I've had some problems with searching in Xcode, what is the best way to find and locate a method or class within a certain project?
command-shift-O will bring up the "open quickly" box, which searches textually and symbolically.
Press ⇧+⌘+O to open the 'Open Quickly...' dialogue window.
From there you can type any symbol name or filename to quickly zoom around your project.
Unfortunately, it doesn't do wildcard or partial searching (much to my frustration) so you need to know the name (or at least the beginning of the name) for it to be much use.
You can use it to open system symbols or headers too, eg, just type UITableView to view the header for it.
If you know the name of the method or class, a really easy way is to type it in whatever document you are in, then hold command and double-click the text. XCode will jump directly to the definition of whatever you double-clicked (even if it is not part of the project).
Project Find with the type of search set to definitions works well.
If you are trying to find the definition of a class from where it's being used, you can right click over the class name and select "Go to definition"
This will take you to where the class/function is defined
Alternatively there's "Find in project"
Pressing ⇧+⌘+F will open up Project Find. Type in what you want to find, and then in the drop-down next to it select "In Project" and press "find."
Voila! It should group the results by file for you.
Look on the left bar, you have a smart folder called "Project Symbols." When you click on it, it will display all the symbols (eg. classes, methods, properties) available in your project. You can even search in this folder by entering a term in the box in the upper right corner.
In NetBeans I can set up a bunch of templates such that typing psvm tab expands to
public static void main(String[] args) {
}
I see that Eclipse also has templates, but they are triggered in a different way - Ctrl-Space. But I don't see a way that you can have the template automatically triggered -instead, a popup appears and you pick which of the code completions to execute. Is there a way to make Eclipse pick the template that matches automatically, without showing that popup? In Netbeans it's a lot less intrusive to insert these code snippets, and I'm hoping it's possible to do the same in Eclipse. Any experts know for sure?
In Eclipse push Enter after typing the template name. The popup comes up quickly but you can STILL type.
Say your template name is: tr
type: tr[PUSH:ENTER] template will complete without the popup, or even if the popup comes up push enter to finish and make it go away.
Also do not name your templates the same name as a PHP keyword as the keyword is listed first
i.e
template name: function
typing: function
popup will come and list
function
function - Template
and you'll have to select the second one
if you named it: func then type func[enter] it'll autocomplete
I call my templates _m (for the main method), _o for System.out.println, etc. This way I only press the underscore, a letter, ctrl-space, and enter. I completely ignore the popup, since I know there's nothing there except for the one template I want. This way I get it separated.
You can assign a keybinding to templates on the Key preference page. Would this help as it reduces the set shown for a keybinding to templates only?
Also, do you realise typing main cntrl+space does the same as your example?