Tip: For custom commands you want to assign, use a well-known first keystroke to group your commands. Here’s an example of what you might see when you press the first sequence of keystrokes (notice the list in the lower, right corner). This works for any commands assigned a sequence of keystrokes. The list appears in the lower right corner of the window. Alt+Shift+X), wait a second then Eclipse helps you out by listing all commands that have this keystroke as the first part of the sequence. If you forgot your sequence shortcuts, just press the first part (eg. Alt+Shift+X, J (that’s used to run the current class as a Java application) is invoked by pressing Alt+Shift+X, releasing the keys then pressing J. Secondly, Eclipse allows you to assign a sequence of keystrokes to a command. You can sort by Binding to see which keys are already used. These aren’t used as often as Ctrl or Ctrl+Shift. Use combos like Ctrl+Alt, Alt+Shift or even Alt+Shift+Ctrl (easier to press then you think). Firstly, if a key you like is already taken then be creative. But for a complete list, I prefer to go to the preference dialog as I can see all commands that are registered, even if they don’t have shortcuts registered. You can press Ctrl+Shift+L to get a list of registered keyboard shortcuts in the lower right corner. You can be anywhere in the line, not necessarily at the beginning. Move a line up/down, copy a line, delete a line (see this tip for more information)Ĭomment/uncomment the current line or selected lines. Show JavaDoc for the current element (Shift+F2 shows external JavaDoc) If no code is selected, format the whole class.ĭebug/run the last launched application (see this tip for more information)ĭisplay all methods that call a method (call hierarchy) Go to the declaration of the method/class/variableįormat the selected code. Open Quick Access which allows you to run commands and navigate views and dialogs by searching for them, similar to Launchy on Windows or QuickSilver on Mac. Quick Fix list (for resolving errors/warnings) and also Refactoringĭisplay the autocomplete list to select a relevant method/template, etc. There are way too many shortcuts to list and you’ll come across the more useful ones in other tips. Notice that Eclipse shows you which keys conflict with the selected one if their in the same context.īefore continuing the discussion, here are a couple of useful Eclipse keyboard shortcuts you should know.You can assign the same shortcut to two different commands, but if the context differs Eclipse will only execute the one command. The When dropdown on the dialog shows you in which context the command applies (eg.If it doesn’t have a shortcut assigned, then assign one immediately. Browse through them or search to see if your favourite command is listed. All commands registered with Eclipse are listed on the Keys preference page.I just prefer to keep the old shortcut in case someone else wants to take over my keyboard and expects the shortcut to work. You don’t have to copy a command to assign/reassign a shortcut.We’ll use this to assign Ctrl+Tab to switch to the next editor. In the video, I’ll show you how to reassign a key. From here you can see all commands and assign/change their associated keyboard shortcuts. Once I edited this setting, the fonts on Eclipse went back to normal.The main preference page can be found under Window > Preferences > General > Keys (or faster: Press Ctrl+3, type Keys and press Enter). I had also resized the fonts on the following location: Window > Preferences > General > Appearance > Colors and Fonts > Structured Text Editors > Structured Text Editor Text Font (overrides default: Text Font) > Edit I finally figured out what the problem was. No matter what I did on this setting, the font remained the same. I went to the following location: Window > Preferences > General > Appearance > Colors and Fonts > Basic > Text Font > Edit So, when it came time to reset the fonts in Eclipse, I couldn't remember exactly what I did. However, I had to go back and undo all the font resizing that I had previously done on every application. Guess what?! On the next Linux update, the fonts got back to normal. So, I went all over the place resizing the fonts for each application. A while ago I did a Linux update and it messed up the fonts on the entire system. I have Eclipse installed in a Linux machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |