How to go to an error using only the keyboard in Eclipse? - eclipse

Let's say I have a file with 10 lines and I have a problem with the name of the package (or something) and the cursor is on the last line of the text.
How can I go directly to that line to see what the problem is and what suggestions there are to remove the problem, using a shortcut?
Question: Is there a keyboard-shortcut for this?
Or something like this:
Go to the next error and Go to the previous error.

Windows and Linux
Go to the next error: Ctrl + .
Go to the previous error: Ctrl + ,
Show quick fixes: Ctrl + 1
Mac
Go to the next error: Cmd + .
Go to the previous error: Cmd + ,
Show quick fixes: Cmd + 1

To go to problem within project just type Shift+Alt+Q then press X. It will open the "Problems" window. Now use ↑ or ↓ to select the error/warning and press Enter to go to it.
I know it isn't simple as Crtl+. but it works for a whole project.

To complete the previous answers, you can use the combobox linked to the toolbar buttons for next/previous annotation to set the annotation level.
That makes browsing through errors using ctrl+./ ctrl+ easier,

TO GO TO NEXT ERROR ONLY in eclipse with Ctrl + . command, tick off warnings as shown in screenshot

Related

Open already opened file in a different editor group in Visual Studio Code

What I am looking for is a way to do the following in Visual Studio Code:
Go to Definition on a symbol (which often opens a new file in the same editor group)
Open this newly opened file in a editor group next to current
... and switch back to the original file
Is there a command / key binding that would let me do 2nd bullet item?
Short Answer
Ctrl + Alt + → does that on Windows.
Details
This is my normal flow:
F12 to go to a symbol definition.
Ctrl + Alt + → to open the file on the right.
On Linux or iOS
Find the equivalent shortcut by opening File > Preferences > Keyboard Shortcuts (or running Open Keyboard Shortcuts in the command palette), and searching for these two commands:
workbench.action.moveEditorToNextGroup
workbench.action.moveEditorToPreviousGroup
If you are here, like me, looking for a way to open files in the next group, by Ctrl + Click.
Then adding Alt to the combination may do the trick. My VSCode version is 1.60.
!IMPORTANT: The new tab opened via Ctrl + Alt + Click, will always be to the right of the current. So, if you have already opened two groups, then move the tab to the left to have new tabs at the right, otherwise it will create third group.
in mac os you can use this key binding cmd + \
in windows you can use this key binding CTRL + \
I'm pretty sure what you're looking for is a combination of the answers above. I find this works:
Ctrl + \ View: Split Editor
Ctrl + Alt + → View: Move Editor into Next Group
Equivalently
(no default keybinding) View: Split Editor into Right Group
Caveat: if the file is already open in the other editor group, then it will be opened (not "cloned"). There may be a configuration setting to alter this behavior, but I couldn't find one quickly.
The result looks as follows. Suppose you are in some file on the left, and there is another editor group on the right (e.g. after executing Ctrl + \). After running the two commands above, then the currently open file will still be open on the left, but will also be open in the editor group on the right.
Tip: if you don't feel like assigning a keybinding, but would like to access the command (relatively) quickly, just type
Ctrl + Shift + P srg

Eclipse keyboard shortcut for error

Is there a keyboard shortcut to view below error without having to hover over my mouse.
Moving the cursor to some red-underlined text, in my Eclipse the error message is then also shown in the status bar (bottom-left of the window). It's not always exactly the same text as is given in the mouse-over-popup, but usually close enough to figure out what's wrong.
Going to the error with Cmd/Ctrl+. should place the cursor at the right spot to show the error message in the status bar.
Windows and Linux
Go to the next error: Ctrl + .
Go to the previous error: Ctrl + ,
Show quick fixes: Ctrl + 1
Mac
Go to the next error: Cmd + .
Go to the previous error: Cmd + ,
Show quick fixes: Cmd + 1
Found the answer here
Go to the next error: Ctrl + .
Go to the previous error: Ctrl + ,
Show quick fixes: Ctrl + 1
Show suggestions and quick fixes: F2
So F2 servers the purpose of bubble which shows suggestions and on clicking quick fixes for multiple error on the same line. With F2 one just have to propagate through each error.

comment lines with syntax error

I am using Eclipse Java EE IDE for WebDevelopers in Version Luna (4.4.2).
Is there any way to comment lines with syntax error via shortcut automatically? I mean not just CTRL + / on every line (with syntax errors) manually.
There is no one short cut to do what you require, but you could use a combination.
Windows Short Cuts
Go to the next error: Ctrl + .
Go to the previous error: Ctrl + ,
Then
Comment that error: Ctrl + /
Extra
If you really wanted you could download a add-on and create a macro to automate the two short cuts into one.
Stackoverflow - Is there a Macro Recorder for Eclipse?
Thought I would chime in with some helpful shortcuts from my other answer:
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

How to come out of while loop during debugging

During debugging in Eclipse , my code went into the while loop ( I dont want to loop until the condition is met )
so please tell me how to come out of while loop during debugging ??
And i see that F7 is disabled under Debug Menu
please see the screen shot here
http://tinypic.com/view.php?pic=wajzeu&s=5
You can select the line that is just outside your while loop in the code editor, then right click and choose Run to Line in the context menu (Or simply use the default hotkey Ctrl + R )
Pressing ctrl+R is the correct option but if your break point is on a line which is inside the for loop, then you will have to first remove the break point and then press ctrl+R on the line on which you want the control to land. I faced this issue while debugging.

Is there a keyboard shortcut to "untab" (move a block of code to the left) in Eclipse or Aptana Studio?

It's so easy to select a block of code and tab out, but how about the reverse?
Currently, I just search and replace for white space at the beginning of the line. Is there anything faster?
In Visual Studio and most other half decent IDEs you can simply do SHIFT+TAB. It does the opposite of just TAB.
I would think and hope that the IDEs you mention support this as well.
Shift-tab outdents again :)
The standard shortcut keys are covered in Standard Accelerators.
You'll find many of the more esoteric ones on FAQ What editor keyboard shortcuts are available?.
Here is a general answer for untab:
In Python IDLE: Ctrl + [
In Eclipse: Shift + Tab
In Visual Studio: Shift + Tab
In general, Shift + Tab works for any environment.
This workaround works most of the time. It uses Eclipse's 'smart insert' features instead:
Control + X to erase the selected block of text, and keep it for pasting.
Control + Shift + Enter, to open a new line for editing above the one you are at.
You might want to adjust the tabbing position at this point. This is where tabbing will start, unless you are at the beginning of the line.
Control + V to paste back the buffer.
I hope this helps until Shift + TAB is implemented in Eclipse.
Shift + Tab does that in Flex Builder (based on Eclipse), so it hopefully should work in regular Eclipse :)
In PyCharm, just use Shift + Tab to move a block of code left.
You can do this by going to the Window menu → Preferences, and then open the General list. Choose Keys.
Scroll down the list of keys until you see "Shift Left". Click that. Below that, you'll see some boxes, one of which lets you bind a key. It won't accept Shift + Tab, so I bound it to Shift + `. Apply Apply and Close, and you're all set.
Yes, in PyCharm: Shift + Tab works fine.
You can also change the shortcut. Use the Command + K, Command + S shortcuts to open the Keyboard Shortcut menu. Search for the "tab" and find the "outdent" in the list.