In "Java" perspective I can see Java code (between "Package Explorer" and "Outline" - depends on your settings, however it's a kind of default I think).
Then I add "DDMS" perspective and I can't see Java code. I have only "Devices" and "Threads", "Heap" etc. No Java editor in between.
How to show Java code in DDMS perspective?
You can simply switch the editor by setting up a keyboard shortcut to really toggle the editor area visibility. Open the Preferences and navigate to General > Keys *(or press Ctrl/Cmd + Shift + L )* twice to jump right to the Keys preferences).
Search the commands for area and then assign a keyboard shortcut to the Toggle Editor Area Visibility command.
Related
Often when I'm working in Eclipse, I'll be in a perspective (say debug) and doing stuff there, then I want to maximize a file I'm looking at. I double-click it, and work on it, then double-click again to minimize back to the debug perspective.
Is there a hot-key to do this from the keyboard?
Ctrl + M will maximize/restore the editor area.
If you can't remember all shortcuts, then just learn Ctrl + Shift + L. That will show a list of available shortcuts.
Also: http://www.shortcutworld.com/en/win/Eclipse.html#link_11
Link http://www.vogella.com/tutorials/EclipseShortcuts/article.html
Link: Maximize code tab in eclipse shortcut
Once and for all, ban the editor (source code editor) windows from mingling my 'DDMS' perspective. How to do that ?
EDIT:
Eclipse IDE for Java Developers
Version: 1.2.2.20100216-1730
Build id: 20100218-1602
with the only available updates being for Mylin and Android something
You can minimize the editor area using a button in the top-right corner of the editor area. That let's you see that it's minimized in the window frame (along the right side) and easily Restore it.
Alternatively, you can set up a keyboard shortcut to really toggle the editor area visibility. Open the Preferences and navigate to General > Keys (or press Ctrl/Cmd + Shift + L twice to jump right to the Keys preferences). Search the commands for area and then assign a keyboard shortcut to the Toggle Editor Area Visibility command. Note: for older versions of Eclipse (3.5 and older), the command is named Hide Editors.
There is no way to permanently remove the Editor Area from a Perspective; that's fundamental to how Eclipse is designed.
When I'm in Mac OS X, I'm able to switch tabs in my browsers and in TextMate using a Command- keybinding. If I want to go to the first tab, I use Command-1, second tab Command-2, etc.
Is there a key binding in Eclipse based IDEs that will support this same functionality?
While using eclipse on OSX, for switching tabs use the following shortcut
Ctrl + fn + Up Cursor Key for moving towards left tab
Ctrl + fn + Down Cursor Key for moving towards right tab
Here Ctrl is not Command, it is Ctrl just like other OS.
Eclipse doesn't support a tab-index-based navigation. The default editor switch key binding as noted by other responders is CTRL+F6. You can configure this to your liking (Window > Preferences > Keys: Next Editor).
Another way to switch between editors is to use CTRL+E. This presents a dialog with all open editors. You can type in the name of the one in which you are interested. This comes in handy when you have numerous open editor tabs (and Eclipse has hidden tabs it is unable to show).
As far as know the only way to switch between tabs in eclipse is CTRL+F6 and CTRL/PAGEUP, CTRL/PAGEDOWN .
In OsX CTRL become CMD .
If you want to support the OSX based approach for a TabFolder, you will have to implement this yourself. E.g via an installed KeyListener on the tab folder.
If you want to implement this for the editors in the editor area of an Eclipse based IDE, you can do it via a new command with bindings for M1+1 to M1+9... but... please note that M1+1 is usually bound to "quick fix", M1+2 is bound to "quick assist", M1+3 is bound to "quick access", etc... So you will have a conflict...
Some days ago my Eclipse was working fine and a +/- appeared in every block that could be collapsed (functions, classes, etc.)... but now it does appear, and I don't know how to activate that feature again.
It's Eclipse Helios, running on a Gentoo Linux box.
Preferences -> C++ -> Editor -> Folding ?
Make a right click in the editor window and go to preferences there, then only the editor-relevant section of the preferences dialog will appear. This works for JDT, CDT etc...
You can do ( Ctrl + Numpad_Divide ) to enable folding.
Also if you Right Click on the area where the + or - was supposed to be, you can see there is a folding option.
Try this option: Preferences > Java > Editor > Folding > Enable folding
To collapse all code blocks
Ctrl + Shift+ /
To expand all code blocks
Ctrl + Shift+ *
pydev:
To collapse all code blocks :
Ctrl + 0
To collapse all code blocks :
Ctrl + 9
Is there a way to collapse all code blocks in Eclipse?
by #partizanos and #bummi
For Python it is as follows:
collapse all 1 level: Ctrl+9
expand all 1 level: Ctrl+0
collapse current: Ctrl+-
expand current: Ctrl++
Hope that helps.
In Preferences, you'll find General > Keys. It's for setting your keyboard shortcuts.
What I use it for more often, though, is to find stuff in Eclipse. You should see an input box labelled "type filter text." It's as close as Eclipse comes to a search feature for every Eclipse command.
I assume you are using Java, but look under the settings for your particular language.
Under the Window menu, select Preferences.
Under Java->Editor->Folding. Select "Enable Folding".
If you want folding an all your editors, I found you can enable Folding in
Preferences > Editors > Structured Text Editors
Enable Folding
For windows eclipse using java: Windows -> Preferences -> Java -> Editor -> Folding
Unfortunately this will not allow for collapsing code, however if it turns off you can re-enable it to get rid of long comments and imports.
Here you go!
Right Click on + button appeared on numbering strip on left most side --> Folding --> Expand All
Right Click on + button appeared on numbering strip on left most side --> Folding --> Collapse All
This way you can expand and collapse all the methods on the file.
Plus Buttons on numbering strip
Context Menu:
Context Menu
In CFEclipse:
Preferences > CFEclipse > Editor > Code Folding > Initially Collapse column, you can uncheck to see all expanded when opening, or check all boxes to close all when opening a file.
I was using salesforce apex classes with Eclipse Neon 3.3 for Java. I found an option "define folding region" on right click in the editor, I selected the block of code i wanted to collapse and selected this property for that code. Now I am seeing + and - symbol to expand and collapse that block of code
I think I'm missing the elephant in the room but for the life of me I can't find the keyboard shortcut to setting a breakpoint in eclipse when using the pydev plugin.
Things that I've already tried:
Ctrl + Shift + B: does nothing.
Ctrl + F10: brings up the breakpoint context menu where you can select to add breakpoint, remove etc... I don't want to have to scroll through a menu every time I want to use a keyboard shortcut.. .kinda defeats the purpose of a shortcut.
Clicking on the strip on the left hand side of the code: this is the only way that I'm setting it atm, but I'm rather avoid using the mouse if I can.
I'm using pydev 1.6.1 on eclipse 3.6
EDIT (31/08): In light of the two answers by codedevour and Tao, I've tried editing the shortcut but have had no luck with the new shortcut Ctrl + Shift + Alt + B either. Other shortcuts work. I've also tried changing the "When" drop down from In Windows to 'Pydev editor scope' with no effects.
From what the editor is telling me, there is no conflicts with the breakpoint shortcut.
This is a fresh install on two machines, both windows 7 and it's happened on both machines.
Finally found it!
The answer is here:
http://www.mail-archive.com/pydev-users#lists.sourceforge.net/msg04234.html
In short, shortcuts are not set for all perspectives of eclipse.
Whilst in the pydev perspective, go to Window > Customize perspective > Command Groups Availability > Check breakpoints.
That's it!
I was using the pydev perspective (which is what it switches to when you first create a pydev project) however, breakpoint shortcuts are only available in the debug perspective by default so you need to turn the shortcut on... wow that was so NOT obvious!
Ctrl + Shift + B
If this refuses to work, have a look at Window > Preferences > General > Keys and look for overlayed keys which may shadow this shortcut.
Ctrl + Shift + B works for me and I am using pydev 1.6.1 with eclipse 3.6.
Perhaps, you have a conflict with another program? Try change it under menu Window > Preference > General > Keys > Toggle Breakpoint to another keyboard shortcut.
On recent pydev versions:
Go to Window > Perspective > customize perspective...
And in tab "Action Set Availability", check "Breakpoints"