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.
Related
By using ctrl-click on a symbol, VSCode will open the source file and take you to that symbol. If you continue to walk through the code this way, such as going up the constructor heirarchy, is it possible reverse your steps? e.g., in Eclipse, you would use the arrows in the toolbar:
*<- <- -> ->*
Where the asterisks would take you to the last/next edit and the arrows without would take you back through the navigation stack.
Closest I've found is Alt-arrow but that is not what I want for walking through code declarations.
Thanks.
Edit:
I should point out that the navigation to source I'm referring to includes opening source that's attached to a Maven dependency. I do see partial symbol navigation with "navigationBack" but it's not accurate when walking code across split editors or attached source.
I believe you want the Go Back command (workbench.action.navigateBack) for this. It is bound to ctrl- by default.
The corresponding Go forward command navigates forward: ctrlshift-
I have been using IntelliJ till now and have switch to Eclipse because reasons.
In IntelliJ, I can see the file structure by Cmd + F12. It pops ups something like this:
How do I get a similar thing in Eclipse?
Based on your image, I don't think you are looking for the directory structure but rather the code outline which shows things like classes, variables, and methods.
This is found in the following menu: Window-> Show View -> Outline
If you are looking for the directory structure, the package explorer on the lefthand side will show you your project. It might be minimized, the icon is 2 small boxes one on top of each other like so:
click on that and it will show you the workspace.
I use an older plugin called Veloeclipse for editing Velocity templates in Eclipse. There's been no development on this since 2009, which isn't a problem because it's mainly just for syntax highlighting and format validation. The really annoying thing about it, however, is that when I try to do Show In to view the current Velocity template within my Package Explorer or Project Explorer, the only available option is Properties. That's not really useful. I really need to be able to get to the file in one of the regular explorer views.
So I have sort of two questions:
Is there a way to configure this without having to monkey with any code? A configuration file or something? I've grepped through my Eclipse installation and haven't seen anything, but I'm hoping that there's something I'm missing.
So assuming that the answer to my first question is no, how do I go about modifying the plugin code so that it will show more than the Properties view in the Show In menu? Most of what I found on the plugin development wiki comes from the other direction: how to make your view or perspective appear in the Show In menu.
Any help with this would be hugely appreciated!
Try to check the plugin source code. it might do something different than other editors. What I mean is that the show in menu item that you have there is not the usual extension point but a hard coded context menu option.
In Eclipse, is there a way to have a Package Explorer like view that shows the classes without having to open the files individually.
I have this project where many classes are written in same files, and that makes navigating them so annoying. Is there some sort of ClassView in Eclipse that disregards file names.
Regards
This question is currently almost 2 years old, but for anyone ending up here through a Google search (like me):
Eclipse offers a "Java Browsing" perspective which is probably what you want. To see this, go to Window -> Open Perspective, and select Java Browsing.
You can use the Outline view.
Window > Show View > Other. Filter by the word 'Outline' (it's under General folder)
window->show view->outline was helpful for me as this was the only window missing in existing perspective.
Yes you can use F3 key if you're seeing this class, o you can use Ctrl+Shift+T shortcut to open 'Open Type' and write in it the name class
Okay, it's been asked a long time ago. You may be looking for the Breadcrumb. Searching for it and got this question. Suddenly I did it unknowingly and shared here. There is a button beside "Save", "Print" buttons; "Toggle Breadcrumb". :)
In Visual Studio, the editor has a drop-down list of functions in the current class; clicking on one will take me to the top of that function. Is there a way to get a similar behaviour from RubyMine?
I suggested this as a feature request to the folks at JetBrains, and within the day they got back to me to tell me about the 'File Structure Popup' on ^F12 which does very nearly what I want; it's an extra keypress but I can live with it.
If you're working on a Rails project, change the project view to Rails (change the View as: dropdown value)
Online help is here.
It looks like this is as close as it gets to the functionality you're looking for.
Ctrl+0 key in editor will show all methods with search capacity.
The same is drop-down menu Navigate -> File structure.